xiaowang/kirby/panel/dist/js/vendor.js
2022-12-19 16:26:24 +01:00

11 lines
341 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* Vue.js v2.7.14
* (c) 2014-2022 Evan You
* Released under the MIT License.
*/
var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function i(t){return!0===t}function o(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function s(t){return"function"==typeof t}function a(t){return null!==t&&"object"==typeof t}var l=Object.prototype.toString;function c(t){return"[object Object]"===l.call(t)}function u(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function f(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function h(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var m=p("slot,component",!0),g=p("key,ref,slot,slot-scope,is");function v(t,e){var n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}var y=Object.prototype.hasOwnProperty;function b(t,e){return y.call(t,e)}function w(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var x=/-(\w)/g,k=w((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),S=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),O=/\B([A-Z])/g,_=w((function(t){return t.replace(O,"-$1").toLowerCase()}));var M=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function C(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function $(t,e){for(var n in e)t[n]=e[n];return t}function N(t){for(var e={},n=0;n<t.length;n++)t[n]&&$(e,t[n]);return e}function T(t,e,n){}var D=function(t,e,n){return!1},A=function(t){return t};function E(t,e){if(t===e)return!0;var n=a(t),r=a(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every((function(t,n){return E(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(i||o)return!1;var s=Object.keys(t),l=Object.keys(e);return s.length===l.length&&s.every((function(n){return E(t[n],e[n])}))}catch(c){return!1}}function P(t,e){for(var n=0;n<t.length;n++)if(E(t[n],e))return n;return-1}function I(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function R(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}var z=["component","directive","filter"],j=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:D,isReservedAttr:D,isUnknownElement:D,getTagNamespace:T,parsePlatformTagName:A,mustUseProp:D,async:!0,_lifecycleHooks:j},L=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function B(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function V(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var q=new RegExp("[^".concat(L.source,".$_\\d]"));var J="__proto__"in{},W="undefined"!=typeof window,H=W&&window.navigator.userAgent.toLowerCase(),K=H&&/msie|trident/.test(H),U=H&&H.indexOf("msie 9.0")>0,Y=H&&H.indexOf("edge/")>0;H&&H.indexOf("android");var G=H&&/iphone|ipad|ipod|ios/.test(H);H&&/chrome\/\d+/.test(H),H&&/phantomjs/.test(H);var Z,X=H&&H.match(/firefox\/(\d+)/),Q={}.watch,tt=!1;if(W)try{var et={};Object.defineProperty(et,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,et)}catch(Tg){}var nt=function(){return void 0===Z&&(Z=!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Z},rt=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,st="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);ot="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var at=null;function lt(t){void 0===t&&(t=null),t||at&&at._scope.off(),at=t,t&&t._scope.on()}var ct=function(){function t(t,e,n,r,i,o,s,a){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),ut=function(t){void 0===t&&(t="");var e=new ct;return e.text=t,e.isComment=!0,e};function dt(t){return new ct(void 0,void 0,void 0,String(t))}function ft(t){var e=new ct(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var ht=0,pt=[],mt=function(){function t(){this._pending=!1,this.id=ht++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,pt.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.filter((function(t){return t})),n=0,r=e.length;n<r;n++){e[n].update()}},t}();mt.target=null;var gt=[];function vt(t){gt.push(t),mt.target=t}function yt(){gt.pop(),mt.target=gt[gt.length-1]}var bt=Array.prototype,wt=Object.create(bt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=bt[t];V(wt,t,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o=e.apply(this,n),s=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&s.observeArray(i),s.dep.notify(),o}))}));var xt=Object.getOwnPropertyNames(wt),kt={},St=!0;function Ot(t){St=t}var _t={notify:T,depend:T,addSub:T,removeSub:T},Mt=function(){function t(t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.value=t,this.shallow=n,this.mock=r,this.dep=r?_t:new mt,this.vmCount=0,V(t,"__ob__",this),e(t)){if(!r)if(J)t.__proto__=wt;else for(var i=0,o=xt.length;i<o;i++){V(t,a=xt[i],wt[a])}n||this.observeArray(t)}else{var s=Object.keys(t);for(i=0;i<s.length;i++){var a;$t(t,a=s[i],kt,void 0,n,r)}}}return t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Ct(t[e],!1,this.mock)},t}();function Ct(t,n,r){return t&&b(t,"__ob__")&&t.__ob__ instanceof Mt?t.__ob__:!St||!r&&nt()||!e(t)&&!c(t)||!Object.isExtensible(t)||t.__v_skip||Pt(t)||t instanceof ct?void 0:new Mt(t,n,r)}function $t(t,n,r,i,o,s){var a=new mt,l=Object.getOwnPropertyDescriptor(t,n);if(!l||!1!==l.configurable){var c=l&&l.get,u=l&&l.set;c&&!u||r!==kt&&2!==arguments.length||(r=t[n]);var d=!o&&Ct(r,!1,s);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var n=c?c.call(t):r;return mt.target&&(a.depend(),d&&(d.dep.depend(),e(n)&&Dt(n))),Pt(n)&&!o?n.value:n},set:function(e){var n=c?c.call(t):r;if(R(n,e)){if(u)u.call(t,e);else{if(c)return;if(!o&&Pt(n)&&!Pt(e))return void(n.value=e);r=e}d=!o&&Ct(e,!1,s),a.notify()}}}),a}}function Nt(t,n,r){if(!Et(t)){var i=t.__ob__;return e(t)&&u(n)?(t.length=Math.max(t.length,n),t.splice(n,1,r),i&&!i.shallow&&i.mock&&Ct(r,!1,!0),r):n in t&&!(n in Object.prototype)?(t[n]=r,r):t._isVue||i&&i.vmCount?r:i?($t(i.value,n,r,void 0,i.shallow,i.mock),i.dep.notify(),r):(t[n]=r,r)}}function Tt(t,n){if(e(t)&&u(n))t.splice(n,1);else{var r=t.__ob__;t._isVue||r&&r.vmCount||Et(t)||b(t,n)&&(delete t[n],r&&r.dep.notify())}}function Dt(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Dt(n)}function At(t){return function(t,e){Et(t)||Ct(t,e,nt())}(t,!0),V(t,"__v_isShallow",!0),t}function Et(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!0!==t.__v_isRef)}function It(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];if(Pt(t))return t.value;var r=t&&t.__ob__;return r&&r.dep.depend(),t},set:function(t){var r=e[n];Pt(r)&&!Pt(t)?r.value=t:e[n]=t}})}var Rt=w((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function zt(t,n){function r(){var t=r.fns;if(!e(t))return He(t,null,arguments,n,"v-on handler");for(var i=t.slice(),o=0;o<i.length;o++)He(i[o],null,arguments,n,"v-on handler")}return r.fns=t,r}function jt(t,e,r,o,s,a){var l,c,u,d;for(l in t)c=t[l],u=e[l],d=Rt(l),n(c)||(n(u)?(n(c.fns)&&(c=t[l]=zt(c,a)),i(d.once)&&(c=t[l]=s(d.name,c,d.capture)),r(d.name,c,d.capture,d.passive,d.params)):c!==u&&(u.fns=c,t[l]=u));for(l in e)n(t[l])&&o((d=Rt(l)).name,e[l],d.capture)}function Ft(t,e,o){var s;t instanceof ct&&(t=t.data.hook||(t.data.hook={}));var a=t[e];function l(){o.apply(this,arguments),v(s.fns,l)}n(a)?s=zt([l]):r(a.fns)&&i(a.merged)?(s=a).fns.push(l):s=zt([a,l]),s.merged=!0,t[e]=s}function Lt(t,e,n,i,o){if(r(e)){if(b(e,n))return t[n]=e[n],o||delete e[n],!0;if(b(e,i))return t[n]=e[i],o||delete e[i],!0}return!1}function Bt(t){return o(t)?[dt(t)]:e(t)?qt(t):void 0}function Vt(t){return r(t)&&r(t.text)&&!1===t.isComment}function qt(t,s){var a,l,c,u,d=[];for(a=0;a<t.length;a++)n(l=t[a])||"boolean"==typeof l||(u=d[c=d.length-1],e(l)?l.length>0&&(Vt((l=qt(l,"".concat(s||"","_").concat(a)))[0])&&Vt(u)&&(d[c]=dt(u.text+l[0].text),l.shift()),d.push.apply(d,l)):o(l)?Vt(u)?d[c]=dt(u.text+l):""!==l&&d.push(dt(l)):Vt(l)&&Vt(u)?d[c]=dt(u.text+l.text):(i(t._isVList)&&r(l.tag)&&n(l.key)&&r(s)&&(l.key="__vlist".concat(s,"_").concat(a,"__")),d.push(l)));return d}function Jt(t,n,l,c,u,d){return(e(l)||o(l))&&(u=c,c=l,l=void 0),i(d)&&(u=2),function(t,n,i,o,l){if(r(i)&&r(i.__ob__))return ut();r(i)&&r(i.is)&&(n=i.is);if(!n)return ut();e(o)&&s(o[0])&&((i=i||{}).scopedSlots={default:o[0]},o.length=0);2===l?o=Bt(o):1===l&&(o=function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(o));var c,u;if("string"==typeof n){var d=void 0;u=t.$vnode&&t.$vnode.ns||F.getTagNamespace(n),c=F.isReservedTag(n)?new ct(F.parsePlatformTagName(n),i,o,void 0,void 0,t):i&&i.pre||!r(d=Fn(t.$options,"components",n))?new ct(n,i,o,void 0,void 0,t):Nn(d,i,t,o,n)}else c=Nn(n,i,t,o);return e(c)?c:r(c)?(r(u)&&Wt(c,u),r(i)&&function(t){a(t.style)&&an(t.style);a(t.class)&&an(t.class)}(i),c):ut()}(t,n,l,c,u)}function Wt(t,e,o){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,o=!0),r(t.children))for(var s=0,a=t.children.length;s<a;s++){var l=t.children[s];r(l.tag)&&(n(l.ns)||i(o)&&"svg"!==l.tag)&&Wt(l,e,o)}}function Ht(t,n){var i,o,s,l,c=null;if(e(t)||"string"==typeof t)for(c=new Array(t.length),i=0,o=t.length;i<o;i++)c[i]=n(t[i],i);else if("number"==typeof t)for(c=new Array(t),i=0;i<t;i++)c[i]=n(i+1,i);else if(a(t))if(st&&t[Symbol.iterator]){c=[];for(var u=t[Symbol.iterator](),d=u.next();!d.done;)c.push(n(d.value,c.length)),d=u.next()}else for(s=Object.keys(t),c=new Array(s.length),i=0,o=s.length;i<o;i++)l=s[i],c[i]=n(t[l],l,i);return r(c)||(c=[]),c._isVList=!0,c}function Kt(t,e,n,r){var i,o=this.$scopedSlots[t];o?(n=n||{},r&&(n=$($({},r),n)),i=o(n)||(s(e)?e():e)):i=this.$slots[t]||(s(e)?e():e);var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function Ut(t){return Fn(this.$options,"filters",t)||A}function Yt(t,n){return e(t)?-1===t.indexOf(n):t!==n}function Gt(t,e,n,r,i){var o=F.keyCodes[e]||n;return i&&r&&!F.keyCodes[e]?Yt(i,r):o?Yt(o,t):r?_(r)!==e:void 0===t}function Zt(t,n,r,i,o){if(r)if(a(r)){e(r)&&(r=N(r));var s=void 0,l=function(e){if("class"===e||"style"===e||g(e))s=t;else{var a=t.attrs&&t.attrs.type;s=i||F.mustUseProp(n,a,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var l=k(e),c=_(e);l in s||c in s||(s[e]=r[e],o&&((t.on||(t.on={}))["update:".concat(e)]=function(t){r[e]=t}))};for(var c in r)l(c)}else;return t}function Xt(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||te(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),"__static__".concat(t),!1),r}function Qt(t,e,n){return te(t,"__once__".concat(e).concat(n?"_".concat(n):""),!0),t}function te(t,n,r){if(e(t))for(var i=0;i<t.length;i++)t[i]&&"string"!=typeof t[i]&&ee(t[i],"".concat(n,"_").concat(i),r);else ee(t,n,r)}function ee(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function ne(t,e){if(e)if(c(e)){var n=t.on=t.on?$({},t.on):{};for(var r in e){var i=n[r],o=e[r];n[r]=i?[].concat(i,o):o}}else;return t}function re(t,n,r,i){n=n||{$stable:!r};for(var o=0;o<t.length;o++){var s=t[o];e(s)?re(s,n,r):s&&(s.proxy&&(s.fn.proxy=!0),n[s.key]=s.fn)}return i&&(n.$key=i),n}function ie(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function oe(t,e){return"string"==typeof t?e+t:t}function se(t){t._o=Qt,t._n=h,t._s=f,t._l=Ht,t._t=Kt,t._q=E,t._i=P,t._m=Xt,t._f=Ut,t._k=Gt,t._b=Zt,t._v=dt,t._e=ut,t._u=re,t._g=ne,t._d=ie,t._p=oe}function ae(t,e){if(!t||!t.length)return{};for(var n={},r=0,i=t.length;r<i;r++){var o=t[r],s=o.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,o.context!==e&&o.fnContext!==e||!s||null==s.slot)(n.default||(n.default=[])).push(o);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var c in n)n[c].every(le)&&delete n[c];return n}function le(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ce(t){return t.isComment&&t.asyncFactory}function ue(e,n,r,i){var o,s=Object.keys(r).length>0,a=n?!!n.$stable:!s,l=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(a&&i&&i!==t&&l===i.$key&&!s&&!i.$hasNormal)return i;for(var c in o={},n)n[c]&&"$"!==c[0]&&(o[c]=de(e,r,c,n[c]))}else o={};for(var u in r)u in o||(o[u]=fe(r,u));return n&&Object.isExtensible(n)&&(n._normalized=o),V(o,"$stable",a),V(o,"$key",l),V(o,"$hasNormal",s),o}function de(t,n,r,i){var o=function(){var n=at;lt(t);var r=arguments.length?i.apply(null,arguments):i({}),o=(r=r&&"object"==typeof r&&!e(r)?[r]:Bt(r))&&r[0];return lt(n),r&&(!o||1===r.length&&o.isComment&&!ce(o))?void 0:r};return i.proxy&&Object.defineProperty(n,r,{get:o,enumerable:!0,configurable:!0}),o}function fe(t,e){return function(){return t[e]}}function he(e){var n=e.$options,r=n.setup;if(r){var i=e._setupContext=function(e){return{get attrs(){if(!e._attrsProxy){var n=e._attrsProxy={};V(n,"_v_attr_proxy",!0),pe(n,e.$attrs,t,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||pe(e._listenersProxy={},e.$listeners,t,e,"$listeners");return e._listenersProxy},get slots(){return function(t){t._slotsProxy||ge(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:M(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return It(e,t,n)}))}}}(e);lt(e),vt();var o=He(r,null,[e._props||At({}),i],e,"setup");if(yt(),lt(),s(o))n.render=o;else if(a(o))if(e._setupState=o,o.__sfc){var l=e._setupProxy={};for(var c in o)"__sfc"!==c&&It(l,o,c)}else for(var c in o)B(c)||It(e,o,c)}}function pe(t,e,n,r,i){var o=!1;for(var s in e)s in t?e[s]!==n[s]&&(o=!0):(o=!0,me(t,s,r,i));for(var s in t)s in e||(o=!0,delete t[s]);return o}function me(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function ge(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var ve,ye=null;function be(t,e){return(t.__esModule||st&&"Module"===t[Symbol.toStringTag])&&(t=t.default),a(t)?e.extend(t):t}function we(t){if(e(t))for(var n=0;n<t.length;n++){var i=t[n];if(r(i)&&(r(i.componentOptions)||ce(i)))return i}}function xe(t,e){ve.$on(t,e)}function ke(t,e){ve.$off(t,e)}function Se(t,e){var n=ve;return function r(){var i=e.apply(null,arguments);null!==i&&n.$off(t,r)}}function Oe(t,e,n){ve=t,jt(e,n||{},xe,ke,Se,t),ve=void 0}var _e=null;function Me(t){var e=_e;return _e=t,function(){_e=e}}function Ce(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function $e(t,e){if(e){if(t._directInactive=!1,Ce(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)$e(t.$children[n]);Te(t,"activated")}}function Ne(t,e){if(!(e&&(t._directInactive=!0,Ce(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)Ne(t.$children[n]);Te(t,"deactivated")}}function Te(t,e,n,r){void 0===r&&(r=!0),vt();var i=at;r&&lt(t);var o=t.$options[e],s="".concat(e," hook");if(o)for(var a=0,l=o.length;a<l;a++)He(o[a],t,n||null,t,s);t._hasHookEvent&&t.$emit("hook:"+e),r&&lt(i),yt()}var De=[],Ae=[],Ee={},Pe=!1,Ie=!1,Re=0;var ze=0,je=Date.now;if(W&&!K){var Fe=window.performance;Fe&&"function"==typeof Fe.now&&je()>document.createEvent("Event").timeStamp&&(je=function(){return Fe.now()})}var Le,Be=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Ve(){var t,e;for(ze=je(),Ie=!0,De.sort(Be),Re=0;Re<De.length;Re++)(t=De[Re]).before&&t.before(),e=t.id,Ee[e]=null,t.run();var n=Ae.slice(),r=De.slice();Re=De.length=Ae.length=0,Ee={},Pe=Ie=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,$e(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Te(r,"updated")}}(r),function(){for(var t=0;t<pt.length;t++){var e=pt[t];e.subs=e.subs.filter((function(t){return t})),e._pending=!1}pt.length=0}(),rt&&F.devtools&&rt.emit("flush")}var qe=function(){function t(t){void 0===t&&(t=!1),this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Le,!t&&Le&&(this.index=(Le.scopes||(Le.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=Le;try{return Le=this,t()}finally{Le=e}}},t.prototype.on=function(){Le=this},t.prototype.off=function(){Le=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},t}();function Je(t,e,n){return Jt(at,t,e,n,2,!0)}function We(t,e,n){vt();try{if(e)for(var r=e;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,t,e,n))return}catch(Tg){Ke(Tg,r,"errorCaptured hook")}}Ke(t,e,n)}finally{yt()}}function He(t,e,n,r,i){var o;try{(o=n?t.apply(e,n):t.call(e))&&!o._isVue&&d(o)&&!o._handled&&(o.catch((function(t){return We(t,r,i+" (Promise/async)")})),o._handled=!0)}catch(Tg){We(Tg,r,i)}return o}function Ke(t,e,n){if(F.errorHandler)try{return F.errorHandler.call(null,t,e,n)}catch(Tg){Tg!==t&&Ue(Tg)}Ue(t)}function Ue(t,e,n){if(!W||"undefined"==typeof console)throw t;console.error(t)}var Ye,Ge=!1,Ze=[],Xe=!1;function Qe(){Xe=!1;var t=Ze.slice(0);Ze.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&it(Promise)){var tn=Promise.resolve();Ye=function(){tn.then(Qe),G&&setTimeout(T)},Ge=!0}else if(K||"undefined"==typeof MutationObserver||!it(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Ye="undefined"!=typeof setImmediate&&it(setImmediate)?function(){setImmediate(Qe)}:function(){setTimeout(Qe,0)};else{var en=1,nn=new MutationObserver(Qe),rn=document.createTextNode(String(en));nn.observe(rn,{characterData:!0}),Ye=function(){en=(en+1)%2,rn.data=String(en)},Ge=!0}function on(t,e){var n;if(Ze.push((function(){if(t)try{t.call(e)}catch(Tg){We(Tg,e,"nextTick")}else n&&n(e)})),Xe||(Xe=!0,Ye()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}var sn=new ot;function an(t){return ln(t,sn),sn.clear(),t}function ln(t,n){var r,i,o=e(t);if(!(!o&&!a(t)||t.__v_skip||Object.isFrozen(t)||t instanceof ct)){if(t.__ob__){var s=t.__ob__.dep.id;if(n.has(s))return;n.add(s)}if(o)for(r=t.length;r--;)ln(t[r],n);else if(Pt(t))ln(t.value,n);else for(r=(i=Object.keys(t)).length;r--;)ln(t[i[r]],n)}}var cn=0,un=function(){function t(t,e,n,r,i){var o,a;o=this,void 0===(a=Le&&!Le._vm?Le:t?t._scope:void 0)&&(a=Le),a&&a.active&&a.effects.push(o),(this.vm=t)&&i&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++cn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ot,this.newDepIds=new ot,this.expression="",s(e)?this.getter=e:(this.getter=function(t){if(!q.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=T)),this.value=this.lazy?void 0:this.get()}return t.prototype.get=function(){var t;vt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Tg){if(!this.user)throw Tg;We(Tg,e,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&an(t),yt(),this.cleanupDeps()}return t},t.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},t.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},t.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==Ee[e]&&(t!==mt.target||!t.noRecurse)){if(Ee[e]=!0,Ie){for(var n=De.length-1;n>Re&&De[n].id>t.id;)n--;De.splice(n+1,0,t)}else De.push(t);Pe||(Pe=!0,on(Ve))}}(this)},t.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||a(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'.concat(this.expression,'"');He(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},t.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},t.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&v(this.vm._scope.effects,this),this.active){for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},t}(),dn={enumerable:!0,configurable:!0,get:T,set:T};function fn(t,e,n){dn.get=function(){return this[e][n]},dn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,dn)}function hn(t){var n=t.$options;if(n.props&&function(t,e){var n=t.$options.propsData||{},r=t._props=At({}),i=t.$options._propKeys=[];t.$parent&&Ot(!1);var o=function(o){i.push(o);var s=Ln(o,e,n,t);$t(r,o,s),o in t||fn(t,"_props",o)};for(var s in e)o(s);Ot(!0)}(t,n.props),he(t),n.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?T:M(e[n],t)}(t,n.methods),n.data)!function(t){var e=t.$options.data;c(e=t._data=s(e)?function(t,e){vt();try{return t.call(e,e)}catch(Tg){return We(Tg,e,"data()"),{}}finally{yt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var i=n.length;for(;i--;){var o=n[i];r&&b(r,o)||B(o)||fn(t,"_data",o)}var a=Ct(e);a&&a.vmCount++}(t);else{var r=Ct(t._data={});r&&r.vmCount++}n.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=nt();for(var i in e){var o=e[i],a=s(o)?o:o.get;r||(n[i]=new un(t,a||T,T,pn)),i in t||mn(t,i,o)}}(t,n.computed),n.watch&&n.watch!==Q&&function(t,n){for(var r in n){var i=n[r];if(e(i))for(var o=0;o<i.length;o++)yn(t,r,i[o]);else yn(t,r,i)}}(t,n.watch)}var pn={lazy:!0};function mn(t,e,n){var r=!nt();s(n)?(dn.get=r?gn(e):vn(n),dn.set=T):(dn.get=n.get?r&&!1!==n.cache?gn(e):vn(n.get):T,dn.set=n.set||T),Object.defineProperty(t,e,dn)}function gn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function vn(t){return function(){return t.call(this,this)}}function yn(t,e,n,r){return c(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function bn(t){var e=t.$options.provide;if(e){var n=s(e)?e.call(t):e;if(!a(n))return;for(var r=function(t){var e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}(t),i=st?Reflect.ownKeys(n):Object.keys(n),o=0;o<i.length;o++){var l=i[o];Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(n,l))}}}function wn(t,e){if(t){for(var n=Object.create(null),r=st?Reflect.ownKeys(t):Object.keys(t),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){var a=t[o].from;if(a in e._provided)n[o]=e._provided[a];else if("default"in t[o]){var l=t[o].default;n[o]=s(l)?l.call(e):l}}}return n}}var xn=0;function kn(t){var e=t.options;if(t.super){var n=kn(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var i in n)n[i]!==r[i]&&(e||(e={}),e[i]=n[i]);return e}(t);r&&$(t.extendOptions,r),(e=t.options=jn(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Sn(n,r,o,s,a){var l,c=this,u=a.options;b(s,"_uid")?(l=Object.create(s))._original=s:(l=s,s=s._original);var d=i(u._compiled),f=!d;this.data=n,this.props=r,this.children=o,this.parent=s,this.listeners=n.on||t,this.injections=wn(u.inject,s),this.slots=function(){return c.$slots||ue(s,n.scopedSlots,c.$slots=ae(o,s)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ue(s,n.scopedSlots,this.slots())}}),d&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ue(s,n.scopedSlots,this.$slots)),u._scopeId?this._c=function(t,n,r,i){var o=Jt(l,t,n,r,i,f);return o&&!e(o)&&(o.fnScopeId=u._scopeId,o.fnContext=s),o}:this._c=function(t,e,n,r){return Jt(l,t,e,n,r,f)}}function On(t,e,n,r,i){var o=ft(t);return o.fnContext=n,o.fnOptions=r,e.slot&&((o.data||(o.data={})).slot=e.slot),o}function _n(t,e){for(var n in e)t[k(n)]=e[n]}function Mn(t){return t.name||t.__name||t._componentTag}se(Sn.prototype);var Cn={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;Cn.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},i=t.data.inlineTemplate;r(i)&&(n.render=i.render,n.staticRenderFns=i.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,_e)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,i,o){var s=i.data.scopedSlots,a=e.$scopedSlots,l=!!(s&&!s.$stable||a!==t&&!a.$stable||s&&e.$scopedSlots.$key!==s.$key||!s&&e.$scopedSlots.$key),c=!!(o||e.$options._renderChildren||l),u=e.$vnode;e.$options._parentVnode=i,e.$vnode=i,e._vnode&&(e._vnode.parent=i),e.$options._renderChildren=o;var d=i.data.attrs||t;e._attrsProxy&&pe(e._attrsProxy,d,u.data&&u.data.attrs||t,e,"$attrs")&&(c=!0),e.$attrs=d,r=r||t;var f=e.$options._parentListeners;if(e._listenersProxy&&pe(e._listenersProxy,r,f||t,e,"$listeners"),e.$listeners=e.$options._parentListeners=r,Oe(e,r,f),n&&e.$options.props){Ot(!1);for(var h=e._props,p=e.$options._propKeys||[],m=0;m<p.length;m++){var g=p[m],v=e.$options.props;h[g]=Ln(g,v,n,e)}Ot(!0),e.$options.propsData=n}c&&(e.$slots=ae(o,i.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Te(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,Ae.push(e)):$e(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Ne(e,!0):e.$destroy())}},$n=Object.keys(Cn);function Nn(o,s,l,c,u){if(!n(o)){var f=l.$options._base;if(a(o)&&(o=f.extend(o)),"function"==typeof o){var h;if(n(o.cid)&&(o=function(t,e){if(i(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;var o=ye;if(o&&r(t.owners)&&-1===t.owners.indexOf(o)&&t.owners.push(o),i(t.loading)&&r(t.loadingComp))return t.loadingComp;if(o&&!r(t.owners)){var s=t.owners=[o],l=!0,c=null,u=null;o.$on("hook:destroyed",(function(){return v(s,o)}));var f=function(t){for(var e=0,n=s.length;e<n;e++)s[e].$forceUpdate();t&&(s.length=0,null!==c&&(clearTimeout(c),c=null),null!==u&&(clearTimeout(u),u=null))},h=I((function(n){t.resolved=be(n,e),l?s.length=0:f(!0)})),p=I((function(e){r(t.errorComp)&&(t.error=!0,f(!0))})),m=t(h,p);return a(m)&&(d(m)?n(t.resolved)&&m.then(h,p):d(m.component)&&(m.component.then(h,p),r(m.error)&&(t.errorComp=be(m.error,e)),r(m.loading)&&(t.loadingComp=be(m.loading,e),0===m.delay?t.loading=!0:c=setTimeout((function(){c=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,f(!1))}),m.delay||200)),r(m.timeout)&&(u=setTimeout((function(){u=null,n(t.resolved)&&p(null)}),m.timeout)))),l=!1,t.loading?t.loadingComp:t.resolved}}(h=o,f),void 0===o))return function(t,e,n,r,i){var o=ut();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}(h,s,l,c,u);s=s||{},kn(o),r(s.model)&&function(t,n){var i=t.model&&t.model.prop||"value",o=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[i]=n.model.value;var s=n.on||(n.on={}),a=s[o],l=n.model.callback;r(a)?(e(a)?-1===a.indexOf(l):a!==l)&&(s[o]=[l].concat(a)):s[o]=l}(o.options,s);var p=function(t,e,i){var o=e.options.props;if(!n(o)){var s={},a=t.attrs,l=t.props;if(r(a)||r(l))for(var c in o){var u=_(c);Lt(s,l,c,u,!0)||Lt(s,a,c,u,!1)}return s}}(s,o);if(i(o.options.functional))return function(n,i,o,s,a){var l=n.options,c={},u=l.props;if(r(u))for(var d in u)c[d]=Ln(d,u,i||t);else r(o.attrs)&&_n(c,o.attrs),r(o.props)&&_n(c,o.props);var f=new Sn(o,c,a,s,n),h=l.render.call(null,f._c,f);if(h instanceof ct)return On(h,o,f.parent,l);if(e(h)){for(var p=Bt(h)||[],m=new Array(p.length),g=0;g<p.length;g++)m[g]=On(p[g],o,f.parent,l);return m}}(o,p,s,l,c);var m=s.on;if(s.on=s.nativeOn,i(o.options.abstract)){var g=s.slot;s={},g&&(s.slot=g)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<$n.length;n++){var r=$n[n],i=e[r],o=Cn[r];i===o||i&&i._merged||(e[r]=i?Tn(o,i):o)}}(s);var y=Mn(o.options)||u;return new ct("vue-component-".concat(o.cid).concat(y?"-".concat(y):""),s,void 0,void 0,void 0,l,{Ctor:o,propsData:p,listeners:m,tag:u,children:c},h)}}}function Tn(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var Dn=T,An=F.optionMergeStrategies;function En(t,e,n){if(void 0===n&&(n=!0),!e)return t;for(var r,i,o,s=st?Reflect.ownKeys(e):Object.keys(e),a=0;a<s.length;a++)"__ob__"!==(r=s[a])&&(i=t[r],o=e[r],n&&b(t,r)?i!==o&&c(i)&&c(o)&&En(i,o):Nt(t,r,o));return t}function Pn(t,e,n){return n?function(){var r=s(e)?e.call(n,n):e,i=s(t)?t.call(n,n):t;return r?En(r,i):i}:e?t?function(){return En(s(e)?e.call(this,this):e,s(t)?t.call(this,this):t)}:e:t}function In(t,n){var r=n?t?t.concat(n):e(n)?n:[n]:t;return r?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r):r}function Rn(t,e,n,r){var i=Object.create(t||null);return e?$(i,e):i}An.data=function(t,e,n){return n?Pn(t,e,n):e&&"function"!=typeof e?t:Pn(t,e)},j.forEach((function(t){An[t]=In})),z.forEach((function(t){An[t+"s"]=Rn})),An.watch=function(t,n,r,i){if(t===Q&&(t=void 0),n===Q&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;var o={};for(var s in $(o,t),n){var a=o[s],l=n[s];a&&!e(a)&&(a=[a]),o[s]=a?a.concat(l):e(l)?l:[l]}return o},An.props=An.methods=An.inject=An.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return $(i,t),e&&$(i,e),i},An.provide=function(t,e){return t?function(){var n=Object.create(null);return En(n,s(t)?t.call(this):t),e&&En(n,s(e)?e.call(this):e,!1),n}:e};var zn=function(t,e){return void 0===e?t:e};function jn(t,n,r){if(s(n)&&(n=n.options),function(t,n){var r=t.props;if(r){var i,o,s={};if(e(r))for(i=r.length;i--;)"string"==typeof(o=r[i])&&(s[k(o)]={type:null});else if(c(r))for(var a in r)o=r[a],s[k(a)]=c(o)?o:{type:o};t.props=s}}(n),function(t,n){var r=t.inject;if(r){var i=t.inject={};if(e(r))for(var o=0;o<r.length;o++)i[r[o]]={from:r[o]};else if(c(r))for(var s in r){var a=r[s];i[s]=c(a)?$({from:s},a):{from:a}}}}(n),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];s(r)&&(e[n]={bind:r,update:r})}}(n),!n._base&&(n.extends&&(t=jn(t,n.extends,r)),n.mixins))for(var i=0,o=n.mixins.length;i<o;i++)t=jn(t,n.mixins[i],r);var a,l={};for(a in t)u(a);for(a in n)b(t,a)||u(a);function u(e){var i=An[e]||zn;l[e]=i(t[e],n[e],r,e)}return l}function Fn(t,e,n,r){if("string"==typeof n){var i=t[e];if(b(i,n))return i[n];var o=k(n);if(b(i,o))return i[o];var s=S(o);return b(i,s)?i[s]:i[n]||i[o]||i[s]}}function Ln(t,e,n,r){var i=e[t],o=!b(n,t),a=n[t],l=Jn(Boolean,i.type);if(l>-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===_(t)){var c=Jn(String,i.type);(c<0||l<c)&&(a=!0)}if(void 0===a){a=function(t,e,n){if(!b(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return s(r)&&"Function"!==Vn(e.type)?r.call(t):r}(r,i,t);var u=St;Ot(!0),Ct(a),Ot(u)}return a}var Bn=/^\s*function (\w+)/;function Vn(t){var e=t&&t.toString().match(Bn);return e?e[1]:""}function qn(t,e){return Vn(t)===Vn(e)}function Jn(t,n){if(!e(n))return qn(n,t)?0:-1;for(var r=0,i=n.length;r<i;r++)if(qn(n[r],t))return r;return-1}function Wn(t){this._init(t)}function Hn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=Mn(t)||Mn(n.options),s=function(t){this._init(t)};return(s.prototype=Object.create(n.prototype)).constructor=s,s.cid=e++,s.options=jn(n.options,t),s.super=n,s.options.props&&function(t){var e=t.options.props;for(var n in e)fn(t.prototype,"_props",n)}(s),s.options.computed&&function(t){var e=t.options.computed;for(var n in e)mn(t.prototype,n,e[n])}(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,z.forEach((function(t){s[t]=n[t]})),o&&(s.options.components[o]=s),s.superOptions=n.options,s.extendOptions=t,s.sealedOptions=$({},s.options),i[r]=s,s}}function Kn(t){return t&&(Mn(t.Ctor.options)||t.tag)}function Un(t,n){return e(t)?t.indexOf(n)>-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===l.call(r)&&t.test(n));var r}function Yn(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var s=n[o];if(s){var a=s.name;a&&!e(a)&&Gn(n,o,r,i)}}}function Gn(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,v(n,e)}Wn.prototype._init=function(e){var n=this;n._uid=xn++,n._isVue=!0,n.__v_skip=!0,n._scope=new qe(!0),n._scope._vm=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=jn(kn(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Oe(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,i=r&&r.context;e.$slots=ae(n._renderChildren,i),e.$scopedSlots=r?ue(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,i){return Jt(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Jt(e,t,n,r,i,!0)};var o=r&&r.data;$t(e,"$attrs",o&&o.attrs||t,null,!0),$t(e,"$listeners",n._parentListeners||t,null,!0)}(n),Te(n,"beforeCreate",void 0,!1),function(t){var e=wn(t.$options.inject,t);e&&(Ot(!1),Object.keys(e).forEach((function(n){$t(t,n,e[n])})),Ot(!0))}(n),hn(n),bn(n),Te(n,"created"),n.$options.el&&n.$mount(n.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Nt,t.prototype.$delete=Tt,t.prototype.$watch=function(t,e,n){var r=this;if(c(e))return yn(r,t,e,n);(n=n||{}).user=!0;var i=new un(r,t,e,n);if(n.immediate){var o='callback for immediate watcher "'.concat(i.expression,'"');vt(),He(e,r,[i.value],r,o),yt()}return function(){i.teardown()}}}(Wn),function(t){var n=/^hook:/;t.prototype.$on=function(t,r){var i=this;if(e(t))for(var o=0,s=t.length;o<s;o++)i.$on(t[o],r);else(i._events[t]||(i._events[t]=[])).push(r),n.test(t)&&(i._hasHookEvent=!0);return i},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,n){var r=this;if(!arguments.length)return r._events=Object.create(null),r;if(e(t)){for(var i=0,o=t.length;i<o;i++)r.$off(t[i],n);return r}var s,a=r._events[t];if(!a)return r;if(!n)return r._events[t]=null,r;for(var l=a.length;l--;)if((s=a[l])===n||s.fn===n){a.splice(l,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?C(n):n;for(var r=C(arguments,1),i='event handler for "'.concat(t,'"'),o=0,s=n.length;o<s;o++)He(n[o],e,r,e,i)}return e}}(Wn),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,i=n._vnode,o=Me(n);n._vnode=t,n.$el=i?n.__patch__(i,t):n.__patch__(n.$el,t,e,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var s=n;s&&s.$vnode&&s.$parent&&s.$vnode===s.$parent._vnode;)s.$parent.$el=s.$el,s=s.$parent},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Te(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Te(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Wn),function(t){se(t.prototype),t.prototype.$nextTick=function(t){return on(t,this)},t.prototype._render=function(){var t,n=this,r=n.$options,i=r.render,o=r._parentVnode;o&&n._isMounted&&(n.$scopedSlots=ue(n.$parent,o.data.scopedSlots,n.$slots,n.$scopedSlots),n._slotsProxy&&ge(n._slotsProxy,n.$scopedSlots)),n.$vnode=o;try{lt(n),ye=n,t=i.call(n._renderProxy,n.$createElement)}catch(Tg){We(Tg,n,"render"),t=n._vnode}finally{ye=null,lt()}return e(t)&&1===t.length&&(t=t[0]),t instanceof ct||(t=ut()),t.parent=o,t}}(Wn);var Zn=[String,RegExp,Array],Xn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Zn,exclude:Zn,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,i=t.keyToCache;if(r){var o=r.tag,s=r.componentInstance,a=r.componentOptions;e[i]={name:Kn(a),tag:o,componentInstance:s},n.push(i),this.max&&n.length>parseInt(this.max)&&Gn(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Gn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Yn(t,(function(t){return Un(e,t)}))})),this.$watch("exclude",(function(e){Yn(t,(function(t){return!Un(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=we(t),n=e&&e.componentOptions;if(n){var r=Kn(n),i=this.include,o=this.exclude;if(i&&(!r||!Un(i,r))||o&&r&&Un(o,r))return e;var s=this.cache,a=this.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;s[l]?(e.componentInstance=s[l].componentInstance,v(a,l),a.push(l)):(this.vnodeToCache=e,this.keyToCache=l),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return F}};Object.defineProperty(t,"config",e),t.util={warn:Dn,extend:$,mergeOptions:jn,defineReactive:$t},t.set=Nt,t.delete=Tt,t.nextTick=on,t.observable=function(t){return Ct(t),t},t.options=Object.create(null),z.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,$(t.options.components,Xn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=C(arguments,1);return n.unshift(this),s(t.install)?t.install.apply(t,n):s(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=jn(this.options,t),this}}(t),Hn(t),function(t){z.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&s(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Wn),Object.defineProperty(Wn.prototype,"$isServer",{get:nt}),Object.defineProperty(Wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Wn,"FunctionalRenderContext",{value:Sn}),Wn.version="2.7.14";var Qn=p("style,class"),tr=p("input,textarea,option,select,progress"),er=function(t,e,n){return"value"===n&&tr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},nr=p("contenteditable,draggable,spellcheck"),rr=p("events,caret,typing,plaintext-only"),ir=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),or="http://www.w3.org/1999/xlink",sr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},ar=function(t){return sr(t)?t.slice(6,t.length):""},lr=function(t){return null==t||!1===t};function cr(t){for(var e=t.data,n=t,i=t;r(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(e=ur(i.data,e));for(;r(n=n.parent);)n&&n.data&&(e=ur(e,n.data));return function(t,e){if(r(t)||r(e))return dr(t,fr(e));return""}(e.staticClass,e.class)}function ur(t,e){return{staticClass:dr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function dr(t,e){return t?e?t+" "+e:t:e||""}function fr(t){return Array.isArray(t)?function(t){for(var e,n="",i=0,o=t.length;i<o;i++)r(e=fr(t[i]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):a(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var hr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},pr=p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),mr=p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),gr=function(t){return pr(t)||mr(t)};function vr(t){return mr(t)?"svg":"math"===t?"math":void 0}var yr=Object.create(null);var br=p("text,number,password,search,email,tel,url");function wr(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var xr=Object.freeze({__proto__:null,createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(hr[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),kr={create:function(t,e){Sr(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Sr(t,!0),Sr(e))},destroy:function(t){Sr(t,!0)}};function Sr(t,n){var i=t.data.ref;if(r(i)){var o=t.context,a=t.componentInstance||t.elm,l=n?null:a,c=n?void 0:a;if(s(i))He(i,o,[l],o,"template ref function");else{var u=t.data.refInFor,d="string"==typeof i||"number"==typeof i,f=Pt(i),h=o.$refs;if(d||f)if(u){var p=d?h[i]:i.value;n?e(p)&&v(p,a):e(p)?p.includes(a)||p.push(a):d?(h[i]=[a],Or(o,i,h[i])):i.value=[a]}else if(d){if(n&&h[i]!==a)return;h[i]=c,Or(o,i,l)}else if(f){if(n&&i.value!==a)return;i.value=l}}}}function Or(t,e,n){var r=t._setupState;r&&b(r,e)&&(Pt(r[e])?r[e].value=n:r[e]=n)}var _r=new ct("",{},[]),Mr=["create","activate","update","remove","destroy"];function Cr(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,i=r(n=t.data)&&r(n=n.attrs)&&n.type,o=r(n=e.data)&&r(n=n.attrs)&&n.type;return i===o||br(i)&&br(o)}(t,e)||i(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function $r(t,e,n){var i,o,s={};for(i=e;i<=n;++i)r(o=t[i].key)&&(s[o]=i);return s}var Nr={create:Tr,update:Tr,destroy:function(t){Tr(t,_r)}};function Tr(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,i,o=t===_r,s=e===_r,a=Ar(t.data.directives,t.context),l=Ar(e.data.directives,e.context),c=[],u=[];for(n in l)r=a[n],i=l[n],r?(i.oldValue=r.value,i.oldArg=r.arg,Pr(i,"update",e,t),i.def&&i.def.componentUpdated&&u.push(i)):(Pr(i,"bind",e,t),i.def&&i.def.inserted&&c.push(i));if(c.length){var d=function(){for(var n=0;n<c.length;n++)Pr(c[n],"inserted",e,t)};o?Ft(e,"insert",d):d()}u.length&&Ft(e,"postpatch",(function(){for(var n=0;n<u.length;n++)Pr(u[n],"componentUpdated",e,t)}));if(!o)for(n in a)l[n]||Pr(a[n],"unbind",t,t,s)}(t,e)}var Dr=Object.create(null);function Ar(t,e){var n,r,i=Object.create(null);if(!t)return i;for(n=0;n<t.length;n++){if((r=t[n]).modifiers||(r.modifiers=Dr),i[Er(r)]=r,e._setupState&&e._setupState.__sfc){var o=r.def||Fn(e,"_setupState","v-"+r.name);r.def="function"==typeof o?{bind:o,update:o}:o}r.def=r.def||Fn(e.$options,"directives",r.name)}return i}function Er(t){return t.rawName||"".concat(t.name,".").concat(Object.keys(t.modifiers||{}).join("."))}function Pr(t,e,n,r,i){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,r,i)}catch(Tg){We(Tg,n.context,"directive ".concat(t.name," ").concat(e," hook"))}}var Ir=[kr,Nr];function Rr(t,e){var o=e.componentOptions;if(!(r(o)&&!1===o.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var s,a,l=e.elm,c=t.data.attrs||{},u=e.data.attrs||{};for(s in(r(u.__ob__)||i(u._v_attr_proxy))&&(u=e.data.attrs=$({},u)),u)a=u[s],c[s]!==a&&zr(l,s,a,e.data.pre);for(s in(K||Y)&&u.value!==c.value&&zr(l,"value",u.value),c)n(u[s])&&(sr(s)?l.removeAttributeNS(or,ar(s)):nr(s)||l.removeAttribute(s))}}function zr(t,e,n,r){r||t.tagName.indexOf("-")>-1?jr(t,e,n):ir(e)?lr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):nr(e)?t.setAttribute(e,function(t,e){return lr(e)||"false"===e?"false":"contenteditable"===t&&rr(e)?e:"true"}(e,n)):sr(e)?lr(n)?t.removeAttributeNS(or,ar(e)):t.setAttributeNS(or,e,n):jr(t,e,n)}function jr(t,e,n){if(lr(n))t.removeAttribute(e);else{if(K&&!U&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Fr={create:Rr,update:Rr};function Lr(t,e){var i=e.elm,o=e.data,s=t.data;if(!(n(o.staticClass)&&n(o.class)&&(n(s)||n(s.staticClass)&&n(s.class)))){var a=cr(e),l=i._transitionClasses;r(l)&&(a=dr(a,fr(l))),a!==i._prevClass&&(i.setAttribute("class",a),i._prevClass=a)}}var Br,Vr,qr,Jr,Wr,Hr,Kr={create:Lr,update:Lr},Ur=/[\w).+\-_$\]]/;function Yr(t){var e,n,r,i,o,s=!1,a=!1,l=!1,c=!1,u=0,d=0,f=0,h=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),s)39===e&&92!==n&&(s=!1);else if(a)34===e&&92!==n&&(a=!1);else if(l)96===e&&92!==n&&(l=!1);else if(c)47===e&&92!==n&&(c=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||u||d||f){switch(e){case 34:a=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:f++;break;case 41:f--;break;case 91:d++;break;case 93:d--;break;case 123:u++;break;case 125:u--}if(47===e){for(var p=r-1,m=void 0;p>=0&&" "===(m=t.charAt(p));p--);m&&Ur.test(m)||(c=!0)}}else void 0===i?(h=r+1,i=t.slice(0,r).trim()):g();function g(){(o||(o=[])).push(t.slice(h,r).trim()),h=r+1}if(void 0===i?i=t.slice(0,r).trim():0!==h&&g(),o)for(r=0;r<o.length;r++)i=Gr(i,o[r]);return i}function Gr(t,e){var n=e.indexOf("(");if(n<0)return'_f("'.concat(e,'")(').concat(t,")");var r=e.slice(0,n),i=e.slice(n+1);return'_f("'.concat(r,'")(').concat(t).concat(")"!==i?","+i:i)}function Zr(t,e){console.error("[Vue compiler]: ".concat(t))}function Xr(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Qr(t,e,n,r,i){(t.props||(t.props=[])).push(li({name:e,value:n,dynamic:i},r)),t.plain=!1}function ti(t,e,n,r,i){(i?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(li({name:e,value:n,dynamic:i},r)),t.plain=!1}function ei(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(li({name:e,value:n},r))}function ni(t,e,n,r,i,o,s,a){(t.directives||(t.directives=[])).push(li({name:e,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:s},a)),t.plain=!1}function ri(t,e,n){return n?"_p(".concat(e,',"').concat(t,'")'):t+e}function ii(e,n,r,i,o,s,a,l){var c;(i=i||t).right?l?n="(".concat(n,")==='click'?'contextmenu':(").concat(n,")"):"click"===n&&(n="contextmenu",delete i.right):i.middle&&(l?n="(".concat(n,")==='click'?'mouseup':(").concat(n,")"):"click"===n&&(n="mouseup")),i.capture&&(delete i.capture,n=ri("!",n,l)),i.once&&(delete i.once,n=ri("~",n,l)),i.passive&&(delete i.passive,n=ri("&",n,l)),i.native?(delete i.native,c=e.nativeEvents||(e.nativeEvents={})):c=e.events||(e.events={});var u=li({value:r.trim(),dynamic:l},a);i!==t&&(u.modifiers=i);var d=c[n];Array.isArray(d)?o?d.unshift(u):d.push(u):c[n]=d?o?[u,d]:[d,u]:u,e.plain=!1}function oi(t,e,n){var r=si(t,":"+e)||si(t,"v-bind:"+e);if(null!=r)return Yr(r);if(!1!==n){var i=si(t,e);if(null!=i)return JSON.stringify(i)}}function si(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var i=t.attrsList,o=0,s=i.length;o<s;o++)if(i[o].name===e){i.splice(o,1);break}return n&&delete t.attrsMap[e],r}function ai(t,e){for(var n=t.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(e.test(o.name))return n.splice(r,1),o}}function li(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function ci(t,e,n){var r=n||{},i=r.number,o="$$v",s=o;r.trim&&(s="(typeof ".concat(o," === 'string'")+"? ".concat(o,".trim()")+": ".concat(o,")")),i&&(s="_n(".concat(s,")"));var a=ui(e,s);t.model={value:"(".concat(e,")"),expression:JSON.stringify(e),callback:"function (".concat(o,") {").concat(a,"}")}}function ui(t,e){var n=function(t){if(t=t.trim(),Br=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Br-1)return(Jr=t.lastIndexOf("."))>-1?{exp:t.slice(0,Jr),key:'"'+t.slice(Jr+1)+'"'}:{exp:t,key:null};Vr=t,Jr=Wr=Hr=0;for(;!fi();)hi(qr=di())?mi(qr):91===qr&&pi(qr);return{exp:t.slice(0,Wr),key:t.slice(Wr+1,Hr)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function di(){return Vr.charCodeAt(++Jr)}function fi(){return Jr>=Br}function hi(t){return 34===t||39===t}function pi(t){var e=1;for(Wr=Jr;!fi();)if(hi(t=di()))mi(t);else if(91===t&&e++,93===t&&e--,0===e){Hr=Jr;break}}function mi(t){for(var e=t;!fi()&&(t=di())!==e;);}var gi;function vi(t,e,n){var r=gi;return function i(){var o=e.apply(null,arguments);null!==o&&wi(t,i,n,r)}}var yi=Ge&&!(X&&Number(X[1])<=53);function bi(t,e,n,r){if(yi){var i=ze,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}gi.addEventListener(t,e,tt?{capture:n,passive:r}:n)}function wi(t,e,n,r){(r||gi).removeEventListener(t,e._wrapper||e,n)}function xi(t,e){if(!n(t.data.on)||!n(e.data.on)){var i=e.data.on||{},o=t.data.on||{};gi=e.elm||t.elm,function(t){if(r(t.__r)){var e=K?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}r(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(i),jt(i,o,bi,wi,vi,e.context),gi=void 0}}var ki,Si={create:xi,update:xi,destroy:function(t){return xi(t,_r)}};function Oi(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var o,s,a=e.elm,l=t.data.domProps||{},c=e.data.domProps||{};for(o in(r(c.__ob__)||i(c._v_attr_proxy))&&(c=e.data.domProps=$({},c)),l)o in c||(a[o]="");for(o in c){if(s=c[o],"textContent"===o||"innerHTML"===o){if(e.children&&(e.children.length=0),s===l[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o&&"PROGRESS"!==a.tagName){a._value=s;var u=n(s)?"":String(s);_i(a,u)&&(a.value=u)}else if("innerHTML"===o&&mr(a.tagName)&&n(a.innerHTML)){(ki=ki||document.createElement("div")).innerHTML="<svg>".concat(s,"</svg>");for(var d=ki.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;d.firstChild;)a.appendChild(d.firstChild)}else if(s!==l[o])try{a[o]=s}catch(Tg){}}}}function _i(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(Tg){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,i=t._vModifiers;if(r(i)){if(i.number)return h(n)!==h(e);if(i.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Mi={create:Oi,update:Oi},Ci=w((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function $i(t){var e=Ni(t.style);return t.staticStyle?$(t.staticStyle,e):e}function Ni(t){return Array.isArray(t)?N(t):"string"==typeof t?Ci(t):t}var Ti,Di=/^--/,Ai=/\s*!important$/,Ei=function(t,e,n){if(Di.test(e))t.style.setProperty(e,n);else if(Ai.test(n))t.style.setProperty(_(e),n.replace(Ai,""),"important");else{var r=Ii(e);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)t.style[r]=n[i];else t.style[r]=n}},Pi=["Webkit","Moz","ms"],Ii=w((function(t){if(Ti=Ti||document.createElement("div").style,"filter"!==(t=k(t))&&t in Ti)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<Pi.length;n++){var r=Pi[n]+e;if(r in Ti)return r}}));function Ri(t,e){var i=e.data,o=t.data;if(!(n(i.staticStyle)&&n(i.style)&&n(o.staticStyle)&&n(o.style))){var s,a,l=e.elm,c=o.staticStyle,u=o.normalizedStyle||o.style||{},d=c||u,f=Ni(e.data.style)||{};e.data.normalizedStyle=r(f.__ob__)?$({},f):f;var h=function(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=$i(i.data))&&$(r,n);(n=$i(t.data))&&$(r,n);for(var o=t;o=o.parent;)o.data&&(n=$i(o.data))&&$(r,n);return r}(e,!0);for(a in d)n(h[a])&&Ei(l,a,"");for(a in h)(s=h[a])!==d[a]&&Ei(l,a,null==s?"":s)}}var zi={create:Ri,update:Ri},ji=/\s+/;function Fi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(ji).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Li(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(ji).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Bi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&$(e,Vi(t.name||"v")),$(e,t),e}return"string"==typeof t?Vi(t):void 0}}var Vi=w((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),qi=W&&!U,Ji="transition",Wi="transitionend",Hi="animation",Ki="animationend";qi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ji="WebkitTransition",Wi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Hi="WebkitAnimation",Ki="webkitAnimationEnd"));var Ui=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Yi(t){Ui((function(){Ui(t)}))}function Gi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Fi(t,e))}function Zi(t,e){t._transitionClasses&&v(t._transitionClasses,e),Li(t,e)}function Xi(t,e,n){var r=to(t,e),i=r.type,o=r.timeout,s=r.propCount;if(!i)return n();var a="transition"===i?Wi:Ki,l=0,c=function(){t.removeEventListener(a,u),n()},u=function(e){e.target===t&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),o+1),t.addEventListener(a,u)}var Qi=/\b(transform|all)(,|$)/;function to(t,e){var n,r=window.getComputedStyle(t),i=(r[Ji+"Delay"]||"").split(", "),o=(r[Ji+"Duration"]||"").split(", "),s=eo(i,o),a=(r[Hi+"Delay"]||"").split(", "),l=(r[Hi+"Duration"]||"").split(", "),c=eo(a,l),u=0,d=0;return"transition"===e?s>0&&(n="transition",u=s,d=o.length):"animation"===e?c>0&&(n="animation",u=c,d=l.length):d=(n=(u=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?o.length:l.length:0,{type:n,timeout:u,propCount:d,hasTransform:"transition"===n&&Qi.test(r[Ji+"Property"])}}function eo(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return no(e)+no(t[n])})))}function no(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function ro(t,e){var i=t.elm;r(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var o=Bi(t.data.transition);if(!n(o)&&!r(i._enterCb)&&1===i.nodeType){for(var l=o.css,c=o.type,u=o.enterClass,d=o.enterToClass,f=o.enterActiveClass,p=o.appearClass,m=o.appearToClass,g=o.appearActiveClass,v=o.beforeEnter,y=o.enter,b=o.afterEnter,w=o.enterCancelled,x=o.beforeAppear,k=o.appear,S=o.afterAppear,O=o.appearCancelled,_=o.duration,M=_e,C=_e.$vnode;C&&C.parent;)M=C.context,C=C.parent;var $=!M._isMounted||!t.isRootInsert;if(!$||k||""===k){var N=$&&p?p:u,T=$&&g?g:f,D=$&&m?m:d,A=$&&x||v,E=$&&s(k)?k:y,P=$&&S||b,R=$&&O||w,z=h(a(_)?_.enter:_),j=!1!==l&&!U,F=so(E),L=i._enterCb=I((function(){j&&(Zi(i,D),Zi(i,T)),L.cancelled?(j&&Zi(i,N),R&&R(i)):P&&P(i),i._enterCb=null}));t.data.show||Ft(t,"insert",(function(){var e=i.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),E&&E(i,L)})),A&&A(i),j&&(Gi(i,N),Gi(i,T),Yi((function(){Zi(i,N),L.cancelled||(Gi(i,D),F||(oo(z)?setTimeout(L,z):Xi(i,c,L)))}))),t.data.show&&(e&&e(),E&&E(i,L)),j||F||L()}}}function io(t,e){var i=t.elm;r(i._enterCb)&&(i._enterCb.cancelled=!0,i._enterCb());var o=Bi(t.data.transition);if(n(o)||1!==i.nodeType)return e();if(!r(i._leaveCb)){var s=o.css,l=o.type,c=o.leaveClass,u=o.leaveToClass,d=o.leaveActiveClass,f=o.beforeLeave,p=o.leave,m=o.afterLeave,g=o.leaveCancelled,v=o.delayLeave,y=o.duration,b=!1!==s&&!U,w=so(p),x=h(a(y)?y.leave:y),k=i._leaveCb=I((function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[t.key]=null),b&&(Zi(i,u),Zi(i,d)),k.cancelled?(b&&Zi(i,c),g&&g(i)):(e(),m&&m(i)),i._leaveCb=null}));v?v(S):S()}function S(){k.cancelled||(!t.data.show&&i.parentNode&&((i.parentNode._pending||(i.parentNode._pending={}))[t.key]=t),f&&f(i),b&&(Gi(i,c),Gi(i,d),Yi((function(){Zi(i,c),k.cancelled||(Gi(i,u),w||(oo(x)?setTimeout(k,x):Xi(i,l,k)))}))),p&&p(i,k),b||w||k())}}function oo(t){return"number"==typeof t&&!isNaN(t)}function so(t){if(n(t))return!1;var e=t.fns;return r(e)?so(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function ao(t,e){!0!==e.data.show&&ro(e)}var lo=function(t){var s,a,l={},c=t.modules,u=t.nodeOps;for(s=0;s<Mr.length;++s)for(l[Mr[s]]=[],a=0;a<c.length;++a)r(c[a][Mr[s]])&&l[Mr[s]].push(c[a][Mr[s]]);function d(t){var e=u.parentNode(t);r(e)&&u.removeChild(e,t)}function f(t,e,n,o,s,a,c){if(r(t.elm)&&r(a)&&(t=a[c]=ft(t)),t.isRootInsert=!s,!function(t,e,n,o){var s=t.data;if(r(s)){var a=r(t.componentInstance)&&s.keepAlive;if(r(s=s.hook)&&r(s=s.init)&&s(t,!1),r(t.componentInstance))return h(t,e),m(n,t.elm,o),i(a)&&function(t,e,n,i){var o,s=t;for(;s.componentInstance;)if(r(o=(s=s.componentInstance._vnode).data)&&r(o=o.transition)){for(o=0;o<l.activate.length;++o)l.activate[o](_r,s);e.push(s);break}m(n,t.elm,i)}(t,e,n,o),!0}}(t,e,n,o)){var d=t.data,f=t.children,p=t.tag;r(p)?(t.elm=t.ns?u.createElementNS(t.ns,p):u.createElement(p,t),b(t),g(t,f,e),r(d)&&y(t,e),m(n,t.elm,o)):i(t.isComment)?(t.elm=u.createComment(t.text),m(n,t.elm,o)):(t.elm=u.createTextNode(t.text),m(n,t.elm,o))}}function h(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(y(t,e),b(t)):(Sr(t),e.push(t))}function m(t,e,n){r(t)&&(r(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function g(t,n,r){if(e(n))for(var i=0;i<n.length;++i)f(n[i],r,t.elm,null,!0,n,i);else o(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function y(t,e){for(var n=0;n<l.create.length;++n)l.create[n](_r,t);r(s=t.data.hook)&&(r(s.create)&&s.create(_r,t),r(s.insert)&&e.push(t))}function b(t){var e;if(r(e=t.fnScopeId))u.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent;r(e=_e)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function w(t,e,n,r,i,o){for(;r<=i;++r)f(n[r],o,t,e,!1,n,r)}function x(t){var e,n,i=t.data;if(r(i))for(r(e=i.hook)&&r(e=e.destroy)&&e(t),e=0;e<l.destroy.length;++e)l.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)x(t.children[n])}function k(t,e,n){for(;e<=n;++e){var i=t[e];r(i)&&(r(i.tag)?(S(i),x(i)):d(i.elm))}}function S(t,e){if(r(e)||r(t.data)){var n,i=l.remove.length+1;for(r(e)?e.listeners+=i:e=function(t,e){function n(){0==--n.listeners&&d(t)}return n.listeners=e,n}(t.elm,i),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&S(n,e),n=0;n<l.remove.length;++n)l.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else d(t.elm)}function O(t,e,n,i){for(var o=n;o<i;o++){var s=e[o];if(r(s)&&Cr(t,s))return o}}function _(t,e,o,s,a,c){if(t!==e){r(e.elm)&&r(s)&&(e=s[a]=ft(e));var d=e.elm=t.elm;if(i(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?$(t.elm,e,o):e.isAsyncPlaceholder=!0;else if(i(e.isStatic)&&i(t.isStatic)&&e.key===t.key&&(i(e.isCloned)||i(e.isOnce)))e.componentInstance=t.componentInstance;else{var h,p=e.data;r(p)&&r(h=p.hook)&&r(h=h.prepatch)&&h(t,e);var m=t.children,g=e.children;if(r(p)&&v(e)){for(h=0;h<l.update.length;++h)l.update[h](t,e);r(h=p.hook)&&r(h=h.update)&&h(t,e)}n(e.text)?r(m)&&r(g)?m!==g&&function(t,e,i,o,s){for(var a,l,c,d=0,h=0,p=e.length-1,m=e[0],g=e[p],v=i.length-1,y=i[0],b=i[v],x=!s;d<=p&&h<=v;)n(m)?m=e[++d]:n(g)?g=e[--p]:Cr(m,y)?(_(m,y,o,i,h),m=e[++d],y=i[++h]):Cr(g,b)?(_(g,b,o,i,v),g=e[--p],b=i[--v]):Cr(m,b)?(_(m,b,o,i,v),x&&u.insertBefore(t,m.elm,u.nextSibling(g.elm)),m=e[++d],b=i[--v]):Cr(g,y)?(_(g,y,o,i,h),x&&u.insertBefore(t,g.elm,m.elm),g=e[--p],y=i[++h]):(n(a)&&(a=$r(e,d,p)),n(l=r(y.key)?a[y.key]:O(y,e,d,p))?f(y,o,t,m.elm,!1,i,h):Cr(c=e[l],y)?(_(c,y,o,i,h),e[l]=void 0,x&&u.insertBefore(t,c.elm,m.elm)):f(y,o,t,m.elm,!1,i,h),y=i[++h]);d>p?w(t,n(i[v+1])?null:i[v+1].elm,i,h,v,o):h>v&&k(e,d,p)}(d,m,g,o,c):r(g)?(r(t.text)&&u.setTextContent(d,""),w(d,null,g,0,g.length-1,o)):r(m)?k(m,0,m.length-1):r(t.text)&&u.setTextContent(d,""):t.text!==e.text&&u.setTextContent(d,e.text),r(p)&&r(h=p.hook)&&r(h=h.postpatch)&&h(t,e)}}}function M(t,e,n){if(i(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var o=0;o<e.length;++o)e[o].data.hook.insert(e[o])}var C=p("attrs,class,staticClass,staticStyle,key");function $(t,e,n,o){var s,a=e.tag,l=e.data,c=e.children;if(o=o||l&&l.pre,e.elm=t,i(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(l)&&(r(s=l.hook)&&r(s=s.init)&&s(e,!0),r(s=e.componentInstance)))return h(e,n),!0;if(r(a)){if(r(c))if(t.hasChildNodes())if(r(s=l)&&r(s=s.domProps)&&r(s=s.innerHTML)){if(s!==t.innerHTML)return!1}else{for(var u=!0,d=t.firstChild,f=0;f<c.length;f++){if(!d||!$(d,c[f],n,o)){u=!1;break}d=d.nextSibling}if(!u||d)return!1}else g(e,c,n);if(r(l)){var p=!1;for(var m in l)if(!C(m)){p=!0,y(e,n);break}!p&&l.class&&an(l.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,o,s){if(!n(e)){var a,c=!1,d=[];if(n(t))c=!0,f(e,d);else{var h=r(t.nodeType);if(!h&&Cr(t,e))_(t,e,d,null,null,s);else{if(h){if(1===t.nodeType&&t.hasAttribute("data-server-rendered")&&(t.removeAttribute("data-server-rendered"),o=!0),i(o)&&$(t,e,d))return M(e,d,!0),t;a=t,t=new ct(u.tagName(a).toLowerCase(),{},[],void 0,a)}var p=t.elm,m=u.parentNode(p);if(f(e,d,p._leaveCb?null:m,u.nextSibling(p)),r(e.parent))for(var g=e.parent,y=v(e);g;){for(var b=0;b<l.destroy.length;++b)l.destroy[b](g);if(g.elm=e.elm,y){for(var w=0;w<l.create.length;++w)l.create[w](_r,g);var S=g.data.hook.insert;if(S.merged)for(var O=1;O<S.fns.length;O++)S.fns[O]()}else Sr(g);g=g.parent}r(m)?k([t],0,0):r(t.tag)&&x(t)}}return M(e,d,c),e.elm}r(t)&&x(t)}}({nodeOps:xr,modules:[Fr,Kr,Si,Mi,zi,W?{create:ao,activate:ao,remove:function(t,e){!0!==t.data.show?io(t,e):e()}}:{}].concat(Ir)});U&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&vo(t,"input")}));var co={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Ft(n,"postpatch",(function(){co.componentUpdated(t,e,n)})):uo(t,e,n.context),t._vOptions=[].map.call(t.options,po)):("textarea"===n.tag||br(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",mo),t.addEventListener("compositionend",go),t.addEventListener("change",go),U&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){uo(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,po);if(i.some((function(t,e){return!E(t,r[e])})))(t.multiple?e.value.some((function(t){return ho(t,i)})):e.value!==e.oldValue&&ho(e.value,i))&&vo(t,"change")}}};function uo(t,e,n){fo(t,e),(K||Y)&&setTimeout((function(){fo(t,e)}),0)}function fo(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,s,a=0,l=t.options.length;a<l;a++)if(s=t.options[a],i)o=P(r,po(s))>-1,s.selected!==o&&(s.selected=o);else if(E(po(s),r))return void(t.selectedIndex!==a&&(t.selectedIndex=a));i||(t.selectedIndex=-1)}}function ho(t,e){return e.every((function(e){return!E(e,t)}))}function po(t){return"_value"in t?t._value:t.value}function mo(t){t.target.composing=!0}function go(t){t.target.composing&&(t.target.composing=!1,vo(t.target,"input"))}function vo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function yo(t){return!t.componentInstance||t.data&&t.data.transition?t:yo(t.componentInstance._vnode)}var bo={model:co,show:{bind:function(t,e,n){var r=e.value,i=(n=yo(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,ro(n,(function(){t.style.display=o}))):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=yo(n)).data&&n.data.transition?(n.data.show=!0,r?ro(n,(function(){t.style.display=t.__vOriginalDisplay})):io(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},wo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function xo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?xo(we(e.children)):t}function ko(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var r in i)e[k(r)]=i[r];return e}function So(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Oo=function(t){return t.tag||ce(t)},_o=function(t){return"show"===t.name},Mo={name:"transition",props:wo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Oo)).length){var r=this.mode,i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var s=xo(i);if(!s)return i;if(this._leaving)return So(t,i);var a="__transition-".concat(this._uid,"-");s.key=null==s.key?s.isComment?a+"comment":a+s.tag:o(s.key)?0===String(s.key).indexOf(a)?s.key:a+s.key:s.key;var l=(s.data||(s.data={})).transition=ko(this),c=this._vnode,u=xo(c);if(s.data.directives&&s.data.directives.some(_o)&&(s.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(s,u)&&!ce(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=$({},l);if("out-in"===r)return this._leaving=!0,Ft(d,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),So(t,i);if("in-out"===r){if(ce(s))return c;var f,h=function(){f()};Ft(l,"afterEnter",h),Ft(l,"enterCancelled",h),Ft(d,"delayLeave",(function(t){f=t}))}}return i}}},Co=$({tag:String,moveClass:String},wo);function $o(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function No(t){t.data.newPos=t.elm.getBoundingClientRect()}function To(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate(".concat(r,"px,").concat(i,"px)"),o.transitionDuration="0s"}}delete Co.mode;var Do={Transition:Mo,TransitionGroup:{props:Co,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=Me(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],s=ko(this),a=0;a<i.length;a++){(u=i[a]).tag&&null!=u.key&&0!==String(u.key).indexOf("__vlist")&&(o.push(u),n[u.key]=u,(u.data||(u.data={})).transition=s)}if(r){var l=[],c=[];for(a=0;a<r.length;a++){var u;(u=r[a]).data.transition=s,u.data.pos=u.elm.getBoundingClientRect(),n[u.key]?l.push(u):c.push(u)}this.kept=t(e,null,l),this.removed=c}return t(e,null,o)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach($o),t.forEach(No),t.forEach(To),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;Gi(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Wi,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Wi,t),n._moveCb=null,Zi(n,e))})}})))},methods:{hasMove:function(t,e){if(!qi)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){Li(n,t)})),Fi(n,e),n.style.display="none",this.$el.appendChild(n);var r=to(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};Wn.config.mustUseProp=er,Wn.config.isReservedTag=gr,Wn.config.isReservedAttr=Qn,Wn.config.getTagNamespace=vr,Wn.config.isUnknownElement=function(t){if(!W)return!0;if(gr(t))return!1;if(t=t.toLowerCase(),null!=yr[t])return yr[t];var e=document.createElement(t);return t.indexOf("-")>-1?yr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:yr[t]=/HTMLUnknownElement/.test(e.toString())},$(Wn.options.directives,bo),$(Wn.options.components,Do),Wn.prototype.__patch__=W?lo:T,Wn.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=ut),Te(t,"beforeMount"),r=function(){t._update(t._render(),n)},new un(t,r,T,{before:function(){t._isMounted&&!t._isDestroyed&&Te(t,"beforeUpdate")}},!0),n=!1;var i=t._preWatchers;if(i)for(var o=0;o<i.length;o++)i[o].run();return null==t.$vnode&&(t._isMounted=!0,Te(t,"mounted")),t}(this,t=t&&W?wr(t):void 0,e)},W&&setTimeout((function(){F.devtools&&rt&&rt.emit("init",Wn)}),0);var Ao=/\{\{((?:.|\r?\n)+?)\}\}/g,Eo=/[-.*+?^${}()|[\]\/\\]/g,Po=w((function(t){var e=t[0].replace(Eo,"\\$&"),n=t[1].replace(Eo,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var Io={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=si(t,"class");n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));var r=oi(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:".concat(t.staticClass,",")),t.classBinding&&(e+="class:".concat(t.classBinding,",")),e}};var Ro,zo={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=si(t,"style");n&&(t.staticStyle=JSON.stringify(Ci(n)));var r=oi(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:".concat(t.staticStyle,",")),t.styleBinding&&(e+="style:(".concat(t.styleBinding,"),")),e}},jo=function(t){return(Ro=Ro||document.createElement("div")).innerHTML=t,Ro.textContent},Fo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Lo=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Bo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Vo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,qo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Jo="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(L.source,"]*"),Wo="((?:".concat(Jo,"\\:)?").concat(Jo,")"),Ho=new RegExp("^<".concat(Wo)),Ko=/^\s*(\/?)>/,Uo=new RegExp("^<\\/".concat(Wo,"[^>]*>")),Yo=/^<!DOCTYPE [^>]+>/i,Go=/^<!\--/,Zo=/^<!\[/,Xo=p("script,style,textarea",!0),Qo={},ts={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},es=/&(?:lt|gt|quot|amp|#39);/g,ns=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,rs=p("pre,textarea",!0),is=function(t,e){return t&&rs(t)&&"\n"===e[0]};function ss(t,e){var n=e?ns:es;return t.replace(n,(function(t){return ts[t]}))}function as(t,e){for(var n,r,i=[],o=e.expectHTML,s=e.isUnaryTag||D,a=e.canBeLeftOpenTag||D,l=0,c=function(){if(n=t,r&&Xo(r)){var c=0,f=r.toLowerCase(),h=Qo[f]||(Qo[f]=new RegExp("([\\s\\S]*?)(</"+f+"[^>]*>)","i"));k=t.replace(h,(function(t,n,r){return c=r.length,Xo(f)||"noscript"===f||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),is(f,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));l+=t.length-k.length,t=k,d(f,l-c,l)}else{var p=t.indexOf("<");if(0===p){if(Go.test(t)){var m=t.indexOf("--\x3e");if(m>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,m),l,l+m+3),u(m+3),"continue"}if(Zo.test(t)){var g=t.indexOf("]>");if(g>=0)return u(g+2),"continue"}var v=t.match(Yo);if(v)return u(v[0].length),"continue";var y=t.match(Uo);if(y){var b=l;return u(y[0].length),d(y[1],b,l),"continue"}var w=function(){var e=t.match(Ho);if(e){var n={tagName:e[1],attrs:[],start:l};u(e[0].length);for(var r=void 0,i=void 0;!(r=t.match(Ko))&&(i=t.match(qo)||t.match(Vo));)i.start=l,u(i[0].length),i.end=l,n.attrs.push(i);if(r)return n.unarySlash=r[1],u(r[0].length),n.end=l,n}}();if(w)return function(t){var n=t.tagName,l=t.unarySlash;o&&("p"===r&&Bo(n)&&d(r),a(n)&&r===n&&d(n));for(var c=s(n)||!!l,u=t.attrs.length,f=new Array(u),h=0;h<u;h++){var p=t.attrs[h],m=p[3]||p[4]||p[5]||"",g="a"===n&&"href"===p[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;f[h]={name:p[1],value:ss(m,g)}}c||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f,start:t.start,end:t.end}),r=n);e.start&&e.start(n,f,c,t.start,t.end)}(w),is(w.tagName,t)&&u(1),"continue"}var x=void 0,k=void 0,S=void 0;if(p>=0){for(k=t.slice(p);!(Uo.test(k)||Ho.test(k)||Go.test(k)||Zo.test(k)||(S=k.indexOf("<",1))<0);)p+=S,k=t.slice(p);x=t.substring(0,p)}p<0&&(x=t),x&&u(x.length),e.chars&&x&&e.chars(x,l-x.length,l)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===c())break}function u(e){l+=e,t=t.substring(e)}function d(t,n,o){var s,a;if(null==n&&(n=l),null==o&&(o=l),t)for(a=t.toLowerCase(),s=i.length-1;s>=0&&i[s].lowerCasedTag!==a;s--);else s=0;if(s>=0){for(var c=i.length-1;c>=s;c--)e.end&&e.end(i[c].tag,n,o);i.length=s,r=s&&i[s-1].tag}else"br"===a?e.start&&e.start(t,[],!0,n,o):"p"===a&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}d()}var ls,cs,us,ds,fs,hs,ps,ms,gs=/^@|^v-on:/,vs=/^v-|^@|^:|^#/,ys=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,bs=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ws=/^\(|\)$/g,xs=/^\[.*\]$/,ks=/:(.*)$/,Ss=/^:|^\.|^v-bind:/,Os=/\.[^.\]]+(?=[^\]]*$)/g,_s=/^v-slot(:|$)|^#/,Ms=/[\r\n]/,Cs=/[ \f\t\r\n]+/g,$s=w(jo);function Ns(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:Rs(e),rawAttrsMap:{},parent:n,children:[]}}function Ts(t,e){ls=e.warn||Zr,hs=e.isPreTag||D,ps=e.mustUseProp||D,ms=e.getTagNamespace||D,e.isReservedTag,us=Xr(e.modules,"transformNode"),ds=Xr(e.modules,"preTransformNode"),fs=Xr(e.modules,"postTransformNode"),cs=e.delimiters;var n,r,i=[],o=!1!==e.preserveWhitespace,s=e.whitespace,a=!1,l=!1;function c(t){if(u(t),a||t.processed||(t=Ds(t,e)),i.length||t===n||n.if&&(t.elseif||t.else)&&Es(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)s=t,c=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),c&&c.if&&Es(c,{exp:s.elseif,block:s});else{if(t.slotScope){var o=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=t}r.children.push(t),t.parent=r}var s,c;t.children=t.children.filter((function(t){return!t.slotScope})),u(t),t.pre&&(a=!1),hs(t.tag)&&(l=!1);for(var d=0;d<fs.length;d++)fs[d](t,e)}function u(t){if(!l)for(var e=void 0;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return as(t,{warn:ls,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,o,s,u,d){var f=r&&r.ns||ms(t);K&&"svg"===f&&(o=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];zs.test(r.name)||(r.name=r.name.replace(js,""),e.push(r))}return e}(o));var h,p=Ns(t,o,r);f&&(p.ns=f),"style"!==(h=p).tag&&("script"!==h.tag||h.attrsMap.type&&"text/javascript"!==h.attrsMap.type)||nt()||(p.forbidden=!0);for(var m=0;m<ds.length;m++)p=ds[m](p,e)||p;a||(!function(t){null!=si(t,"v-pre")&&(t.pre=!0)}(p),p.pre&&(a=!0)),hs(p.tag)&&(l=!0),a?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),i=0;i<n;i++)r[i]={name:e[i].name,value:JSON.stringify(e[i].value)},null!=e[i].start&&(r[i].start=e[i].start,r[i].end=e[i].end);else t.pre||(t.plain=!0)}(p):p.processed||(As(p),function(t){var e=si(t,"v-if");if(e)t.if=e,Es(t,{exp:e,block:t});else{null!=si(t,"v-else")&&(t.else=!0);var n=si(t,"v-else-if");n&&(t.elseif=n)}}(p),function(t){null!=si(t,"v-once")&&(t.once=!0)}(p)),n||(n=p),s?c(p):(r=p,i.push(p))},end:function(t,e,n){var o=i[i.length-1];i.length-=1,r=i[i.length-1],c(o)},chars:function(t,e,n){if(r&&(!K||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var i,c=r.children;if(t=l||t.trim()?"script"===(i=r).tag||"style"===i.tag?t:$s(t):c.length?s?"condense"===s&&Ms.test(t)?"":" ":o?" ":"":""){l||"condense"!==s||(t=t.replace(Cs," "));var u=void 0,d=void 0;!a&&" "!==t&&(u=function(t,e){var n=e?Po(e):Ao;if(n.test(t)){for(var r,i,o,s=[],a=[],l=n.lastIndex=0;r=n.exec(t);){(i=r.index)>l&&(a.push(o=t.slice(l,i)),s.push(JSON.stringify(o)));var c=Yr(r[1].trim());s.push("_s(".concat(c,")")),a.push({"@binding":c}),l=i+r[0].length}return l<t.length&&(a.push(o=t.slice(l)),s.push(JSON.stringify(o))),{expression:s.join("+"),tokens:a}}}(t,cs))?d={type:2,expression:u.expression,tokens:u.tokens,text:t}:" "===t&&c.length&&" "===c[c.length-1].text||(d={type:3,text:t}),d&&c.push(d)}}},comment:function(t,e,n){if(r){var i={type:3,text:t,isComment:!0};r.children.push(i)}}}),n}function Ds(t,e){var n,r;(r=oi(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=oi(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=si(t,"scope"),t.slotScope=e||si(t,"slot-scope")):(e=si(t,"slot-scope"))&&(t.slotScope=e);var n=oi(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||ti(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){if(s=ai(t,_s)){var r=Ps(s),i=r.name,o=r.dynamic;t.slotTarget=i,t.slotTargetDynamic=o,t.slotScope=s.value||"_empty_"}}else{var s;if(s=ai(t,_s)){var a=t.scopedSlots||(t.scopedSlots={}),l=Ps(s),c=l.name,u=(o=l.dynamic,a[c]=Ns("template",[],t));u.slotTarget=c,u.slotTargetDynamic=o,u.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=u,!0})),u.slotScope=s.value||"_empty_",t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=oi(t,"name"))}(t),function(t){var e;(e=oi(t,"is"))&&(t.component=e);null!=si(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var i=0;i<us.length;i++)t=us[i](t,e)||t;return function(t){var e,n,r,i,o,s,a,l,c=t.attrsList;for(e=0,n=c.length;e<n;e++)if(r=i=c[e].name,o=c[e].value,vs.test(r))if(t.hasBindings=!0,(s=Is(r.replace(vs,"")))&&(r=r.replace(Os,"")),Ss.test(r))r=r.replace(Ss,""),o=Yr(o),(l=xs.test(r))&&(r=r.slice(1,-1)),s&&(s.prop&&!l&&"innerHtml"===(r=k(r))&&(r="innerHTML"),s.camel&&!l&&(r=k(r)),s.sync&&(a=ui(o,"$event"),l?ii(t,'"update:"+('.concat(r,")"),a,null,!1,0,c[e],!0):(ii(t,"update:".concat(k(r)),a,null,!1,0,c[e]),_(r)!==k(r)&&ii(t,"update:".concat(_(r)),a,null,!1,0,c[e])))),s&&s.prop||!t.component&&ps(t.tag,t.attrsMap.type,r)?Qr(t,r,o,c[e],l):ti(t,r,o,c[e],l);else if(gs.test(r))r=r.replace(gs,""),(l=xs.test(r))&&(r=r.slice(1,-1)),ii(t,r,o,s,!1,0,c[e],l);else{var u=(r=r.replace(vs,"")).match(ks),d=u&&u[1];l=!1,d&&(r=r.slice(0,-(d.length+1)),xs.test(d)&&(d=d.slice(1,-1),l=!0)),ni(t,r,i,o,d,l,s,c[e])}else ti(t,r,JSON.stringify(o),c[e]),!t.component&&"muted"===r&&ps(t.tag,t.attrsMap.type,r)&&Qr(t,r,"true",c[e])}(t),t}function As(t){var e;if(e=si(t,"v-for")){var n=function(t){var e=t.match(ys);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(ws,""),i=r.match(bs);i?(n.alias=r.replace(bs,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(e);n&&$(t,n)}}function Es(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function Ps(t){var e=t.name.replace(_s,"");return e||"#"!==t.name[0]&&(e="default"),xs.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'.concat(e,'"'),dynamic:!1}}function Is(t){var e=t.match(Os);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function Rs(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var zs=/^xmlns:NS\d+/,js=/^NS\d+:/;function Fs(t){return Ns(t.tag,t.attrsList.slice(),t.parent)}var Ls=[Io,zo,{preTransformNode:function(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r=void 0;if((n[":type"]||n["v-bind:type"])&&(r=oi(t,"type")),n.type||r||!n["v-bind"]||(r="(".concat(n["v-bind"],").type")),r){var i=si(t,"v-if",!0),o=i?"&&(".concat(i,")"):"",s=null!=si(t,"v-else",!0),a=si(t,"v-else-if",!0),l=Fs(t);As(l),ei(l,"type","checkbox"),Ds(l,e),l.processed=!0,l.if="(".concat(r,")==='checkbox'")+o,Es(l,{exp:l.if,block:l});var c=Fs(t);si(c,"v-for",!0),ei(c,"type","radio"),Ds(c,e),Es(l,{exp:"(".concat(r,")==='radio'")+o,block:c});var u=Fs(t);return si(u,"v-for",!0),ei(u,":type",r),Ds(u,e),Es(l,{exp:i,block:u}),s?l.else=!0:a&&(l.elseif=a),l}}}}];var Bs,Vs,qs,Js={model:function(t,e,n){var r=e.value,i=e.modifiers,o=t.tag,s=t.attrsMap.type;if(t.component)return ci(t,r,i),!1;if("select"===o)!function(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(r?"_n(val)":"val","})"),o="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",s="var $$selectedVal = ".concat(i,";");s="".concat(s," ").concat(ui(e,o)),ii(t,"change",s,null,!0)}(t,r,i);else if("input"===o&&"checkbox"===s)!function(t,e,n){var r=n&&n.number,i=oi(t,"value")||"null",o=oi(t,"true-value")||"true",s=oi(t,"false-value")||"false";Qr(t,"checked","Array.isArray(".concat(e,")")+"?_i(".concat(e,",").concat(i,")>-1")+("true"===o?":(".concat(e,")"):":_q(".concat(e,",").concat(o,")"))),ii(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(o,"):(").concat(s,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+i+")":i,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(ui(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(ui(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(ui(e,"$$c"),"}"),null,!0)}(t,r,i);else if("input"===o&&"radio"===s)!function(t,e,n){var r=n&&n.number,i=oi(t,"value")||"null";i=r?"_n(".concat(i,")"):i,Qr(t,"checked","_q(".concat(e,",").concat(i,")")),ii(t,"change",ui(e,i),null,!0)}(t,r,i);else if("input"===o||"textarea"===o)!function(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,s=i.number,a=i.trim,l=!o&&"range"!==r,c=o?"change":"range"===r?"__r":"input",u="$event.target.value";a&&(u="$event.target.value.trim()");s&&(u="_n(".concat(u,")"));var d=ui(e,u);l&&(d="if($event.target.composing)return;".concat(d));Qr(t,"value","(".concat(e,")")),ii(t,c,d,null,!0),(a||s)&&ii(t,"blur","$forceUpdate()")}(t,r,i);else if(!F.isReservedTag(o))return ci(t,r,i),!1;return!0},text:function(t,e){e.value&&Qr(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Qr(t,"innerHTML","_s(".concat(e.value,")"),e)}},Ws={expectHTML:!0,modules:Ls,directives:Js,isPreTag:function(t){return"pre"===t},isUnaryTag:Fo,mustUseProp:er,canBeLeftOpenTag:Lo,isReservedTag:gr,getTagNamespace:vr,staticKeys:(Bs=Ls,Bs.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(","))},Hs=w((function(t){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Ks(t,e){t&&(Vs=Hs(e.staticKeys||""),qs=e.isReservedTag||D,Us(t),Ys(t,!1))}function Us(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!qs(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Vs)))}(t),1===t.type){if(!qs(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Us(r),r.static||(t.static=!1)}if(t.ifConditions)for(e=1,n=t.ifConditions.length;e<n;e++){var i=t.ifConditions[e].block;Us(i),i.static||(t.static=!1)}}}function Ys(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ys(t.children[n],e||!!t.for);if(t.ifConditions)for(n=1,r=t.ifConditions.length;n<r;n++)Ys(t.ifConditions[n].block,e)}}var Gs=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Zs=/\([^)]*?\);*$/,Xs=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Qs={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ta={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},ea=function(t){return"if(".concat(t,")return null;")},na={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ea("$event.target !== $event.currentTarget"),ctrl:ea("!$event.ctrlKey"),shift:ea("!$event.shiftKey"),alt:ea("!$event.altKey"),meta:ea("!$event.metaKey"),left:ea("'button' in $event && $event.button !== 0"),middle:ea("'button' in $event && $event.button !== 1"),right:ea("'button' in $event && $event.button !== 2")};function ra(t,e){var n=e?"nativeOn:":"on:",r="",i="";for(var o in t){var s=ia(t[o]);t[o]&&t[o].dynamic?i+="".concat(o,",").concat(s,","):r+='"'.concat(o,'":').concat(s,",")}return r="{".concat(r.slice(0,-1),"}"),i?n+"_d(".concat(r,",[").concat(i.slice(0,-1),"])"):n+r}function ia(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return ia(t)})).join(","),"]");var e=Xs.test(t.value),n=Gs.test(t.value),r=Xs.test(t.value.replace(Zs,""));if(t.modifiers){var i="",o="",s=[],a=function(e){if(na[e])o+=na[e],Qs[e]&&s.push(e);else if("exact"===e){var n=t.modifiers;o+=ea(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else s.push(e)};for(var l in t.modifiers)a(l);s.length&&(i+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(oa).join("&&"),")return null;")}(s)),o&&(i+=o);var c=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(i).concat(c,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function oa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Qs[t],r=ta[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var sa={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:T},aa=function(t){this.options=t,this.warn=t.warn||Zr,this.transforms=Xr(t.modules,"transformCode"),this.dataGenFns=Xr(t.modules,"genData"),this.directives=$($({},sa),t.directives);var e=t.isReservedTag||D;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function la(t,e){var n=new aa(e),r=t?"script"===t.tag?"null":ca(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function ca(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return ua(t,e);if(t.once&&!t.onceProcessed)return da(t,e);if(t.for&&!t.forProcessed)return pa(t,e);if(t.if&&!t.ifProcessed)return fa(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=ya(t,e),i="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),o=t.attrs||t.dynamicAttrs?xa((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:k(t.name),value:t.value,dynamic:t.dynamic}}))):null,s=t.attrsMap["v-bind"];!o&&!s||r||(i+=",null");o&&(i+=",".concat(o));s&&(i+="".concat(o?"":",null",",").concat(s));return i+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:ya(e,n,!0);return"_c(".concat(t,",").concat(ma(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,i=e.maybeComponent(t);(!t.plain||t.pre&&i)&&(r=ma(t,e));var o=void 0,s=e.options.bindings;i&&s&&!1!==s.__isScriptSetup&&(o=function(t,e){var n=k(e),r=S(n),i=function(i){return t[e]===i?e:t[n]===i?n:t[r]===i?r:void 0},o=i("setup-const")||i("setup-reactive-const");if(o)return o;var s=i("setup-let")||i("setup-ref")||i("setup-maybe-ref");if(s)return s}(s,t.tag)),o||(o="'".concat(t.tag,"'"));var a=t.inlineTemplate?null:ya(t,e,!0);n="_c(".concat(o).concat(r?",".concat(r):"").concat(a?",".concat(a):"",")")}for(var l=0;l<e.transforms.length;l++)n=e.transforms[l](t,n);return n}return ya(t,e)||"void 0"}function ua(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return ".concat(ca(t,e),"}")),e.pre=n,"_m(".concat(e.staticRenderFns.length-1).concat(t.staticInFor?",true":"",")")}function da(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return fa(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o(".concat(ca(t,e),",").concat(e.onceId++,",").concat(n,")"):ca(t,e)}return ua(t,e)}function fa(t,e,n,r){return t.ifProcessed=!0,ha(t.ifConditions.slice(),e,n,r)}function ha(t,e,n,r){if(!t.length)return r||"_e()";var i=t.shift();return i.exp?"(".concat(i.exp,")?").concat(o(i.block),":").concat(ha(t,e,n,r)):"".concat(o(i.block));function o(t){return n?n(t,e):t.once?da(t,e):ca(t,e)}}function pa(t,e,n,r){var i=t.for,o=t.alias,s=t.iterator1?",".concat(t.iterator1):"",a=t.iterator2?",".concat(t.iterator2):"";return t.forProcessed=!0,"".concat(r||"_l","((").concat(i,"),")+"function(".concat(o).concat(s).concat(a,"){")+"return ".concat((n||ca)(t,e))+"})"}function ma(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,i,o,s,a="directives:[",l=!1;for(r=0,i=n.length;r<i;r++){o=n[r],s=!0;var c=e.directives[o.name];c&&(s=!!c(t,o,e.warn)),s&&(l=!0,a+='{name:"'.concat(o.name,'",rawName:"').concat(o.rawName,'"').concat(o.value?",value:(".concat(o.value,"),expression:").concat(JSON.stringify(o.value)):"").concat(o.arg?",arg:".concat(o.isDynamicArg?o.arg:'"'.concat(o.arg,'"')):"").concat(o.modifiers?",modifiers:".concat(JSON.stringify(o.modifiers)):"","},"))}if(l)return a.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:".concat(t.key,",")),t.ref&&(n+="ref:".concat(t.ref,",")),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'.concat(t.tag,'",'));for(var i=0;i<e.dataGenFns.length;i++)n+=e.dataGenFns[i](t);if(t.attrs&&(n+="attrs:".concat(xa(t.attrs),",")),t.props&&(n+="domProps:".concat(xa(t.props),",")),t.events&&(n+="".concat(ra(t.events,!1),",")),t.nativeEvents&&(n+="".concat(ra(t.nativeEvents,!0),",")),t.slotTarget&&!t.slotScope&&(n+="slot:".concat(t.slotTarget,",")),t.scopedSlots&&(n+="".concat(function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||ga(n)})),i=!!t.if;if(!r)for(var o=t.parent;o;){if(o.slotScope&&"_empty_"!==o.slotScope||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var s=Object.keys(e).map((function(t){return va(e[t],n)})).join(",");return"scopedSlots:_u([".concat(s,"]").concat(r?",null,true":"").concat(!r&&i?",null,false,".concat(function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(s)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var o=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=la(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);o&&(n+="".concat(o,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(xa(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function ga(t){return 1===t.type&&("slot"===t.tag||t.children.some(ga))}function va(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return fa(t,e,va,"null");if(t.for&&!t.forProcessed)return pa(t,e,va);var r="_empty_"===t.slotScope?"":String(t.slotScope),i="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(ya(t,e)||"undefined",":undefined"):ya(t,e)||"undefined":ca(t,e),"}"),o=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(i).concat(o,"}")}function ya(t,e,n,r,i){var o=t.children;if(o.length){var s=o[0];if(1===o.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var a=n?e.maybeComponent(s)?",1":",0":"";return"".concat((r||ca)(s,e)).concat(a)}var l=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var i=t[r];if(1===i.type){if(ba(i)||i.ifConditions&&i.ifConditions.some((function(t){return ba(t.block)}))){n=2;break}(e(i)||i.ifConditions&&i.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(o,e.maybeComponent):0,c=i||wa;return"[".concat(o.map((function(t){return c(t,e)})).join(","),"]").concat(l?",".concat(l):"")}}function ba(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function wa(t,e){return 1===t.type?ca(t,e):3===t.type&&t.isComment?(r=t,"_e(".concat(JSON.stringify(r.text),")")):"_v(".concat(2===(n=t).type?n.expression:ka(JSON.stringify(n.text)),")");var n,r}function xa(t){for(var e="",n="",r=0;r<t.length;r++){var i=t[r],o=ka(i.value);i.dynamic?n+="".concat(i.name,",").concat(o,","):e+='"'.concat(i.name,'":').concat(o,",")}return e="{".concat(e.slice(0,-1),"}"),n?"_d(".concat(e,",[").concat(n.slice(0,-1),"])"):e}function ka(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Sa(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),T}}function Oa(t){var e=Object.create(null);return function(n,r,i){(r=$({},r)).warn,delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(e[o])return e[o];var s=t(n,r),a={},l=[];return a.render=Sa(s.render,l),a.staticRenderFns=s.staticRenderFns.map((function(t){return Sa(t,l)})),e[o]=a}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var _a,Ma,Ca=(_a=function(t,e){var n=Ts(t.trim(),e);!1!==e.optimize&&Ks(n,e);var r=la(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),i=[],o=[];if(n)for(var s in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=$(Object.create(t.directives||null),n.directives)),n)"modules"!==s&&"directives"!==s&&(r[s]=n[s]);r.warn=function(t,e,n){(n?o:i).push(t)};var a=_a(e.trim(),r);return a.errors=i,a.tips=o,a}return{compile:e,compileToFunctions:Oa(e)}}),$a=Ca(Ws).compileToFunctions;function Na(t){return(Ma=Ma||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',Ma.innerHTML.indexOf("&#10;")>0}var Ta=!!W&&Na(!1),Da=!!W&&Na(!0),Aa=w((function(t){var e=wr(t);return e&&e.innerHTML})),Ea=Wn.prototype.$mount;function Pa(t){this.content=t}function Ia(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){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let t=0;i.text[t]==o.text[t];t++)n++;return n}if(i.content.size||o.content.size){let t=Ia(i.content,o.content,n+1);if(null!=t)return t}n+=i.nodeSize}else n+=i.nodeSize}}function Ra(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let t=0,e=Math.min(s.text.length,a.text.length);for(;t<e&&s.text[s.text.length-t-1]==a.text[a.text.length-t-1];)t++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let t=Ra(s.content,a.content,n-1,r-1);if(t)return t}n-=l,r-=l}else n-=l,r-=l}}Wn.prototype.$mount=function(t,e){if((t=t&&wr(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Aa(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var i=$a(r,{outputSourceRange:!1,shouldDecodeNewlines:Ta,shouldDecodeNewlinesForHref:Da,delimiters:n.delimiters,comments:n.comments},this),o=i.render,s=i.staticRenderFns;n.render=o,n.staticRenderFns=s}}return Ea.call(this,t,e)},Wn.compile=$a,Pa.prototype={constructor:Pa,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return-1==i?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Pa(o)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new Pa(n)},addToStart:function(t,e){return new Pa([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Pa(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(-1==o?i.length:o,0,e,n),new Pa(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=Pa.from(t)).size?new Pa(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Pa.from(t)).size?new Pa(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Pa.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach((function(e,n){t[e]=n})),t},get size(){return this.content.length>>1}},Pa.from=function(t){if(t instanceof Pa)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Pa(e)};class za{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let n=0;n<t.length;n++)this.size+=t[n].nodeSize}nodesBetween(t,e,n,r=0,i){for(let o=0,s=0;s<e;o++){let a=this.content[o],l=s+a.nodeSize;if(l>t&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,t-i),Math.min(a.content.size,e-i),n,r+i)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",o=!0;return this.nodesBetween(t,e,((s,a)=>{s.isText?(i+=s.text.slice(Math.max(t,a)-a,e-a),o=!n):s.isLeaf?(r?i+="function"==typeof r?r(s):r:s.type.spec.leafText&&(i+=s.type.spec.leafText(s)),o=!n):!o&&s.isBlock&&(i+=n,o=!0)}),0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<t.content.length;i++)r.push(t.content[i]);return new za(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,o=0;o<e;i++){let s=this.content[i],a=o+s.nodeSize;a>t&&((o<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),r+=s.nodeSize),o=a}return new za(n,r)}cutByIndex(t,e){return t==e?za.empty:0==t&&e==this.content.length?this:new za(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new za(r,i)}addToStart(t){return new za([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new za(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))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(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return Ia(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return Ra(this,t,e,n)}findIndex(t,e=-1){if(0==t)return Fa(0,t);if(t==this.size)return Fa(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t||e>0?Fa(n+1,i):Fa(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return za.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new za(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return za.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new za(e||t,n)}static from(t){if(!t)return za.empty;if(t instanceof za)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new za([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}za.empty=new za([],0);const ja={index:0,offset:0};function Fa(t,e){return ja.index=t,ja.offset=e,ja}function La(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)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 n=0;n<t.length;n++)if(!La(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!La(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class Ba{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&La(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return Ba.none;if(t instanceof Ba)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}Ba.none=[];class Va extends Error{}class qa{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=Wa(this.content,t+this.openStart,e);return n&&new qa(n,this.openStart,this.openEnd)}removeBetween(t,e){return new qa(Ja(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return qa.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new qa(za.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new qa(t,n,r)}}function Ja(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=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(Ja(o.content,e-i-1,n-i-1)))}function Wa(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 a=Wa(s.content,e-o-1,n);return a&&t.replaceChild(i,s.copy(a))}function Ha(t,e,n){if(n.openStart>t.depth)throw new Va("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Va("Inconsistent open depths");return Ka(t,e,n,0)}function Ka(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=Ka(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:i,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)r=e.node(i).copy(za.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return Xa(o,Qa(t,i,s,e,r))}{let r=t.parent,i=r.content;return Xa(r,i.cut(0,t.parentOffset).append(n.content).append(i.cut(e.parentOffset)))}}return Xa(o,tl(t,e,r))}function Ua(t,e){if(!e.type.compatibleContent(t.type))throw new Va("Cannot join "+e.type.name+" onto "+t.type.name)}function Ya(t,e,n){let r=t.node(n);return Ua(r,e.node(n)),r}function Ga(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Za(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&&(Ga(t.nodeAfter,r),o++));for(let a=o;a<s;a++)Ga(i.child(a),r);e&&e.depth==n&&e.textOffset&&Ga(e.nodeBefore,r)}function Xa(t,e){return t.type.checkContent(e),t.copy(e)}function Qa(t,e,n,r,i){let o=t.depth>i&&Ya(t,e,i+1),s=r.depth>i&&Ya(n,r,i+1),a=[];return Za(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(Ua(o,s),Ga(Xa(o,Qa(t,e,n,r,i+1)),a)):(o&&Ga(Xa(o,tl(t,e,i+1)),a),Za(e,n,i,a),s&&Ga(Xa(s,tl(n,r,i+1)),a)),Za(r,null,i,a),new za(a)}function tl(t,e,n){let r=[];if(Za(null,t,n,r),t.depth>n){Ga(Xa(Ya(t,e,n+1),tl(t,e,n+1)),r)}return Za(e,null,n,r),new za(r)}qa.empty=new qa(za.empty,0,0);class el{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let i=0;i<t;i++)r+=n.child(i).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return Ba.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new ol(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let o=t;;){let{index:t,offset:e}=o.content.findIndex(i),s=i-e;if(n.push(o,t,r+e),!s)break;if(o=o.child(t),o.isText)break;i=s-1,r+=e+1}return new el(e,n,i)}static resolveCached(t,e){for(let r=0;r<nl.length;r++){let n=nl[r];if(n.pos==e&&n.doc==t)return n}let n=nl[rl]=el.resolve(t,e);return rl=(rl+1)%il,n}}let nl=[],rl=0,il=12;class ol{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const sl=Object.create(null);class al{constructor(t,e,n,r=Ba.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||za.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&La(this.attrs,e||t.defaultAttrs||sl)&&Ba.sameSet(this.marks,n||Ba.none)}copy(t=null){return t==this.content?this:new al(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new al(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return qa.empty;let r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new qa(a,r.depth-o,i.depth-o)}replace(t,e,n){return Ha(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return el.resolveCached(this,t)}resolveNoCache(t){return el.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),cl(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=za.empty,r=0,i=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let a=r;a<i;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=Ba.none;for(let e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!Ba.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=za.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}al.prototype.text=void 0;class ll extends al{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):cl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ll(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ll(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function cl(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ul{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new dl(t,e);if(null==n.next)return ul.empty;let r=fl(n);n.next&&n.err("Unexpected trailing text");let i=function(t){let e=Object.create(null);return n(yl(t,0));function n(r){let i=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);yl(t,n).forEach((t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let o=e[r.join(",")]=new ul(r.indexOf(t.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(vl);o.next.push({type:i[t][0],next:e[r.join(",")]||n(r)})}return o}}(function(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach((t=>t.to=e))}function o(t,e){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(o(n,e))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(e,s),i(o(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(o(t.expr,e),s),i(o(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(e)].concat(o(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e<t.min;e++){let e=n();i(o(t.expr,s),e),s=e}if(-1==t.max)i(o(t.expr,s),s);else for(let e=t.min;e<t.max;e++){let e=n();r(s,e),i(o(t.expr,s),e),s=e}return[r(s)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=o(t.exprs[r],e);if(r==t.exprs.length-1)return s;i(s,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,o=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];o.push(n.name),!i||n.isText||n.hasRequiredAttrs()||(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function i(o,s){let a=o.matchFragment(t,n);if(a&&(!e||a.validEnd))return za.from(s.map((t=>t.createAndFill())));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=i(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==t)return this.wrapCache[n+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:o,next:s}=i.next[t];o.isLeaf||o.hasRequiredAttrs()||o.name in e||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),e[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map(((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let i=0;i<e.next.length;i++)r+=(i?", ":"")+e.next[i].type.name+"->"+t.indexOf(e.next[i].next);return r})).join("\n")}}ul.empty=new ul(!0);class dl{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function fl(t){let e=[];do{e.push(hl(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function hl(t){let e=[];do{e.push(pl(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function pl(t){let e=function(t){if(t.eat("(")){let e=fl(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let t=n[o];t.groups.indexOf(e)>-1&&i.push(t)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(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("{"))break;e=gl(t,e)}return e}function ml(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function gl(t,e){let n=ml(t),r=n;return t.eat(",")&&(r="}"!=t.next?ml(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function vl(t,e){return e-t}function yl(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:o}=i[t];r||-1!=n.indexOf(o)||e(o)}}(e),n.sort(vl)}function bl(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function wl(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=e.default}n[r]=i}return n}function xl(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new Sl(t[n]);return e}class kl{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=xl(n.attrs),this.defaultAttrs=bl(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ul.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:wl(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new al(this,this.computeAttrs(t),za.from(e),Ba.setFrom(n))}createChecked(t=null,e,n){return e=za.from(e),this.checkContent(e),new al(this,this.computeAttrs(t),e,Ba.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=za.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),i=r&&r.fillBefore(za.empty,!0);return i?new al(this,t,e.append(i),Ba.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:Ba.none:t}static compile(t,e){let n=Object.create(null);t.forEach(((t,r)=>n[t]=new kl(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class Sl{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Ol{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=xl(r.attrs),this.excluded=null;let i=bl(this.attrs);this.instance=i?new Ba(this,i):null}create(t=null){return!t&&this.instance?this.instance:new Ba(this,wl(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,i)=>n[t]=new Ol(t,r++,e,i))),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}class _l{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=Pa.from(t.nodes),e.marks=Pa.from(t.marks||{}),this.nodes=kl.compile(this.spec.nodes,this),this.marks=Ol.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let t=this.nodes[r],e=t.spec.content||"",i=t.spec.marks;t.contentMatch=n[e]||(n[e]=ul.parse(e,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==i?null:i?Ml(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let r in this.marks){let t=this.marks[r],e=t.spec.excludes;t.excluded=null==e?[t]:""==e?[]:Ml(this,e.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof kl))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new ll(n,n.defaultAttrs,t,Ba.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return al.fromJSON(this,t)}markFromJSON(t){return Ba.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function Ml(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 e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Cl{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((t=>{t.tag?this.tags.push(t):t.style&&this.styles.push(t)})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new El(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new El(this,e,!0);return n.addAll(t,e.from,e.to),qa.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Pl(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(!(0!=o.indexOf(t)||r.context&&!n.matchesContext(r.context)||o.length>t.length&&(61!=o.charCodeAt(t.length)||o.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let r in t.marks){let e=t.marks[r].spec.parseDOM;e&&e.forEach((t=>{n(t=Il(t)),t.mark=r}))}for(let r in t.nodes){let e=t.nodes[r].spec.parseDOM;e&&e.forEach((t=>{n(t=Il(t)),t.node=r}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Cl(t,Cl.schemaRules(t)))}}const $l={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},Nl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Tl={ol:!0,ul:!0};function Dl(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class Al{constructor(t,e,n,r,i,o,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=Ba.none,this.stashMarks=[],this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(za.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=za.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(za.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;e<n.length;e++){let r=n[e];(this.type?this.type.allowsMarkType(r.type):Rl(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!$l.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class El{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r,i=e.topNode,o=Dl(null,e.preserveWhitespace,0)|(n?4:0);r=i?new Al(i.type,i.attrs,Ba.none,Ba.none,!0,e.topMatch||i.type.contentMatch,o):new Al(n?null:t.schema.topNodeType,null,Ba.none,Ba.none,!0,null,o),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){let e=t.getAttribute("style"),n=e?this.readStyles(function(t){let e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;e=n.exec(t);)r.push(e[1],e[2].trim());return r}(e)):null,r=this.top;if(null!=n)for(let t=0;t<n.length;t++)this.addPendingMark(n[t]);if(this.addElement(t),null!=n)for(let t=0;t<n.length;t++)this.removePendingMark(n[t],r)}}addTextNode(t){let e=t.nodeValue,n=this.top;if(2&n.options||n.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)e=2&n.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=t.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}addElement(t,e){let n,r=t.nodeName.toLowerCase();Tl.hasOwnProperty(r)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&Tl.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(n=this.parser.matchTag(t,this,e));if(i?i.ignore:Nl.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let e,n=this.top,o=this.needsBlock;if($l.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),e=!0,n.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),e&&this.sync(n),this.needsBlock=o}else this.addElementByRule(t,i,!1===i.consuming?n:void 0)}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=Ba.none;t:for(let n=0;n<t.length;n+=2)for(let r;;){let i=this.parser.matchStyle(t[n],t[n+1],this,r);if(!i)continue t;if(i.ignore)return null;if(e=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(e),!1!==i.consuming)break;r=i}return e}addElementByRule(t,e,n){let r,i,o;if(e.node)i=this.parser.schema.nodes[e.node],i.isLeaf?this.insertNode(i.create(e.attrs))||this.leafFallback(t):r=this.enter(i,e.attrs||null,e.preserveWhitespace);else{o=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(o)}let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t)));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,o&&this.removePendingMark(o,s)}addAll(t,e,n){let r=e||0;for(let i=e?t.childNodes[e]:t.firstChild,o=null==n?null:t.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(i);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(t);if(o&&(!e||e.length>o.length)&&(e=o,n=i,!o.length))break;if(i.solid)break}if(!e)return!1;this.sync(n);for(let r=0;r<e.length;r++)this.enterInner(e[r],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(t)){this.closeExtra();let e=this.top;e.applyPending(t.type),e.match&&(e.match=e.match.matchType(t.type));let n=e.activeMarks;for(let r=0;r<t.marks.length;r++)e.type&&!e.type.allowsMarkType(t.marks[r].type)||(n=t.marks[r].addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n){let r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r}enterInner(t,e=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t);let o=Dl(t,r,i.options);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new Al(t,e,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));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(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=i;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!t||t.name!=a&&-1==t.groups.indexOf(a))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(t){let e=function(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function Pl(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Il(t){let e={};for(let n in t)e[n]=t[n];return e}function Rl(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e)return!0;if(o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}class zl{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=Fl(e).createDocumentFragment());let r=n,i=[];return t.forEach((t=>{if(i.length||t.marks.length){let n=0,o=0;for(;n<i.length&&o<t.marks.length;){let e=t.marks[o];if(this.marks[e.type.name]){if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,o++}else o++}for(;n<i.length;)r=i.pop()[1];for(;o<t.marks.length;){let n=t.marks[o++],s=this.serializeMark(n,t.isInline,e);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))})),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=zl.renderSpec(Fl(e),this.nodes[t.type.name](t));if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&zl.renderSpec(Fl(n),r(t,e))}static renderSpec(t,e,n=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r,i=e[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s=n?t.createElementNS(n,i):t.createElement(i),a=e[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):s.setAttribute(t,a[t])}}for(let c=l;c<e.length;c++){let i=e[c];if(0===i){if(c<e.length-1||c>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:o}=zl.renderSpec(t,i,n);if(s.appendChild(e),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new zl(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=jl(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return jl(t.marks)}}function jl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Fl(t){return t.document||window.document}const Ll=Math.pow(2,16);function Bl(t){return 65535&t}class Vl{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class ql{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&ql.empty)return ql.empty}recover(t){let e=0,n=Bl(t);if(!this.inverted)for(let r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/Ll}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>t)break;let l=this.ranges[s+i],c=this.ranges[s+o],u=a+l;if(t<=u){let i=a+r+((l?t==a?-1:t==u?1:e:e)<0?0:c);if(n)return i;let o=t==(e<0?a:u)?null:s/3+(t-a)*Ll,d=t==a?2:t==u?1:4;return(e<0?t!=a:t!=u)&&(d|=8),new Vl(i,d,o)}r+=c-l}return n?t+r:new Vl(t+r,0,null)}touches(t,e){let n=0,r=Bl(e),i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let e=this.ranges[s]-(this.inverted?n:0);if(e>t)break;let a=this.ranges[s+i];if(t<=e+a&&s==3*r)return!0;n+=this.ranges[s+o]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+e],c=this.ranges[r+n];t(s,s+l,a,a+c),i+=c-l}}invert(){return new ql(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?ql.empty:new ql(t<0?[0,-t,0]:[0,0,t])}}ql.empty=new ql([]);class Jl{constructor(t=[],e,n=0,r=t.length){this.maps=t,this.mirror=e,this.from=n,this.to=r}slice(t=0,e=this.maps.length){return new Jl(this.maps,this.mirror,t,e)}copy(){return new Jl(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,n=this.maps.length;e<t.maps.length;e++){let r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new Jl;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let i=this.from;i<this.to;i++){let n=this.maps[i].mapResult(t,e);if(null!=n.recover){let e=this.getMirror(i);if(null!=e&&e>i&&e<this.to){i=e,t=this.maps[e].recover(n.recover);continue}}r|=n.delInfo,t=n.pos}return n?t:new Vl(t,r,null)}}const Wl=Object.create(null);class Hl{getMap(){return ql.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Wl[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Wl)throw new RangeError("Duplicate use of step JSON ID "+t);return Wl[t]=e,e.prototype.jsonID=t,e}}class Kl{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new Kl(t,null)}static fail(t){return new Kl(null,t)}static fromReplace(t,e,n,r){try{return Kl.ok(t.replace(e,n,r))}catch(Tg){if(Tg instanceof Va)return Kl.fail(Tg.message);throw Tg}}}function Ul(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Ul(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return za.fromArray(r)}class Yl extends Hl{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new qa(Ul(e.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),r),e.openStart,e.openEnd);return Kl.fromReplace(t,this.from,this.to,i)}invert(){return new Gl(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new Yl(e.pos,n.pos,this.mark)}merge(t){return t instanceof Yl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Yl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Yl(e.from,e.to,t.markFromJSON(e.mark))}}Hl.jsonID("addMark",Yl);class Gl extends Hl{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new qa(Ul(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return Kl.fromReplace(t,this.from,this.to,n)}invert(){return new Yl(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new Gl(e.pos,n.pos,this.mark)}merge(t){return t instanceof Gl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Gl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Gl(e.from,e.to,t.markFromJSON(e.mark))}}Hl.jsonID("removeMark",Gl);class Zl extends Hl{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Kl.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return Kl.fromReplace(t,this.pos,this.pos+1,new qa(za.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new Zl(this.pos,e.marks[n]);return new Zl(this.pos,this.mark)}}return new Xl(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Zl(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Zl(e.pos,t.markFromJSON(e.mark))}}Hl.jsonID("addNodeMark",Zl);class Xl extends Hl{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Kl.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return Kl.fromReplace(t,this.pos,this.pos+1,new qa(za.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new Zl(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Xl(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Xl(e.pos,t.markFromJSON(e.mark))}}Hl.jsonID("removeNodeMark",Xl);class Ql extends Hl{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&ec(t,this.from,this.to)?Kl.fail("Structure replace would overwrite content"):Kl.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new ql([this.from,this.to-this.from,this.slice.size])}invert(t){return new Ql(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new Ql(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof Ql)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?qa.empty:new qa(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Ql(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?qa.empty:new qa(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Ql(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ql(e.from,e.to,qa.fromJSON(t,e.slice),!!e.structure)}}Hl.jsonID("replace",Ql);class tc extends Hl{constructor(t,e,n,r,i,o,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(ec(t,this.from,this.gapFrom)||ec(t,this.gapTo,this.to)))return Kl.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return Kl.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?Kl.fromReplace(t,this.from,this.to,n):Kl.fail("Content does not fit in gap")}getMap(){return new ql([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new tc(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new tc(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tc(e.from,e.to,e.gapFrom,e.gapTo,qa.fromJSON(t,e.slice),e.insert,!!e.structure)}}function ec(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 t=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function nc(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function rc(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(0==n||r.type.spec.isolating||!nc(r,i,o))break}return null}function ic(t,e,n=null,r=t){let i=function(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}(t,e),o=i&&function(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 a=(s.length?s[s.length-1]:e).contentMatch;for(let l=r;a&&l<i;l++)a=a.matchType(n.child(l).type);return a&&a.validEnd?s:null}(r,e);return o?i.map(oc).concat({type:e,attrs:n}).concat(o.map(oc)):null}function oc(t){return{type:t,attrs:null}}function sc(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let t=i.node(c),e=i.index(c);if(t.type.spec.isolating)return!1;let n=t.content.cutByIndex(e,t.childCount),o=r&&r[u]||t;if(o!=t&&(n=n.replaceChild(0,o.type.create(o.attrs))),!t.canReplace(e+1,t.childCount)||!o.type.validContent(n))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function ac(t,e){let n=t.resolve(e),r=n.index();return i=n.nodeBefore,o=n.nodeAfter,!(!i||!o||i.isLeaf||!i.canAppend(o))&&n.parent.canReplace(r,r+1);var i,o}function lc(t,e,n=e,r=qa.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return cc(i,o,r)?new Ql(e,n,r):new uc(i,o,r).fit()}function cc(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}Hl.jsonID("replaceAround",tc);class uc{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=za.empty;for(let r=0;r<=t.depth;r++){let e=t.node(r);this.frontier.push({type:e.type,match:e.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=za.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let a=new qa(i,o,s);return t>-1?new tc(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new Ql(n.pos,r.pos,a):null}findFittable(){for(let t=1;t<=2;t++)for(let e=this.unplaced.openStart;e>=0;e--){let n,r=null;e?(r=hc(this.unplaced.content,e-1).firstChild,n=r.content):n=this.unplaced.content;let i=n.firstChild;for(let o=this.depth;o>=0;o--){let n,{type:s,match:a}=this.frontier[o],l=null;if(1==t&&(i?a.matchType(i.type)||(l=a.fillBefore(za.from(i),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:e,frontierDepth:o,parent:r,inject:l};if(2==t&&i&&(n=a.findWrapping(i.type)))return{sliceDepth:e,frontierDepth:o,parent:r,wrap:n};if(r&&a.matchType(r.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=hc(t,e);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new qa(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=hc(t,e);if(r.childCount<=1&&e>0){let i=t.size-e<=e+r.size;this.unplaced=new qa(dc(t,e-1,1),e-1,i?e-1:n)}else this.unplaced=new qa(dc(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:i}){for(;this.depth>e;)this.closeFrontierNode();if(i)for(let p=0;p<i.length;p++)this.openFrontierNode(i[p]);let o=this.unplaced,s=n?n.content:o.content,a=o.openStart-t,l=0,c=[],{match:u,type:d}=this.frontier[e];if(r){for(let t=0;t<r.childCount;t++)c.push(r.child(t));u=u.matchFragment(r)}let f=s.size+t-(o.content.size-o.openEnd);for(;l<s.childCount;){let t=s.child(l),e=u.matchType(t.type);if(!e)break;l++,(l>1||0==a||t.content.size)&&(u=e,c.push(pc(t.mark(d.allowedMarks(t.marks)),1==l?a:0,l==s.childCount?f:-1)))}let h=l==s.childCount;h||(f=-1),this.placed=fc(this.placed,e,za.from(c)),this.frontier[e].match=u,h&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let p=0,m=s;p<f;p++){let t=m.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),m=t.content}this.unplaced=h?0==t?qa.empty:new qa(dc(o.content,t-1,1),t-1,f<0?o.openEnd:t-1):new qa(dc(o.content,t,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!mc(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),o=mc(t,e,r,n,i);if(o){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=mc(t,n,r,e,!0);if(!i||i.childCount)continue t}return{depth:e,fit:o,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=fc(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=fc(this.placed,this.depth,za.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(za.empty,!0);t.childCount&&(this.placed=fc(this.placed,this.frontier.length,t))}}function dc(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(dc(t.firstChild.content,e-1,n)))}function fc(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(fc(t.lastChild.content,e-1,n)))}function hc(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function pc(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,pc(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(za.empty,!0)))),t.copy(r)}function mc(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,s)?a:null}function gc(t){return t.spec.defining||t.spec.definingForContent}function vc(t,e,n,r,i){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(vc(i.content,e+1,n,r,i)))}if(e>r){let e=i.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(za.empty,!0))}return t}function yc(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}class bc extends Hl{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return Kl.fail("No node at attribute step's position");let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,null,e.marks);return Kl.fromReplace(t,this.pos,this.pos+1,new qa(za.from(r),0,e.isLeaf?0:1))}getMap(){return ql.empty}invert(t){return new bc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new bc(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new bc(e.pos,e.attr,e.value)}}Hl.jsonID("attr",bc);let wc=class extends Error{};wc=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(wc.prototype=Object.create(Error.prototype)).constructor=wc,wc.prototype.name="TransformError";class xc{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Jl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new wc(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=qa.empty){let r=lc(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new qa(za.from(n),0,0))}delete(t,e){return this.replace(t,e,qa.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(cc(i,o,r))return t.step(new Ql(e,n,r));let s=yc(i,t.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let t=i.node(f).type.spec;if(t.defining||t.definingAsContext||t.isolating)break;s.indexOf(f)>-1?a=f:i.before(f)==h&&s.splice(1,0,-f)}let l=s.indexOf(a),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let t=f.firstChild;if(c.push(t),h==r.openStart)break;f=t.content}for(let f=u-1;f>=0;f--){let t=c[f].type,e=gc(t);if(e&&i.node(l).type!=t)u=f;else if(e||!t.isTextblock)break}for(let f=r.openStart;f>=0;f--){let e=(f+u+1)%(r.openStart+1),a=c[e];if(a)for(let c=0;c<s.length;c++){let u=s[(c+l)%s.length],d=!0;u<0&&(d=!1,u=-u);let f=i.node(u-1),h=i.index(u-1);if(f.canReplaceWith(h,h,a.type,a.marks))return t.replace(i.before(u),d?o.after(u):n,new qa(vc(r.content,0,r.openStart,e),e,r.openEnd))}}let d=t.steps.length;for(let f=s.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let t=s[f];t<0||(e=i.before(t),n=o.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let i=r.depth-1;i>=0;i--){let t=r.index(i);if(r.node(i).canReplaceWith(t,t,n))return r.before(i+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let t=r.indexAfter(i);if(r.node(i).canReplaceWith(t,t,n))return r.after(i+1);if(t<r.node(i).childCount)return null}return null}(t.doc,e,r.type);null!=i&&(e=n=i)}t.replaceRange(e,n,new qa(za.from(r),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=yc(r,i);for(let s=0;s<o.length;s++){let e=o[s],n=s==o.length-1;if(n&&0==e||r.node(e).type.contentMatch.validEnd)return t.delete(r.start(e),i.end(e));if(e>0&&(n||r.node(e-1).canReplace(r.index(e-1),i.indexAfter(e-1))))return t.delete(r.before(e),i.after(e))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=za.empty,d=0;for(let p=o,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,u=za.from(r.node(p).copy(u)),d++):l--;let f=za.empty,h=0;for(let p=o,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,f=za.from(i.node(p).copy(f)),h++):c++;t.step(new tc(l,c,s,a,new qa(u.append(f),d,h),u.size-d,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let r=new Ql(e-n,e+n,qa.empty,!0);t.step(r)}(this,t,e),this}wrap(t,e){return function(t,e,n){let r=za.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let t=n[s].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=za.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new tc(i,o,i,o,new qa(r,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,r=null){return function(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,((e,n)=>{if(e.isTextblock&&!e.hasMarkup(r,i)&&function(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(t.doc,t.mapping.slice(o).map(n),r)){t.clearIncompatible(t.mapping.slice(o).map(n,1),r);let s=t.mapping.slice(o),a=s.map(n,1),l=s.map(n+e.nodeSize,1);return t.step(new tc(a,l,a+1,l-1,new qa(za.from(r.create(i,null,e.marks)),0,0),1,!0)),!1}}))}(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r=[]){return function(t,e,n,r,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new tc(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new qa(za.from(s),0,0),1,!0))}(this,t,e,n,r),this}setNodeAttribute(t,e,n){return this.step(new bc(t,e,n)),this}addNodeMark(t,e){return this.step(new Zl(t,e)),this}removeNodeMark(t,e){if(!(e instanceof Ba)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new Xl(t,e)),this}split(t,e=1,n){return function(t,e,n=1,r){let i=t.doc.resolve(e),o=za.empty,s=za.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=za.from(i.node(a).copy(o));let t=r&&r[c];s=za.from(t?t.type.create(t.attrs,s):i.node(a).copy(s))}t.step(new Ql(e,e,new qa(o.append(s),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let i,o,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,c)=>{if(!t.isInline)return;let u=t.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),d=Math.min(l+t.nodeSize,n),f=r.addToSet(u);for(let t=0;t<u.length;t++)u[t].isInSet(f)||(i&&i.to==c&&i.mark.eq(u[t])?i.to=d:s.push(i=new Gl(c,d,u[t])));o&&o.to==c?o.to=d:a.push(o=new Yl(c,d,r))}})),s.forEach((e=>t.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,((t,s)=>{if(!t.isInline)return;o++;let a=null;if(r instanceof Ol){let e,n=t.marks;for(;e=r.isInSet(n);)(a||(a=[])).push(e),n=e.removeFromSet(n)}else r?r.isInSet(t.marks)&&(a=[r]):a=t.marks;if(a&&a.length){let r=Math.min(s+t.nodeSize,n);for(let t=0;t<a.length;t++){let n,l=a[t];for(let t=0;t<i.length;t++){let e=i[t];e.step==o-1&&l.eq(i[t].style)&&(n=e)}n?(n.to=r,n.step=o):i.push({style:l,from:Math.max(s,e),to:r,step:o})}}})),i.forEach((e=>t.step(new Gl(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return function(t,e,n,r=n.contentMatch){let i=t.doc.nodeAt(e),o=[],s=e+1;for(let a=0;a<i.childCount;a++){let e=i.child(a),l=s+e.nodeSize,c=r.matchType(e.type);if(c){r=c;for(let r=0;r<e.marks.length;r++)n.allowsMarkType(e.marks[r].type)||t.step(new Gl(s,l,e.marks[r]))}else o.push(new Ql(s,l,qa.empty));s=l}if(!r.validEnd){let e=r.fillBefore(za.empty,!0);t.replace(s,s,new qa(e,0,0))}for(let a=o.length-1;a>=0;a--)t.step(o[a])}(this,t,e,n),this}}const kc=Object.create(null);class Sc{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new Oc(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=qa.empty){let n=e.content.lastChild,r=null;for(let s=0;s<e.openEnd;s++)r=n,n=n.lastChild;let i=t.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],c=t.mapping.slice(i);t.replaceRange(c.map(a.pos),c.map(l.pos),s?qa.empty:e),0==s&&Pc(t,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=t.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),Pc(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new Cc(t):Ec(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let i=t.depth-1;i>=0;i--){let r=e<0?Ec(t.node(0),t.node(i),t.before(i+1),t.index(i),e,n):Ec(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,n);if(r)return r}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Dc(t.node(0))}static atStart(t){return Ec(t,t,0,0,1)||new Dc(t)}static atEnd(t){return Ec(t,t,t.content.size,t.childCount,-1)||new Dc(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=kc[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in kc)throw new RangeError("Duplicate use of selection JSON ID "+t);return kc[t]=e,e.prototype.jsonID=t,e}getBookmark(){return Cc.between(this.$anchor,this.$head).getBookmark()}}Sc.prototype.visible=!0;class Oc{constructor(t,e){this.$from=t,this.$to=e}}let _c=!1;function Mc(t){_c||t.parent.inlineContent||(_c=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Cc extends Sc{constructor(t,e=t){Mc(t),Mc(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return Sc.near(n);let r=t.resolve(e.map(this.anchor));return new Cc(r.parent.inlineContent?r:n,n)}replace(t,e=qa.empty){if(super.replace(t,e),e==qa.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof Cc&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new $c(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Cc(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=Sc.findFrom(e,n,!0)||Sc.findFrom(e,-n,!0);if(!t)return Sc.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(Sc.findFrom(t,-n,!0)||Sc.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0)&&(t=e),new Cc(t,e)}}Sc.jsonID("text",Cc);class $c{constructor(t,e){this.anchor=t,this.head=e}map(t){return new $c(t.map(this.anchor),t.map(this.head))}resolve(t){return Cc.between(t.resolve(this.anchor),t.resolve(this.head))}}class Nc extends Sc{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?Sc.near(i):new Nc(i)}content(){return new qa(za.from(this.node),0,0)}eq(t){return t instanceof Nc&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Tc(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Nc(t.resolve(e.anchor))}static create(t,e){return new Nc(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}Nc.prototype.visible=!1,Sc.jsonID("node",Nc);class Tc{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new $c(n,n):new Tc(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&Nc.isSelectable(n)?new Nc(e):Sc.near(e)}}class Dc extends Sc{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=qa.empty){if(e==qa.empty){t.delete(0,t.doc.content.size);let e=Sc.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new Dc(t)}map(t){return new Dc(t)}eq(t){return t instanceof Dc}getBookmark(){return Ac}}Sc.jsonID("all",Dc);const Ac={map(){return this},resolve:t=>new Dc(t)};function Ec(t,e,n,r,i,o=!1){if(e.inlineContent)return Cc.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let r=e.child(s);if(r.isAtom){if(!o&&Nc.isSelectable(r))return Nc.create(t,n-(i<0?r.nodeSize:0))}else{let e=Ec(t,r,n+i,i<0?r.childCount:0,i,o);if(e)return e}n+=r.nodeSize*i}return null}function Pc(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof Ql||o instanceof tc)&&(t.mapping.maps[r].forEach(((t,e,n,r)=>{null==i&&(i=r)})),t.setSelection(Sc.near(t.doc.resolve(i),n)))}class Ic extends xc{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return Ba.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Ba.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(Sc.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Rc(t,e){return e&&t?t.bind(e):t}class zc{constructor(t,e,n){this.name=t,this.init=Rc(e.init,n),this.apply=Rc(e.apply,n)}}const jc=[new zc("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new zc("selection",{init:(t,e)=>t.selection||Sc.atStart(e.doc),apply:t=>t.selection}),new zc("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new zc("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class Fc{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=jc.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new zc(t.key,t.spec.state,t))}))}}class Lc{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=r?r[o].n:0,l=r?r[o].state:this,c=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,l,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<o?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new Lc(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new Ic(this)}static create(t){let e=new Fc(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new Lc(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new Fc(this.schema,t.plugins),n=e.fields,r=new Lc(e);for(let i=0;i<n.length;i++){let e=n[i].name;r[e]=this.hasOwnProperty(e)?this[e]:n[i].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new Fc(t.schema,t.plugins),i=new Lc(r);return r.fields.forEach((r=>{if("doc"==r.name)i.doc=al.fromJSON(t.schema,e.doc);else if("selection"==r.name)i.selection=Sc.fromJSON(i.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(i.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let o in n){let s=n[o],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,o))return void(i[r.name]=a.fromJSON.call(s,t,e[o],i))}i[r.name]=r.init(t,i)}})),i}}function Bc(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=Bc(i,e,{})),n[r]=i}return n}class Vc{constructor(t){this.spec=t,this.props={},t.props&&Bc(t.props,this,this.props),this.key=t.key?t.key.key:Jc("plugin")}getState(t){return t[this.key]}}const qc=Object.create(null);function Jc(t){return t in qc?t+"$"+ ++qc[t]:(qc[t]=0,t+"$")}class Wc{constructor(t="key"){this.key=Jc(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Hc=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Kc=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let Uc=null;const Yc=function(t,e,n){let r=Uc||(Uc=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},Gc=function(t,e,n,r){return n&&(Xc(t,e,n,r,-1)||Xc(t,e,n,r,1))},Zc=/^(img|br|input|textarea|hr)$/i;function Xc(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Qc(t))){let n=t.parentNode;if(!n||1!=n.nodeType||tu(t)||Zc.test(t.nodeName)||"false"==t.contentEditable)return!1;e=Hc(t)+(i<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?Qc(t):0}}}function Qc(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function tu(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const eu=function(t){return t.focusNode&&Gc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function nu(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const ru="undefined"!=typeof navigator?navigator:null,iu="undefined"!=typeof document?document:null,ou=ru&&ru.userAgent||"",su=/Edge\/(\d+)/.exec(ou),au=/MSIE \d/.exec(ou),lu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ou),cu=!!(au||lu||su),uu=au?document.documentMode:lu?+lu[1]:su?+su[1]:0,du=!cu&&/gecko\/(\d+)/i.test(ou);du&&(/Firefox\/(\d+)/.exec(ou)||[0,0])[1];const fu=!cu&&/Chrome\/(\d+)/.exec(ou),hu=!!fu,pu=fu?+fu[1]:0,mu=!cu&&!!ru&&/Apple Computer/.test(ru.vendor),gu=mu&&(/Mobile\/\w+/.test(ou)||!!ru&&ru.maxTouchPoints>2),vu=gu||!!ru&&/Mac/.test(ru.platform),yu=/Android \d/.test(ou),bu=!!iu&&"webkitFontSmoothing"in iu.documentElement.style,wu=bu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function xu(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ku(t,e){return"number"==typeof t?t:t[e]}function Su(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ou(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Kc(s)){if(1!=s.nodeType)continue;let t=s,n=t==o.body,a=n?xu(o):Su(t),l=0,c=0;if(e.top<a.top+ku(r,"top")?c=-(a.top-e.top+ku(i,"top")):e.bottom>a.bottom-ku(r,"bottom")&&(c=e.bottom-a.bottom+ku(i,"bottom")),e.left<a.left+ku(r,"left")?l=-(a.left-e.left+ku(i,"left")):e.right>a.right-ku(r,"right")&&(l=e.right-a.right+ku(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=t.scrollLeft,r=t.scrollTop;c&&(t.scrollTop+=c),l&&(t.scrollLeft+=l);let i=t.scrollLeft-n,o=t.scrollTop-r;e={left:e.left-i,top:e.top-o,right:e.right-i,bottom:e.bottom-o}}if(n)break}}function _u(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Kc(r));return e}function Mu(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Cu=null;function $u(t,e){let n,r,i=2e8,o=0,s=e.top,a=e.top;for(let l=t.firstChild,c=0;l;l=l.nextSibling,c++){let t;if(1==l.nodeType)t=l.getClientRects();else{if(3!=l.nodeType)continue;t=Yc(l).getClientRects()}for(let u=0;u<t.length;u++){let d=t[u];if(d.top<=s&&d.bottom>=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let t=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0;if(t<i){n=l,i=t,r=t&&3==n.nodeType?{left:d.right<e.left?d.right:d.left,top:e.top}:e,1==l.nodeType&&t&&(o=c+(e.left>=(d.left+d.right)/2?1:0));continue}}!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let n=Au(r,1);if(n.top!=n.bottom&&Nu(e,n))return{node:t,offset:i+(e.left>=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:t,offset:o}:$u(n,r)}function Nu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Tu(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=t.childNodes[o];if(1==n.nodeType){let t=n.getClientRects();for(let r=0;r<t.length;r++){let i=t[r];if(Nu(e,i))return Tu(n,e,i)}}if((o=(o+1)%r)==i)break}return t}function Du(t,e){let n,r=t.dom.ownerDocument,i=0;if(r.caretPositionFromPoint)try{let t=r.caretPositionFromPoint(e.left,e.top);t&&({offsetNode:n,offset:i}=t)}catch(l){}if(!n&&r.caretRangeFromPoint){let t=r.caretRangeFromPoint(e.left,e.top);t&&({startContainer:n,startOffset:i}=t)}let o,s=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!s||!t.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=t.dom.getBoundingClientRect();if(!Nu(e,n))return null;if(s=Tu(t.dom,e,n),!s)return null}if(mu)for(let c=s;n&&c;c=Kc(c))c.draggable&&(n=void 0);if(s=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(s,e),n){if(du&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let t,r=n.childNodes[i];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&i++}n==t.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?o=t.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=function(t,e,n,r){let i=-1;for(let o=e;o!=t.dom;){let e=t.docView.nearestDesc(o,!0);if(!e)return null;if(e.node.isBlock&&e.parent){let t=e.dom.getBoundingClientRect();if(t.left>r.left||t.top>r.top)i=e.posBefore;else{if(!(t.right<r.left||t.bottom<r.top))break;i=e.posAfter}}o=e.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,1)}(t,n,i,e))}null==o&&(o=function(t,e,n){let{node:r,offset:i}=$u(e,n),o=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();o=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:o,inside:a?a.posAtStart-a.border:-1}}function Au(t,e){let n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}const Eu=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Pu(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=bu||du;if(3==r.nodeType){if(!s||!Eu.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let t=i,e=i,o=n<0?1:-1;return n<0&&!i?(e++,o=-1):n>=0&&i==r.nodeValue.length?(t--,o=1):n<0?t--:e++,Iu(Au(Yc(r,t,e),1),o<0)}{let t=Au(Yc(r,i,i),n);if(du&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let e=Au(Yc(r,i-1,i-1),-1);if(e.top==t.top){let n=Au(Yc(r,i,i+1),-1);if(n.top!=t.top)return Iu(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==Qc(r))){let t=r.childNodes[i-1];if(1==t.nodeType)return Ru(t.getBoundingClientRect(),!1)}if(null==o&&i<Qc(r)){let t=r.childNodes[i];if(1==t.nodeType)return Ru(t.getBoundingClientRect(),!0)}return Ru(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==Qc(r))){let t=r.childNodes[i-1],e=3==t.nodeType?Yc(t,Qc(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Iu(Au(e,1),!1)}if(null==o&&i<Qc(r)){let t=r.childNodes[i];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?Yc(t,0,s?0:1):1==t.nodeType?t:null:null;if(e)return Iu(Au(e,-1),!0)}return Iu(Au(3==r.nodeType?Yc(r):r,-n),n>=0)}function Iu(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Ru(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function zu(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}const ju=/[\u0590-\u08ac]/;let Fu=null,Lu=null,Bu=!1;function Vu(t,e,n){return Fu==e&&Lu==n?Bu:(Fu=e,Lu=n,Bu="up"==n||"down"==n?function(t,e,n){let r=e.selection,i="up"==n?r.$from:r.$to;return zu(t,e,(()=>{let{node:e}=t.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.dom;break}e=n.dom.parentNode}let r=Pu(t,i.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=Yc(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let i=e[t];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=t.domSelection();return ju.test(r.parent.textContent)&&a.modify?zu(t,e,(()=>{let{focusNode:e,focusOffset:i,anchorNode:o,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:u,focusOffset:d}=t.domSelectionRange(),f=u&&!c.contains(1==u.nodeType?u:u.parentNode)||e==u&&i==d;try{a.collapse(o,s),e&&(e!=o||i!=s)&&a.extend&&a.extend(e,i)}catch(h){}return null!=l&&(a.caretBidiLevel=l),f})):"left"==n||"backward"==n?o:s}(t,e,n))}class qu{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>Hc(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==t.nodeType?t:t.parentNode):i==t))return o;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let n=e;n;n=n.parent)if(n==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],i=n+r.size;if(n==t&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<i)return r.descAt(t-n-r.border);n=i}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n,r=0,i=0;for(let o=0;r<this.children.length;r++){let e=this.children[r],n=o+e.size;if(n>t||e instanceof Gu){i=t-o;break}o=n}if(i)return this.children[r].domFromPos(i-this.children[r].border,e);for(;r&&!(n=this.children[r-1]).size&&n instanceof Ju&&n.side>=0;r--);if(e<=0){let t,n=!0;for(;t=r?this.children[r-1]:null,t&&t.dom.parentNode!=this.contentDOM;r--,n=!1);return t&&e&&n&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?Hc(t.dom)+1:0}}{let t,n=!0;for(;t=r<this.children.length?this.children[r]:null,t&&t.dom.parentNode!=this.contentDOM;r++,n=!1);return t&&n&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?Hc(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&t<=a){let i=o+n.border;if(t>=i&&e<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,i);t=o;for(let e=s;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Hc(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(a>e||s==this.children.length-1)){e=a;for(let t=s+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=Hc(n.dom);break}e+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let i=Math.min(t,e),o=Math.max(t,e);for(let f=0,h=0;f<this.children.length;f++){let s=this.children[f],a=h+s.size;if(i>h&&o<a)return s.setSelection(t-h-s.border,e-h-s.border,n,r);h=a}let s=this.domFromPos(t,t?-1:1),a=e==t?s:this.domFromPos(e,e?-1:1),l=n.getSelection(),c=!1;if((du||mu)&&t==e){let{node:t,offset:e}=s;if(3==t.nodeType){if(c=!(!e||"\n"!=t.nodeValue[e-1]),c&&e==t.nodeValue.length)for(let n,r=t;r;r=r.parentNode){if(n=r.nextSibling){"BR"==n.nodeName&&(s=a={node:n.parentNode,offset:Hc(n)+1});break}let t=r.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(du&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let t=l.focusNode.childNodes[l.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||c&&mu)&&Gc(s.node,s.offset,l.anchorNode,l.anchorOffset)&&Gc(a.node,a.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||t==e)&&!c){l.collapse(s.node,s.offset);try{t!=e&&l.extend(a.node,a.offset),u=!0}catch(d){}}if(!u){if(t>e){let t=s;s=a,a=t}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?t<=o&&e>=n:t<o&&e>n){let r=n+i.border,s=o-i.border;if(t>=r&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=r||e!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(t-r,e-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Ju extends qu{constructor(t,e,n,r){let i,o=e.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!e.type.spec.raw){if(1!=o.nodeType){let t=document.createElement("span");t.appendChild(o),o=t}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=e,this.widget=e,i=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Wu extends qu{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class Hu extends qu{constructor(t,e,n,r){super(t,[],n,r),this.mark=e}static create(t,e,n,r){let i=r.nodeViews[e.type.name],o=i&&i(e,r,n);return o&&o.dom||(o=zl.renderSpec(document,e.type.spec.toDOM(e,n))),new Hu(t,e,o.dom,o.contentDOM||o.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=Hu.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;e<o&&(i=cd(i,e,o,n)),t>0&&(i=cd(i,0,t,n));for(let s=0;s<i.length;s++)i[s].parent=r;return r.children=i,r}}class Ku extends qu{constructor(t,e,n,r,i,o,s,a,l){super(t,[],i,o),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,o&&this.updateChildren(a,l)}static create(t,e,n,r,i,o){let s,a=i.nodeViews[e.type.name],l=a&&a(e,i,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:o),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(e.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(e.text);else c||({dom:c,contentDOM:u}=zl.renderSpec(document,e.type.spec.toDOM(e)));u||e.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),e.type.spec.draggable&&(c.draggable=!0));let d=c;return c=id(c,n,e),l?s=new Zu(t,e,n,r,c,u||null,d,l,i,o+1):e.isText?new Yu(t,e,n,r,c,d,i):new Ku(t,e,n,r,c,u||null,d,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>za.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&od(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,i=t.composing?this.localCompositionInfo(t,e):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new ad(this,o&&o.node,t);!function(t,e,n,r){let i=e.locals(t),o=0;if(0==i.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,i,e.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<i.length&&i[s].to==o){let t,e=i[s++];for(;s<i.length&&i[s].to==o;)(t||(t=[e])).push(i[s++]);if(t){t.sort(ld);for(let e=0;e<t.length;e++)n(t[e],c,!!l)}else n(e,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<t.childCount))break;d=c,u=t.child(c++)}for(let t=0;t<a.length;t++)a[t].to<=o&&a.splice(t--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let f=o+u.nodeSize;if(u.isText){let t=f;s<i.length&&i[s].from<t&&(t=i[s].from);for(let e=0;e<a.length;e++)a[e].to<t&&(t=a[e].to);t<f&&(l=u.cut(t-o),u=u.cut(0,t-o),f=t,d=-1)}r(u,u.isInline&&!u.isLeaf?a.filter((t=>!t.inline)):a.slice(),e.forChild(o,u),d),o=f}}(this.node,this.innerDeco,((e,i,o)=>{e.spec.marks?a.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Ba.none:this.node.child(i).marks,n,t),a.placeWidget(e,t,r)}),((e,o,l,c)=>{let u;a.syncToMarks(e.marks,n,t),a.findNodeMatch(e,o,l,c)||s&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(u=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(e,o,l,u,t)||a.updateNextNode(e,o,l,t,c)||a.addNode(e,o,l,t,r),r+=e.nodeSize})),a.syncToMarks([],n,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(t,o),Xu(this.contentDOM,this.children,t),gu&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:r}=t.state.selection;if(!(t.state.selection instanceof Cc)||n<e||r>e+this.node.content.size)return null;let i=t.domSelectionRange(),o=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=Qc(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}(i.focusNode,i.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let t=o.nodeValue,i=function(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let e=t.child(i++);if(o+=e.nodeSize,!e.isText)break;l+=e.text}if(o>=n){let t=a<r?l.lastIndexOf(e,r-a-1):-1;if(t>=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,r-e);return i<0?null:{node:o,pos:i,text:t}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let i=e;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new Wu(this,i,e,r);t.input.compositionNodes.push(o),this.children=cd(this.children,n,n+r.length,t,o)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(od(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=nd(this.dom,this.nodeDOM,ed(this.outerDeco,this.node,e),ed(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Uu(t,e,n,r,i){return id(r,e,t),new Ku(void 0,t,e,n,r,r,r,i,0)}class Yu extends Ku{constructor(t,e,n,r,i,o,s){super(t,e,n,r,i,null,o,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),i=document.createTextNode(r.text);return new Yu(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class Gu extends qu{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Zu extends Ku{constructor(t,e,n,r,i,o,s,a,l,c){super(t,e,n,r,i,o,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update){let i=this.spec.update(t,e,n);return i&&this.updateInner(t,e,n,r),i}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function Xu(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=sd(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof Hu){let e=r?r.previousSibling:t.lastChild;Xu(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=sd(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Qu=function(t){t&&(this.nodeName=t)};Qu.prototype=Object.create(null);const td=[new Qu];function ed(t,e,n){if(0==t.length)return td;let r=n?td[0]:new Qu,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Qu(s.nodeName));for(let t in s){let o=s[t];null!=o&&(n&&1==i.length&&i.push(r=new Qu(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+o:"style"==t?r.style=(r.style?r.style+";":"")+o:"nodeName"!=t&&(r[t]=o))}}}return i}function nd(t,e,n,r){if(n==td&&r==td)return e;let i=e;for(let o=0;o<r.length;o++){let e=r[o],s=n[o];if(o){let n;s&&s.nodeName==e.nodeName&&i!=t&&(n=i.parentNode)&&n.nodeName.toLowerCase()==e.nodeName||(n=document.createElement(e.nodeName),n.pmIsDeco=!0,n.appendChild(i),s=td[0]),i=n}rd(i,s||td[0],e)}return i}function rd(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==i.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<i.length;e++)-1==r.indexOf(i[e])&&t.classList.add(i[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function id(t,e,n){return nd(t,t,td,ed(e,n,1!=t.nodeType))}function od(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function sd(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class ad{constructor(t,e,n){this.lock=e,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];t:for(;i>0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof Hu)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n){let r=0,i=this.stack.length>>1,o=Math.min(i,t.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let e=this.index;e<Math.min(this.index+3,this.top.children.length);e++)if(this.top.children[e].matchesMark(t[i])){r=e;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Hu.create(this.top,t[i],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(t,e,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,e,n))o=this.top.children.indexOf(i,this.index);else for(let s=this.index,a=Math.min(this.top.children.length,s+5);s<a;s++){let r=this.top.children[s];if(r.matchesNode(t,e,n)&&!this.preMatch.matched.has(r)){o=s;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,e,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(t,e,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,i){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof Ku){let a=this.preMatch.matched.get(s);if(null!=a&&a!=i)return!1;let l=s.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(t.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==t.text&&3!=s.dirty&&od(e,s.outerDeco)))&&s.update(t,e,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(t,e,n,r,i){this.top.children.splice(this.index++,0,Ku.create(this.top,t,e,n,r,i)),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new Ju(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof Hu;)e=t,t=e.children[e.children.length-1];(!t||!(t instanceof Yu)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((mu||hu)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new Gu(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}}function ld(t,e){return t.type.side-e.type.side}function cd(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,u=a+=l.size;c>=n||u<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function ud(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(eu(n)){for(a=c;i&&!i.node;)i=i.parent;let t=i.node;if(i&&t.isAtom&&Nc.isSelectable(t)&&i.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,i=e==Qc(t);r||i;){if(t==n)return!0;let e=Hc(t);if(!(t=t.parentNode))return!1;r=r&&0==e,i=i&&e==Qc(t)}}(n.focusNode,n.focusOffset,i.dom))){let t=i.posBefore;l=new Nc(s==t?c:r.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;a=r.resolve(e)}if(!l){l=bd(t,a,c,"pointer"==e||t.state.selection.head<c.pos&&!o?1:-1)}return l}function dd(t){return t.editable?t.hasFocus():xd(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function fd(t,e=!1){let n=t.state.selection;if(vd(t,n),dd(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&hu){let e=t.domSelectionRange(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&Gc(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,Hc(r)+1):n.setEnd(r,0);n.collapse(!1),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&cu&&uu<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{let r,i,{anchor:o,head:s}=n;!hd||n instanceof Cc||(n.$from.parent.inlineContent||(r=pd(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=pd(t,n.to))),t.docView.setSelection(o,s,t.root,e),hd&&(r&&gd(r),i&&gd(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{dd(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const hd=mu||hu&&pu<63;function pd(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(mu&&i&&"false"==i.contentEditable)return md(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return md(i);if(o)return md(o)}}function md(t){return t.contentEditable="true",mu&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function gd(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function vd(t,e){if(e instanceof Nc){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(yd(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else yd(t)}function yd(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function bd(t,e,n,r){return t.someProp("createSelectionBetween",(r=>r(t,e,n)))||Cc.between(e,n,r)}function wd(t){return!(t.editable&&!t.hasFocus())&&xd(t)}function xd(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function kd(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&Sc.findFrom(o,e)}function Sd(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Od(t,e,n){let r=t.state.selection;if(!(r instanceof Cc)){if(r instanceof Nc&&r.node.isInline)return Sd(t,new Cc(e>0?r.$to:r.$from));{let n=kd(t.state,e);return!!n&&Sd(t,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){let n=kd(t.state,e);return!!(n&&n instanceof Nc)&&Sd(t,n)}if(!(vu&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=e<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=t.docView.descAt(s))&&!n.contentDOM)&&(Nc.isSelectable(o)?Sd(t,new Nc(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):!!bu&&Sd(t,new Cc(t.state.doc.resolve(e<0?s:s+o.nodeSize))))}}function _d(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Md(t){let e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Cd(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=!1;for(du&&1==n.nodeType&&r<_d(n)&&Md(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Md(t))i=n,o=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Nd(n))break;{let e=n.previousSibling;for(;e&&Md(e);)i=n.parentNode,o=Hc(e),e=e.previousSibling;if(e)n=e,r=_d(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Td(t,n,r):i&&Td(t,i,o)}function $d(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=_d(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Md(n.childNodes[r]))break;i=n,o=++r}else{if(Nd(n))break;{let e=n.nextSibling;for(;e&&Md(e);)i=e.parentNode,o=Hc(e)+1,e=e.nextSibling;if(e)n=e,r=0,s=_d(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&Td(t,i,o)}function Nd(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Td(t,e,n){let r=t.domSelection();if(eu(r)){let t=document.createRange();t.setEnd(e,n),t.setStart(e,n),r.removeAllRanges(),r.addRange(t)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout((()=>{t.state==i&&fd(t)}),50)}function Dd(t,e,n){let r=t.state.selection;if(r instanceof Cc&&!r.empty||n.indexOf("s")>-1)return!1;if(vu&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=kd(t.state,e);if(n&&n instanceof Nc)return Sd(t,n)}if(!i.parent.inlineContent){let n=e<0?i:o,s=r instanceof Dc?Sc.near(n,e):Sc.findFrom(n,e);return!!s&&Sd(t,s)}return!1}function Ad(t,e){if(!(t.state.selection instanceof Cc))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=t.state.tr;return e<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),t.dispatch(r),!0}return!1}function Ed(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Pd(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||vu&&72==n&&"c"==r?Ad(t,-1)||Cd(t):46==n||vu&&68==n&&"c"==r?Ad(t,1)||$d(t):13==n||27==n||(37==n||vu&&66==n&&"c"==r?Od(t,-1,r)||Cd(t):39==n||vu&&70==n&&"c"==r?Od(t,1,r)||$d(t):38==n||vu&&80==n&&"c"==r?Dd(t,-1,r)||Cd(t):40==n||vu&&78==n&&"c"==r?function(t){if(!mu||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Ed(t,n,"true"),setTimeout((()=>Ed(t,n,"false")),20)}return!1}(t)||Dd(t,1,r)||$d(t):r==(vu?"m":"c")&&(66==n||73==n||89==n||90==n))}function Id(t,e){t.someProp("transformCopied",(n=>{e=n(e,t)}));let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let s=t.someProp("clipboardSerializer")||zl.fromSchema(t.state.schema),a=Wd(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=qd[u.nodeName.toLowerCase()]);){for(let t=c.length-1;t>=0;t--){let e=a.createElement(c[t]);for(;l.firstChild;)e.appendChild(l.firstChild);l.appendChild(e),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:t.someProp("clipboardTextSerializer",(n=>n(e,t)))||e.content.textBetween(0,e.content.size,"\n\n")}}function Rd(t,e,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!e)return null;let l=e&&(r||a||!n);if(l){if(t.someProp("transformPastedText",(n=>{e=n(e,a||r,t)})),a)return e?new qa(za.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):qa.empty;let n=t.someProp("clipboardTextParser",(n=>n(e,i,r,t)));if(n)s=n;else{let n=i.marks(),{schema:r}=t.state,s=zl.fromSchema(r);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=o.appendChild(document.createElement("p"));t&&e.appendChild(s.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(e=>{n=e(n,t)})),o=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=Wd().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t);(n=i&&qd[i[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"</"+t+">")).reverse().join(""));if(r.innerHTML=t,n)for(let o=0;o<n.length;o++)r=r.querySelector(n[o])||r;return r}(n),bu&&function(t){let e=t.querySelectorAll(hu?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let t=o.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;o=t}if(!s){let e=t.someProp("clipboardParser")||t.someProp("domParser")||Cl.fromSchema(t.state.schema);s=e.parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||zd.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(Tg){return t}let{content:i,openStart:o,openEnd:s}=t;for(let a=n.length-2;a>=0;a-=2){let t=r.nodes[n[a]];if(!t||t.hasRequiredAttrs())break;i=za.from(t.create(n[a+1],i)),o++,s++}return new qa(i,o,s)}(Vd(s,+u[1],+u[2]),u[4]);else if(s=qa.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,i=e.node(n).contentMatchAt(e.index(n)),o=[];if(t.forEach((t=>{if(!o)return;let e,n=i.findWrapping(t.type);if(!n)return o=null;if(e=o.length&&r.length&&Fd(n,r,t,o[o.length-1],0))o[o.length-1]=e;else{o.length&&(o[o.length-1]=Ld(o[o.length-1],r.length));let e=jd(t,n);o.push(e),i=i.matchType(e.type),r=n}})),o)return za.from(o)}return t}(s.content,i),!0),s.openStart||s.openEnd){let t=0,e=0;for(let n=s.content.firstChild;t<s.openStart&&!n.type.spec.isolating;t++,n=n.firstChild);for(let n=s.content.lastChild;e<s.openEnd&&!n.type.spec.isolating;e++,n=n.lastChild);s=Vd(s,t,e)}return t.someProp("transformPasted",(e=>{s=e(s,t)})),s}const zd=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function jd(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,za.from(t));return t}function Fd(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=Fd(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(za.from(jd(n,t,i+1))))}}function Ld(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,Ld(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(za.empty,!0);return t.copy(n.append(r))}function Bd(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return i<r-1&&(a=Bd(a,e,n,r,i+1,o)),i>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,t.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(za.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function Vd(t,e,n){return e<t.openStart&&(t=new qa(Bd(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new qa(Bd(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const qd={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Jd=null;function Wd(){return Jd||(Jd=document.implementation.createHTMLDocument("title"))}const Hd={},Kd={},Ud={touchstart:!0,touchmove:!0};class Yd{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Gd(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Zd(t){t.someProp("handleDOMEvents",(e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>Xd(t,e))}))}function Xd(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function Qd(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function tf(t){return{left:t.clientX,top:t.clientY}}function ef(t,e,n,r,i){if(-1==r)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,(e=>s>o.depth?e(t,n,o.nodeAfter,o.before(s),i,!0):e(t,n,o.node(s),o.before(s),i,!1))))return!0;return!1}function nf(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function rf(t,e,n,r,i){return ef(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(n=>n(t,e,r)))||(i?function(t,e){if(-1==e)return!1;let n,r,i=t.state.selection;i instanceof Nc&&(n=i.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let t=s>o.depth?o.nodeAfter:o.node(s);if(Nc.isSelectable(t)){r=n&&i.$from.depth>0&&s>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(s);break}}return null!=r&&(nf(t,Nc.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&Nc.isSelectable(r))&&(nf(t,new Nc(n),"pointer"),!0)}(t,n))}function of(t,e,n,r){return ef(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function sf(t,e,n,r){return ef(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(n=>n(t,e,r)))||function(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(nf(t,Cc.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let e=o>i.depth?i.nodeAfter:i.node(o),n=i.before(o);if(e.inlineContent)nf(t,Cc.create(r,n+1,n+1+e.content.size),"pointer");else{if(!Nc.isSelectable(e))continue;nf(t,Nc.create(r,n),"pointer")}return!0}}(t,n,r)}function af(t){return pf(t)}Kd.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!uf(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!yu||!hu||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!gu||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||Pd(t,n)?n.preventDefault():Gd(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,nu(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},Kd.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},Kd.keypress=(t,e)=>{let n=e;if(uf(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||vu&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof Cc&&r.$from.sameParent(r.$to))){let e=String.fromCharCode(n.charCode);t.someProp("handleTextInput",(n=>n(t,r.$from.pos,r.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const lf=vu?"metaKey":"ctrlKey";Hd.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=af(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[lf]&&("singleClick"==t.input.lastClick.type?o="doubleClick":"doubleClick"==t.input.lastClick.type&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(tf(n));s&&("singleClick"==o?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new cf(t,s,n,!!r)):("doubleClick"==o?of:sf)(t,s.pos,s.inside,n)?n.preventDefault():Gd(t,"pointer"))};class cf{constructor(t,e,n,r){let i,o;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[lf],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),o=e.inside;else{let n=t.state.doc.resolve(e.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?t.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=t.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Nc&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!du||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Gd(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>fd(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(tf(t))),this.updateAllowDefault(t),this.allowDefault||!e?Gd(this.view,"pointer"):rf(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||mu&&this.mightDrag&&!this.mightDrag.node.isAtom||hu&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(nf(this.view,Sc.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Gd(this.view,"pointer")}move(t){this.updateAllowDefault(t),Gd(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function uf(t,e){return!!t.composing||!!(mu&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}Hd.touchstart=t=>{t.input.lastTouch=Date.now(),af(t),Gd(t,"pointer")},Hd.touchmove=t=>{t.input.lastTouch=Date.now(),Gd(t,"pointer")},Hd.contextmenu=t=>af(t);const df=yu?5e3:-1;function ff(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>pf(t)),e))}function hf(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function pf(t,e=!1){if(!(yu&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),hf(t),e||t.docView&&t.docView.dirty){let e=ud(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}Kd.compositionstart=Kd.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),pf(t,!0),t.markCursor=null;else if(pf(t),du&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){t.domSelection().collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}ff(t,df)},Kd.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,ff(t,20))};const mf=cu&&uu<15||gu&&wu<604;function gf(t,e,n,r){let i=Rd(t,e,n,t.input.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,r,i||qa.empty))))return!0;if(!i)return!1;let o=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(i),s=o?t.state.tr.replaceSelectionWith(o,t.input.shiftKey):t.state.tr.replaceSelection(i);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Hd.copy=Kd.cut=(t,e)=>{let n=e,r=t.state.selection,i="cut"==n.type;if(r.empty)return;let o=mf?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Id(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Kd.paste=(t,e)=>{let n=e;if(t.composing&&!yu)return;let r=mf?null:n.clipboardData;r&&gf(t,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?gf(t,r.value,null,e):gf(t,r.textContent,r.innerHTML,e)}),50)}(t,n)};class vf{constructor(t,e){this.slice=t,this.move=e}}const yf=vu?"altKey":"ctrlKey";Hd.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(tf(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof Nc?i.to-1:i.to));else if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Nc.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&t.dispatch(t.state.tr.setSelection(Nc.create(t.state.doc,e.posBefore)))}let s=t.state.selection.content(),{dom:a,text:l}=Id(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData(mf?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",mf||n.dataTransfer.setData("text/plain",l),t.dragging=new vf(s,!n[yf])},Hd.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},Kd.dragover=Kd.dragenter=(t,e)=>e.preventDefault(),Kd.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(tf(n));if(!i)return;let o=t.state.doc.resolve(i.pos),s=r&&r.slice;s?t.someProp("transformPasted",(e=>{s=e(s,t)})):s=Rd(t,n.dataTransfer.getData(mf?"Text":"text/plain"),mf?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[yf]);if(t.someProp("handleDrop",(e=>e(t,n,s||qa.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(0==n.openStart&&n.size?2:1);o++)for(let t=r.depth;t>=0;t--){let e=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,n=r.index(t)+(e>0?1:0),s=r.node(t),a=!1;if(1==o)a=s.canReplace(n,n,i);else{let t=s.contentMatchAt(n).findWrapping(i.firstChild.type);a=t&&s.canReplaceWith(n,n,t[0])}if(a)return 0==e?r.pos:e<0?r.before(t+1):r.after(t+1)}return null}(t.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=t.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,f=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&Nc.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Nc(h));else{let e=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((t,n,r,i)=>e=i)),c.setSelection(bd(t,h,c.doc.resolve(e)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))},Hd.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&fd(t)}),20))},Hd.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},Hd.beforeinput=(t,e)=>{if(hu&&yu&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,nu(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in Kd)Hd[os]=Kd[os];function bf(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class wf{constructor(t,e){this.toDOM=t,this.spec=e||_f,this.side=this.spec.side||0}map(t,e,n,r){let{pos:i,deleted:o}=t.mapResult(e.from+r,this.side<0?-1:1);return o?null:new Sf(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof wf&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&bf(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class xf{constructor(t,e){this.attrs=t,this.spec=e||_f}map(t,e,n,r){let i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Sf(i,o,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof xf&&bf(this.attrs,t.attrs)&&bf(this.spec,t.spec)}static is(t){return t.type instanceof xf}destroy(){}}class kf{constructor(t,e){this.attrs=t,this.spec=e||_f}map(t,e,n,r){let i=t.mapResult(e.from+r,1);if(i.deleted)return null;let o=t.mapResult(e.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Sf(i.pos-n,o.pos-n,this)}valid(t,e){let n,{index:r,offset:i}=t.content.findIndex(e.from);return i==e.from&&!(n=t.child(r)).isText&&i+n.nodeSize==e.to}eq(t){return this==t||t instanceof kf&&bf(this.attrs,t.attrs)&&bf(this.spec,t.spec)}destroy(){}}class Sf{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new Sf(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new Sf(t,t,new wf(e,n))}static inline(t,e,n,r){return new Sf(t,e,new xf(n,r))}static node(t,e,n,r){return new Sf(t,e,new kf(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof xf}}const Of=[],_f={};class Mf{constructor(t,e){this.local=t.length?t:Of,this.children=e.length?e:Of}static create(t,e){return e.length?Af(e,t,0,_f):Cf}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=e&&s.to>=t&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<e&&this.children[o+1]>t){let s=this.children[o]+1;this.children[o+2].findInner(t-s,e-s,n,r+s,i)}}map(t,e,n){return this==Cf||0==t.maps.length?this:this.mapInner(t,e,0,0,n||_f)}mapInner(t,e,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,i,o,s){let a=t.slice();for(let c=0,u=o;c<n.maps.length;c++){let t=0;n.maps[c].forEach(((e,n,r,o)=>{let s=o-r-(n-e);for(let l=0;l<a.length;l+=3){let o=a[l+1];if(o<0||e>o+u-t)continue;let c=a[l]+u-t;n>=c?a[l+1]=e<=c?-2:-1:r>=i&&s&&(a[l]+=s,a[l+1]+=s)}t+=s})),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(-2==a[c+1]){l=!0,a[c+1]=-1;continue}let e=n.map(t[c]+o),u=e-i;if(u<0||u>=r.content.size){l=!0;continue}let d=n.map(t[c+1]+o,-1)-i,{index:f,offset:h}=r.content.findIndex(u),p=r.maybeChild(f);if(p&&h==u&&h+p.nodeSize==d){let r=a[c+2].mapInner(n,p,e+1,t[c]+o+1,s);r!=Cf?(a[c]=u,a[c+1]=d,a[c+2]=r):(a[c+1]=-2,l=!0)}else l=!0}if(l){let l=function(t,e,n,r,i,o,s){function a(t,e){for(let o=0;o<t.local.length;o++){let a=t.local[o].map(r,i,e);a?n.push(a):s.onRemove&&s.onRemove(t.local[o].spec)}for(let n=0;n<t.children.length;n+=3)a(t.children[n+2],t.children[n]+e+1)}for(let l=0;l<t.length;l+=3)-1==t[l+1]&&a(t[l+2],e[l]+o+1);return n}(a,t,e,n,i,o,s),c=Af(l,r,0,s);e=c.local;for(let t=0;t<a.length;t+=3)a[t+1]<0&&(a.splice(t,3),t-=3);for(let t=0,e=0;t<c.children.length;t+=3){let n=c.children[t];for(;e<a.length&&a[e]<n;)e+=3;a.splice(e,0,c.children[t],c.children[t+1],c.children[t+2])}}return new Mf(e.sort(Ef),a)}(this.children,o||[],t,e,n,r,i):o?new Mf(o.sort(Ef),Of):Cf}add(t,e){return e.length?this==Cf?Mf.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,i=0;t.forEach(((t,o)=>{let s,a=o+n;if(s=Tf(e,t,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(t,s,a+1):r.splice(i,0,o,o+t.nodeSize,Af(s,t,a+1,_f)),i+=3}}));let o=Nf(i?Df(e):e,-n);for(let s=0;s<o.length;s++)o[s].type.valid(t,o[s])||o.splice(s--,1);return new Mf(o.length?this.local.concat(o).sort(Ef):this.local,r||this.children)}remove(t){return 0==t.length||this==Cf?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let i=0;i<n.length;i+=3){let r,o=n[i]+e,s=n[i+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>o&&e.to<s&&(t[n]=null,(r||(r=[])).push(e));if(!r)continue;n==this.children&&(n=this.children.slice());let a=n[i+2].removeInner(r,o+1);a!=Cf?n[i+2]=a:(n.splice(i,3),i-=3)}if(r.length)for(let i,o=0;o<t.length;o++)if(i=t[o])for(let t=0;t<r.length;t++)r[t].eq(i,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Mf(r,n):Cf}forChild(t,e){if(this==Cf)return this;if(e.isLeaf)return Mf.empty;let n,r;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(n=this.children[s+2]);break}let i=t+1,o=i+e.content.size;for(let s=0;s<this.local.length;s++){let t=this.local[s];if(t.from<o&&t.to>i&&t.type instanceof xf){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let t=new Mf(r.sort(Ef),Of);return n?new $f([t,n]):t}return n||Cf}eq(t){if(this==t)return!0;if(!(t instanceof Mf)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return Pf(this.localsInner(t))}localsInner(t){if(this==Cf)return Of;if(t.inlineContent||!this.local.some(xf.is))return this.local;let e=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof xf||e.push(this.local[n]);return e}}Mf.empty=new Mf([],[]),Mf.removeOverlap=Pf;const Cf=Mf.empty;class $f{constructor(t){this.members=t}map(t,e){const n=this.members.map((n=>n.map(t,e,_f)));return $f.from(n)}forChild(t,e){if(e.isLeaf)return Mf.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(t,e);i!=Cf&&(i instanceof $f?n=n.concat(i.members):n.push(i))}return $f.from(n)}eq(t){if(!(t instanceof $f)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(t);if(i.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<i.length;t++)e.push(i[t])}else e=i}return e?Pf(n?e:e.sort(Ef)):Of}static from(t){switch(t.length){case 0:return Cf;case 1:return t[0];default:return new $f(t.every((t=>t instanceof Mf))?t:t.reduce(((t,e)=>t.concat(e instanceof Mf?e:e.members)),[]))}}}function Nf(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Sf(i.from+e,i.to+e,i.type))}return n}function Tf(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o,s=0;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function Df(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Af(t,e,n,r){let i=[],o=!1;e.forEach(((e,s)=>{let a=Tf(t,e,s+n);if(a){o=!0;let t=Af(a,e,n+s+1,r);t!=Cf&&i.push(s,s+e.nodeSize,t)}}));let s=Nf(o?Df(t):t,-n).sort(Ef);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Mf(s,i):Cf}function Ef(t,e){return t.from-e.from||t.to-e.to}function Pf(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),If(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),If(e,i+1,o.copy(r.to,o.to)))}}return e}function If(t,e,n){for(;e<t.length&&Ef(n,t[e])>0;)e++;t.splice(e,0,n)}function Rf(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Cf&&e.push(r)})),t.cursorWrapper&&e.push(Mf.create(t.state.doc,[t.cursorWrapper.deco])),$f.from(e)}const zf={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jf=cu&&uu<=11;class Ff{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Lf{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Ff,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);cu&&uu<=11&&t.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),jf&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,zf)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(wd(this.view)){if(this.suppressingSelectionUpdates)return fd(this.view);if(cu&&uu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Gc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let i=t.focusNode;i;i=Kc(i))n.add(i);for(let i=t.anchorNode;i;i=Kc(i))if(n.has(i)){e=i;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let n=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&wd(t)&&!this.ignoreSelectionChange(n),i=-1,o=-1,s=!1,a=[];if(t.editable)for(let c=0;c<e.length;c++){let t=this.registerMutation(e[c],a);t&&(i=i<0?t.from:Math.min(t.from,i),o=o<0?t.to:Math.max(t.to,o),t.typeOver&&(s=!0))}if(du&&a.length>1){let t=a.filter((t=>"BR"==t.nodeName));if(2==t.length){let e=t[0],n=t[1];e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}}let l=null;i<0&&r&&t.input.lastFocus>Date.now()-200&&t.input.lastTouch<Date.now()-300&&eu(n)&&(l=ud(t))&&l.eq(Sc.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,fd(t),this.currentSelection.set(n),t.scrollToSelection()):(i>-1||r)&&(i>-1&&(t.docView.markDirty(i,o),function(t){if(Bf.has(t))return;if(Bf.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)){if(t.requiresGeckoHackNode=du,Vf)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Vf=!0}}(t)),this.handleDOMChange(i,o,s,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||fd(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;n<t.addedNodes.length;n++)e.push(t.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,i=t.nextSibling;if(cu&&uu<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:o}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(t.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==t.target?Hc(r)+1:0,s=n.localPosFromDOM(t.target,o,-1),a=i&&i.parentNode==t.target?Hc(i):t.target.childNodes.length;return{from:s,to:n.localPosFromDOM(t.target,a,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}}let Bf=new WeakMap,Vf=!1;function qf(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(mu&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||mu&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}function Jf(t,e,n,r,i){if(e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=ud(t,e);if(n&&!t.state.selection.eq(n)){let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),t.dispatch(r)}return}let o=t.state.doc.resolve(e),s=o.sharedDepth(n);e=o.before(s+1),n=t.state.doc.resolve(n).after(s+1);let a,l,c=t.state.selection,u=function(t,e,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),u=c.anchorNode;if(u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],eu(c)||r.push({node:c.focusNode,offset:c.focusOffset})),hu&&8===t.input.lastKeyCode)for(let g=s;g>o;g--){let t=i.childNodes[g-1],e=t.pmViewDesc;if("BR"==t.nodeName&&!e){s=g;break}if(!e||e.size)break}let d=t.state.doc,f=t.someProp("domParser")||Cl.fromSchema(t.state.schema),h=d.resolve(a),p=null,m=f.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:qf,context:h});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),p={anchor:t+a,head:e+a}}return{doc:m,sel:p,from:a,to:l}}(t,e,n),d=t.state.doc,f=d.slice(u.from,u.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(a=t.state.selection.to,l="end"):(a=t.state.selection.from,l="start"),t.input.lastKeyCode=null;let h=function(t,e,n,r,i){let o=t.findDiffStart(e,n);if(null==o)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==i){r-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&t.size<e.size){o-=r<=o&&r>=s?o-r:0,a=o+(a-s),s=o}else if(a<o){o-=r<=o&&r>=a?o-r:0,s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(f.content,u.doc.content,u.from,a,l);if((gu&&t.input.lastIOSEnter>Date.now()-225||yu)&&i.some((t=>"DIV"==t.nodeName||"P"==t.nodeName||"LI"==t.nodeName))&&(!h||h.endA>=h.endB)&&t.someProp("handleKeyDown",(e=>e(t,nu(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!h){if(!(r&&c instanceof Cc&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let e=Wf(t,t.state.doc,u.sel);e&&!e.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(e))}return}h={start:c.from,endA:c.to,endB:c.to}}if(hu&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let t=h.endB-h.start;u.sel={anchor:u.sel.anchor+t,head:u.sel.anchor+t}}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&h.start==h.endB&&t.state.selection instanceof Cc&&(h.start>t.state.selection.from&&h.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?h.start=t.state.selection.from:h.endA<t.state.selection.to&&h.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(h.endB+=t.state.selection.to-h.endA,h.endA=t.state.selection.to)),cu&&uu<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&"  "==u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)&&(h.start--,h.endA--,h.endB--);let p,m=u.doc.resolveNoCache(h.start-u.from),g=u.doc.resolveNoCache(h.endB-u.from),v=d.resolve(h.start),y=m.sameParent(g)&&m.parent.inlineContent&&v.end()>=h.endA;if((gu&&t.input.lastIOSEnter>Date.now()-225&&(!y||i.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!y&&m.pos<u.doc.content.size&&(p=Sc.findFrom(u.doc.resolve(m.pos+1),1,!0))&&p.head==g.pos)&&t.someProp("handleKeyDown",(e=>e(t,nu(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>h.start&&function(t,e,n,r,i){if(!r.parent.isTextblock||n-e<=i.pos-r.pos||Hf(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(Hf(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||Hf(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(d,h.start,h.endA,m,g)&&t.someProp("handleKeyDown",(e=>e(t,nu(8,"Backspace")))))return void(yu&&hu&&t.domObserver.suppressSelectionUpdates());hu&&yu&&h.endB==h.start&&(t.input.lastAndroidDelete=Date.now()),yu&&!y&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,g=u.doc.resolveNoCache(h.endB-u.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,nu(13,"Enter"))}))}),20));let b,w,x,k=h.start,S=h.endA;if(y)if(m.pos==g.pos)cu&&uu<=11&&0==m.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>fd(t)),20)),b=t.state.tr.delete(k,S),w=d.resolve(h.start).marksAcross(d.resolve(h.endA));else if(h.endA==h.endB&&(x=function(t,e){let n,r,i,o=t.firstChild.marks,s=e.firstChild.marks,a=o,l=s;for(let u=0;u<s.length;u++)a=s[u].removeFromSet(a);for(let u=0;u<o.length;u++)l=o[u].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",i=t=>t.mark(r.addToSet(t.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=t=>t.mark(r.removeFromSet(t.marks))}let c=[];for(let u=0;u<e.childCount;u++)c.push(i(e.child(u)));if(za.from(c).eq(t))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),v.parent.content.cut(v.parentOffset,h.endA-v.start()))))b=t.state.tr,"add"==x.type?b.addMark(k,S,x.mark):b.removeMark(k,S,x.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let e=m.parent.textBetween(m.parentOffset,g.parentOffset);if(t.someProp("handleTextInput",(n=>n(t,k,S,e))))return;b=t.state.tr.insertText(e,k,S)}if(b||(b=t.state.tr.replace(k,S,u.doc.slice(h.start-u.from,h.endB-u.from))),u.sel){let e=Wf(t,b.doc,u.sel);e&&!(hu&&yu&&t.composing&&e.empty&&(h.start!=h.endB||t.input.lastAndroidDelete<Date.now()-100)&&(e.head==k||e.head==b.mapping.map(S)-1)||cu&&e.empty&&e.head==k)&&b.setSelection(e)}w&&b.ensureMarks(w),t.dispatch(b.scrollIntoView())}function Wf(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:bd(t,e.resolve(n.anchor),e.resolve(n.head))}function Hf(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,i++}return i}class Kf{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Yd,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Xf),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Gf(this),Yf(this),this.nodeViews=Zf(this),this.docView=Uu(this.state.doc,Uf(this),Rf(this),this.dom,this),this.domObserver=new Lf(this,((t,e,n,r)=>Jf(this,t,e,n,r))),this.domObserver.start(),function(t){for(let e in Hd){let n=Hd[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!Qd(t,e)||Xd(t,e)||!t.editable&&e.type in Kd||n(t,e)},Ud[e]?{passive:!0}:void 0)}mu&&t.dom.addEventListener("input",(()=>null)),Zd(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Zd(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Xf),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let n in this._props)e[n]=this._props[n];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){let n=this.state,r=!1,i=!1;t.storedMarks&&this.composing&&(hf(this),i=!0),this.state=t;let o=n.plugins!=t.plugins||this._props.plugins!=e.plugins;if(o||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=Zf(this);(function(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,r=!0)}(o||e.handleDOMEvents!=this._props.handleDOMEvents)&&Zd(this),this.editable=Gf(this),Yf(this);let s=Rf(this),a=Uf(this),l=n.plugins==t.plugins||n.doc.eq(t.doc)?t.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(t.doc,a,s);!c&&t.selection.eq(n.selection)||(i=!0);let u="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(o,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:_u(t.dom)}}(this);if(i){this.domObserver.stop();let e=c&&(cu||hu)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(n.selection,t.selection);if(c){let n=hu?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(t.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Uu(t.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Gc(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?fd(this,e):(vd(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():u&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Mu(n,0==r?0:r-e)}(u)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(this.state.selection instanceof Nc){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&Ou(this,e.getBoundingClientRect(),t)}else Ou(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let o=0;o<this.directPlugins.length;o++){let r=this.directPlugins[o].props[t];if(null!=r&&(n=e?e(r):r))return n}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let r=i[o].props[t];if(null!=r&&(n=e?e(r):r))return n}}hasFocus(){if(cu){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if("false"==t.contentEditable)return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(Cu)return t.focus(Cu);let e=_u(t);t.focus(null==Cu?{get preventScroll(){return Cu={preventScroll:!0},!0}}:void 0),Cu||(Cu=!1,Mu(e,0))}(this.dom),fd(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return t||document}posAtCoords(t){return Du(this,t)}coordsAtPos(t,e=1){return Pu(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return Vu(this,e||this.state,t)}destroy(){this.docView&&(!function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Rf(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){Xd(t,e)||!Hd[e.type]||!t.editable&&e.type in Kd||Hd[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return mu&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom?function(t){let e;function n(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0);let r=e.startContainer,i=e.startOffset,o=e.endContainer,s=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return Gc(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Uf(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),e.translate="no",t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t&&(e.class+=" "+n[t]),"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),[Sf.node(0,t.state.doc.content.size,e)]}function Yf(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Sf.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Gf(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function Zf(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Xf(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Qf={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},th={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eh="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var nh="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),rh="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ih=nh||eh&&+eh[1]<57,oh=0;oh<10;oh++)Qf[48+oh]=Qf[96+oh]=String(oh);for(oh=1;oh<=24;oh++)Qf[oh+111]="F"+oh;for(oh=65;oh<=90;oh++)Qf[oh]=String.fromCharCode(oh+32),th[oh]=String.fromCharCode(oh);for(var sh in Qf)th.hasOwnProperty(sh)||(th[sh]=Qf[sh]);const ah="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function lh(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let a=0;a<o.length-1;a++){let t=o[a];if(/^(cmd|meta|m)$/i.test(t))i=!0;else if(/^a(lt)?$/i.test(t))e=!0;else if(/^(c|ctrl|control)$/i.test(t))n=!0;else if(/^s(hift)?$/i.test(t))r=!0;else{if(!/^mod$/i.test(t))throw new Error("Unrecognized modifier name: "+t);ah?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function ch(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function uh(t){return new Vc({props:{handleKeyDown:dh(t)}})}function dh(t){let e=function(t){let e=Object.create(null);for(let n in t)e[lh(n)]=t[n];return e}(t);return function(t,n){let r,i=function(t){var e=!(ih&&(t.ctrlKey||t.altKey||t.metaKey)||rh&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?th:Qf)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),o=1==i.length&&" "!=i,s=e[ch(i,n,!o)];if(s&&s(t.state,t.dispatch,t))return!0;if(o&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=Qf[n.keyCode])&&r!=i){let i=e[ch(r,n,!0)];if(i&&i(t.state,t.dispatch,t))return!0}else if(o&&n.shiftKey){let r=e[ch(i,n,!0)];if(r&&r(t.state,t.dispatch,t))return!0}return!1}}const fh=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function hh(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function ph(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function mh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function gh(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const vh=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=gh(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let r=n.after(),i=t.tr.replaceWith(r,r,s.createAndFill());i.setSelection(Sc.near(i.doc.resolve(r),1)),e(i.scrollIntoView())}return!0};function yh(t,e,n){let r,i,o=e.nodeBefore,s=e.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!ac(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=e.pos+s.nodeSize,a=za.empty;for(let t=r.length-1;t>=0;t--)a=za.from(r[t].create(null,a));a=za.from(o.copy(a));let l=t.tr.step(new tc(e.pos-1,i,e.pos,i,new qa(a,1,0),r.length,!0)),c=i+2*r.length;ac(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=Sc.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),u=c&&rc(c);if(null!=u&&u>=e.depth)return n&&n(t.tr.lift(c,u).scrollIntoView()),!0;if(a&&hh(s,"start",!0)&&hh(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=za.empty;for(let t=i.length-1;t>=0;t--)r=za.from(i[t].copy(r));n(t.tr.step(new tc(e.pos-i.length,e.pos+s.nodeSize,e.pos+l,e.pos+s.nodeSize-l,new qa(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function bh(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(e.tr.setSelection(Cc.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const wh=bh(-1),xh=bh(1);function kh(t,e=null){return function(n,r){let{from:i,to:o}=n.selection,s=!1;return n.doc.nodesBetween(i,o,((r,i)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{let e=n.doc.resolve(i),r=e.index();s=e.parent.canReplaceWith(r,r+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(i,o,t,e).scrollIntoView()),!0)}}function Sh(t,e=null){return function(n,r){let{empty:i,$cursor:o,ranges:s}=n.selection;if(i&&!o||!function(t,e,n){for(let r=0;r<e.length;r++){let{$from:i,$to:o}=e[r],s=0==i.depth&&t.inlineContent&&t.type.allowsMarkType(n);if(t.nodesBetween(i.pos,o.pos,(t=>{if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,t))return!1;if(r)if(o)t.isInSet(n.storedMarks||o.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{let i=!1,o=n.tr;for(let e=0;!i&&e<s.length;e++){let{$from:r,$to:o}=s[e];i=n.doc.rangeHasMark(r.pos,o.pos,t)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(i)o.removeMark(r.pos,a.pos,t);else{let n=r.pos,i=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<i&&(n+=c,i-=u),o.addMark(n,i,t.create(e))}}r(o.scrollIntoView())}return!0}}function Oh(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let _h=Oh(fh,((t,e,n)=>{let{$cursor:r}=t.selection;if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1;let i=ph(r);if(!i){let n=r.blockRange(),i=n&&rc(n);return null!=i&&(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&yh(t,i,e))return!0;if(0==r.parent.content.size&&(hh(o,"end")||Nc.isSelectable(o))){let n=lc(t.doc,r.before(),r.after(),qa.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(hh(o,"end")?Sc.findFrom(r.doc.resolve(r.mapping.map(i.pos,-1)),-1):Nc.create(r.doc,i.pos-o.nodeSize)),e(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)}),((t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=ph(r)}let s=o&&o.nodeBefore;return!(!s||!Nc.isSelectable(s))&&(e&&e(t.tr.setSelection(Nc.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)})),Mh=Oh(fh,((t,e,n)=>{let{$cursor:r}=t.selection;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1;let i=mh(r);if(!i)return!1;let o=i.nodeAfter;if(yh(t,i,e))return!0;if(0==r.parent.content.size&&(hh(o,"start")||Nc.isSelectable(o))){let n=lc(t.doc,r.before(),r.after(),qa.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(hh(o,"start")?Sc.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Nc.create(r.doc,r.mapping.map(i.pos))),e(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)}),((t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=mh(r)}let s=o&&o.nodeAfter;return!(!s||!Nc.isSelectable(s))&&(e&&e(t.tr.setSelection(Nc.create(t.doc,o.pos)).scrollIntoView()),!0)}));const Ch={Enter:Oh(((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)}),((t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Dc||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=gh(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=t.tr.insert(n,o.createAndFill());s.setSelection(Cc.create(s.doc,n+1)),e(s.scrollIntoView())}return!0}),((t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(sc(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&rc(r);return null!=i&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)}),((t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Nc&&t.selection.node.isBlock)return!(!n.parentOffset||!sc(t.doc,n.pos))&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(e){let i=r.parentOffset==r.parent.content.size,o=t.tr;(t.selection instanceof Cc||t.selection instanceof Dc)&&o.deleteSelection();let s=0==n.depth?null:gh(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=sc(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!sc(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let t=o.mapping.map(n.before()),e=o.doc.resolve(t);s&&n.node(-1).canReplaceWith(e.index(),e.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}e(o.scrollIntoView())}return!0})),"Mod-Enter":vh,Backspace:_h,"Mod-Backspace":_h,"Shift-Backspace":_h,Delete:Mh,"Mod-Delete":Mh,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Dc(t.doc))),!0)},$h={"Ctrl-h":Ch.Backspace,"Alt-Backspace":Ch["Mod-Backspace"],"Ctrl-d":Ch.Delete,"Ctrl-Alt-Backspace":Ch["Mod-Delete"],"Alt-Delete":Ch["Mod-Delete"],"Alt-d":Ch["Mod-Delete"],"Ctrl-a":wh,"Ctrl-e":xh};for(let os in Ch)$h[os]=Ch[os];const Nh=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?$h:Ch;class Th{constructor(t,e){var n;this.match=t,this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,i){let o=n;if(e[1]){let t=e[0].lastIndexOf(e[1]);o+=e[0].slice(t+e[1].length);let n=(r+=t)-i;n>0&&(o=e[0].slice(t-n,t)+o,r=i)}return t.tr.insertText(o,r,i)}):e}}function Dh({rules:t}){let e=new Vc({state:{init:()=>null,apply(t,e){let n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:(n,r,i,o)=>Ah(n,r,i,o,t,e),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&Ah(n,r.pos,r.pos,"",t,e)}))}}},isInputRules:!0});return e}function Ah(t,e,n,r,i,o){if(t.composing)return!1;let s=t.state,a=s.doc.resolve(e);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+r;for(let c=0;c<i.length;c++){let a=i[c].match.exec(l),u=a&&i[c].handler(s,a,e-(a[0].length-r.length),n);if(u)return t.dispatch(u.setMeta(o,{transform:u,from:e,to:n,text:r})),!0}return!1}const Eh=(t,e)=>{let n=t.plugins;for(let r=0;r<n.length;r++){let i,o=n[r];if(o.spec.isInputRules&&(i=o.getState(t))){if(e){let n=t.tr,r=i.transform;for(let t=r.steps.length-1;t>=0;t--)n.step(r.steps[t].invert(r.docs[t]));if(i.text){let e=n.doc.resolve(i.from).marks();n.replaceWith(i.from,i.to,t.schema.text(i.text,e))}else n.delete(i.from,i.to);e(n)}return!0}}return!1};function Ph(t,e,n=null,r){return new Th(t,((t,i,o,s)=>{let a=n instanceof Function?n(i):n,l=t.tr.delete(o,s),c=l.doc.resolve(o).blockRange(),u=c&&ic(c,e,a);if(!u)return null;l.wrap(c,u);let d=l.doc.resolve(o-1).nodeBefore;return d&&d.type==e&&ac(l.doc,o-1)&&(!r||r(i,d))&&l.join(o-1),l}))}function Ih(t,e,n=null){return new Th(t,((t,r,i,o)=>{let s=t.doc.resolve(i),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),e)?t.tr.delete(i,o).setBlockType(i,i,e,a):null}))}new Th(/--$/,"—"),new Th(/\.\.\.$/,"…"),new Th(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Th(/"$/,"”"),new Th(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,""),new Th(/'$/,"");const Rh=["ol",0],zh=["ul",0],jh=["li",0],Fh={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1==t.attrs.order?Rh:["ol",{start:t.attrs.order},0]},Lh={parseDOM:[{tag:"ul"}],toDOM:()=>zh},Bh={parseDOM:[{tag:"li"}],toDOM:()=>jh,defining:!0};function Vh(t,e){let n={};for(let r in t)n[r]=t[r];for(let r in e)n[r]=e[r];return n}function qh(t,e,n){return t.append({ordered_list:Vh(Fh,{content:"list_item+",group:n}),bullet_list:Vh(Lh,{content:"list_item+",group:n}),list_item:Vh(Bh,{content:e})})}function Jh(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;let t=n.doc.resolve(s.start-2);l=new ol(t,t,s.depth),s.endIndex<s.parent.childCount&&(s=new ol(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=ic(l,t,e,s);return!!c&&(r&&r(function(t,e,n,r,i){let o=za.empty;for(let u=n.length-1;u>=0;u--)o=za.from(n[u].type.create(n[u].attrs,o));t.step(new tc(e.start-(r?2:0),e.end,e.start,e.end,new qa(o,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==i&&(s=u+1);let a=n.length-s,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&sc(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}(n.tr,s,c,a,t).scrollIntoView()),!0)}}function Wh(t){return function(e,n){let{$from:r,$to:i,node:o}=e.selection;if(o&&o.isBlock||r.depth<2||!r.sameParent(i))return!1;let s=r.node(-1);if(s.type!=t)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=t||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let i=za.empty,o=r.index(-1)?1:r.index(-2)?2:3;for(let t=r.depth-o;t>=r.depth-3;t--)i=za.from(r.node(t).copy(i));let s=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;i=i.append(za.from(t.createAndFill()));let a=r.before(r.depth-(o-1)),l=e.tr.replace(a,r.after(-s),new qa(i,4-o,0)),c=-1;l.doc.nodesBetween(a,l.doc.content.size,((t,e)=>{if(c>-1)return!1;t.isTextblock&&0==t.content.size&&(c=e+1)})),c>-1&&l.setSelection(Sc.near(l.doc.resolve(c))),n(l.scrollIntoView())}return!0}let a=i.pos==r.end()?s.contentMatchAt(0).defaultType:null,l=e.tr.delete(r.pos,i.pos),c=a?[null,{type:a}]:void 0;return!!sc(l.doc,r.pos,2,c)&&(n&&n(l.split(r.pos,2,c).scrollIntoView()),!0)}}function Hh(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,(e=>e.childCount>0&&e.firstChild.type==t));return!!o&&(!n||(r.node(o.depth-1).type==t?function(t,e,n,r){let i=t.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new tc(o-1,s,o,s,new qa(za.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new ol(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=rc(r);if(null==a)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;ac(i.doc,l)&&i.join(l);return e(i.scrollIntoView()),!0}(e,n,t,o):function(t,e,n){let r=t.tr,i=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?za.empty:za.from(i))))return!1;let d=o.pos,f=d+s.nodeSize;return r.step(new tc(d-(a?1:0),f+(l?1:0),d+1,f-1,new qa((a?za.empty:za.from(i.copy(za.empty))).append(l?za.empty:za.from(i.copy(za.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}(e,n,o)))}}function Kh(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,(e=>e.childCount>0&&e.firstChild.type==t));if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let r=l.lastChild&&l.lastChild.type==a.type,i=za.from(r?t.create():null),s=new qa(za.from(t.create(null,za.from(a.type.create(null,i)))),r?3:1,0),c=o.start,u=o.end;n(e.tr.step(new tc(c-(r?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0}}var Uh=function(){};Uh.prototype.append=function(t){return t.length?(t=Uh.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},Uh.prototype.prepend=function(t){return t.length?Uh.from(t).append(this):this},Uh.prototype.appendInner=function(t){return new Gh(this,t)},Uh.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Uh.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Uh.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Uh.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Uh.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},Uh.from=function(t){return t instanceof Uh?t:t&&t.length?new Yh(t):Uh.empty};var Yh=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Uh);Uh.empty=new Yh([]);var Gh=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;return!(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;return!(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Uh),Zh=Uh;class Xh{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--){if(this.items.get(i-1).selection){--i;break}}e&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=t.tr,l=[],c=[];return this.items.forEach(((t,e)=>{if(!t.step)return n||(n=this.remapping(i,e+1),r=n.maps.length),r--,void c.push(t);if(n){c.push(new Qh(t.map));let e,i=t.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new Qh(e,void 0,void 0,l.length+c.length))),r--,e&&n.appendMap(e,r)}else a.maybeStep(t.step);return t.selection?(o=n?t.selection.map(n.slice(r)):t.selection,s=new Xh(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(t,e,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let c=0;c<t.steps.length;c++){let n,l=t.steps[c].invert(t.docs[c]),u=new Qh(t.mapping.maps[c],l,e);(n=a&&a.merge(u))&&(u=n,c?i.pop():s=s.slice(0,s.length-1)),i.push(u),e&&(o++,e=void 0),r||(a=u)}let l=o-n.depth;return l>ep&&(s=function(t,e){let n;return t.forEach(((t,r)=>{if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}(s,l),o-=l),new Xh(s.append(i),o)}remapping(t,e){let n=new Jl;return this.items.forEach(((e,r)=>{let i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,i)}),t,e),n}addMaps(t){return 0==this.eventCount?this:new Xh(this.items.append(t.map((t=>new Qh(t)))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),i=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach((t=>{t.selection&&s--}),r);let a=e;this.items.forEach((e=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(e.step){let o=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(i.slice(a+1,r));c&&s++,n.push(new Qh(l,o,c))}else n.push(new Qh(l))}),r);let l=[];for(let d=e;d<o;d++)l.push(new Qh(i.maps[d]));let c=this.items.slice(0,r).append(l).append(n),u=new Xh(c,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let t=0;return this.items.forEach((e=>{e.step||t++})),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=t)r.push(o),o.selection&&i++;else if(o.step){let t=o.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=o.selection&&o.selection.map(e.slice(n));a&&i++;let l,c=new Qh(s.invert(),t,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new Xh(Zh.from(r.reverse()),i)}}Xh.empty=new Xh(Zh.empty,0);class Qh{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new Qh(e.getMap().invert(),e,this.selection)}}}class tp{constructor(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r}}const ep=20;function np(t){let e=[];return t.forEach(((t,n,r,i)=>e.push(r,i))),e}function rp(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function ip(t,e,n,r){let i=ap(e),o=lp.get(e).spec.config,s=(r?t.undone:t.done).popEvent(e,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),o,i),c=new tp(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(lp,{redo:r,historyState:c}).scrollIntoView())}let op=!1,sp=null;function ap(t){let e=t.plugins;if(sp!=e){op=!1,sp=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){op=!0;break}}return op}const lp=new Wc("history"),cp=new Wc("closeHistory");function up(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vc({key:lp,state:{init:()=>new tp(Xh.empty,Xh.empty,null,0),apply:(e,n,r)=>function(t,e,n,r){let i,o=n.getMeta(lp);if(o)return o.historyState;n.getMeta(cp)&&(t=new tp(t.done,t.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(lp))return s.getMeta(lp).redo?new tp(t.done.addTransform(n,void 0,r,ap(e)),t.undone,np(n.mapping.maps[n.steps.length-1]),t.prevTime):new tp(t.done,t.undone.addTransform(n,void 0,r,ap(e)),null,t.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new tp(t.done.rebased(n,i),t.undone.rebased(n,i),rp(t.prevRanges,n.mapping),t.prevTime):new tp(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),rp(t.prevRanges,n.mapping),t.prevTime);{let i=0==t.prevTime||!s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach(((t,r)=>{for(let i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)})),n}(n,t.prevRanges)),o=s?rp(t.prevRanges,n.mapping):np(n.mapping.maps[n.steps.length-1]);return new tp(t.done.addTransform(n,i?e.selection.getBookmark():void 0,r,ap(e)),Xh.empty,o,n.time)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?dp:"historyRedo"==n?fp:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const dp=(t,e)=>{let n=lp.getState(t);return!(!n||0==n.done.eventCount)&&(e&&ip(n,t,e,!1),!0)},fp=(t,e)=>{let n=lp.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&ip(n,t,e,!0),!0)};function hp(t){let e=lp.getState(t);return e?e.done.eventCount:0}function pp(t){let e=lp.getState(t);return e?e.undone.eventCount:0}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function mp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gp={},vp={},yp={},bp={},wp={};function xp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function kp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xp(Object(n),!0).forEach((function(e){Sp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Sp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Op(t){return(Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(wp,"__esModule",{value:!0}),wp._setTarget=void 0,wp.popParams=$p,wp.pushParams=Cp,wp.target=void 0,wp.withParams=function(t,e){if("object"===Op(t)&&void 0!==e)return n=t,r=e,Tp((function(t){return function(){t(n);for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return r.apply(this,i)}}));var n,r;return Tp(t)};var _p=[],Mp=null;wp.target=Mp;function Cp(){null!==Mp&&_p.push(Mp),wp.target=Mp={}}function $p(){var t=Mp,e=wp.target=Mp=_p.pop()||null;return e&&(Array.isArray(e.$sub)||(e.$sub=[]),e.$sub.push(t)),t}function Np(t){if("object"!==Op(t)||Array.isArray(t))throw new Error("params must be an object");wp.target=Mp=kp(kp({},Mp),t)}function Tp(t){var e=t(Np);return function(){Cp();try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}finally{$p()}}}wp._setTarget=function(t){wp.target=Mp=t},Object.defineProperty(bp,"__esModule",{value:!0}),bp.default=void 0;var Dp=wp.withParams;bp.default=Dp,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.regex=t.ref=t.len=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.default}});var e,n=(e=bp)&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){if(Array.isArray(t))return!!t.length;if(null==t)return!1;if(!1===t)return!0;if(t instanceof Date)return!isNaN(t.getTime());if("object"===r(t)){for(var e in t)return!0;return!1}return!!String(t).length};t.req=i;t.len=function(t){return Array.isArray(t)?t.length:"object"===r(t)?Object.keys(t).length:String(t).length};t.ref=function(t,e,n){return"function"==typeof t?t.call(e,n):n[t]};t.regex=function(t,e){return(0,n.default)({type:t},(function(t){return!i(t)||e.test(t)}))}}(yp),Object.defineProperty(vp,"__esModule",{value:!0}),vp.default=void 0;var Ap=(0,yp.regex)("alpha",/^[a-zA-Z]*$/);vp.default=Ap;var Ep={};Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.default=void 0;var Pp=(0,yp.regex)("alphaNum",/^[a-zA-Z0-9]*$/);Ep.default=Pp;var Ip={};Object.defineProperty(Ip,"__esModule",{value:!0}),Ip.default=void 0;var Rp=(0,yp.regex)("numeric",/^[0-9]*$/);Ip.default=Rp;var zp={};Object.defineProperty(zp,"__esModule",{value:!0}),zp.default=void 0;var jp=yp;zp.default=function(t,e){return(0,jp.withParams)({type:"between",min:t,max:e},(function(n){return!(0,jp.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n}))};var Fp={};Object.defineProperty(Fp,"__esModule",{value:!0}),Fp.default=void 0;var Lp=(0,yp.regex)("email",/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i);Fp.default=Lp;var Bp={};Object.defineProperty(Bp,"__esModule",{value:!0}),Bp.default=void 0;var Vp=yp,qp=(0,Vp.withParams)({type:"ipAddress"},(function(t){if(!(0,Vp.req)(t))return!0;if("string"!=typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(Jp)}));Bp.default=qp;var Jp=function(t){if(t.length>3||0===t.length)return!1;if("0"===t[0]&&"0"!==t)return!1;if(!t.match(/^\d+$/))return!1;var e=0|+t;return e>=0&&e<=255},Wp={};Object.defineProperty(Wp,"__esModule",{value:!0}),Wp.default=void 0;var Hp=yp;Wp.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,Hp.withParams)({type:"macAddress"},(function(e){if(!(0,Hp.req)(e))return!0;if("string"!=typeof e)return!1;var n="string"==typeof t&&""!==t?e.split(t):12===e.length||16===e.length?e.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every(Kp)}))};var Kp=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)},Up={};Object.defineProperty(Up,"__esModule",{value:!0}),Up.default=void 0;var Yp=yp;Up.default=function(t){return(0,Yp.withParams)({type:"maxLength",max:t},(function(e){return!(0,Yp.req)(e)||(0,Yp.len)(e)<=t}))};var Gp={};Object.defineProperty(Gp,"__esModule",{value:!0}),Gp.default=void 0;var Zp=yp;Gp.default=function(t){return(0,Zp.withParams)({type:"minLength",min:t},(function(e){return!(0,Zp.req)(e)||(0,Zp.len)(e)>=t}))};var Xp={};Object.defineProperty(Xp,"__esModule",{value:!0}),Xp.default=void 0;var Qp=yp,tm=(0,Qp.withParams)({type:"required"},(function(t){return(0,Qp.req)("string"==typeof t?t.trim():t)}));Xp.default=tm;var em={};Object.defineProperty(em,"__esModule",{value:!0}),em.default=void 0;var nm=yp;em.default=function(t){return(0,nm.withParams)({type:"requiredIf",prop:t},(function(e,n){return!(0,nm.ref)(t,this,n)||(0,nm.req)(e)}))};var rm={};Object.defineProperty(rm,"__esModule",{value:!0}),rm.default=void 0;var im=yp;rm.default=function(t){return(0,im.withParams)({type:"requiredUnless",prop:t},(function(e,n){return!!(0,im.ref)(t,this,n)||(0,im.req)(e)}))};var om={};Object.defineProperty(om,"__esModule",{value:!0}),om.default=void 0;var sm=yp;om.default=function(t){return(0,sm.withParams)({type:"sameAs",eq:t},(function(e,n){return e===(0,sm.ref)(t,this,n)}))};var am={};Object.defineProperty(am,"__esModule",{value:!0}),am.default=void 0;var lm=(0,yp.regex)("url",/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);am.default=lm;var cm={};Object.defineProperty(cm,"__esModule",{value:!0}),cm.default=void 0;var um=yp;cm.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,um.withParams)({type:"or"},(function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.length>0&&e.reduce((function(e,n){return e||n.apply(t,r)}),!1)}))};var dm={};Object.defineProperty(dm,"__esModule",{value:!0}),dm.default=void 0;var fm=yp;dm.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,fm.withParams)({type:"and"},(function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.length>0&&e.reduce((function(e,n){return e&&n.apply(t,r)}),!0)}))};var hm={};Object.defineProperty(hm,"__esModule",{value:!0}),hm.default=void 0;var pm=yp;hm.default=function(t){return(0,pm.withParams)({type:"not"},(function(e,n){return!(0,pm.req)(e)||!t.call(this,e,n)}))};var mm={};Object.defineProperty(mm,"__esModule",{value:!0}),mm.default=void 0;var gm=yp;mm.default=function(t){return(0,gm.withParams)({type:"minValue",min:t},(function(e){return!(0,gm.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t}))};var vm={};Object.defineProperty(vm,"__esModule",{value:!0}),vm.default=void 0;var ym=yp;vm.default=function(t){return(0,ym.withParams)({type:"maxValue",max:t},(function(e){return!(0,ym.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t}))};var bm={};Object.defineProperty(bm,"__esModule",{value:!0}),bm.default=void 0;var wm=(0,yp.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);bm.default=wm;var xm={};Object.defineProperty(xm,"__esModule",{value:!0}),xm.default=void 0;var km=(0,yp.regex)("decimal",/^[-]?\d*(\.\d+)?$/);xm.default=km,function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"alpha",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"alphaNum",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"and",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"between",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"decimal",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"email",{enumerable:!0,get:function(){return s.default}}),t.helpers=void 0,Object.defineProperty(t,"integer",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"ipAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"macAddress",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"maxLength",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"maxValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"minLength",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"minValue",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"not",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"numeric",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"or",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"required",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"requiredIf",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"requiredUnless",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"sameAs",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"url",{enumerable:!0,get:function(){return m.default}});var n=_(vp),r=_(Ep),i=_(Ip),o=_(zp),s=_(Fp),a=_(Bp),l=_(Wp),c=_(Up),u=_(Gp),d=_(Xp),f=_(em),h=_(rm),p=_(om),m=_(am),g=_(cm),v=_(dm),y=_(hm),b=_(mm),w=_(vm),x=_(bm),k=_(xm),S=function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!==e(t)&&"function"!=typeof t)return{default:t};var r=O(n);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}i.default=t,r&&r.set(t,i);return i}(yp);function O(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(O=function(t){return t?n:e})(t)}function _(t){return t&&t.__esModule?t:{default:t}}t.helpers=S}(gp);function Sm(t){return(Sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Om={selector:"vue-portal-target-".concat(((t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e})())},_m=function(t){return Om.selector=t},Mm="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":Sm(document)),Cm=Wn.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?1!==e.length||e[0].text?t(this.tag||"DIV",e):e:t()},destroyed:function(){var t=this.$el;t&&t.parentNode.removeChild(t)}}),$m=Wn.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(Om.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(Mm)return document.querySelector(this.selector)},insertTargetEl:function(){if(Mm){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){if(Mm){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new Cm({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function Nm(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",$m),e.defaultSelector&&_m(e.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===Wn&&Wn.use(Nm)
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/;var Tm=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function Dm(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var i=Array.isArray(t)?[]:{};return e.push({original:t,copy:i}),Object.keys(t).forEach((function(n){i[n]=Dm(t[n],e)})),i}function Am(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function Em(t){return null!==t&&"object"==typeof t}var Pm=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},Im={namespaced:{configurable:!0}};Im.namespaced.get=function(){return!!this._rawModule.namespaced},Pm.prototype.addChild=function(t,e){this._children[t]=e},Pm.prototype.removeChild=function(t){delete this._children[t]},Pm.prototype.getChild=function(t){return this._children[t]},Pm.prototype.hasChild=function(t){return t in this._children},Pm.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},Pm.prototype.forEachChild=function(t){Am(this._children,t)},Pm.prototype.forEachGetter=function(t){this._rawModule.getters&&Am(this._rawModule.getters,t)},Pm.prototype.forEachAction=function(t){this._rawModule.actions&&Am(this._rawModule.actions,t)},Pm.prototype.forEachMutation=function(t){this._rawModule.mutations&&Am(this._rawModule.mutations,t)},Object.defineProperties(Pm.prototype,Im);var Rm,zm=function(t){this.register([],t,!1)};function jm(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;jm(t.concat(r),e.getChild(r),n.modules[r])}}zm.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},zm.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},zm.prototype.update=function(t){jm([],this.root,t)},zm.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=new Pm(e,n);0===t.length?this.root=i:this.get(t.slice(0,-1)).addChild(t[t.length-1],i);e.modules&&Am(e.modules,(function(e,i){r.register(t.concat(i),e,n)}))},zm.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},zm.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var Fm=function(t){var e=this;void 0===t&&(t={}),!Rm&&"undefined"!=typeof window&&window.Vue&&Km(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new zm(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Rm,this._makeLocalGettersCache=Object.create(null);var i=this,o=this.dispatch,s=this.commit;this.dispatch=function(t,e){return o.call(i,t,e)},this.commit=function(t,e,n){return s.call(i,t,e,n)},this.strict=r;var a=this._modules.root.state;Jm(this,a,[],this._modules.root),qm(this,a),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:Rm.config.devtools)&&function(t){Tm&&(t._devtoolHook=Tm,Tm.emit("vuex:init",t),Tm.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){Tm.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){Tm.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},Lm={state:{configurable:!0}};function Bm(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Vm(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Jm(t,n,[],t._modules.root,!0),qm(t,n,e)}function qm(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,o={};Am(i,(function(e,n){o[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=Rm.config.silent;Rm.config.silent=!0,t._vm=new Rm({data:{$$state:e},computed:o}),Rm.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),Rm.nextTick((function(){return r.$destroy()})))}function Jm(t,e,n,r,i){var o=!n.length,s=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[s],t._modulesNamespaceMap[s]=r),!o&&!i){var a=Wm(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit((function(){Rm.set(a,l,r.state)}))}var c=r.context=function(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=Hm(n,r,i),s=o.payload,a=o.options,l=o.type;return a&&a.root||(l=e+l),t.dispatch(l,s)},commit:r?t.commit:function(n,r,i){var o=Hm(n,r,i),s=o.payload,a=o.options,l=o.type;a&&a.root||(l=e+l),t.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return Wm(t.state,n)}}}),i}(t,s,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,s+n,e,c)})),r.forEachAction((function(e,n){var r=e.root?n:s+n,i=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var i,o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(i=o)&&"function"==typeof i.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}(t,r,i,c)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,s+n,e,c)})),r.forEachChild((function(r,o){Jm(t,e,n.concat(o),r,i)}))}function Wm(t,e){return e.reduce((function(t,e){return t[e]}),t)}function Hm(t,e,n){return Em(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function Km(t){Rm&&t===Rm||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(Rm=t)}Lm.state.get=function(){return this._vm._data.$$state},Lm.state.set=function(t){},Fm.prototype.commit=function(t,e,n){var r=this,i=Hm(t,e,n),o=i.type,s=i.payload,a={type:o,payload:s},l=this._mutations[o];l&&(this._withCommit((function(){l.forEach((function(t){t(s)}))})),this._subscribers.slice().forEach((function(t){return t(a,r.state)})))},Fm.prototype.dispatch=function(t,e){var n=this,r=Hm(t,e),i=r.type,o=r.payload,s={type:i,payload:o},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(s,n.state)}))}catch(Tg){}var l=a.length>1?Promise.all(a.map((function(t){return t(o)}))):a[0](o);return new Promise((function(t,e){l.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(s,n.state)}))}catch(Tg){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(s,n.state,t)}))}catch(Tg){}e(t)}))}))}},Fm.prototype.subscribe=function(t,e){return Bm(t,this._subscribers,e)},Fm.prototype.subscribeAction=function(t,e){return Bm("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},Fm.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},Fm.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},Fm.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),Jm(this,this.state,t,this._modules.get(t),n.preserveState),qm(this,this.state)},Fm.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=Wm(e.state,t.slice(0,-1));Rm.delete(n,t[t.length-1])})),Vm(this)},Fm.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},Fm.prototype.hotUpdate=function(t){this._modules.update(t),Vm(this,!0)},Fm.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(Fm.prototype,Lm);var Um=Qm((function(t,e){var n={};return Xm(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=tg(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].vuex=!0})),n})),Ym=Qm((function(t,e){var n={};return Xm(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=tg(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n})),Gm=Qm((function(t,e){var n={};return Xm(e).forEach((function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||tg(this.$store,"mapGetters",t))return this.$store.getters[i]},n[r].vuex=!0})),n})),Zm=Qm((function(t,e){var n={};return Xm(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var o=tg(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n}));function Xm(t){return function(t){return Array.isArray(t)||Em(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function Qm(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function tg(t,e,n){return t._modulesNamespaceMap[n]}function eg(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(Tg){t.log(e)}}function ng(t){try{t.groupEnd()}catch(Tg){t.log("—— log end ——")}}function rg(){var t=new Date;return" @ "+ig(t.getHours(),2)+":"+ig(t.getMinutes(),2)+":"+ig(t.getSeconds(),2)+"."+ig(t.getMilliseconds(),3)}function ig(t,e){return n="0",r=e-t.toString().length,new Array(r+1).join(n)+t;var n,r}const og={Store:Fm,install:Km,version:"3.6.2",mapState:Um,mapMutations:Ym,mapGetters:Gm,mapActions:Zm,createNamespacedHelpers:function(t){return{mapState:Um.bind(null,t),mapGetters:Gm.bind(null,t),mapMutations:Ym.bind(null,t),mapActions:Zm.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var i=t.mutationTransformer;void 0===i&&(i=function(t){return t});var o=t.actionFilter;void 0===o&&(o=function(t,e){return!0});var s=t.actionTransformer;void 0===s&&(s=function(t){return t});var a=t.logMutations;void 0===a&&(a=!0);var l=t.logActions;void 0===l&&(l=!0);var c=t.logger;return void 0===c&&(c=console),function(t){var u=Dm(t.state);void 0!==c&&(a&&t.subscribe((function(t,o){var s=Dm(o);if(n(t,u,s)){var a=rg(),l=i(t),d="mutation "+t.type+a;eg(c,d,e),c.log("%c prev state","color: #9E9E9E; font-weight: bold",r(u)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",r(s)),ng(c)}u=s})),l&&t.subscribeAction((function(t,n){if(o(t,n)){var r=rg(),i=s(t),a="action "+t.type+r;eg(c,a,e),c.log("%c action","color: #03A9F4; font-weight: bold",i),ng(c)}})))}}};function sg(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)})),(r=t.get("*"))&&r.slice().map((function(t){t(e,n)}))}}}var ag,lg,cg="function"==typeof Map?new Map:(ag=[],lg=[],{has:function(t){return ag.indexOf(t)>-1},get:function(t){return lg[ag.indexOf(t)]},set:function(t,e){-1===ag.indexOf(t)&&(ag.push(t),lg.push(e))},delete:function(t){var e=ag.indexOf(t);e>-1&&(ag.splice(e,1),lg.splice(e,1))}}),ug=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(Tg){ug=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function dg(t){var e=cg.get(t);e&&e.destroy()}function fg(t){var e=cg.get(t);e&&e.update()}var hg=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((hg=function(t){return t}).destroy=function(t){return t},hg.update=function(t){return t}):((hg=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!cg.has(t)){var e,n=null,r=null,i=null,o=function(){t.clientWidth!==r&&c()},s=function(e){window.removeEventListener("resize",o,!1),t.removeEventListener("input",c,!1),t.removeEventListener("keyup",c,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",c,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),cg.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",c,!1),window.addEventListener("resize",o,!1),t.addEventListener("input",c,!1),t.addEventListener("autosize:update",c,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",cg.set(t,{destroy:s,update:c}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),c()}function a(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function l(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&(t.parentNode.style.scrollBehavior="auto",e.push([t.parentNode,t.parentNode.scrollTop])),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0];e.scrollTop=t[1],e.style.scrollBehavior=null}))}}(t);t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e()}}function c(){l();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(r<e?"hidden"===n.overflowY&&(a("scroll"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(a("hidden"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),i!==r){i=r;var o=ug("autosize:resized");try{t.dispatchEvent(o)}catch(s){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],dg),t},hg.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],fg),t});var pg=hg,mg={exports:{}};const gg=mg.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",l="week",c="month",u="quarter",d="year",f="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),o=n-i<0,s=e.clone().add(r+(o?-1:1),c);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:d,w:l,d:a,D:f,h:s,m:o,s:i,ms:r,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var x=function(t){return t instanceof _},k=function t(e,n,r){var i;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();w[o]&&(i=o),n&&(w[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,i=a}return!r&&i&&(b=i),i||!r&&b},S=function(t,e){if(x(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=y;O.l=k,O.i=x,O.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function g(t){this.$L=k(t.locale,null,!0),this.parse(t)}var v=g.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return O},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return S(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<S(t)},v.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,r=!!O.u(e)||e,u=O.p(t),h=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},p=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(u){case d:return r?h(1,0):h(31,11);case c:return r?h(1,g):h(0,g+1);case l:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return h(r?v-w:v+(6-w),g);case a:case f:return p(y+"Hours",0);case s:return p(y+"Minutes",1);case o:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var n,l=O.p(t),u="set"+(this.$u?"UTC":""),h=(n={},n[a]=u+"Date",n[f]=u+"Date",n[c]=u+"Month",n[d]=u+"FullYear",n[s]=u+"Hours",n[o]=u+"Minutes",n[i]=u+"Seconds",n[r]=u+"Milliseconds",n)[l],p=l===a?this.$D+(e-this.$W):e;if(l===c||l===d){var m=this.clone().set(f,1);m.$d[h](p),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[O.p(t)]()},v.add=function(r,u){var f,h=this;r=Number(r);var p=O.p(u),m=function(t){var e=S(h);return O.w(e.date(e.date()+Math.round(t*r)),h)};if(p===c)return this.set(c,this.$M+r);if(p===d)return this.set(d,this.$y+r);if(p===a)return m(1);if(p===l)return m(7);var g=(f={},f[o]=e,f[s]=n,f[i]=t,f)[p]||1,v=this.$d.getTime()+r*g;return O.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),o=this.$H,s=this.$m,a=this.$M,l=n.weekdays,c=n.months,u=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},d=function(t){return O.s(o%12||12,t,"0")},f=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:u(n.monthsShort,a,c,3),MMMM:u(c,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,l,2),ddd:u(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:O.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:O.s(s,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(t,e){return e||p[t]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,f,h){var p,m=O.p(f),g=S(r),v=(g.utcOffset()-this.utcOffset())*e,y=this-g,b=O.m(this,g);return b=(p={},p[d]=b/12,p[c]=b,p[u]=b/3,p[l]=(y-v)/6048e5,p[a]=(y-v)/864e5,p[s]=y/n,p[o]=y/e,p[i]=y/t,p)[m]||y,h?b:O.a(b)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return w[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=k(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return O.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),M=_.prototype;return S.prototype=M,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",c],["$y",d],["$D",f]].forEach((function(t){M[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),S.extend=function(t,e){return t.$i||(t(e,_,S),t.$i=!0),S},S.locale=k,S.isDayjs=x,S.unix=function(t){return S(1e3*t)},S.en=w[b],S.Ls=w,S.p={},S}();var vg={exports:{}};const yg=vg.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(t){return(t=+t)+(t>68?1900:2e3)},a=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],c=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=u(t,!1)}],a:[i,function(t){this.afternoon=u(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=c("months"),n=(c("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(t){var e=c("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t)}],YYYY:[/\d{4}/,a("year")],Z:l,ZZ:l};function f(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,l=0;l<a;l+=1){var c=s[l],u=d[c],f=u&&u[0],h=u&&u[1];s[l]=h?{regex:f,parser:h}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,l=i.parser,c=t.slice(r),u=o.exec(c)[0];l.call(e,u),t=t.replace(u,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var l=!0===s[2],c=!0===s[3],u=l||c,d=s[2];c&&(d=s[2]),o=this.$locale(),!l&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=f(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,l=r.minutes,c=r.seconds,u=r.milliseconds,d=r.zone,h=new Date,p=s||(i||o?1:h.getDate()),m=i||h.getFullYear(),g=0;i&&!o||(g=o>0?o-1:h.getMonth());var v=a||0,y=l||0,b=c||0,w=u||0;return d?new Date(Date.UTC(m,g,p,v,y,b,w+60*d.offset*1e3)):n?new Date(Date.UTC(m,g,p,v,y,b,w)):new Date(m,g,p,v,y,b,w)}catch(x){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&e!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var h=a.length,p=1;p<=h;p+=1){s[1]=a[p-1];var m=n.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===h&&(this.$d=new Date(""))}else i.call(this,t)}}}();var bg={},wg={};function xg(t){return null==t}function kg(t){return null!=t}function Sg(t,e){return e.tag===t.tag&&e.key===t.key}function Og(t){var e=t.tag;t.vm=new e({data:t.args})}function _g(t,e,n){var r,i,o={};for(r=e;r<=n;++r)kg(i=t[r].key)&&(o[i]=r);return o}function Mg(t,e,n){for(;e<=n;++e)Og(t[e])}function Cg(t,e,n){for(;e<=n;++e){var r=t[e];kg(r)&&(r.vm.$destroy(),r.vm=null)}}function $g(t,e){t!==e&&(e.vm=t.vm,function(t){for(var e=Object.keys(t.args),n=0;n<e.length;n++)e.forEach((function(e){t.vm[e]=t.args[e]}))}(e))}Object.defineProperty(wg,"__esModule",{value:!0}),wg.h=function(t,e,n){return{tag:t,key:e,args:n}},wg.patchChildren=function(t,e){kg(t)&&kg(e)?t!==e&&function(t,e){var n,r,i,o=0,s=0,a=t.length-1,l=t[0],c=t[a],u=e.length-1,d=e[0],f=e[u];for(;o<=a&&s<=u;)xg(l)?l=t[++o]:xg(c)?c=t[--a]:Sg(l,d)?($g(l,d),l=t[++o],d=e[++s]):Sg(c,f)?($g(c,f),c=t[--a],f=e[--u]):Sg(l,f)?($g(l,f),l=t[++o],f=e[--u]):Sg(c,d)?($g(c,d),c=t[--a],d=e[++s]):(xg(n)&&(n=_g(t,o,a)),xg(r=kg(d.key)?n[d.key]:null)?(Og(d),d=e[++s]):Sg(i=t[r],d)?($g(i,d),t[r]=void 0,d=e[++s]):(Og(d),d=e[++s]));o>a?Mg(e,s,u):s>u&&Cg(t,o,a)}(t,e):kg(e)?Mg(e,0,e.length-1):kg(t)&&Cg(t,0,t.length-1)},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Vuelidate=O,t.validationMixin=t.default=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.withParams}});var e=wg,n=wp;function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(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.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c=function(){return null},u=function(t,e,n){return t.reduce((function(t,r){return t[n?n(r):r]=e(r),t}),{})};function d(t){return"function"==typeof t}function f(t){return null!==t&&("object"===l(t)||d(t))}var h=function(t,e,n,r){if("function"==typeof n)return n.call(t,e,r);n=Array.isArray(n)?n:n.split(".");for(var i=0;i<n.length;i++){if(!e||"object"!==l(e))return r;e=e[n[i]]}return void 0===e?r:e};var p={$invalid:function(){var t=this,e=this.proxy;return this.nestedKeys.some((function(e){return t.refProxy(e).$invalid}))||this.ruleKeys.some((function(t){return!e[t]}))},$dirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.every((function(e){return t.refProxy(e).$dirty}))},$anyDirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.some((function(e){return t.refProxy(e).$anyDirty}))},$error:function(){return this.$dirty&&!this.$pending&&this.$invalid},$anyError:function(){var t=this;return!!this.$error||this.nestedKeys.some((function(e){return t.refProxy(e).$anyError}))},$pending:function(){var t=this;return this.ruleKeys.some((function(e){return t.getRef(e).$pending}))||this.nestedKeys.some((function(e){return t.refProxy(e).$pending}))},$params:function(){var t=this,e=this.validations;return s(s({},u(this.nestedKeys,(function(t){return e[t]&&e[t].$params||null}))),u(this.ruleKeys,(function(e){return t.getRef(e).$params})))}};function m(t){this.dirty=t;var e=this.proxy,n=t?"$touch":"$reset";this.nestedKeys.forEach((function(t){e[t][n]()}))}var g={$touch:function(){m.call(this,!0)},$reset:function(){m.call(this,!1)},$flattenParams:function(){var t=this.proxy,e=[];for(var n in this.$params)if(this.isNested(n)){for(var r=t[n].$flattenParams(),i=0;i<r.length;i++)r[i].path.unshift(n);e=e.concat(r)}else e.push({path:[],name:n,params:this.$params[n]});return e}},v=Object.keys(p),y=Object.keys(g),b=null,w=function(t){if(b)return b;var i=t.extend({computed:{refs:function(){var t=this._vval;this._vval=this.children,(0,e.patchChildren)(t,this._vval);var n={};return this._vval.forEach((function(t){n[t.key]=t.vm})),n}},beforeCreate:function(){this._vval=null},beforeDestroy:function(){this._vval&&((0,e.patchChildren)(this._vval),this._vval=null)},methods:{getModel:function(){return this.lazyModel?this.lazyModel(this.prop):this.model},getModelKey:function(t){var e=this.getModel();if(e)return e[t]},hasIter:function(){return!1}}}),o=i.extend({data:function(){return{rule:null,lazyModel:null,model:null,lazyParentModel:null,rootModel:null}},methods:{runRule:function(e){var r=this.getModel();(0,n.pushParams)();var i,o=this.rule.call(this.rootModel,r,e),s=f(i=o)&&d(i.then)?function(t,e){var n=new t({data:{p:!0,v:!1}});return e.then((function(t){n.p=!1,n.v=t}),(function(t){throw n.p=!1,n.v=!1,t})),n.__isVuelidateAsyncVm=!0,n}(t,o):o,a=(0,n.popParams)();return{output:s,params:a&&a.$sub?a.$sub.length>1?a:a.$sub[0]:null}}},computed:{run:function(){var t=this,e=this.lazyParentModel();if(Array.isArray(e)&&e.__ob__){var n=e.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var i=r.constructor;this._indirectWatcher=new i(this,(function(){return t.runRule(e)}),null,{lazy:!0})}var o=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===o)return this._indirectWatcher.depend(),r.value;this._lastModel=o,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t.__isVuelidateAsyncVm?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t.__isVuelidateAsyncVm&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),a=i.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:s(s({},g),{},{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!=typeof this.validations[t]}}),computed:s(s({},p),{},{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter((function(e){return!t.isNested(e)}))},keys:function(){return Object.keys(this.validations).filter((function(t){return"$params"!==t}))},proxy:function(){var t=this,e=u(this.keys,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}})),n=u(v,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}})),r=u(y,(function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}})),i=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},s({},e))}}:{};return Object.defineProperties({},s(s(s(s({},e),i),{},{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n),r))},children:function(){var t=this;return[].concat(r(this.nestedKeys.map((function(e){return w(t,e)}))),r(this.ruleKeys.map((function(e){return x(t,e)})))).filter(Boolean)}})}),l=a.extend({methods:{isNested:function(t){return void 0!==this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),m=a.extend({computed:{keys:function(){var t=this.getModel();return f(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(h(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,n=this.validations,r=this.getModel(),i=s({},n);delete i.$trackBy;var o={};return this.keys.map((function(n){var s=t.tracker(n);return o.hasOwnProperty(s)?null:(o[s]=!0,(0,e.h)(a,s,{validations:i,prop:n,lazyParentModel:t.getModelLazy,model:r[n],rootModel:t.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),w=function(t,n){if("$each"===n)return(0,e.h)(m,n,{validations:t.validations[n],lazyParentModel:t.lazyParentModel,prop:n,lazyModel:t.getModel,rootModel:t.rootModel});var r=t.validations[n];if(Array.isArray(r)){var i=t.rootModel,o=u(r,(function(t){return function(){return h(i,i.$v,t)}}),(function(t){return Array.isArray(t)?t.join("."):t}));return(0,e.h)(l,n,{validations:o,lazyParentModel:c,prop:n,lazyModel:c,rootModel:i})}return(0,e.h)(a,n,{validations:r,lazyParentModel:t.getModel,prop:n,lazyModel:t.getModelKey,rootModel:t.rootModel})},x=function(t,n){return(0,e.h)(o,n,{rule:t.validations[n],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return b={VBase:i,Validation:a}},x=null;var k=function(t,n){var r=function(t){if(x)return x;for(var e=t.constructor;e.super;)e=e.super;return x=e,e}(t),i=w(r),o=i.Validation;return new(0,i.VBase)({computed:{children:function(){var r="function"==typeof n?n.call(t):n;return[(0,e.h)(o,"$v",{validations:r,lazyParentModel:c,prop:"$v",model:t,rootModel:t})]}}})},S={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=k(this,t)),{}},beforeCreate:function(){var t=this.$options;t.validations&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function O(t){t.mixin(S)}t.validationMixin=S;var _=O;t.default=_}(bg);const Ng=mp(bg);export{Nm as A,Tt as B,og as C,Cl as D,Lc as E,za as F,sg as G,gg as H,Th as I,yg as J,pg as K,Ng as L,Nc as N,Vc as P,qa as S,Cc as T,Wn as V,kh as a,Ph as b,Oh as c,Ih as d,vh as e,qh as f,Wh as g,Kh as h,_l as i,Dh as j,uh as k,Hh as l,Kf as m,zl as n,Nh as o,dp as p,hp as q,fp as r,Nt as s,Sh as t,Eh as u,pp as v,Jh as w,up as x,gp as y,Je as z};