PageSourceSearch

https://prometheusagency.co/assets/js/chunk-Dn8Knuz1.js

js prometheusagency.co collected 2026-10-05 21:57:51 UTC 473,458 bytes, 63 lines download raw bytes

vendor: 4,327 bytes, line 1
1function e(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r={exports:{}},o={},i={exports:{}},s={},l=Symbol.for("react.element"),a=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function x(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||b}function S(){}function C(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||b}x.prototype.isReactComponent={},x.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},x.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=x.prototype;var E=C.prototype=new S;E.constructor=C,w(E,x.prototype),E.isPureReactComponent=!0;var M=Array.isArray,O=Object.prototype.hasOwnProperty,N={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,o={},i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)O.call(t,r)&&!T.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(1===a)o.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===o[r]&&(o[r]=a[r]);return{$$typeof:l,type:e,key:i,ref:s,props:o,_owner:N.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var P=/\/+/g;function z(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case l:case a:s=!0}}if(s)return o=o(s=e),e=""===r?"."+z(s,0):r,M(o)?(n="",null!=e&&(n=e.replace(P,"$&/")+"/"),A(o,t,n,"",(function(e){return e}))):null!=o&&(R(o)&&(o=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(P,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",M(e))for(var c=0;c<e.length;c++){var u=r+z(i=e[c],c);s+=A(i,t,n,u,o)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=v&&e[v]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)s+=A(i=i.value,t,n,u=r+z(i,c++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function I(e,t,n){if(null==e)return e;var r=[],o=0;return A(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function L(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var $={current:null},_={transition:null},F={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:_,ReactCurrentOwner:N};function B(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 21,133 bytes, lines 1-30
1s.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},s.Component=x,s.Fragment=c,s.Profiler=d,s.PureComponent=C,s.StrictMode=u,s.Suspense=m,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,s.act=B,s.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=w({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=N.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)O.call(t,c)&&!T.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==a?a[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:l,type:e.type,key:o,ref:i,props:r,_owner:s}},s.createContext=function(e){return(e={$$typeof:h,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:f,_context:e},e.Consumer=e},s.createElement=D,s.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},s.createRef=function(){return{current:null}},s.forwardRef=function(e){return{$$typeof:p,render:e}},s.isValidElement=R,s.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:L}},s.memo=function(e,t){return{$$typeof:g,type:e,compare:void 0===t?null:t}},s.startTransition=function(e){var t=_.transition;_.transition={};try{e()}finally{_.transition=t}},s.unstable_act=B,s.useCallback=function(e,t){return $.current.useCallback(e,t)},s.useContext=function(e){return $.current.useContext(e)},s.useDebugValue=function(){},s.useDeferredValue=function(e){return $.current.useDeferredValue(e)},s.useEffect=function(e,t){return $.current.useEffect(e,t)},s.useId=function(){return $.current.useId()},s.useImperativeHandle=function(e,t,n){return $.current.useImperativeHandle(e,t,n)},s.useInsertionEffect=function(e,t){return $.current.useInsertionEffect(e,t)},s.useLayoutEffect=function(e,t){return $.current.useLayoutEffect(e,t)},s.useMemo=function(e,t){return $.current.useMemo(e,t)},s.useReducer=function(e,t,n){return $.current.useReducer(e,t,n)},s.useRef=function(e){return $.current.useRef(e)},s.useState=function(e){return $.current.useState(e)},s.useSyncExternalStore=function(e,t,n){return $.current.useSyncExternalStore(e,t,n)},s.useTransition=function(){return $.current.useTransition()},s.version="18.3.1",i.exports=s;var V=i.exports;const j=n(V),W=e({__proto__:null,default:j},[V]);
2/**
3 * @license React
4 * react-jsx-runtime.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */
11var U=V,H=Symbol.for("react.element"),q=Symbol.for("react.fragment"),K=Object.prototype.hasOwnProperty,J=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};function Y(e,t,n){var r,o={},i=null,s=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(s=t.ref),t)K.call(t,r)&&!Q.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:H,type:e,key:i,ref:s,props:o,_owner:J.current}}o.Fragment=q,o.jsx=Y,o.jsxs=Y,r.exports=o;var X=r.exports,G={exports:{}},Z={},ee={exports:{}},te={};
12/**
13 * @license React
14 * scheduler.production.min.js
15 *
16 * Copyright (c) Facebook, Inc. and its affiliates.
17 *
18 * This source code is licensed under the MIT license found in the
19 * LICENSE file in the root directory of this source tree.
20 */
21!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var l=2*(r+1)-1,a=e[l],c=l+1,u=e[c];if(0>o(a,n))c<i&&0>o(u,a)?(e[r]=u,e[c]=n,r=c):(e[r]=a,e[l]=n,r=l);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],c=[],u=1,d=null,f=3,h=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(a,o)}o=n(c)}}function w(e){if(m=!1,b(e),!p)if(null!==n(a))p=!0,P(k);else{var t=n(c);null!==t&&z(w,t.startTime-e)}}function k(t,o){p=!1,m&&(m=!1,y(E),E=-1),h=!0;var i=f;try{for(b(o),d=n(a);null!==d&&(!(d.expirationTime>o)||t&&!N());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var l=s(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?d.callback=l:d===n(a)&&r(a),b(o)}else r(a);d=n(a)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&z(w,g.startTime-o),u=!1}return u}finally{d=null,f=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,C=null,E=-1,M=5,O=-1;function N(){return!(e.unstable_now()-O<M)}function T(){if(null!==C){var t=e.unstable_now();O=t;var n=!0;try{n=C(!0,t)}finally{n?x():(S=!1,C=null)}}else S=!1}if("function"==typeof v)x=function(){v(T)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,R=D.port2;D.port1.onmessage=T,x=function(){R.postMessage(null)}}else x=function(){g(T,0)};function P(e){C=e,S||(S=!0,x())}function z(t,n){E=g((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,P(k))},e.unstable_forceFrameRate=function(e){0>e||125<e||(M=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var s=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?s+i:s:i=s,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:l=i+l,sortIndex:-1},i>s?(r.sortIndex=i,t(c,r),null===n(a)&&r===n(c)&&(m?(y(E),E=-1):m=!0,z(w,i-s))):(r.sortIndex=l,t(a,r),p||h||(p=!0,P(k))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(te),ee.exports=te;var ne=ee.exports,re=V,oe=ne;
22/**
23 * @license React
24 * react-dom.production.min.js
25 *
26 * Copyright (c) Facebook, Inc. and its affiliates.
27 *
28 * This source code is licensed under the MIT license found in the
29 * LICENSE file in the root directory of this source tree.
30 */function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var se=new Set,le={};function ae(e,t){ce(e,t),ce(e+"Capture",t)}function ce(e,t){for(le[e]=t,e=0;e<t.length;e++)se.add(t[e])}var ue=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),de=Object.prototype.hasOwnProperty,fe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,he={},pe={};function me(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ge[e]=new me(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ge[t]=new me(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ge[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ge[e]=new me(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){ge[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ge[e]=new me(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){ge[e]=new me(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){ge[e]=new me(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){ge[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)}));var ye=/[\-:]([a-z])/g;function ve(e){return e[1].toUpperCase()}function be(e,t,n,r){var o=ge.hasOwnProperty(t)?ge[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!de.call(pe,e)||!de.call(he,e)&&(fe.test(e)?pe[e]=!0:(he[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(ye,ve);ge[t]=new me(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(ye,ve);ge[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(ye,ve);ge[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){ge[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)})),ge.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){ge[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)}));var we=re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ke=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Se=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),Ee=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Oe=Symbol.for("react.context"),Ne=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),De=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),ze=Symbol.for("react.offscreen"),Ae=Symbol.iterator;function Ie(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ae&&e[Ae]||e["@@iterator"])?e:null}var Le,$e=Object.assign;function _e(e){if(void 0===Le)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Le=t&&t[1]||""}return"\n"+Le+e}var Fe=!1;function Be(e,t){if(!e||Fe)return"";Fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(1!==s||1!==l)do{if(s--,0>--l||o[s]!==i[l]){var a="\n"+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}}while(1<=s&&0<=l);break}}}finally{Fe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_e(e):""}function Ve(e){switch(e.tag){case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return _e("Suspense");case 19:return _e("SuspenseList");case 0:case 2:case 15:return e=Be(e.type,!1);case 11:return e=Be(e.type.render,!1);case 1:return e=Be(e.type,!0);default:return""}}function je(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Se:return"Fragment";case xe:return"Portal";case Ee:return"Profiler";case Ce:return"StrictMode";case Te:return"Suspense";case De:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Oe:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case Ne:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Re:return null!==(t=e.displayName||null)?t:je(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return je(e(t))}catch(n){}}return null}function We(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return je(t);case 8:return t===Ce?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Ue(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function He(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function qe(e){e._valueTracker||(e._valueTracker=function(e){var t=He(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ke(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=He(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Je(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Qe(e,t){var n=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ye(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Ue(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Xe(e,t){null!=(t=t.checked)&&be(e,"checked",t,!1)}function Ge(e,t){Xe(e,t);var n=Ue(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?et(e,t.type,n):t.hasOwnProperty("defaultValue")&&et(e,t.type,Ue(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ze(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function et(e,t,n){"number"===t&&Je(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tt=Array.isArray;function nt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ue(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function rt(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(ie(91));return $e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ot(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(ie(92));if(tt(n)){if(1<n.length)throw Error(ie(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Ue(n)}}function it(e,t){var n=Ue(t.value),r=Ue(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function st(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function lt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?lt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ct,ut,dt=(ut=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ct=ct||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ct.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ut(e,t)}))}:ut);function ft(e,t){if(t){var n=e.firstChild;
vendor: 2,089 bytes, line 30
30if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ht={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pt=["Webkit","ms","Moz","O"];function mt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ht.hasOwnProperty(e)&&ht[e]?(""+t).trim():t+"px"}function gt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=mt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ht).forEach((function(e){pt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ht[t]=ht[e]}))}));var yt=$e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vt(e,t){if(t){if(yt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(ie(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(ie(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(ie(62))}}function bt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wt=null;function kt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.n
vendor: 4,657 bytes, line 30
30odeType?e.parentNode:e}var xt=null,St=null,Ct=null;function Et(e){if(e=wi(e)){if("function"!=typeof xt)throw Error(ie(280));var t=e.stateNode;t&&(t=xi(t),xt(e.stateNode,e.type,t))}}function Mt(e){St?Ct?Ct.push(e):Ct=[e]:St=e}function Ot(){if(St){var e=St,t=Ct;if(Ct=St=null,Et(e),t)for(e=0;e<t.length;e++)Et(t[e])}}function Nt(e,t){return e(t)}function Tt(){}var Dt=!1;function Rt(e,t,n){if(Dt)return e(t,n);Dt=!0;try{return Nt(e,t,n)}finally{Dt=!1,(null!==St||null!==Ct)&&(Tt(),Ot())}}function Pt(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(ie(231,t,typeof n));return n}var zt=!1;if(ue)try{var At={};Object.defineProperty(At,"passive",{get:function(){zt=!0}}),window.addEventListener("test",At,At),window.removeEventListener("test",At,At)}catch(ut){zt=!1}function It(e,t,n,r,o,i,s,l,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Lt=!1,$t=null,_t=!1,Ft=null,Bt={onError:function(e){Lt=!0,$t=e}};function Vt(e,t,n,r,o,i,s,l,a){Lt=!1,$t=null,It.apply(Bt,arguments)}function jt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Wt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ut(e){if(jt(e)!==e)throw Error(ie(188))}function Ht(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=jt(e)))throw Error(ie(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ut(o),e;if(i===r)return Ut(o),t;i=i.sibling}throw Error(ie(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(ie(189))}}if(n.alternate!==r)throw Error(ie(190))}if(3!==n.tag)throw Error(ie(188));return n.stateNode.current===n?e:t}(e))?qt(e):null}function qt(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qt(e);if(null!==t)return t;e=e.sibling}return null}var Kt=oe.unstable_scheduleCallback,Jt=oe.unstable_cancelCallback,Qt=oe.unstable_shouldYield,Yt=oe.unstable_requestPaint,Xt=oe.unstable_now,Gt=oe.unstable_getCurrentPriorityLevel,Zt=oe.unstable_ImmediatePriority,en=oe.unstable_UserBlockingPriority,tn=oe.unstable_NormalPriority,nn=oe.unstable_LowPriority,rn=oe.unstable_IdlePriority,on=null,sn=null;var ln=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(an(e)/cn|0)|0},an=Math.log,cn=Math.LN2;var un=64,dn=4194304;function fn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=268435455&n;if(0!==s){var l=s&~o;0!==l?r=fn(l):0!==(i&=s)&&(r=fn(i))}else 0!==(s=n&~o)?r=fn(s):0!==i&&(r=fn(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-ln(t)),r|=e[n],t&=~o;return r}function pn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gn(){var e=un;return!(4194240&(un<<=1))&&(un=64),e}function yn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
vendor: 1,292 bytes, line 30
30function vn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ln(t)]=n}function bn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ln(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var wn=0;function kn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var xn,Sn,Cn,En,Mn,On=!1,Nn=[],Tn=null,Dn=null,Rn=null,Pn=new Map,zn=new Map,An=[],In="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ln(e,t){switch(e){case"focusin":case"focusout":Tn=null;break;case"dragenter":case"dragleave":Dn=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":Pn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zn.delete(t.pointerId)}}function $n(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=wi(t))&&Sn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function _n(e){var t=bi(e.target);if(null!==t){var n=jt(t);
vendor: 5,131 bytes, line 30
30if(null!==n)if(13===(t=n.tag)){if(null!==(t=Wt(n)))return e.blockedOn=t,void Mn(e.priority,(function(){Cn(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Fn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wi(n))&&Sn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);wt=r,n.target.dispatchEvent(r),wt=null,t.shift()}return!0}function Bn(e,t,n){Fn(e)&&n.delete(t)}function Vn(){On=!1,null!==Tn&&Fn(Tn)&&(Tn=null),null!==Dn&&Fn(Dn)&&(Dn=null),null!==Rn&&Fn(Rn)&&(Rn=null),Pn.forEach(Bn),zn.forEach(Bn)}function jn(e,t){e.blockedOn===t&&(e.blockedOn=null,On||(On=!0,oe.unstable_scheduleCallback(oe.unstable_NormalPriority,Vn)))}function Wn(e){function t(t){return jn(t,e)}if(0<Nn.length){jn(Nn[0],e);for(var n=1;n<Nn.length;n++){var r=Nn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tn&&jn(Tn,e),null!==Dn&&jn(Dn,e),null!==Rn&&jn(Rn,e),Pn.forEach(t),zn.forEach(t),n=0;n<An.length;n++)(r=An[n]).blockedOn===e&&(r.blockedOn=null);for(;0<An.length&&null===(n=An[0]).blockedOn;)_n(n),null===n.blockedOn&&An.shift()}var Un=we.ReactCurrentBatchConfig,Hn=!0;function qn(e,t,n,r){var o=wn,i=Un.transition;Un.transition=null;try{wn=1,Jn(e,t,n,r)}finally{wn=o,Un.transition=i}}function Kn(e,t,n,r){var o=wn,i=Un.transition;Un.transition=null;try{wn=4,Jn(e,t,n,r)}finally{wn=o,Un.transition=i}}function Jn(e,t,n,r){if(Hn){var o=Yn(e,t,n,r);if(null===o)Ho(e,t,r,Qn,n),Ln(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Tn=$n(Tn,e,t,n,r,o),!0;case"dragenter":return Dn=$n(Dn,e,t,n,r,o),!0;case"mouseover":return Rn=$n(Rn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Pn.set(i,$n(Pn.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,zn.set(i,$n(zn.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Ln(e,r),4&t&&-1<In.indexOf(e)){for(;null!==o;){var i=wi(o);if(null!==i&&xn(i),null===(i=Yn(e,t,n,r))&&Ho(e,t,r,Qn,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Ho(e,t,r,null,n)}}var Qn=null;function Yn(e,t,n,r){if(Qn=null,null!==(e=bi(e=kt(r))))if(null===(t=jt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Wt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qn=e,null}function Xn(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Gt()){case Zt:return 1;case en:return 4;case tn:case nn:return 16;case rn:return 536870912;default:return 16}default:return 16}}var Gn=null,Zn=null,er=null;function tr(){if(er)return er;var e,t,n=Zn,r=n.length,o="value"in Gn?Gn.value:Gn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===o[i-t];t++);return er=o.slice(e,1<t?1-t:void 0)}function nr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rr(){return!0}function or(){return!1}function ir(e){function t(t,n,r,o,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(o):o[s]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?rr:or,this.isPropagationStopped=or,this}return $e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var sr,lr,ar,cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=ir(cr),dr=$e({}
vendor: 4,608 bytes, line 30
30,cr,{view:0,detail:0}),fr=ir(dr),hr=$e({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Er,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ar&&(ar&&"mousemove"===e.type?(sr=e.screenX-ar.screenX,lr=e.screenY-ar.screenY):lr=sr=0,ar=e),sr)},movementY:function(e){return"movementY"in e?e.movementY:lr}}),pr=ir(hr),mr=ir($e({},hr,{dataTransfer:0})),gr=ir($e({},dr,{relatedTarget:0})),yr=ir($e({},cr,{animationName:0,elapsedTime:0,pseudoElement:0})),vr=$e({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),br=ir(vr),wr=ir($e({},cr,{data:0})),kr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sr[e])&&!!t[e]}function Er(){return Cr}var Mr=$e({},dr,{key:function(e){if(e.key){var t=kr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Er,charCode:function(e){return"keypress"===e.type?nr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Or=ir(Mr),Nr=ir($e({},hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tr=ir($e({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Er})),Dr=ir($e({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rr=$e({},hr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pr=ir(Rr),zr=[9,13,27,32],Ar=ue&&"CompositionEvent"in window,Ir=null;ue&&"documentMode"in document&&(Ir=document.documentMode);var Lr=ue&&"TextEvent"in window&&!Ir,$r=ue&&(!Ar||Ir&&8<Ir&&11>=Ir),_r=String.fromCharCode(32),Fr=!1;function Br(e,t){switch(e){case"keyup":return-1!==zr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var jr=!1;var Wr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wr[e.type]:"textarea"===t}function Hr(e,t,n,r){Mt(r),0<(t=Ko(t,"onChange")).length&&(n=new ur("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qr=null,Kr=null;function Jr(e){Fo(e,0)}function Qr(e){if(Ke(ki(e)))return e}function Yr(e,t){if("change"===e)return t}var Xr=!1;if(ue){var Gr;if(ue){var Zr="oninput"in document;if(!Zr){var eo=document.createElement("div");eo.setAttribute("oninput","return;"),Zr="function"==typeof eo.oninput}Gr=Zr}else Gr=!1;Xr=Gr&&(!document.documentMode||9<document.documentMode)}function to(){qr&&(qr.detachEvent("onpropertychange",no),Kr=qr=null)}function no(e){if("value"===e.propertyName&&Qr(Kr)){var t=[];Hr(t,Kr,e,kt(e)),Rt(Jr,t)}}function ro(e,t,n){"focusin"===e?(to(),Kr=n,(qr=t).attachEvent("onpropertychange",no)):"focusout"===e&&to()}function oo(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qr(Kr)}function io(e,t){if("click"===e)return Qr(t)}function so(e,t){if("input"===e||"change"===e)return Qr(t)}var lo="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ao(e,t){if(lo(e,t))return!0;
vendor: 4,841 bytes, line 30
30if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!de.call(t,o)||!lo(e[o],t[o]))return!1}return!0}function co(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uo(e,t){var n,r=co(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=co(r)}}function fo(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fo(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ho(){for(var e=window,t=Je();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Je((e=t.contentWindow).document)}return t}function po(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mo(e){var t=ho(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fo(n.ownerDocument.documentElement,n)){if(null!==r&&po(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=uo(n,i);var s=uo(n,r);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var go=ue&&"documentMode"in document&&11>=document.documentMode,yo=null,vo=null,bo=null,wo=!1;function ko(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wo||null==yo||yo!==Je(r)||("selectionStart"in(r=yo)&&po(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},bo&&ao(bo,r)||(bo=r,0<(r=Ko(vo,"onSelect")).length&&(t=new ur("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yo)))}function xo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var So={animationend:xo("Animation","AnimationEnd"),animationiteration:xo("Animation","AnimationIteration"),animationstart:xo("Animation","AnimationStart"),transitionend:xo("Transition","TransitionEnd")},Co={},Eo={};function Mo(e){if(Co[e])return Co[e];if(!So[e])return e;var t,n=So[e];for(t in n)if(n.hasOwnProperty(t)&&t in Eo)return Co[e]=n[t];return e}ue&&(Eo=document.createElement("div").style,"AnimationEvent"in window||(delete So.animationend.animation,delete So.animationiteration.animation,delete So.animationstart.animation),"TransitionEvent"in window||delete So.transitionend.transition);var Oo=Mo("animationend"),No=Mo("animationiteration"),To=Mo("animationstart"),Do=Mo("transitionend"),Ro=new Map,Po="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zo(e,t){Ro.set(e,t),ae(t,[e])}for(var Ao=0;Ao<Po.length;Ao++){var Io=Po[Ao];zo(Io.toLowerCase(),"on"+(Io[0].toUpperCase()+Io.slice(1)))}zo(Oo,"onAnimationEnd"),zo(No,"onAnimationIteration"),zo(To,"onAnimationStart"),zo("dblclick","onDoubleClick"),zo("focusin","onFocus"),zo("focusout","onBlur"),zo(Do,"onTransitionEnd"),ce("onMouseEnter",["mouseout","mouseover"]),ce("onMouseLeave",["mouseout","mouseover"]),ce("onPointerEnter",["pointerout","pointerover"]),ce("onPointerLeave",["pointerout","pointerover"]),ae("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ae("onSelect","focusout contextmenu dragend focu
30sin keydown keyup mousedown mouseup selectionchange".split(" ")),ae("onBeforeInput",["compositionend","keypress","textInput","paste"]),ae("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ae("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ae("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$o=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lo));function _o(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,l,a){if(Vt.apply(this,arguments),Lt){if(!Lt)throw Error(ie(198));var c=$t;Lt=!1,$t=null,_t||(_t=!0,Ft=c)}}(r,t,void 0,e),e.currentTarget=null}function Fo(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==i&&o.isPropagationStopped())break e;_o(o,l,c),i=a}else for(s=0;s<r.length;s++){if(a=(l=r[s]).instance,c=l.currentTarget,l=l.listener,a!==i&&o.isPropagationStopped())break e;_o(o,l,c),i=a}}}if(_t)throw e=Ft,_t=!1,Ft=null,e}function Bo(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(Uo(t,e,2,!1),n.add(r))}function Vo(e,t,n){var r=0;t&&(r|=4),Uo(n,e,r,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function Wo(e){if(!e[jo]){e[jo]=!0,se.forEach((function(t){"selectionchange"!==t&&($o.has(t)||Vo(t,!1,e),Vo(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[jo]||(t[jo]=!0,Vo("selectionchange",!1,t))}}function Uo(e,t,n,r){switch(Xn(t)){case 1:var o=qn;break;case 4:o=Kn;break;default:o=Jn}n=o.bind(null,t,n,e),o=void 0,!zt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ho(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===s)for(s=r.return;null!==s;){var a=s.tag;if((3===a||4===a)&&((a=s.stateNode.containerInfo)===o||8===a.nodeType&&a.parentNode===o))return;s=s.return}for(;null!==l;){if(null===(s=bi(l)))return;if(5===(a=s.tag)||6===a){r=i=s;continue e}l=l.parentNode}}r=r.return}Rt((function(){var r=i,o=kt(n),s=[];e:{var l=Ro.get(e);if(void 0!==l){var a=ur,c=e;switch(e){case"keypress":if(0===nr(n))break e;case"keydown":case"keyup":a=Or;break;case"focusin":c="focus",a=gr;break;case"focusout":c="blur",a=gr;break;case"beforeblur":case"afterblur":a=gr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":a=pr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":a=mr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":a=Tr;break;case Oo:case No:case To:a=yr;break;case Do:a=Dr;break;case"scroll":a=fr;break;case"wheel":a=Pr;break;case"copy":case"cut":case"paste":a=br;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":a=Nr}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==l?l+"Capture":null:l;u=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=Pt(p,f))&&u.push(qo(p,m,h)))),d)break;p=p.return}0<u.length&&(l=new a(l,c,null,n,o),s.push({event:l,listeners:u}))}}if(!(7&t)){if(a="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===wt||!(c=n.relatedTarget||n.fromElement)||!bi(c)&&!c[mi])&&(a||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,a?(a=r,null!==(c=(c=n.relatedTarget||n.toElement)?bi(c):null)&&(c!==(d=jt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(a=null,c=r),a!==c)){if(u=pr,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Nr,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==a?l:ki(a),h=null==c?l:ki(c),(l=new u(m,p+"leave",a,n,o)).target=d,l.relatedTarget=h,m=null,bi(o)===r&&((u=new u(f,p+"enter",c,n,o)).target=h,u.relatedTarget=d,m=u),d=m,a&&c)e:{for(f=c,p=0,h=u=a;h;h=Jo(h))p++;for(h=0,m=f;m;m=Jo(m))h++;for(;0<p-h;)u=Jo(u),p--;for(;0<h-p;)f=Jo(f),h--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=Jo(u),f=Jo(f)}u=null}else u=null;null!==a&&Qo(s,l,a,u,!1),null!==c&&null!==d&&Qo(s,d,c,u,!0)}if("select"===(a=(l=r?ki(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===a&&"file"===l.type)var g=Yr;else if(Ur(l))if(Xr)g=so;else{g=oo;var y=ro}
vendor: 4,812 bytes, line 30
30else(a=l.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=io);switch(g&&(g=g(e,r))?Hr(s,g,n,o):(y&&y(e,l,r),"focusout"===e&&(y=l._wrapperState)&&y.controlled&&"number"===l.type&&et(l,"number",l.value)),y=r?ki(r):window,e){case"focusin":(Ur(y)||"true"===y.contentEditable)&&(yo=y,vo=r,bo=null);break;case"focusout":bo=vo=yo=null;break;case"mousedown":wo=!0;break;case"contextmenu":case"mouseup":case"dragend":wo=!1,ko(s,n,o);break;case"selectionchange":if(go)break;case"keydown":case"keyup":ko(s,n,o)}var v;if(Ar)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else jr?Br(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($r&&"ko"!==n.locale&&(jr||"onCompositionStart"!==b?"onCompositionEnd"===b&&jr&&(v=tr()):(Zn="value"in(Gn=o)?Gn.value:Gn.textContent,jr=!0)),0<(y=Ko(r,b)).length&&(b=new wr(b,e,null,n,o),s.push({event:b,listeners:y}),v?b.data=v:null!==(v=Vr(n))&&(b.data=v))),(v=Lr?function(e,t){switch(e){case"compositionend":return Vr(t);case"keypress":return 32!==t.which?null:(Fr=!0,_r);case"textInput":return(e=t.data)===_r&&Fr?null:e;default:return null}}(e,n):function(e,t){if(jr)return"compositionend"===e||!Ar&&Br(e,t)?(e=tr(),er=Zn=Gn=null,jr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $r&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ko(r,"onBeforeInput")).length&&(o=new wr("onBeforeInput","beforeinput",null,n,o),s.push({event:o,listeners:r}),o.data=v))}Fo(s,t)}))}function qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ko(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Pt(e,n))&&r.unshift(qo(e,i,o)),null!=(i=Pt(e,t))&&r.push(qo(e,i,o))),e=e.return}return r}function Jo(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qo(e,t,n,r,o){for(var i=t._reactName,s=[];null!==n&&n!==r;){var l=n,a=l.alternate,c=l.stateNode;if(null!==a&&a===r)break;5===l.tag&&null!==c&&(l=c,o?null!=(a=Pt(n,i))&&s.unshift(qo(n,a,l)):o||null!=(a=Pt(n,i))&&s.push(qo(n,a,l))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Yo=/\r\n?/g,Xo=/\u0000|\uFFFD/g;function Go(e){return("string"==typeof e?e:""+e).replace(Yo,"\n").replace(Xo,"")}function Zo(e,t,n){if(t=Go(t),Go(e)!==t&&n)throw Error(ie(425))}function ei(){}var ti=null,ni=null;function ri(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var oi="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,si="function"==typeof Promise?Promise:void 0,li="function"==typeof queueMicrotask?queueMicrotask:void 0!==si?function(e){return si.resolve(null).then(e).catch(ai)}:oi;function ai(e){setTimeout((function(){throw e}))}function ci(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Wn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Wn(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function di(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),hi="__reactFiber$"+fi,pi="__reactProps$"+fi,mi="__reactContainer$"+fi,gi="__reactEvents$"+fi,yi="__reactListeners$"+fi,vi="__reactHandles$"+fi;function bi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=di(e);null!==e;){if(n=e[hi])return n;e=di(e)}return t}n=(e=n).parentNode}return null}function wi(e){return!(e=e[hi]||e[mi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ki(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(ie(33))}function xi(e){return e[pi]||null}var Si=[],Ci=-1;function Ei(e){return{current:e}}function Mi(e){0>Ci||(e.current=Si[Ci],Si[Ci]=null,Ci--)}function Oi(e,t){Ci++,Si[Ci]=e.current,e.current=t}var Ni={},Ti=Ei(Ni),Di=Ei(!1),Ri=Ni;function Pi(e,t){var n=e.type.contextTypes;if(!n)return Ni;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};
vendor: 1,220 bytes, line 30
30for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zi(e){return null!=(e=e.childContextTypes)}function Ai(){Mi(Di),Mi(Ti)}function Ii(e,t,n){if(Ti.current!==Ni)throw Error(ie(168));Oi(Ti,t),Oi(Di,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(ie(108,We(e)||"Unknown",o));return $e({},n,r)}function $i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ni,Ri=Ti.current,Oi(Ti,e),Oi(Di,Di.current),!0}function _i(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=Li(e,t,Ri),r.__reactInternalMemoizedMergedChildContext=e,Mi(Di),Mi(Ti),Oi(Ti,e)):Mi(Di),Oi(Di,n)}var Fi=null,Bi=!1,Vi=!1;function ji(e){null===Fi?Fi=[e]:Fi.push(e)}function Wi(){if(!Vi&&null!==Fi){Vi=!0;var e=0,t=wn;try{var n=Fi;for(wn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fi=null,Bi=!1}catch(o){throw null!==Fi&&(Fi=Fi.slice(e+1)),Kt(Zt,Wi),o}finally{wn=t,Vi=!1}}return null}var Ui=[],Hi=0,qi=null,Ki=0,Ji=[],Qi=0,Yi=null,Xi=1,Gi="";function Zi(e,t){Ui[Hi++]=Ki,Ui[Hi++]=qi,qi=e,Ki=t}
vendor: 5,568 bytes, line 30
30function es(e,t,n){Ji[Qi++]=Xi,Ji[Qi++]=Gi,Ji[Qi++]=Yi,Yi=e;var r=Xi;e=Gi;var o=32-ln(r)-1;r&=~(1<<o),n+=1;var i=32-ln(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Xi=1<<32-ln(t)+o|n<<o|r,Gi=i+e}else Xi=1<<i|n<<o|r,Gi=e}function ts(e){null!==e.return&&(Zi(e,1),es(e,1,0))}function ns(e){for(;e===qi;)qi=Ui[--Hi],Ui[Hi]=null,Ki=Ui[--Hi],Ui[Hi]=null;for(;e===Yi;)Yi=Ji[--Qi],Ji[Qi]=null,Gi=Ji[--Qi],Ji[Qi]=null,Xi=Ji[--Qi],Ji[Qi]=null}var rs=null,is=null,ss=!1,ls=null;function as(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function cs(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,rs=e,is=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,rs=e,is=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yi?{id:Xi,overflow:Gi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(18,null,null,0)).stateNode=t,n.return=e,e.child=n,rs=e,is=null,!0);default:return!1}}function us(e){return!(!(1&e.mode)||128&e.flags)}function ds(e){if(ss){var t=is;if(t){var n=t;if(!cs(e,t)){if(us(e))throw Error(ie(418));t=ui(n.nextSibling);var r=rs;t&&cs(e,t)?as(r,n):(e.flags=-4097&e.flags|2,ss=!1,rs=e)}}else{if(us(e))throw Error(ie(418));e.flags=-4097&e.flags|2,ss=!1,rs=e}}}function fs(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;rs=e}function hs(e){if(e!==rs)return!1;if(!ss)return fs(e),ss=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ri(e.type,e.memoizedProps)),t&&(t=is)){if(us(e))throw ps(),Error(ie(418));for(;t;)as(e,t),t=ui(t.nextSibling)}if(fs(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){is=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}is=null}}else is=rs?ui(e.stateNode.nextSibling):null;return!0}function ps(){for(var e=is;e;)e=ui(e.nextSibling)}function ms(){is=rs=null,ss=!1}function gs(e){null===ls?ls=[e]:ls.push(e)}var ys=we.ReactCurrentBatchConfig;function vs(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(ie(309));var r=n.stateNode}if(!r)throw Error(ie(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(ie(284));if(!n._owner)throw Error(ie(290,e))}return e}function bs(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ws(e){return(0,e._init)(e._payload)}function ks(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=zu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=$u(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function a(e,t,n,r){var i=n.type;return i===Se?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===Pe&&ws(i)===t.type)?((r=o(t,n.props)).ref=vs(e,t,n),r.return=e,r):((r=Au(n.type,n.key,n.props,null,e.mode,r)).ref=vs(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=_u(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,i){return null===t||7!==t.tag?((t=Iu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=$u(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ke:return(n=Au(t.type,t.key,t.props,null,e.mode,n)).ref=vs(e,null,t),n.return=e,n;case xe:return(t=_u(t,e.mode,n)).return=e,t;case Pe:return d(e,(0,t._init)(t._payload),n)}if(tt(t)||Ie(t))return(t=Iu(t,e.mode,n,null)).return=e,t;bs(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ke:return n.key===o?a(e,t,n,r):null;case xe:return n.key===o?c(e,t,n,r):null;case Pe:return f(e,t,(o=n._init)(n._payload),r)}if(tt(n)||Ie(n))return null!==o?null:u(e,t,n,r,null);bs(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ke:return a(t,e=e.get(null===r.key?n:r.key)||null,r,o);case xe:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Pe:return h(e,t,n,(0,r._init)(r._payload),o)}if(tt(r)||Ie(r))return u(t,e=e.get(n)||null,r,o,null);bs(t,r)}return null}return function l(a,c,u,p){if("object"==typeof u&&null!==u&&u.type===Se&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case ke:e:{for(var m=u.key,g=c;
vendor: 4,212 bytes, line 30
30null!==g;){if(g.key===m){if((m=u.type)===Se){if(7===g.tag){n(a,g.sibling),(c=o(g,u.props.children)).return=a,a=c;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Pe&&ws(m)===g.type){n(a,g.sibling),(c=o(g,u.props)).ref=vs(a,g,u),c.return=a,a=c;break e}n(a,g);break}t(a,g),g=g.sibling}u.type===Se?((c=Iu(u.props.children,a.mode,p,u.key)).return=a,a=c):((p=Au(u.type,u.key,u.props,null,a.mode,p)).ref=vs(a,c,u),p.return=a,a=p)}return s(a);case xe:e:{for(g=u.key;null!==c;){if(c.key===g){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(a,c.sibling),(c=o(c,u.children||[])).return=a,a=c;break e}n(a,c);break}t(a,c),c=c.sibling}(c=_u(u,a.mode,p)).return=a,a=c}return s(a);case Pe:return l(a,c,(g=u._init)(u._payload),p)}if(tt(u))return function(o,s,l,a){for(var c=null,u=null,p=s,m=s=0,g=null;null!==p&&m<l.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var y=f(o,p,l[m],a);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(o,p),s=i(y,s,m),null===u?c=y:u.sibling=y,u=y,p=g}if(m===l.length)return n(o,p),ss&&Zi(o,m),c;if(null===p){for(;m<l.length;m++)null!==(p=d(o,l[m],a))&&(s=i(p,s,m),null===u?c=p:u.sibling=p,u=p);return ss&&Zi(o,m),c}for(p=r(o,p);m<l.length;m++)null!==(g=h(p,o,m,l[m],a))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),s=i(g,s,m),null===u?c=g:u.sibling=g,u=g);return e&&p.forEach((function(e){return t(o,e)})),ss&&Zi(o,m),c}(a,c,u,p);if(Ie(u))return function(o,s,l,a){var c=Ie(l);if("function"!=typeof c)throw Error(ie(150));if(null==(l=c.call(l)))throw Error(ie(151));for(var u=c=null,p=s,m=s=0,g=null,y=l.next();null!==p&&!y.done;m++,y=l.next()){p.index>m?(g=p,p=null):g=p.sibling;var v=f(o,p,y.value,a);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(o,p),s=i(v,s,m),null===u?c=v:u.sibling=v,u=v,p=g}if(y.done)return n(o,p),ss&&Zi(o,m),c;if(null===p){for(;!y.done;m++,y=l.next())null!==(y=d(o,y.value,a))&&(s=i(y,s,m),null===u?c=y:u.sibling=y,u=y);return ss&&Zi(o,m),c}for(p=r(o,p);!y.done;m++,y=l.next())null!==(y=h(p,o,m,y.value,a))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),s=i(y,s,m),null===u?c=y:u.sibling=y,u=y);return e&&p.forEach((function(e){return t(o,e)})),ss&&Zi(o,m),c}(a,c,u,p);bs(a,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(a,c.sibling),(c=o(c,u)).return=a,a=c):(n(a,c),(c=$u(u,a.mode,p)).return=a,a=c),s(a)):n(a,c)}}var xs=ks(!0),Ss=ks(!1),Cs=Ei(null),Es=null,Ms=null,Os=null;function Ns(){Os=Ms=Es=null}function Ts(e){var t=Cs.current;Mi(Cs),e._currentValue=t}function Ds(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Rs(e,t){Es=e,Os=Ms=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ba=!0),e.firstContext=null)}function Ps(e){var t=e._currentValue;if(Os!==e)if(e={context:e,memoizedValue:t,next:null},null===Ms){if(null===Es)throw Error(ie(308));Ms=e,Es.dependencies={lanes:0,firstContext:e}}else Ms=Ms.next=e;return t}var zs=null;function As(e){null===zs?zs=[e]:zs.push(e)}function Is(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,As(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ls(e,r)}function Ls(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var $s=!1;function _s(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vs(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Nc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ls(e,n)}return null===(o=r.interleaved)?(t.next=t,As(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ls(e,n)}
vendor: 14,627 bytes, line 30
30function js(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bn(e,n)}}function Ws(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Us(e,t,n,r){var o=e.updateQueue;$s=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var a=l,c=a.next;a.next=null,null===s?i=c:s.next=c,s=a;var u=e.alternate;null!==u&&((l=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===l?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=a))}if(null!==i){var d=o.baseState;for(s=0,u=c=a=null,l=i;;){var f=l.lane,h=l.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=e,m=l;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=$e({},d,f);break e;case 2:$s=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[l]:f.push(l))}else h={eventTime:h,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===u?(c=u=h,a=d):u=u.next=h,s|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(f=l).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===u&&(a=d),o.baseState=a,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{s|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Lc|=s,e.lanes=s,e.memoizedState=d}}function Hs(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(ie(191,o));o.call(r)}}}var qs={},Ks=Ei(qs),Js=Ei(qs),Qs=Ei(qs);function Ys(e){if(e===qs)throw Error(ie(174));return e}function Xs(e,t){switch(Oi(Qs,t),Oi(Js,e),Oi(Ks,qs),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:t=at(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Mi(Ks),Oi(Ks,t)}function Gs(){Mi(Ks),Mi(Js),Mi(Qs)}function Zs(e){Ys(Qs.current);var t=Ys(Ks.current),n=at(t,e.type);t!==n&&(Oi(Js,e),Oi(Ks,n))}function el(e){Js.current===e&&(Mi(Ks),Mi(Js))}var tl=Ei(0);function nl(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rl=[];function ol(){for(var e=0;e<rl.length;e++)rl[e]._workInProgressVersionPrimary=null;rl.length=0}var il=we.ReactCurrentDispatcher,sl=we.ReactCurrentBatchConfig,ll=0,al=null,cl=null,ul=null,dl=!1,fl=!1,hl=0,pl=0;function ml(){throw Error(ie(321))}function gl(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lo(e[n],t[n]))return!1;return!0}function yl(e,t,n,r,o,i){if(ll=i,al=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,il.current=null===e||null===e.memoizedState?ea:ta,e=n(r,o),fl){i=0;do{if(fl=!1,hl=0,25<=i)throw Error(ie(301));i+=1,ul=cl=null,t.updateQueue=null,il.current=na,e=n(r,o)}while(fl)}if(il.current=Zl,t=null!==cl&&null!==cl.next,ll=0,ul=cl=al=null,dl=!1,t)throw Error(ie(300));return e}function vl(){var e=0!==hl;return hl=0,e}function bl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ul?al.memoizedState=ul=e:ul=ul.next=e,ul}function wl(){if(null===cl){var e=al.alternate;e=null!==e?e.memoizedState:null}else e=cl.next;var t=null===ul?al.memoizedState:ul.next;if(null!==t)ul=t,cl=e;else{if(null===e)throw Error(ie(310));e={memoizedState:(cl=e).memoizedState,baseState:cl.baseState,baseQueue:cl.baseQueue,queue:cl.queue,next:null},null===ul?al.memoizedState=ul=e:ul=ul.next=e}return ul}function kl(e,t){return"function"==typeof t?t(e):t}function xl(e){var t=wl(),n=t.queue;if(null===n)throw Error(ie(311));n.lastRenderedReducer=e;var r=cl,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var l=s=null,a=null,c=i;do{var u=c.lane;if((ll&u)===u)null!==a&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===a?(l=a=d,s=r):a=a.next=d,al.lanes|=u,Lc|=u}c=c.next}while(null!==c&&c!==i);null===a?s=r:a.next=l,lo(r,t.memoizedState)||(ba=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,al.lanes|=i,Lc|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sl(e){var t=wl(),n=t.queue;if(null===n)throw Error(ie(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);lo(i,t.memoizedState)||(ba=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Cl(){}function El(e,t){var n=al,r=wl(),o=t(),i=!lo(r.memoizedState,o);if(i&&(r.memoizedState=o,ba=!0),r=r.queue,$l(Nl.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==ul&&1&ul.memoizedState.tag){if(n.flags|=2048,Pl(9,Ol.bind(null,n,r,o,t),void 0,null),null===Tc)throw Error(ie(349));30&ll||Ml(n,t,o)}return o}function Ml(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=al.updateQueue)?(t={lastEffect:null,stores:null},al.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ol(e,t,n,r){t.value=n,t.getSnapshot=r,Tl(t)&&Dl(e)}function Nl(e,t,n){return n((function(){Tl(t)&&Dl(e)}))}function Tl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lo(e,n)}catch(r){return!0}}function Dl(e){var t=Ls(e,1);null!==t&&nu(t,e,1,-1)}function Rl(e){var t=bl();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kl,lastRenderedState:e},t.queue=e,e=e.dispatch=Ql.bind(null,al,e),[t.memoizedState,e]}function Pl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=al.updateQueue)?(t={lastEffect:null,stores:null},al.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zl(){return wl().memoizedState}function Al(e,t,n,r){var o=bl();al.flags|=e,o.memoizedState=Pl(1|t,n,void 0,void 0===r?null:r)}function Il(e,t,n,r){var o=wl();r=void 0===r?null:r;var i=void 0;if(null!==cl){var s=cl.memoizedState;if(i=s.destroy,null!==r&&gl(r,s.deps))return void(o.memoizedState=Pl(t,n,i,r))}al.flags|=e,o.memoizedState=Pl(1|t,n,i,r)}function Ll(e,t){return Al(8390656,8,e,t)}function $l(e,t){return Il(2048,8,e,t)}function _l(e,t){return Il(4,2,e,t)}function Fl(e,t){return Il(4,4,e,t)}function Bl(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Vl(e,t,n){return n=null!=n?n.concat([e]):null,Il(4,4,Bl.bind(null,t,e),n)}function jl(){}function Wl(e,t){var n=wl();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ul(e,t){var n=wl();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hl(e,t,n){return 21&ll?(lo(n,t)||(n=gn(),al.lanes|=n,Lc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n)}function ql(e,t){var n=wn;wn=0!==n&&4>n?n:4,e(!0);var r=sl.transition;sl.transition={};try{e(!1),t()}finally{wn=n,sl.transition=r}}function Kl(){return wl().memoizedState}function Jl(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Yl(e))Xl(t,n);else if(null!==(n=Is(e,t,n,r))){nu(n,e,r,eu()),Gl(n,t,r)}}function Ql(e,t,n){var r=tu(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yl(e))Xl(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,lo(l,s)){var a=t.interleaved;return null===a?(o.next=o,As(t)):(o.next=a.next,a.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Is(e,t,o,r))&&(nu(n,e,r,o=eu()),Gl(n,t,r))}}function Yl(e){var t=e.alternate;return e===al||null!==t&&t===al}function Xl(e,t){fl=dl=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gl(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bn(e,n)}}var Zl={readContext:Ps,useCallback:ml,useContext:ml,useEffect:ml,useImperativeHandle:ml,useInsertionEffect:ml,useLayoutEffect:ml,useMemo:ml,useReducer:ml,useRef:ml,useState:ml,useDebugValue:ml,useDeferredValue:ml,useTransition:ml,useMutableSource:ml,useSyncExternalStore:ml,useId:ml,unstable_isNewReconciler:!1},ea={readContext:Ps,useCallback:function(e,t){return bl().memoizedState=[e,void 0===t?null:t],e},useContext:Ps,useEffect:Ll,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Al(4194308,4,Bl.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Al(4194308,4,e,t)},useInsertionEffect:function(e,t){return Al(4,2,e,t)},useMemo:function(e,t){var n=bl();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bl();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jl.bind(null,al,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},bl().memoizedState=e},useState:Rl,useDebugValue:jl,useDeferredValue:function(e){return bl().memoizedState=e},useTransition:function(){var e=Rl(!1),t=e[0];return e=ql.bind(null,e[1]),bl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=al,o=bl();if(ss){if(void 0===n)throw Error(ie(407));n=n()}else{if(n=t(),null===Tc)throw Error(ie(349));30&ll||Ml(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ll(Nl.bind(null,r,i,e),[e]),r.flags|=2048,Pl(9,Ol.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bl(),t=Tc.identifierPrefix;if(ss){var n=Gi;t=":"+t+"R"+(n=(Xi&~(1<<32-ln(Xi)-1)).toString(32)+n),0<(n=hl++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=pl++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ta={readContext:Ps,useCallback:Wl,useContext:Ps,useEffect:$l,useImperativeHandle:Vl,useInsertionEffect:_l,useLayoutEffect:Fl,useMemo:Ul,useReducer:xl,useRef:zl,useState:function(){return xl(kl)},useDebugValue:jl,useDeferredValue:function(e){return Hl(wl(),cl.memoizedState,e)},useTransition:function(){return[xl(kl)[0],wl().memoizedState]},useMutableSource:Cl,useSyncExternalStore:El,useId:Kl,unstable_isNewReconciler:!1},na={readContext:Ps,useCallback:Wl,useContext:Ps,useEffect:$l,useImperativeHandle:Vl,useInsertionEffect:_l,useLayoutEffect:Fl,useMemo:Ul,useReducer:Sl,useRef:zl,useState:function(){return Sl(kl)},useDebugValue:jl,useDeferredValue:function(e){var t=wl();return null===cl?t.memoizedState=e:Hl(t,cl.memoizedState,e)},useTransition:function(){return[Sl(kl)[0],wl().memoizedState]},useMutableSource:Cl,useSyncExternalStore:El,useId:Kl,unstable_isNewReconciler:!1};function ra(e,t){if(e&&e.defaultProps){for(var n in t=$e({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function oa(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$e({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ia={isMounted:function(e){return!!(e=e._reactInternals)&&jt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),o=tu(e),i=Bs(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Vs(e,i,o))&&(nu(t,e,o,r),js(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),o=tu(e),i=Bs(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Vs(e,i,o))&&(nu(t,e,o,r),js(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),o=Bs(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Vs(e,o,r))&&(nu(t,e,r,n),js(t,e,r))}};function sa(e,t,n,r,o,i,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!ao(n,r)||!ao(o,i))}function la(e,t,n){var r=!1,o=Ni,i=t.contextType;return"object"==typeof i&&null!==i?i=Ps(i):(o=zi(t)?Ri:Ti.current,i=(r=null!=(r=t.contextTypes))?Pi(e,o):Ni),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ia,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function aa(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ia.enqueueReplaceState(t,t.state,null)}function ca(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},_s(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ps(i):(i=zi(t)?Ri:Ti.current,o.context=Pi(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(oa(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ia.enqueueReplaceState(o,o.state,null),Us(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function ua(e,t){try{var n="",r=t;do{n+=Ve(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}
vendor: 8,390 bytes, line 30
30function da(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var fa="function"==typeof WeakMap?WeakMap:Map;function ha(e,t,n){(n=Bs(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Uc||(Uc=!0,Hc=r)},n}function pa(e,t,n){(n=Bs(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===qc?qc=new Set([this]):qc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ma(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fa;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Eu.bind(null,e,t,n),t.then(e,e))}function ga(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bs(-1,1)).tag=2,Vs(n,t,1))),n.lanes|=1),e)}var va=we.ReactCurrentOwner,ba=!1;function wa(e,t,n,r){t.child=null===e?Ss(t,null,n,r):xs(t,e.child,n,r)}function ka(e,t,n,r,o){n=n.render;var i=t.ref;return Rs(t,o),r=yl(e,t,n,r,i,o),n=vl(),null===e||ba?(ss&&n&&ts(t),t.flags|=1,wa(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ua(e,t,o))}function xa(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Pu(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Au(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Sa(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:ao)(s,r)&&e.ref===t.ref)return Ua(e,t,o)}return t.flags|=1,(e=zu(i,r)).ref=t.ref,e.return=t,t.child=e}function Sa(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(ao(i,r)&&e.ref===t.ref){if(ba=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Ua(e,t,o);131072&e.flags&&(ba=!0)}}return Ma(e,t,n,r,o)}function Ca(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oi(zc,Pc),Pc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Oi(zc,Pc),Pc|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oi(zc,Pc),Pc|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Oi(zc,Pc),Pc|=r;return wa(e,t,o,n),t.child}function Ea(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ma(e,t,n,r,o){var i=zi(n)?Ri:Ti.current;return i=Pi(t,i),Rs(t,o),n=yl(e,t,n,r,i,o),r=vl(),null===e||ba?(ss&&r&&ts(t),t.flags|=1,wa(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ua(e,t,o))}function Oa(e,t,n,r,o){if(zi(n)){var i=!0;$i(t)}else i=!1;if(Rs(t,o),null===t.stateNode)Wa(e,t),la(t,n,r),ca(t,n,r,o),r=!0;else if(null===e){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ps(c):c=Pi(t,c=zi(n)?Ri:Ti.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(l!==r||a!==c)&&aa(t,s,r,c),$s=!1;var f=t.memoizedState;s.state=f,Us(t,r,s,o),a=t.memoizedState,l!==r||f!==a||Di.current||$s?("function"==typeof u&&(oa(t,n,u,r),a=t.memoizedState),(l=$s||sa(t,n,l,r,f,a,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=c,r=l):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Fs(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:ra(t.type,l),s.props=c,d=t.pendingProps,f=s.context,"object"==typeof(a=n.contextType)&&null!==a?a=Ps(a):a=Pi(t,a=zi(n)?Ri:Ti.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(l!==d||f!==a)&&aa(t,s,r,a),$s=!1,f=t.memoizedState,s.state=f,Us(t,r,s,o);var p=t.memoizedState;l!==d||f!==p||Di.current||$s?("function"==typeof h&&(oa(t,n,h,r),p=t.memoizedState),(c=$s||sa(t,n,c,r,f,p,a)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,a),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,a)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=a,r=c):("function"!=typeof s.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Na(e,t,n,r,i,o)}function Na(e,t,n,r,o,i){Ea(e,t);var s=!!(128&t.flags);if(!r&&!s)return o&&_i(t,n,!1),Ua(e,t,i);r=t.stateNode,va.current=t;var l=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=xs(t,e.child,null,i),t.child=xs(t,null,l,i)):wa(e,t,l,i),t.memoizedState=r.state,o&&_i(t,n,!0),t.child}function Ta(e){var t=e.stateNode;t.pendingContext?Ii(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ii(0,t.context,!1),Xs(e,t.containerInfo)}function Da(e,t,n,r,o){return ms(),gs(o),t.flags|=256,wa(e,t,n,r),t.child}var Ra,Pa,za,Aa,Ia={dehydrated:null,treeContext:null,retryLane:0};function La(e){return{baseLanes:e,cachePool:null,transitions:null}}function $a(e,t,n){var r,o=t.pendingProps,i=tl.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Oi(tl,1&i),null===e)return ds(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Lu(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Iu(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=La(n),t.memoizedState=Ia,e):_a(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,s){if(n)return 256&t.flags?(t.flags&=-257,Fa(e,t,s,r=da(Error(ie(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Lu({mode:"visible",children:r.children},o,0,null),(i=Iu(i,o,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&xs(t,e.child,null,s),t.child.memoizedState=La(s),t.memoizedState=Ia,i);if(!(1&t.mode))return Fa(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Fa(e,t,s,r=da(i=Error(ie(419)),r,void 0))}if(l=0!==(s&e.childLanes),ba||l){if(null!==(r=Tc)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|s))?0:o)&&o!==i.retryLane&&(i.retryLane=o,Ls(e,o),nu(r,e,o,-1))}return mu(),Fa(e,t,s,r=da(Error(ie(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ou.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,is=u
vendor: 2,759 bytes, line 30
30i(o.nextSibling),rs=t,ss=!0,ls=null,null!==e&&(Ji[Qi++]=Xi,Ji[Qi++]=Gi,Ji[Qi++]=Yi,Xi=e.id,Gi=e.overflow,Yi=t),t=_a(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,i,n);if(s){s=o.fallback,l=t.mode,r=(i=e.child).sibling;var a={mode:"hidden",children:o.children};return 1&l||t.child===i?(o=zu(i,a)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=a,t.deletions=null),null!==r?s=zu(r,s):(s=Iu(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?La(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ia,o}return e=(s=e.child).sibling,o=zu(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function _a(e,t){return(t=Lu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fa(e,t,n,r){return null!==r&&gs(r),xs(t,e.child,null,n),(e=_a(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ba(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ds(e.return,t,n)}function Va(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function ja(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(wa(e,t,r.children,n),2&(r=tl.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ba(e,n,t);else if(19===e.tag)Ba(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oi(tl,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===nl(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Va(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===nl(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Va(t,!0,n,null,i);break;case"together":Va(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Wa(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ua(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Lc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(ie(153));if(null!==t.child){for(n=zu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;
vendor: 9,218 bytes, line 30
30)e=e.sibling,(n=n.sibling=zu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ha(e,t){if(!ss)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qa(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ka(e,t,n){var r=t.pendingProps;switch(ns(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qa(t),null;case 1:case 17:return zi(t.type)&&Ai(),qa(t),null;case 3:return r=t.stateNode,Gs(),Mi(Di),Mi(Ti),ol(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(hs(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ls&&(su(ls),ls=null))),Pa(e,t),qa(t),null;case 5:el(t);var o=Ys(Qs.current);if(n=t.type,null!==e&&null!=t.stateNode)za(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(ie(166));return qa(t),null}if(e=Ys(Ks.current),hs(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[hi]=t,r[pi]=i,e=!!(1&t.mode),n){case"dialog":Bo("cancel",r),Bo("close",r);break;case"iframe":case"object":case"embed":Bo("load",r);break;case"video":case"audio":for(o=0;o<Lo.length;o++)Bo(Lo[o],r);break;case"source":Bo("error",r);break;case"img":case"image":case"link":Bo("error",r),Bo("load",r);break;case"details":Bo("toggle",r);break;case"input":Ye(r,i),Bo("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Bo("invalid",r);break;case"textarea":ot(r,i),Bo("invalid",r)}for(var s in vt(n,i),o=null,i)if(i.hasOwnProperty(s)){var l=i[s];"children"===s?"string"==typeof l?r.textContent!==l&&(!0!==i.suppressHydrationWarning&&Zo(r.textContent,l,e),o=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(!0!==i.suppressHydrationWarning&&Zo(r.textContent,l,e),o=["children",""+l]):le.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&Bo("scroll",r)}switch(n){case"input":qe(r),Ze(r,i,!0);break;case"textarea":qe(r),st(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=ei)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=lt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[hi]=t,e[pi]=r,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(s=bt(n,r),n){case"dialog":Bo("cancel",e),Bo("close",e),o=r;break;case"iframe":case"object":case"embed":Bo("load",e),o=r;break;case"video":case"audio":for(o=0;o<Lo.length;o++)Bo(Lo[o],e);o=r;break;case"source":Bo("error",e),o=r;break;case"img":case"image":case"link":Bo("error",e),Bo("load",e),o=r;break;case"details":Bo("toggle",e),o=r;break;case"input":Ye(e,r),o=Qe(e,r),Bo("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=$e({},r,{value:void 0}),Bo("invalid",e);break;case"textarea":ot(e,r),o=rt(e,r),Bo("invalid",e)}for(i in vt(n,o),l=o)if(l.hasOwnProperty(i)){var a=l[i];"style"===i?gt(e,a):"dangerouslySetInnerHTML"===i?null!=(a=a?a.__html:void 0)&&dt(e,a):"children"===i?"string"==typeof a?("textarea"!==n||""!==a)&&ft(e,a):"number"==typeof a&&ft(e,""+a):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(le.hasOwnProperty(i)?null!=a&&"onScroll"===i&&Bo("scroll",e):null!=a&&be(e,i,a,s))}switch(n){case"input":qe(e),Ze(e,r,!1);break;case"textarea":qe(e),st(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Ue(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?nt(e,!!r.multiple,i,!1):null!=r.defaultValue&&nt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=ei)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qa(t),null;case 6:if(e&&null!=t.stateNode)Aa(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(ie(166));if(n=Ys(Qs.current),Ys(Ks.current),hs(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(i=r.nodeValue!==n)&&null!==(e=rs))switch(e.tag){case 3:Zo(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zo(r.nodeValue,n,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return qa(t),null;case 13:if(Mi(tl),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ss&&null!==is&&1&t.mode&&!(128&t.flags))ps(),ms(),t.flags|=98560,i=!1;else if(i=hs(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(ie(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(ie(317));i[hi]=t}else ms(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qa(t),i=!1}else null!==ls&&(su(ls),ls=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&tl.current?0===Ac&&(Ac=3):mu())),null!==t.updateQueue&&(t.flags|=4),qa(t),null);case 4:return Gs(),Pa(e,t),null===e&&Wo(t.stateNode.containerInfo),qa(t),null;case 10:return Ts(t.type._context),qa(t),null;case 19:if(Mi(tl),null===(i=t.memoizedState))return qa(t),null;if(r=!!(128&t.flags),null===(s=i.rendering))if(r)Ha(i,!1);else{if(0!==Ac||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=nl(e))){for(t.flags|=128,Ha(i,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oi(tl,1&tl.current|2),t.child}e=e.sibling}null!==i.tail&&Xt()>jc&&(t.flags|=128,r=!0,Ha(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=nl(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ha(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!ss)return qa(t),null}else 2*Xt()-i.renderingStartTime>jc&&1073741824!==n&&(t.flags|=128,r=!0,Ha(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=i.last)?n.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Xt(),t.sibling=null,n=tl.current,Oi(tl,r?1&n|2:1&n),t):(qa(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Pc)&&(qa(t),6&t.subtreeFlags&&(t.flags|=8192)):qa(t),null;case 24:case 25:return null}throw Error(ie(156,t.tag))}function Ja(e,t){switch(ns(t),t.tag){case 1:return zi(t.type)&&Ai(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Gs(),Mi(Di),Mi(Ti),ol(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return el(t),null;case 13:if(Mi(tl),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(ie(340));ms()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Mi(tl),null;case 4:return Gs(),null;case 10:return Ts(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ra=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Pa=function(){},za=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ys(Ks.current);var i,s=null;switch(n){case"input":o=Qe(e,o),r=Qe(e,r),s=[];break;case"select":o=$e({},o,{value:void 0}),r=$e({},r,{value:void 0}),s=[];break;case"textarea":o=rt(e,o),r=rt(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=ei)}for(c in vt(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var l=o[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(le.hasOwnProperty(c)?s||
vendor: 5,093 bytes, line 30
30(s=[]):(s=s||[]).push(c,null));for(c in r){var a=r[c];if(l=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&a!==l&&(null!=a||null!=l))if("style"===c)if(l){for(i in l)!l.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&l[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(s||(s=[]),s.push(c,n)),n=a;else"dangerouslySetInnerHTML"===c?(a=a?a.__html:void 0,l=l?l.__html:void 0,null!=a&&l!==a&&(s=s||[]).push(c,a)):"children"===c?"string"!=typeof a&&"number"!=typeof a||(s=s||[]).push(c,""+a):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(le.hasOwnProperty(c)?(null!=a&&"onScroll"===c&&Bo("scroll",e),s||l===a||(s=[])):(s=s||[]).push(c,a))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Aa=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qa=!1,Ya=!1,Xa="function"==typeof WeakSet?WeakSet:Set,Ga=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Cu(e,t,r)}else n.current=null}function ec(e,t,n){try{n()}catch(r){Cu(e,t,r)}}var tc=!1;function nc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&ec(t,n,i)}o=o.next}while(o!==r)}}function rc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function oc(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ic(e){var t=e.alternate;null!==t&&(e.alternate=null,ic(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[gi],delete t[yi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sc(e){return 5===e.tag||3===e.tag||4===e.tag}function lc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ac(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ei));else if(4!==r&&null!==(e=e.child))for(ac(e,t,n),e=e.sibling;null!==e;)ac(e,t,n),e=e.sibling}function cc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cc(e,t,n),e=e.sibling;null!==e;)cc(e,t,n),e=e.sibling}var uc=null,dc=!1;function fc(e,t,n){for(n=n.child;null!==n;)hc(e,t,n),n=n.sibling}function hc(e,t,n){if(sn&&"function"==typeof sn.onCommitFiberUnmount)try{sn.onCommitFiberUnmount(on,n)}catch(l){}switch(n.tag){case 5:Ya||Za(n,t);case 6:var r=uc,o=dc;uc=null,fc(e,t,n),dc=o,null!==(uc=r)&&(dc?(e=uc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):uc.removeChild(n.stateNode));break;case 18:null!==uc&&(dc?(e=uc,n=n.stateNode,8===e.nodeType?ci(e.parentNode,n):1===e.nodeType&&ci(e,n),Wn(e)):ci(uc,n.stateNode));break;case 4:r=uc,o=dc,uc=n.stateNode.containerInfo,dc=!0,fc(e,t,n),uc=r,dc=o;break;case 0:case 11:case 14:case 15:if(!Ya&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,void 0!==s&&(2&i||4&i)&&ec(n,t,s),o=o.next}while(o!==r)}fc(e,t,n);break;case 1:if(!Ya&&(Za(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Cu(n,t,l)}fc(e,t,n);break;case 21:fc(e,t,n);break;case 22:1&n.mode?(Ya=(r=Ya)||null!==n.memoizedState,fc(e,t,n),Ya=r):fc(e,t,n);break;default:fc(e,t,n)}}function pc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach((function(t){var r=Nu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:uc=l.stateNode,dc=!1;break e;case 3:case 4:uc=l.stateNode.containerInfo,dc=!0;break e}l=l.return}if(null===uc)throw Error(ie(160));hc(i,s,o),uc=null,dc=!1;var a=o.alternate;null!==a&&(a.return=null),o.return=null}catch(c){Cu(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gc(t,e),t=t.sibling}function gc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mc(t,e),yc(e),4&r){try{nc(3,e,e.return),rc(3,e)}catch(m){Cu(e,e.return,m)}try{nc(5,e,e.return)}catch(m){Cu(e,e.return,m)}}break;case 1:mc(t,e),yc(e),512&r&&null!==n&&Za(n,n.return);break;case 5:if(mc(t,e),yc(e),512&r&&null!==n&&Za(n,n.return),32&e.flags){var o=e.stateNode;try{ft(o,"")}catch(m){Cu(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==n?n.memoizedProps:i,l=e.type,a=e.updateQueue;
vendor: 4,709 bytes, line 30
30if(e.updateQueue=null,null!==a)try{"input"===l&&"radio"===i.type&&null!=i.name&&Xe(o,i),bt(l,s);var c=bt(l,i);for(s=0;s<a.length;s+=2){var u=a[s],d=a[s+1];"style"===u?gt(o,d):"dangerouslySetInnerHTML"===u?dt(o,d):"children"===u?ft(o,d):be(o,u,d,c)}switch(l){case"input":Ge(o,i);break;case"textarea":it(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?nt(o,!!i.multiple,h,!1):f!==!!i.multiple&&(null!=i.defaultValue?nt(o,!!i.multiple,i.defaultValue,!0):nt(o,!!i.multiple,i.multiple?[]:"",!1))}o[pi]=i}catch(m){Cu(e,e.return,m)}}break;case 6:if(mc(t,e),yc(e),4&r){if(null===e.stateNode)throw Error(ie(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){Cu(e,e.return,m)}}break;case 3:if(mc(t,e),yc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Wn(t.containerInfo)}catch(m){Cu(e,e.return,m)}break;case 4:default:mc(t,e),yc(e);break;case 13:mc(t,e),yc(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Vc=Xt())),4&r&&pc(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(c=Ya)||u,mc(t,e),Ya=c):mc(t,e),yc(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Ga=e,u=e.child;null!==u;){for(d=Ga=u;null!==Ga;){switch(h=(f=Ga).child,f.tag){case 0:case 11:case 14:case 15:nc(4,f,f.return);break;case 1:Za(f,f.return);var p=f.stateNode;if("function"==typeof p.componentWillUnmount){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Cu(r,n,m)}}break;case 5:Za(f,f.return);break;case 22:if(null!==f.memoizedState){kc(d);continue}}null!==h?(h.return=f,Ga=h):kc(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{o=d.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(l=d.stateNode,s=null!=(a=d.memoizedProps.style)&&a.hasOwnProperty("display")?a.display:null,l.style.display=mt("display",s))}catch(m){Cu(e,e.return,m)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){Cu(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:mc(t,e),yc(e),4&r&&pc(e);case 21:}}function yc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sc(n)){var r=n;break e}n=n.return}throw Error(ie(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(ft(o,""),r.flags&=-33),cc(e,lc(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;ac(e,lc(e),i);break;default:throw Error(ie(161))}}catch(s){Cu(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vc(e,t,n){Ga=e,bc(e)}function bc(e,t,n){for(var r=!!(1&e.mode);null!==Ga;){var o=Ga,i=o.child;if(22===o.tag&&r){var s=null!==o.memoizedState||Qa;if(!s){var l=o.alternate,a=null!==l&&null!==l.memoizedState||Ya;l=Qa;var c=Ya;if(Qa=s,(Ya=a)&&!c)for(Ga=o;null!==Ga;)a=(s=Ga).child,22===s.tag&&null!==s.memoizedState?xc(o):null!==a?(a.return=s,Ga=a):xc(o);for(;null!==i;)Ga=i,bc(i),i=i.sibling;Ga=o,Qa=l,Ya=c}wc(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,Ga=i):wc(e)}}function wc(e){for(;null!==Ga;){var t=Ga;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ya||rc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ya)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ra(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Hs(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Hs(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Wn(d)}}}break;default:throw Error(ie(163))}Ya||512&t.flags&&oc(t)}catch(f){Cu(t,t.return,f)}}if(t===e){Ga=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ga=n;break}Ga=t.return}}function kc(e){for(;null!==Ga;){var t=Ga;if(t===e){Ga=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ga=n;break}Ga=t.return}}function xc(e){for(;null!==Ga;){var t=Ga;
vendor: 6,648 bytes, line 30
30try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rc(4,t)}catch(a){Cu(t,n,a)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(a){Cu(t,o,a)}}var i=t.return;try{oc(t)}catch(a){Cu(t,i,a)}break;case 5:var s=t.return;try{oc(t)}catch(a){Cu(t,s,a)}}}catch(a){Cu(t,t.return,a)}if(t===e){Ga=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Ga=l;break}Ga=t.return}}var Sc,Cc=Math.ceil,Ec=we.ReactCurrentDispatcher,Mc=we.ReactCurrentOwner,Oc=we.ReactCurrentBatchConfig,Nc=0,Tc=null,Dc=null,Rc=0,Pc=0,zc=Ei(0),Ac=0,Ic=null,Lc=0,$c=0,_c=0,Fc=null,Bc=null,Vc=0,jc=1/0,Wc=null,Uc=!1,Hc=null,qc=null,Kc=!1,Jc=null,Qc=0,Yc=0,Xc=null,Gc=-1,Zc=0;function eu(){return 6&Nc?Xt():-1!==Gc?Gc:Gc=Xt()}function tu(e){return 1&e.mode?2&Nc&&0!==Rc?Rc&-Rc:null!==ys.transition?(0===Zc&&(Zc=gn()),Zc):0!==(e=wn)?e:e=void 0===(e=window.event)?16:Xn(e.type):1}function nu(e,t,n,r){if(50<Yc)throw Yc=0,Xc=null,Error(ie(185));vn(e,n,r),2&Nc&&e===Tc||(e===Tc&&(!(2&Nc)&&($c|=n),4===Ac&&lu(e,Rc)),ru(e,r),1===n&&0===Nc&&!(1&t.mode)&&(jc=Xt()+500,Bi&&Wi()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-ln(i),l=1<<s,a=o[s];-1===a?0!==(l&n)&&0===(l&r)||(o[s]=pn(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}(e,t);var r=hn(e,e===Tc?Rc:0);if(0===r)null!==n&&Jt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Jt(n),1===t)0===e.tag?function(e){Bi=!0,ji(e)}(au.bind(null,e)):ji(au.bind(null,e)),li((function(){!(6&Nc)&&Wi()})),n=null;else{switch(kn(r)){case 1:n=Zt;break;case 4:n=en;break;case 16:default:n=tn;break;case 536870912:n=rn}n=Tu(n,ou.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ou(e,t){if(Gc=-1,Zc=0,6&Nc)throw Error(ie(327));var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=hn(e,e===Tc?Rc:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=gu(e,r);else{t=r;var o=Nc;Nc|=2;var i=pu();for(Tc===e&&Rc===t||(Wc=null,jc=Xt()+500,fu(e,t));;)try{vu();break}catch(l){hu(e,l)}Ns(),Ec.current=i,Nc=o,null!==Dc?t=0:(Tc=null,Rc=0,t=Ac)}if(0!==t){if(2===t&&(0!==(o=mn(e))&&(r=o,t=iu(e,o))),1===t)throw n=Ic,fu(e,0),lu(e,r),ru(e,Xt()),n;if(6===t)lu(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!lo(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=gu(e,r),2===t&&(i=mn(e),0!==i&&(r=i,t=iu(e,i))),1!==t)))throw n=Ic,fu(e,0),lu(e,r),ru(e,Xt()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ie(345));case 2:case 5:ku(e,Bc,Wc);break;case 3:if(lu(e,r),(130023424&r)===r&&10<(t=Vc+500-Xt())){if(0!==hn(e,0))break;if(((o=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=oi(ku.bind(null,e,Bc,Wc),t);break}ku(e,Bc,Wc);break;case 4:if(lu(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-ln(r);i=1<<s,(s=t[s])>o&&(o=s),r&=~i}if(r=o,10<(r=(120>(r=Xt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cc(r/1960))-r)){e.timeoutHandle=oi(ku.bind(null,e,Bc,Wc),r);break}ku(e,Bc,Wc);break;default:throw Error(ie(329))}}}return ru(e,Xt()),e.callbackNode===n?ou.bind(null,e):null}function iu(e,t){var n=Fc;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Bc,Bc=n,null!==t&&su(t)),e}function su(e){null===Bc?Bc=e:Bc.push.apply(Bc,e)}function lu(e,t){for(t&=~_c,t&=~$c,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ln(t),r=1<<n;e[n]=-1,t&=~r}}function au(e){if(6&Nc)throw Error(ie(327));xu();var t=hn(e,0);if(!(1&t))return ru(e,Xt()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var r=mn(e);0!==r&&(t=r,n=iu(e,r))}if(1===n)throw n=Ic,fu(e,0),lu(e,t),ru(e,Xt()),n;if(6===n)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ku(e,Bc,Wc),ru(e,Xt()),null}function cu(e,t){var n=Nc;Nc|=1;try{return e(t)}finally{0===(Nc=n)&&(jc=Xt()+500,Bi&&Wi())}}function uu(e){null!==Jc&&0===Jc.tag&&!(6&Nc)&&xu();var t=Nc;Nc|=1;var n=Oc.transition,r=wn;try{if(Oc.transition=null,wn=1,e)return e()}finally{wn=r,Oc.transition=n,!(6&(Nc=t))&&Wi()}}function du(){Pc=zc.current,Mi(zc)}function fu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Dc)for(n=Dc.return;null!==n;){var r=n;switch(ns(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ai();break;case 3:Gs(),Mi(Di),Mi(Ti),ol();break;case 5:el(r);break;case 4:Gs();break;case 13:case 19:Mi(tl);break;case 10:Ts(r.type._context);break;case 22:case 23:du()}n=n.return}if(Tc=e,Dc=e=zu(e.current,null),Rc=Pc=t,Ac=0,Ic=null,_c=$c=Lc=0,Bc=Fc=null,null!==zs){for(t=0;t<zs.length;t++)if(null!==(r=(n=zs[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var s=i.next;i.next=o,r.next=s}n.pending=r}zs=null}return e}function hu(e,t){for(;;){var n=Dc;try{if(Ns(),il.current=Zl,dl){for(var r=al.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}dl=!1}if(ll=0,ul=cl=al=null,fl=!1,hl=0,Mc.current=null,null===n||null===n.return){Ac=1,Ic=t,Dc=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=Rc,l.flags|=32768,null!==a&&"object"==typeof a&&"function"==typeof a.then){var c=a,u=l,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=ga(s);if(null!==h){h.flags&=-257,ya(h,s,l,0,t),1&h.mode&&ma(i,c,t),a=c;var p=(t=h).updateQueue;if(null===p){var m=new Set;m.add(a),t.updateQueue=m}else p.add(a);break e}if(!(1&t)){ma(i,c,t),mu();break e}a=Error(ie(426))}else if(ss&&1&l.mode){var g=ga(s);if(null!==g){!(65536&g.flags)&&(g.flags|=256),ya(g,s,l,0,t),gs(ua(a,l));break e}}i=a=ua(a,l),4!==Ac&&(Ac=2),null===Fc?Fc=[i]:Fc.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Ws(i,ha(0,a,t));break e;case 1:l=a;var y=i.type,v=i.stateNode;if(!(128&i.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==qc&&qc.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t,Ws(i,pa(i,l,t));break e}}i=i.return}while(null!==i)}wu(n)}catch(b){t=b,Dc===n&&null!==n&&(Dc=n=n.return);continue}break}}function pu(){var e=Ec.current;return Ec.current=Zl,null===e?Zl:e}
vendor: 6,348 bytes, line 30
30function mu(){0!==Ac&&3!==Ac&&2!==Ac||(Ac=4),null===Tc||!(268435455&Lc)&&!(268435455&$c)||lu(Tc,Rc)}function gu(e,t){var n=Nc;Nc|=2;var r=pu();for(Tc===e&&Rc===t||(Wc=null,fu(e,t));;)try{yu();break}catch(o){hu(e,o)}if(Ns(),Nc=n,Ec.current=r,null!==Dc)throw Error(ie(261));return Tc=null,Rc=0,Ac}function yu(){for(;null!==Dc;)bu(Dc)}function vu(){for(;null!==Dc&&!Qt();)bu(Dc)}function bu(e){var t=Sc(e.alternate,e,Pc);e.memoizedProps=e.pendingProps,null===t?wu(e):Dc=t,Mc.current=null}function wu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ja(n,t)))return n.flags&=32767,void(Dc=n);if(null===e)return Ac=6,void(Dc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ka(n,t,Pc)))return void(Dc=n);if(null!==(t=t.sibling))return void(Dc=t);Dc=t=e}while(null!==t);0===Ac&&(Ac=5)}function ku(e,t,n){var r=wn,o=Oc.transition;try{Oc.transition=null,wn=1,function(e,t,n,r){do{xu()}while(null!==Jc);if(6&Nc)throw Error(ie(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-ln(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===Tc&&(Dc=Tc=null,Rc=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kc||(Kc=!0,Tu(tn,(function(){return xu(),null}))),i=!!(15990&n.flags),!!(15990&n.subtreeFlags)||i){i=Oc.transition,Oc.transition=null;var s=wn;wn=1;var l=Nc;Nc|=4,Mc.current=null,function(e,t){if(ti=Hn,po(e=ho())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var s=0,l=-1,a=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||0!==o&&3!==d.nodeType||(l=s+o),d!==i||0!==r&&3!==d.nodeType||(a=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(h=d.firstChild);)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++c===o&&(l=s),f===i&&++u===r&&(a=s),null!==(h=d.nextSibling))break;f=(d=f).parentNode}d=h}n=-1===l||-1===a?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ni={focusedElem:e,selectionRange:n},Hn=!1,Ga=t;null!==Ga;)if(e=(t=Ga).child,1028&t.subtreeFlags&&null!==e)e.return=t,Ga=e;else for(;null!==Ga;){t=Ga;try{var p=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var m=p.memoizedProps,g=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:ra(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(ie(163))}}catch(w){Cu(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Ga=e;break}Ga=t.return}p=tc,tc=!1}(e,n),gc(n,e),mo(ni),Hn=!!ti,ni=ti=null,e.current=n,vc(n),Yt(),Nc=l,wn=s,Oc.transition=i}else e.current=n;if(Kc&&(Kc=!1,Jc=e,Qc=o),i=e.pendingLanes,0===i&&(qc=null),function(e){if(sn&&"function"==typeof sn.onCommitFiberRoot)try{sn.onCommitFiberRoot(on,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),ru(e,Xt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Uc)throw Uc=!1,e=Hc,Hc=null,e;!!(1&Qc)&&0!==e.tag&&xu(),i=e.pendingLanes,1&i?e===Xc?Yc++:(Yc=0,Xc=e):Yc=0,Wi()}(e,t,n,r)}finally{Oc.transition=o,wn=r}return null}function xu(){if(null!==Jc){var e=kn(Qc),t=Oc.transition,n=wn;try{if(Oc.transition=null,wn=16>e?16:e,null===Jc)var r=!1;else{if(e=Jc,Jc=null,Qc=0,6&Nc)throw Error(ie(331));var o=Nc;for(Nc|=4,Ga=e.current;null!==Ga;){var i=Ga,s=i.child;if(16&Ga.flags){var l=i.deletions;if(null!==l){for(var a=0;a<l.length;a++){var c=l[a];for(Ga=c;null!==Ga;){var u=Ga;switch(u.tag){case 0:case 11:case 15:nc(8,u,i)}var d=u.child;if(null!==d)d.return=u,Ga=d;else for(;null!==Ga;){var f=(u=Ga).sibling,h=u.return;if(ic(u),u===c){Ga=null;break}if(null!==f){f.return=h,Ga=f;break}Ga=h}}}var p=i.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Ga=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,Ga=s;else e:for(;null!==Ga;){if(2048&(i=Ga).flags)switch(i.tag){case 0:case 11:case 15:nc(9,i,i.return)}var y=i.sibling;if(null!==y){y.return=i.return,Ga=y;break e}Ga=i.return}}var v=e.current;for(Ga=v;null!==Ga;){var b=(s=Ga).child;if(2064&s.subtreeFlags&&null!==b)b.return=s,Ga=b;else e:for(s=v;null!==Ga;){if(2048&(l=Ga).flags)try{switch(l.tag){case 0:case 11:case 15:rc(9,l)}}catch(k){Cu(l,l.return,k)}if(l===s){Ga=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Ga=w;break e}Ga=l.return}}if(Nc=o,Wi(),sn&&"function"==typeof sn.onPostCommitFiberRoot)try{sn.onPostCommitFiberRoot(on,e)}catch(k){}r=!0}return r}finally{wn=n,Oc.transition=t}}return!1}function Su(e,t,n){e=Vs(e,t=ha(0,t=ua(n,t),1),1),t=eu(),null!==e&&(vn(e,1,t),ru(e,t))}function Cu(e,t,n){if(3===e.tag)Su(e,e,n);else for(;null!==t;){if(3===t.tag){Su(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qc||!qc.has(r))){t=Vs(t,e=pa(t,e=ua(n,e),1),1),e=eu(),null!==t&&(vn(t,1,e),ru(t,e));break}}t=t.return}}function Eu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Tc===e&&(Rc&n)===n&&(4===Ac||3===Ac&&(130023424&Rc)===Rc&&500>Xt()-Vc?fu(e,0):_c|=n),ru(e,t)}function Mu(e,t){0===t&&(1&e.mode?(t=dn,!(130023424&(dn<<=1))&&(dn=4194304)):t=1);var n=eu();null!==(e=Ls(e,t))&&(vn(e,t,n),ru(e,n))}function Ou(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mu(e,n)}function Nu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ie(314))}null!==r&&r.delete(t),Mu(e,n)}function Tu(e,t){return Kt(e,t)}function Du(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 6,629 bytes, line 30
30ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new Du(e,t,n,r)}function Pu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zu(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)Pu(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case Se:return Iu(n.children,o,i,t);case Ce:s=8,o|=8;break;case Ee:return(e=Ru(12,n,t,2|o)).elementType=Ee,e.lanes=i,e;case Te:return(e=Ru(13,n,t,o)).elementType=Te,e.lanes=i,e;case De:return(e=Ru(19,n,t,o)).elementType=De,e.lanes=i,e;case ze:return Lu(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Me:s=10;break e;case Oe:s=9;break e;case Ne:s=11;break e;case Re:s=14;break e;case Pe:s=16,r=null;break e}throw Error(ie(130,null==e?e:typeof e,""))}return(t=Ru(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Iu(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Lu(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=ze,e.lanes=n,e.stateNode={isHidden:!1},e}function $u(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function _u(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yn(0),this.expirationTimes=yn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bu(e,t,n,r,o,i,s,l,a){return e=new Fu(e,t,n,l,a),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Ru(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_s(i),e}function Vu(e){if(!e)return Ni;e:{if(jt(e=e._reactInternals)!==e||1!==e.tag)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(ie(171))}if(1===e.tag){var n=e.type;if(zi(n))return Li(e,n,t)}return t}function ju(e,t,n,r,o,i,s,l,a){return(e=Bu(n,r,!0,e,0,i,0,l,a)).context=Vu(null),n=e.current,(i=Bs(r=eu(),o=tu(n))).callback=null!=t?t:null,Vs(n,i,o),e.current.lanes=o,vn(e,o,r),ru(e,r),e}function Wu(e,t,n,r){var o=t.current,i=eu(),s=tu(o);return n=Vu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bs(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Vs(o,t,s))&&(nu(e,o,s,i),js(e,o,s)),s}function Uu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qu(e,t){Hu(e,t),(e=e.alternate)&&Hu(e,t)}Sc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Di.current)ba=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:Ta(t),ms();break;case 5:Zs(t);break;case 1:zi(t.type)&&$i(t);break;case 4:Xs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Oi(Cs,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oi(tl,1&tl.current),t.flags|=128,null):0!==(n&t.child.childLanes)?$a(e,t,n):(Oi(tl,1&tl.current),null!==(e=Ua(e,t,n))?e.sibling:null);Oi(tl,1&tl.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return ja(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Oi(tl,tl.current),r)break;return null;case 22:case 23:return t.lanes=0,Ca(e,t,n)}return Ua(e,t,n)}(e,t,n);ba=!!(131072&e.flags)}else ba=!1,ss&&1048576&t.flags&&es(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wa(e,t),e=t.pendingProps;var o=Pi(t,Ti.current);Rs(t,n),o=yl(null,t,r,e,o,n);var i=vl();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zi(r)?(i=!0,$i(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,_s(t),o.updater=ia,t.stateNode=o,o._reactInternals=t,ca(t,r,e,n),t=Na(null,t,r,!0,i,n)):(t.tag=0,ss&&i&&ts(t),wa(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wa(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Pu(e)?1:0;if(null!=e){if((e=e.$$typeof)===Ne)return 11;if(e===Re)return 14}return 2}(r),e=ra(r,e),o){case 0:t=Ma(null,t,r,e,n);break e;case 1:t=Oa(null,t,r,e,n);break e;case 11:t=ka(null,t,r,e,n);break e;case 14:t=xa(null,t,r,ra(r.type,e),n);break e}throw Error(ie(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ma(e,t,r,o=t.elementType===r?o:ra(r,o),n);case 1:return r=t.type,o=t.pendingProps,Oa(e,t,r,o=t.elementType===r?o:ra(r,o),n);case 3:e:{if(Ta(t),null===e)throw Error(ie(387));r=t.pendingProps,o=(i=t.memoizedState).element,Fs(e,t),Us(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Da(e,t,r,n,o=ua(Error(ie(423)),t));break e}if(r!==o){t=Da(e,t,r,n,o=ua(Error(ie(424)),t));break e}for(is=ui(t.stateNode.containerInfo.firstChild),rs=t,ss=!0,ls=null,n=Ss(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ms(),r===o){t=Ua(e,t,n);break e}wa(e,t,r,n)}t=t.child}return t;case 5:return Zs(t),null===e&&ds(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,ri(r,o)?s=null:null!==i&&ri(r,i)&&
vendor: 5,385 bytes, line 30
30(t.flags|=32),Ea(e,t),wa(e,t,s,n),t.child;case 6:return null===e&&ds(t),null;case 13:return $a(e,t,n);case 4:return Xs(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xs(t,null,r,n):wa(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,ka(e,t,r,o=t.elementType===r?o:ra(r,o),n);case 7:return wa(e,t,t.pendingProps,n),t.child;case 8:case 12:return wa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Oi(Cs,r._currentValue),r._currentValue=s,null!==i)if(lo(i.value,s)){if(i.children===o.children&&!Di.current){t=Ua(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var a=l.firstContext;null!==a;){if(a.context===r){if(1===i.tag){(a=Bs(-1,n&-n)).tag=2;var c=i.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}i.lanes|=n,null!==(a=i.alternate)&&(a.lanes|=n),Ds(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(ie(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ds(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}wa(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Rs(t,n),r=r(o=Ps(o)),t.flags|=1,wa(e,t,r,n),t.child;case 14:return o=ra(r=t.type,t.pendingProps),xa(e,t,r,o=ra(r.type,o),n);case 15:return Sa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ra(r,o),Wa(e,t),t.tag=1,zi(r)?(e=!0,$i(t)):e=!1,Rs(t,n),la(t,r,o),ca(t,r,o,n),Na(null,t,r,!0,e,n);case 19:return ja(e,t,n);case 22:return Ca(e,t,n)}throw Error(ie(156,t.tag))};var Ku="function"==typeof reportError?reportError:function(e){};function Ju(e){this._internalRoot=e}function Qu(e){this._internalRoot=e}function Yu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Gu(){}function Zu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if("function"==typeof o){var l=o;o=function(){var e=Uu(s);l.call(e)}}Wu(t,s,e,o)}else s=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Uu(s);i.call(e)}}var s=ju(t,r,e,0,null,!1,0,"",Gu);return e._reactRootContainer=s,e[mi]=s.current,Wo(8===e.nodeType?e.parentNode:e),uu(),s}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var l=r;r=function(){var e=Uu(a);l.call(e)}}var a=Bu(e,0,!1,null,0,!1,0,"",Gu);return e._reactRootContainer=a,e[mi]=a.current,Wo(8===e.nodeType?e.parentNode:e),uu((function(){Wu(t,a,n,r)})),a}(n,t,e,o,r);return Uu(s)}Qu.prototype.render=Ju.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(ie(409));Wu(e,t,null,null)},Qu.prototype.unmount=Ju.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uu((function(){Wu(null,e,null,null)})),t[mi]=null}},Qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=En();e={blockedOn:null,target:e,priority:t};for(var n=0;n<An.length&&0!==t&&t<An[n].priority;n++);An.splice(n,0,e),0===n&&_n(e)}},xn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fn(t.pendingLanes);0!==n&&(bn(t,1|n),ru(t,Xt()),!(6&Nc)&&(jc=Xt()+500,Wi()))}break;case 13:uu((function(){var t=Ls(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),qu(e,1)}},Sn=function(e){if(13===e.tag){var t=Ls(e,134217728);if(null!==t)nu(t,e,134217728,eu());qu(e,134217728)}},Cn=function(e){if(13===e.tag){var t=tu(e),n=Ls(e,t);if(null!==n)nu(n,e,t,eu());qu(e,t)}},En=function(){return wn},Mn=function(e,t){var n=wn;try{return wn=e,t()}finally{wn=n}},xt=function(e,t,n){switch(t){case"input":if(Ge(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xi(r);if(!o)throw Error(ie(90));Ke(r),Ge(r,o)}}}break;case"textarea":it(e,n);break;case"select":null!=(t=n.value)&&nt(e,!!n.multiple,t,!1)}},Nt=cu,Tt=uu;var ed={usingClientEntryPoint:!1,Events:[wi,ki,xi,Mt,Ot,cu]},td={findFiberByHostInstance:bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:we.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ht(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{on=rd.inject(nd),sn=rd}
30catch(ut){}}Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,Z.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yu(t))throw Error(ie(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:xe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},Z.createRoot=function(e,t){if(!Yu(e))throw Error(ie(299));var n=!1,r="",o=Ku;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Bu(e,1,!1,null,0,n,0,r,o),e[mi]=t.current,Wo(8===e.nodeType?e.parentNode:e),new Ju(t)},Z.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(ie(188));throw e=Object.keys(e).join(","),Error(ie(268,e))}return e=null===(e=Ht(t))?null:e.stateNode},Z.flushSync=function(e){return uu(e)},Z.hydrate=function(e,t,n){if(!Xu(t))throw Error(ie(200));return Zu(null,e,t,!0,n)},Z.hydrateRoot=function(e,t,n){if(!Yu(e))throw Error(ie(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",s=Ku;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=ju(t,null,e,1,null!=n?n:null,o,0,i,s),e[mi]=t.current,Wo(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Qu(t)},Z.render=function(e,t,n){if(!Xu(t))throw Error(ie(200));return Zu(null,e,t,!1,n)},Z.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(ie(40));return!!e._reactRootContainer&&(uu((function(){Zu(null,null,e,!1,(function(){e._reactRootContainer=null,e[mi]=null}))})),!0)},Z.unstable_batchedUpdates=cu,Z.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xu(n))throw Error(ie(200));if(null==e||void 0===e._reactInternals)throw Error(ie(38));return Zu(e,t,n,!1,r)},Z.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){}}(),G.exports=Z;var od=G.exports;const id=n(od);var sd,ld,ad,cd=od;
31/**
32 * @remix-run/router v1.20.0
33 *
34 * Copyright (c) Remix Software Inc.
35 *
36 * This source code is licensed under the MIT license found in the
37 * LICENSE.md file in the root directory of this source tree.
38 *
39 * @license MIT
40 */
41function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ud.apply(this,arguments)}sd=cd.createRoot,cd.hydrateRoot,(ad=ld||(ld={})).Pop="POP",ad.Push="PUSH",ad.Replace="REPLACE";const dd="popstate";function fd(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=ld.Pop,a=null,c=u();null==c&&(c=0,s.replaceState(ud({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){l=ld.Pop;let e=u(),t=null==e?null:e-c;c=e,a&&a({action:l,location:m.location,delta:t})}function f(e,t){l=ld.Push;let n=gd(m.location,e,t);c=u()+1;let r=md(n,c),d=m.createHref(n);try{s.pushState(r,"",d)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;o.location.assign(d)}i&&a&&a({action:l,location:m.location,delta:1})}function h(e,t){l=ld.Replace;let n=gd(m.location,e,t);c=u();let r=md(n,c),o=m.createHref(n);s.replaceState(r,"",o),i&&a&&a({action:l,location:m.location,delta:0})}function p(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:yd(e);return n=n.replace(/ $/,"%20"),hd(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return l},get location(){return e(o,s)},listen(e){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(dd,d),a=e,()=>{o.removeEventListener(dd,d),a=null}},createHref:e=>t(o,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:h,go:e=>s.go(e)};return m}((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return gd("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:yd(t)}),0,e)}function hd(e,t){if(!1===e||null==e)throw new Error(t)}function pd(e,t){if(!e)try{throw new Error(t)}catch(n){}}function md(e,t){return{usr:e.state,key:e.key,idx:t}}function gd(e,t,n,r){return void 0===n&&(n=null),ud({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?vd(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function yd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function vd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var bd,wd;function kd(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let o="string"==typeof t?vd(t):t,i=Id(o.pathname||"/",n);if(null==i)return null;let s=xd(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(s);let l=null;for(let a=0;null==l&&a<s.length;++a){let e=Ad(i);l=Pd(s[a],e,r)}return l}(e,t,n,!1)}function xd(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};s.relativePath.startsWith("/")&&(hd(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not val
41id. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let l=Fd([r,s.relativePath]),a=n.concat(s);e.children&&e.children.length>0&&(hd(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),xd(e.children,t,a,l)),(null!=e.path||e.index)&&t.push({path:l,score:Rd(l,e.index),routesMeta:a})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Sd(e.path))o(e,t,r);else o(e,t)})),t}function Sd(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let s=Sd(r.join("/")),l=[];return l.push(...s.map((e=>""===e?i:[i,e].join("/")))),o&&l.push(...s),l.map((t=>e.startsWith("/")&&""===t?"/":t))}(wd=bd||(bd={})).data="data",wd.deferred="deferred",wd.redirect="redirect",wd.error="error";const Cd=/^:[\w-]+$/,Ed=3,Md=2,Od=1,Nd=10,Td=-2,Dd=e=>"*"===e;function Rd(e,t){let n=e.split("/"),r=n.length;return n.some(Dd)&&(r+=Td),t&&(r+=Md),n.filter((e=>!Dd(e))).reduce(((e,t)=>e+(Cd.test(t)?Ed:""===t?Od:Nd)),r)}function Pd(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l<r.length;++l){let e=r[l],a=l===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=zd({path:e.relativePath,caseSensitive:e.caseSensitive,end:a},c),d=e.route;if(!u&&a&&n&&!r[r.length-1].route.index&&(u=zd({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;
41Object.assign(o,u.params),s.push({params:o,pathname:Fd([i,u.pathname]),pathnameBase:Bd(Fd([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=Fd([i,u.pathnameBase]))}return s}function zd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);pd("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[n];return e[r]=o&&!a?void 0:(a||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:s,pattern:e}}function Ad(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return pd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Id(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Ld(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function $d(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function _d(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=vd(e):(o=ud({},e),hd(!o.pathname||!o.pathname.includes("?"),Ld("?","pathname","search",o)),hd(!o.pathname||!o.pathname.includes("#"),Ld("#","pathname","hash",o)),hd(!o.search||!o.search.includes("#"),Ld("#","search","hash",o)));let i,s=""===e||""===o.pathname,l=s?"/":o.pathname;if(null==l)i=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let a=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?vd(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Vd(r),hash:jd(o)}}(o,i),c=l&&"/"!==l&&l.endsWith("/"),u=(s||"."===l)&&n.endsWith("/");return a.pathname.endsWith("/")||!c&&!u||(a.pathname+="/"),a}const Fd=e=>e.join("/").replace(/\/\/+/g,"/"),Bd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vd=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",jd=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Wd=["post","put","patch","delete"];new Set(Wd);const Ud=["get",...Wd];
42/**
43 * React Router v6.27.0
44 *
45 * Copyright (c) Remix Software Inc.
46 *
47 * This source code is licensed under the MIT license found in the
48 * LICENSE.md file in the root directory of this source tree.
49 *
50 * @license MIT
51 */
52function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hd.apply(this,arguments)}new Set(Ud);const qd=V.createContext(null),Kd=V.createContext(null),Jd=V.createContext(null),Qd=V.createContext(null),Yd=V.createContext({outlet:null,matches:[],isDataRoute:!1}),Xd=V.createContext(null);function Gd(){return null!=V.useContext(Qd)}function Zd(){return Gd()||hd(!1),V.useContext(Qd).location}function ef(e){V.useContext(Jd).static||V.useLayoutEffect(e)}function tf(){let{isDataRoute:e}=V.useContext(Yd);return e?function(){let{router:e}=function(){let e=V.useContext(qd);return e||hd(!1),e}(uf.UseNavigateStable),t=ff(df.UseNavigateStable),n=V.useRef(!1);return ef((()=>{n.current=!0})),V.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Hd({fromRouteId:t},o)))}),[e,t])}():function(){Gd()||hd(!1);let e=V.useContext(qd),{basename:t,future:n,navigator:r}=V.useContext(Jd),{matches:o}=V.useContext(Yd),{pathname:i}=Zd(),s=JSON.stringify($d(o,n.v7_relativeSplatPath)),l=V.useRef(!1);return ef((()=>{l.current=!0})),V.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void r.go(n);let a=_d(n,JSON.parse(s),i,"path"===o.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:Fd([t,a.pathname])),(o.replace?r.replace:r.push)(a,o.state,o)}),[t,r,s,i,e])}()}function nf(){let{matches:e}=V.useContext(Yd),t=e[e.length-1];return t?t.params:{}}function rf(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=V.useContext(Jd),{matches:o}=V.useContext(Yd),{pathname:i}=Zd(),s=JSON.stringify($d(o,r.v7_relativeSplatPath));return V.useMemo((()=>_d(e,JSON.parse(s),i,"path"===n)),[e,s,i,n])}function of(e,t){return function(e,t,n,r){Gd()||hd(!1);let{navigator:o}=V.useContext(Jd),{matches:i}=V.useContext(Yd),s=i[i.length-1],l=s?s.params:{};!s||s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let c,u=Zd();if(t){var d;let e="string"==typeof t?vd(t):t;"/"===a||(null==(d=e.pathname)?void 0:d.startsWith(a))||hd(!1),c=e}else c=u;let f=c.pathname||"/",h=f;if("/"!==a){let e=a.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=kd(e,{pathname:h}),m=function(e,t,n,r){var o;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=r)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,l=null==(o=n)?void 0:o.errors;if(null!=l){let e=s.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||hd(!1),s=s.slice(0,Math.min(s.length,e+1))}let a=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let e=s[u];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=u),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){a=!0,s=c>=0?s.slice(0,c+1):[s[0]];break}}}return s.reduceRight(((e,r,o)=>{let i,u=!1,d=null,f=null;n&&(i=l&&r.route.id?l[r.route.id]:void 0,d=r.route.errorElement||lf,a&&(c<0&&0===o?(u=!0,f=null):c===o&&(u=!0,f=r.route.hydrateFallbackElement||null)));let h=t.concat(s.slice(0,o+1)),p=()=>{let t;return t=i?d:u?f:r.route.Component?V.createElement(r.route.Component,null):r.route.element?r.route.element:e,V.createElement(cf,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?V.createElement(af,{location:n.location,revalidation:n.revalidation,component:d,error:i,children:p(),routeC
52ontext:{outlet:null,matches:h,isDataRoute:!0}}):p()}),null)}(p&&p.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Fd([a,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?a:Fd([a,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,n,r);if(t&&m)return V.createElement(Qd.Provider,{value:{location:Hd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ld.Pop}},m);return m}(e,t)}function sf(){let e=function(){var e;let t=V.useContext(Xd),n=function(){let e=V.useContext(Kd);return e||hd(!1),e}(df.UseRouteError),r=ff(df.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},t),n?V.createElement("pre",{style:r},n):null,null)}const lf=V.createElement(sf,null);class af extends V.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?V.createElement(Yd.Provider,{value:this.props.routeContext},V.createElement(Xd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function cf(e){let{routeContext:t,match:n,children:r}=e,o=V.useContext(qd);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),V.createElement(Yd.Provider,{value:t},r)}var uf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uf||{}),df=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(df||{});function ff(e){let t=function(){let e=V.useContext(Yd);return e||hd(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||hd(!1),n.route.id}function hf(e){let{to:t,replace:n,state:r,relative:o}=e;Gd()||hd(!1);let{future:i,static:s}=V.useContext(Jd),{matches:l}=V.useContext(Yd),{pathname:a}=Zd(),c=tf(),u=_d(t,$d(l,i.v7_relativeSplatPath),a,"path"===o),d=JSON.stringify(u);return V.useEffect((()=>c(JSON.parse(d),{replace:n,state:r,relative:o})),[c,d,o,n,r]),null}function pf(e){hd(!1)}function mf(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ld.Pop,navigator:i,static:s=!1,future:l}=e;Gd()&&hd(!1);let a=t.replace(/^\/*/,"/"),c=V.useMemo((()=>({basename:a,navigator:i,static:s,future:Hd({v7_relativeSplatPath:!1},l)})),[a,l,i,s]);"string"==typeof r&&(r=vd(r));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,m=V.useMemo((()=>{let e=Id(u,a);return null==e?null:{location:{pathname:e,search:d,hash:f,state:h,key:p},navigationType:o}}),[a,u,d,f,h,p,o]);return null==m?null:V.createElement(Jd.Provider,{value:c},V.createElement(Qd.Provider,{children:n,value:m}))}function gf(e){let{children:t,location:n}=e;return of(yf(t),n)}function yf(e,t){void 0===t&&(t=[]);let n=[];return V.Children.forEach(e,((e,r)=>{if(!V.isValidElement(e))return;let o=[...t,r];if(e.type===V.Fragment)return void n.push.apply(n,yf(e.props.children,o));e.type!==pf&&hd(!1),e.props.index&&e.props.children&&hd(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=yf(e.props.children,o)),n.push(i)})),n}
53/**
54 * React Router DOM v6.27.0
55 *
56 * Copyright (c) Remix Software Inc.
57 *
58 * This source code is licensed under the MIT license found in the
59 * LICENSE.md file in the root directory of this source tree.
60 *
61 * @license MIT
62 */function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vf.apply(this,arguments)}function bf(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function wf(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Promise((()=>{}));const kf=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],xf=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(tC){}const Sf=V.createContext({isTransitioning:!1}
62),Cf=W.startTransition;function Ef(e){let{basename:t,children:n,future:r,window:o}=e,i=V.useRef();null==i.current&&(i.current=fd({window:o,v5Compat:!0}));let s=i.current,[l,a]=V.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=V.useCallback((e=>{c&&Cf?Cf((()=>a(e))):a(e)}),[a,c]);return V.useLayoutEffect((()=>s.listen(u)),[s,u]),V.createElement(mf,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const Mf="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Of=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nf=V.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:a,to:c,preventScrollReset:u,viewTransition:d}=e,f=bf(e,kf),{basename:h}=V.useContext(Jd),p=!1;if("string"==typeof c&&Of.test(c)&&(n=c,Mf))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=Id(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:p=!0}catch(tC){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;Gd()||hd(!1);let{basename:r,navigator:o}=V.useContext(Jd),{hash:i,pathname:s,search:l}=rf(e,{relative:n}),a=s;return"/"!==r&&(a="/"===s?r:Fd([r,s])),o.createHref({pathname:a,search:l,hash:i})}(c,{relative:o}),g=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}=void 0===t?{}:t,a=tf(),c=Zd(),u=rf(e,{relative:s});return V.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:yd(c)===yd(u);a(e,{replace:n,state:o,preventScrollReset:i,relative:s,viewTransition:l})}}),[c,a,u,r,o,n,e,i,s,l])}(c,{replace:s,state:l,target:a,preventScrollReset:u,relative:o,viewTransition:d});return V.createElement("a",vf({},f,{href:n||m,onClick:p||i?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:a}))})),Tf=V.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:o="",end:i=!1,style:s,to:l,viewTransition:a,children:c}=e,u=bf(e,xf),d=rf(l,{relative:u.relative}),f=Zd(),h=V.useContext(Kd),{navigator:p,basename:m}=V.useContext(Jd),g=null!=h&&function(e,t){void 0===t&&(t={});let n=V.useContext(Sf);null==n&&hd(!1);let{basename:r}=function(){let e=V.useContext(qd);return e||hd(!1),e}(Df.useViewTransitionState),o=rf(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Id(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Id(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=zd(o.pathname,s)||null!=zd(o.pathname,i)}(d)&&!0===a,y=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,v=f.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(v=v.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=Id(b,m)||b);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,x=v===y||!i&&v.startsWith(y)&&"/"===v.charAt(w),S=null!=b&&(b===y||!i&&b.startsWith(y)&&"/"===b.charAt(y.length)),C={isActive:x,isPending:S,isTransitioning:g},E=x?n:void 0;k="function"==typeof o?o(C):[o,x?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let M="function"==typeof s?s(C):s;return V.createElement(Nf,vf({},u,{"aria-current":E,className:k,ref:t,style:M,to:l,viewTransition:a}),"function"==typeof c?c(C):c)}));var Df,Rf,Pf,zf;function Af(e){let t=V.useRef(wf(e)),n=V.useRef(!1),r=Zd(),o=V.useMemo((()=>function(e,t){let n=wf(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))}
vendor: 9,003 bytes, line 62
62)),n}(r.search,n.current?null:t.current)),[r.search]),i=tf(),s=V.useCallback(((e,t)=>{const r=wf("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,s]}(Rf=Df||(Df={})).UseScrollRestoration="useScrollRestoration",Rf.UseSubmit="useSubmit",Rf.UseSubmitFetcher="useSubmitFetcher",Rf.UseFetcher="useFetcher",Rf.useViewTransitionState="useViewTransitionState",(zf=Pf||(Pf={})).UseFetcher="useFetcher",zf.UseFetchers="useFetchers",zf.UseScrollRestoration="useScrollRestoration";const If=["top","right","bottom","left"],Lf=Math.min,$f=Math.max,_f=Math.round,Ff=Math.floor,Bf=e=>({x:e,y:e}),Vf={left:"right",right:"left",bottom:"top",top:"bottom"},jf={start:"end",end:"start"};function Wf(e,t,n){return $f(e,Lf(t,n))}function Uf(e,t){return"function"==typeof e?e(t):e}function Hf(e){return e.split("-")[0]}function qf(e){return e.split("-")[1]}function Kf(e){return"x"===e?"y":"x"}function Jf(e){return"y"===e?"height":"width"}function Qf(e){return["top","bottom"].includes(Hf(e))?"y":"x"}function Yf(e){return Kf(Qf(e))}function Xf(e){return e.replace(/start|end/g,(e=>jf[e]))}function Gf(e){return e.replace(/left|right|bottom|top/g,(e=>Vf[e]))}function Zf(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function eh(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function th(e,t,n){let{reference:r,floating:o}=e;const i=Qf(t),s=Yf(t),l=Jf(s),a=Hf(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let h;switch(a){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(qf(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1)}return h}async function nh(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Uf(t,e),p=Zf(h),m=l[f?"floating"===d?"reference":"floating":d],g=eh(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),y="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=eh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(g.top-w.top+p.top)/b.y,bottom:(w.bottom-g.bottom+p.bottom)/b.y,left:(g.left-w.left+p.left)/b.x,right:(w.right-g.right+p.right)/b.x}}function rh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oh(e){return If.some((t=>e[t]>=0))}function ih(){return"undefined"!=typeof window}function sh(e){return ch(e)?(e.nodeName||"").toLowerCase():"#document"}function lh(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ah(e){var t;return null==(t=(ch(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ch(e){return!!ih()&&(e instanceof Node||e instanceof lh(e).Node)}function uh(e){return!!ih()&&(e instanceof Element||e instanceof lh(e).Element)}function dh(e){return!!ih()&&(e instanceof HTMLElement||e instanceof lh(e).HTMLElement)}function fh(e){return!(!ih()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof lh(e).ShadowRoot)}function hh(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ph(e){return["table","td","th"].includes(sh(e))}function mh(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(tC){return!1}}))}function gh(e){const t=yh(),n=uh(e)?bh(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function yh(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function vh(e){return["html","body","#document"].includes(sh(e))}function bh(e){return lh(e).getComputedStyle(e)}function wh(e){return uh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kh(e){if("html"===sh(e))return e;const t=e.assignedSlot||e.parentNode||fh(e)&&e.host||ah(e);return fh(t)?t.host:t}function xh(e){const t=kh(e);return vh(t)?e.ownerDocument?e.ownerDocument.body:e.body:dh(t)&&hh(t)?t:xh(t)}function Sh(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=xh(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=lh(o);if(i){const e=Ch(s);return t.concat(s,s.visualViewport||[],hh(o)?o:[],e&&n?Sh(e):[])}return t.concat(o,Sh(o,[],n))}function Ch(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Eh(e){const t=bh(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=dh(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=_f(n)!==i||_f(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Mh(e){return uh(e)?e:e.contextElement}function Oh(e){const t=Mh(e);if(!dh(t))return Bf(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Eh(t);let s=(i?_f(n.width):n.width)/r,l=(i?_f(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const Nh=Bf(0);function Th(e){const t=lh(e);return yh()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Nh}function Dh(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Mh(e);let s=Bf(1);t&&(r?uh(r)&&(s=Oh(r)):s=Oh(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==lh(e))&&t}(i,n,r)?Th(i):Bf(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=lh(i),t=r&&uh(r)?lh(r):r;let n=e,o=Ch(n);for(;o&&r&&t!==n;){const e=Oh(o),t=o.getBoundingClientRect(),r=bh(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,n=lh(o),o=Ch(n)}}return eh({width:u,height:d,x:a,y:c})}function Rh(e,t){const n=wh(e).scrollLeft;return t?t.left+n:Dh(ah(e)).left+n}function Ph(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=lh(e),r=ah(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const e=yh();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t)r=function(e){const t=ah(e),n=wh(e),r=e.ownerDocument.body,o=$f(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$f(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rh(e);const l=-n.scrollTop;return"rtl"===bh(r).direction&&(s+=$f(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}(ah(e));else if(uh(t))r=function(e,t){const n=Dh(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=dh(e)?Oh(e):Bf(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Th(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return eh(r)}function zh(e,t){const n=kh(e);return!(n===t||!uh(n)||vh(n))&&("fixed"===bh(n).position||zh(n,t))}function Ah(e,t,n){const r=dh(t),o=ah(t),i="fixed"===n,s=Dh(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=Bf(0);if(r||!r&&!i)if(("body"!==sh(t)||hh(o))&&(l=wh(t)),r){const e=Dh(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Rh(o));let c=0,u=0;if(o&&!r&&!i){const e=o.getBoundingClientRect();u=e.top+l.scrollTop,c=e.left+l.scrollLeft-Rh(o,e)}return{x:s.left+l.scrollLeft-a.x-c,y:s.top+l.scrollTop-a.y-u,width:s.width,height:s.height}}function Ih(e){return"static"===bh(e).position}function Lh(e,t){if(!dh(e)||"fixed"===bh(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ah(e)===n&&(n=n.ownerDocument.body),n}function $h(e,t){const n=lh(e);if(mh(e))return n;if(!dh(e)){let t=kh(e);for(;t&&!vh(t);){if(uh(t)&&!Ih(t))return t;t=kh(t)}return n}let r=Lh(e,t);for(;r&&ph(r)&&Ih(r);)r=Lh(r,t);return r&&vh(r)&&Ih(r)&&!gh(r)?n:r||function(e){let t=kh(e);for(;dh(t)&&!vh(t);){if(gh(t))return t;if(mh(t))return null;t=kh(t)}return null}(e)||n}const _h={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=ah(r),l=!!t&&mh(t.floating);if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=Bf(1);const u=Bf(0),d=dh(r);
vendor: 4,322 bytes, line 62
62if((d||!d&&!i)&&(("body"!==sh(r)||hh(s))&&(a=wh(r)),dh(r))){const e=Dh(r);c=Oh(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:ah,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?mh(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Sh(e,[],!1).filter((e=>uh(e)&&"body"!==sh(e))),o=null;const i="fixed"===bh(e).position;let s=i?kh(e):e;for(;uh(s)&&!vh(s);){const t=bh(s),n=gh(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||hh(s)&&!n&&zh(e,s))?r=r.filter((e=>e!==s)):o=t,s=kh(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],l=i.reduce(((e,n)=>{const r=Ph(t,n,o);return e.top=$f(r.top,e.top),e.right=Lf(r.right,e.right),e.bottom=Lf(r.bottom,e.bottom),e.left=$f(r.left,e.left),e}),Ph(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:$h,getElementRects:async function(e){const t=this.getOffsetParent||$h,n=this.getDimensions,r=await n(e.floating);return{reference:Ah(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Eh(e);return{width:t,height:n}},getScale:Oh,isElement:uh,isRTL:function(e){return"rtl"===bh(e).direction}};function Fh(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=Mh(e),u=o||i?[...c?Sh(c):[],...Sh(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=ah(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const h={rootMargin:-Ff(u)+"px "+-Ff(o.clientWidth-(c+d))+"px "+-Ff(o.clientHeight-(u+f))+"px "+-Ff(c)+"px",threshold:$f(0,Lf(1,a))||1};let p=!0;function m(e){const t=e[0].intersectionRatio;if(t!==a){if(!p)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}p=!1}try{r=new IntersectionObserver(m,{...h,root:o.ownerDocument})}catch(tC){r=new IntersectionObserver(m,h)}r.observe(e)}(!0),i}(c,n):null;let f,h=-1,p=null;s&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!a&&p.observe(c),p.observe(t));let m=a?Dh(e):null;return a&&function t(){const r=Dh(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,a&&cancelAnimationFrame(f)}}const Bh=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Hf(n),l=qf(n),a="y"===Qf(n),c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=Uf(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof p&&(h="end"===l?-1*p:p),a?{x:h*u,y:f*c}:{x:f*c,y:h*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Vh=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=Uf(e,t),c={x:n,y:r},u=await nh(t,a),d=Qf(Hf(o)),f=Kf(d);let h=c[f],p=c[d];if(i){const e="y"===f?"bottom":"right";h=Wf(h+u["y"===f?"top":"left"],h,h-u[e])}if(s){const e="y"===d?"bottom":"right";p=Wf(p+u["y"===d?"top":"left"],p,p-u[e])}const m=l.fn({...t,[f]:h,[d]:p});
vendor: 9,613 bytes, line 62
62return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},jh=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Uf(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Hf(o),v=Qf(l),b=Hf(l)===l,w=await(null==a.isRTL?void 0:a.isRTL(c.floating)),k=f||(b||!m?[Gf(l)]:function(e){const t=Gf(e);return[Xf(e),t,Xf(t)]}(l)),x="none"!==p;!f&&x&&k.push(...function(e,t,n,r){const o=qf(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(Hf(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Xf)))),i}(l,m,p,w));const S=[l,...k],C=await nh(t,g),E=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&E.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=qf(e),o=Yf(e),i=Jf(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Gf(s)),[s,Gf(s)]}(o,s,w);E.push(C[e[0]],C[e[1]])}if(M=[...M,{placement:o,overflows:E}],!E.every((e=>e<=0))){var O,N;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:M},reset:{placement:t}};let n=null==(N=M.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(h){case"bestFit":{var T;const e=null==(T=M.filter((e=>{if(x){const t=Qf(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Wh=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...c}=Uf(e,t),u=await nh(t,c),d=Hf(o),f=qf(o),h="y"===Qf(o),{width:p,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==s.isRTL?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=p-u.left-u.right,w=Lf(m-u[g],v),k=Lf(p-u[y],b),x=!t.middlewareData.shift;let S=w,C=k;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),x&&!f){const e=$f(u.left,0),t=$f(u.right,0),n=$f(u.top,0),r=$f(u.bottom,0);h?C=p-2*(0!==e||0!==t?e+t:$f(u.left,u.right)):S=m-2*(0!==n||0!==r?n+r:$f(u.top,u.bottom))}await a({...t,availableWidth:C,availableHeight:S});const E=await s.getDimensions(l.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Uh=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Uf(e,t);switch(r){case"referenceHidden":{const e=rh(await nh(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:oh(e)}}}case"escaped":{const e=rh(await nh(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:oh(e)}}}default:return{}}}}},Hh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:c,padding:u=0}=Uf(e,t)||{};if(null==c)return{};const d=Zf(u),f={x:n,y:r},h=Yf(o),p=Jf(h),m=await s.getDimensions(c),g="y"===h,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[h]-f[h]-i.floating[p],k=f[h]-i.reference[h],x=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=x?x[b]:0;S&&await(null==s.isElement?void 0:s.isElement(x))||(S=l.floating[b]||i.floating[p]);const C=w/2-k/2,E=S/2-m[p]/2-1,M=Lf(d[y],E),O=Lf(d[v],E),N=M,T=S-m[p]-O,D=S/2-m[p]/2+C,R=Wf(N,D,T),P=!a.arrow&&null!=qf(o)&&D!==R&&i.reference[p]/2-(D<N?M:O)-m[p]/2<0,z=P?D<N?D-N:D-T:0;return{[h]:f[h]+z,data:{[h]:R,centerOffset:D-R-z,...P&&{alignmentOffset:z}},reset:P}}}),qh=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=Uf(e,t),u={x:n,y:r},d=Qf(o),f=Kf(d);let h=u[f],p=u[d];const m=Uf(l,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var y,v;const e="y"===f?"width":"height",t=["top","left"].includes(Hf(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=s.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(v=s.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[f]:h,[d]:p}}}},Kh=(e,t,n)=>{const r=new Map,o={platform:_h,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=th(c,r,a),f=r,h={},p=0;for(let m=0;m<l.length;m++){const{name:n,fn:i}=l[m],{x:g,y:y,data:v,reset:b}=await i({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[n]:{...h[n],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=th(c,f,a))),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Jh="undefined"!=typeof document?V.useLayoutEffect:V.useEffect;function Qh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Qh(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Qh(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Yh(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xh(e,t){const n=Yh(e);return Math.round(t*n)/n}function Gh(e){const t=V.useRef(e);return Jh((()=>{t.current=e})),t}function Zh(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=V.useState(r);Qh(f,r)||h(r);const[p,m]=V.useState(null),[g,y]=V.useState(null),v=V.useCallback((e=>{e!==x.current&&(x.current=e,m(e))}),[]),b=V.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),w=i||p,k=s||g,x=V.useRef(null),S=V.useRef(null),C=V.useRef(u),E=null!=a,M=Gh(a),O=Gh(o),N=Gh(c),T=V.useCallback((()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Kh(x.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};D.current&&!Qh(C.current,t)&&(C.current=t,od.flushSync((()=>{d(t)})))}))}),[f,t,n,O,N]);Jh((()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const D=V.useRef(!1);Jh((()=>(D.current=!0,()=>{D.current=!1})),[]),Jh((()=>{if(w&&(x.current=w),k&&(S.current=k),w&&k){if(M.current)return M.current(w,k,T);T()}}),[w,k,T,M,E]);const R=V.useMemo((()=>({reference:x,floating:S,setReference:v,setFloating:b})),[v,b]),P=V.useMemo((()=>({reference:w,floating:k})),[w,k]),z=V.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Xh(P.floating,u.x),r=Xh(P.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Yh(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,P.floating,u.x,u.y]);return V.useMemo((()=>({...u,update:T,refs:R,elements:P,floatingStyles:z})),[u,T,R,P,z])}const ep=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Hh({element:n.current,padding:r}).fn(t):{}:n?Hh({element:n,padding:r}).fn(t):{};var o}}),tp=(e,t)=>({...Bh(e),options:[e,t]}),np=(e,t)=>({...Vh(e),options:[e,t]}),rp=(e,t)=>({...qh(e),options:[e,t]}),op=(e,t)=>({...jh(e),options:[e,t]}),ip=(e,t)=>({...Wh(e),options:[e,t]}),sp=(e,t)=>({...Uh(e),options:[e,t]}),lp=(e,t)=>({...ep(e),options:[e,t]});var ap={exports:{}},cp={},up=V;var dp="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},fp=up.useState,hp=up.useEffect,pp=up.useLayoutEffect,mp=up.useDebugValue;function gp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dp(e,n)}catch(r){return!0}}var yp="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=fp({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return pp((function(){o.value=n,o.getSnapshot=t,gp(o)&&i({inst:o})}),[e,n,t]),hp((function(){return gp(o)&&i({inst:o}),e((function(){gp(o)&&i({inst:o})}))}),[e]),mp(n),n};cp.useSyncExternalStore=void 0!==up.useSyncExternalStore?up.useSyncExternalStore:yp,ap.exports=cp;var vp=ap.exports;function bp(e){this.content=e}
vendor: 5,910 bytes, line 62
62function wp(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let e=0;o.text[e]==i.text[e];e++)n++;return n}if(o.content.size||i.content.size){let e=wp(o.content,i.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function kp(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=e.child(--o),l=t.child(--i),a=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let e=0,t=Math.min(s.text.length,l.text.length);for(;e<t&&s.text[s.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let e=kp(s.content,l.content,n-1,r-1);if(e)return e}n-=a,r-=a}else n-=a,r-=a}}bp.prototype={constructor:bp,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new bp(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new bp(n)},addToStart:function(e,t){return new bp([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new bp(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new bp(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=bp.from(e)).size?new bp(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=bp.from(e)).size?new bp(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=bp.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},bp.from=function(e){if(e instanceof bp)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new bp(t)};class xp{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,s=0;s<t;i++){let l=this.content[i],a=s+l.nodeSize;if(a>e&&!1!==n(l,r+s,o||null,i)&&l.content.size){let o=s+1;l.nodesBetween(Math.max(0,e-o),Math.min(l.content.size,t-o),n,r+o)}s=a}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,l)=>{let a=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(i?i=!1:o+=n),o+=a}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new xp(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],l=i+s.nodeSize;l>e&&((i<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=l}return new xp(n,r)}cutByIndex(e,t){return e==t?xp.empty:0==e&&t==this.content.length?this:new xp(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new xp(r,o)}addToStart(e){return new xp([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new xp(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return wp(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return kp(this,e,t,n)}findIndex(e){if(0==e)return Cp(0,e);if(e==this.size)return Cp(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e)return r==e?Cp(t+1,r):Cp(t,n);n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return xp.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new xp(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return xp.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new xp(t||e,n)}static from(e){if(!e)return xp.empty;if(e instanceof xp)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new xp([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}xp.empty=new xp([],0);const Sp={index:0,offset:0};function Cp(e,t){return Sp.index=e,Sp.offset=t,Sp}function Ep(e,t){if(e===t)return!0;
vendor: 4,265 bytes, line 62
62if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Ep(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Ep(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}let Mp=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ep(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort(((e,t)=>e.type.rank-t.type.rank)),n}};Mp.none=[];class Op extends Error{}class Np{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Dp(this.content,e+this.openStart,t);return n&&new Np(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Np(Tp(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Np.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Np(xp.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new Np(e,n,r)}}function Tp(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:l}=e.findIndex(n);if(o==t||i.isText){if(l!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(Tp(i.content,t-o-1,n-o-1)))}function Dp(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=Dp(s.content,t-i-1,n,s);return l&&e.replaceChild(o,s.copy(l))}function Rp(e,t,n){if(n.openStart>e.depth)throw new Op("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Op("Inconsistent open depths");return Pp(e,t,n,0)}function Pp(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=Pp(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)r=t.node(o).copy(xp.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return $p(i,_p(e,o,s,t,r))}{let r=e.parent,o=r.content;return $p(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return $p(i,Fp(e,t,r))}function zp(e,t){if(!t.type.compatibleContent(e.type))throw new Op("Cannot join "+t.type.name+" onto "+e.type.n
vendor: 5,032 bytes, line 62
62ame)}function Ap(e,t,n){let r=e.node(n);return zp(r,t.node(n)),r}function Ip(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Lp(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Ip(e.nodeAfter,r),i++));for(let l=i;l<s;l++)Ip(o.child(l),r);t&&t.depth==n&&t.textOffset&&Ip(t.nodeBefore,r)}function $p(e,t){return e.type.checkContent(t),e.copy(t)}function _p(e,t,n,r,o){let i=e.depth>o&&Ap(e,t,o+1),s=r.depth>o&&Ap(n,r,o+1),l=[];return Lp(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(zp(i,s),Ip($p(i,_p(e,t,n,r,o+1)),l)):(i&&Ip($p(i,Fp(e,t,o+1)),l),Lp(t,n,o,l),s&&Ip($p(s,Fp(n,r,o+1)),l)),Lp(r,null,o,l),new xp(l)}function Fp(e,t,n){let r=[];if(Lp(null,e,n,r),e.depth>n){Ip($p(Ap(e,t,n+1),Fp(e,t,n+1)),r)}return Lp(t,null,n,r),new xp(r)}Np.empty=new Np(xp.empty,0,0);class Bp{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let o=0;o<e;o++)r+=n.child(o).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return Mp.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Up(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let i=e;;){let{index:e,offset:t}=i.content.findIndex(o),s=o-t;if(n.push(i,e,r+t),!s)break;if(i=i.child(e),i.isText)break;o=s-1,r+=t+1}return new Bp(t,n,o)}static resolveCached(e,t){let n=Wp.get(e);if(n)for(let o=0;o<n.elts.length;o++){let e=n.elts[o];if(e.pos==t)return e}else Wp.set(e,n=new Vp);let r=n.elts[n.i]=Bp.resolve(e,t);return n.i=(n.i+1)%jp,r}}class Vp{constructor(){this.elts=[],this.i=0}}const jp=12,Wp=new WeakMap;class Up{constructor(e,t,n){this.$from=e,this.$to=t,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 Hp=Object.create(null);let qp=class e{constructor(e,t,n,r=Mp.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||xp.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}
vendor: 22,833 bytes, line 62
62textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Ep(this.attrs,t||e.defaultAttrs||Hp)&&Mp.sameSet(this.marks,n||Mp.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Np.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),l=r.node(i).content.cut(r.pos-s,o.pos-s);return new Np(l,r.depth-i,o.depth-i)}replace(e,t,n){return Rp(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Bp.resolveCached(this,e)}resolveNoCache(e){return Bp.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Jp(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=xp.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Mp.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Mp.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=xp.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,r,n);return o.type.checkAttrs(o.attrs),o}};qp.prototype.text=void 0;class Kp extends qp{constructor(e,t,n,r){if(super(e,t,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):Jp(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Kp(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Kp(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Jp(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Qp{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new Yp(e,t);if(null==n.next)return Qp.empty;let r=Xp(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(rm(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);rm(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new Qp(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(nm);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}}(function(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function i(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(i(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(t,s),o(i(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){let s=t;for(let t=0;t<e.min;t++){let t=n();o(i(e.expr,s),t),s=t}if(-1==e.max)o(i(e.expr,s),s);else for(let t=e.min;t<e.max;t++){let t=n();r(s,t),o(i(e.expr,s),t),s=t}return[r(s)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(e.exprs[r],t);if(r==e.exprs.length-1)return s;o(s,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,s){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return xp.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}Qp.empty=new Qp(!0);class Yp{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Xp(e){let t=[];do{t.push(Gp(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Gp(e){let t=[];do{t.push(Zp(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Zp(e){let t=function(e){if(e.eat("(")){let t=Xp(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let e=n[i];e.isInGroup(t)&&o.push(e)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=tm(e,t)}return t}function em(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function tm(e,t){let n=em(e),r=n;return e.eat(",")&&(r="}"!=e.next?em(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function nm(e,t){return t-e}function rm(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(nm)}function om(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function im(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function sm(e,t,n,r){for(let o in t)if(!(o in e))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in e){let n=e[o];n.validate&&n.validate(t[o])}}function lm(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new cm(e,r,t[r]);return n}let am=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=lm(e,n.attrs),this.defaultAttrs=om(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Qp.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:im(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new qp(this,this.computeAttrs(e),xp.from(t),Mp.setFrom(n))}createChecked(e=null,t,n){return t=xp.from(t),this.checkContent(t),new qp(this,this.computeAttrs(e),t,Mp.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=xp.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(xp.empty,!0);return o?new qp(this,e,t.append(o),Mp.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){sm(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Mp.none:e}static compile(t,n){let r=Object.create(null);t.forEach(((t,o)=>r[t]=new e(t,n,o)));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class cm{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let o=null===n?"null":typeof n;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${o}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class um{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=lm(e,r.attrs),this.excluded=null;let o=om(this.attrs);this.instance=o?new Mp(this,o):null}create(e=null){return!e&&this.instance?this.instance:new Mp(this,im(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new um(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){sm(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class dm{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=bp.from(e.nodes),t.marks=bp.from(e.marks||{}),this.nodes=am.compile(this.spec.nodes,this),this.marks=um.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 e=this.nodes[r],t=e.spec.content||"",o=e.spec.marks;if(e.contentMatch=n[t]||(n[t]=Qp.parse(t,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==o?null:o?fm(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let r in this.marks){let e=this.marks[r],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:fm(this,t.split(" "))}this.nodeFromJSON=e=>qp.fromJSON(this,e),this.markFromJSON=e=>Mp.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof am))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new Kp(n,n.defaultAttrs,e,Mp.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function fm(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class hm{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach((e=>{if(function(e){return null!=e.tag}(e))this.tags.push(e);else if(function(e){return null!=e.style}(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new bm(this,t,!1);return n.addAll(e,Mp.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new bm(this,t,!0);return n.addAll(e,Mp.none,t.from,t.to),Np.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(wm(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let r in e.marks){let t=e.marks[r].spec.parseDOM;t&&t.forEach((e=>{n(e=km(e)),e.mark||e.ignore||e.clearMark||(e.mark=r)}))}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach((e=>{n(e=km(e)),e.node||e.ignore||e.mark||(e.node=r)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new hm(e,hm.schemaRules(e)))}}const pm={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},mm={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},gm={ol:!0,ul:!0};function ym(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class vm{constructor(e,t,n,r,o,i){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=i,this.content=[],this.activeMarks=Mp.none,this.match=o||(4&i?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(xp.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=xp.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(xp.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!pm.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class bm{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,o=t.topNode,i=ym(null,t.preserveWhitespace,0)|(n?4:0);r=o?new vm(o.type,o.attrs,Mp.none,!0,t.topMatch||o.type.contentMatch,i):new vm(n?null:e.schema.topNodeType,null,Mp.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,o=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:i}=this.parser;if("full"===o||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(o)if("full"===o)n=n.replace(/\r\n?/g,"\n");else if(i.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(i.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(i.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(i.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],o=e.previousSibling;(!t||o&&"BR"==o.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(i.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,o=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i,s=e.nodeName.toLowerCase();gm.hasOwnProperty(s)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&gm.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,n));e:if(l?l.ignore:mm.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(pm.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),n=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let i=l&&l.skip?t:this.readStyles(e,t);i&&this.addAll(e,i),n&&this.sync(o),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?i:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let e=this.parser.matchedStyles[r],o=n.getPropertyValue(e);if(o)for(let n;;){let r=this.parser.matchStyle(e,o,this,n);if(!r)break;
vendor: 8,428 bytes, line 62
62if(r.ignore)return null;if(t=r.clearMark?t.filter((e=>!r.clearMark(e))):t.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1!==r.consuming)break;n=r}}return t}addElementByRule(e,t,n,r){let o,i;if(t.node)if(i=this.parser.schema.nodes[t.node],i.isLeaf)this.insertNode(i.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(i,t.attrs||null,n,t.preserveWhitespace);e&&(o=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e,n,!1)));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}o&&this.sync(s)&&this.open--}addAll(e,t,n,r){let o=n||0;for(let i=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i,t);this.findAtPoint(e,o)}findPlace(e,t,n){let r,o;for(let i=this.open,s=0;i>=0;i--){let t=this.nodes[i],l=t.findWrapping(e);if(l&&(!r||r.length>l.length+s)&&(r=l,o=t,!l.length))break;if(t.solid){if(n)break;s+=2}}if(!r)return null;this.sync(o);for(let i=0;i<r.length;i++)t=this.enterInner(r[i],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=Mp.none;for(let o of r.concat(e.marks))(t.type?t.type.allowsMarkType(o.type):xm(o.type,e.type))&&(n=o.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let o=this.findPlace(e.create(t),n,!1);return o&&(o=this.enterInner(e,t,n,!0,r)),o}enterInner(e,t,n,r=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let s=ym(e,o,i.options);4&i.options&&0==i.content.length&&(s|=4);let l=Mp.none;return n=n.filter((t=>!(i.type?i.type.allowsMarkType(t.type):xm(t.type,e))||(l=t.addToSet(l),!1))),this.nodes.push(new vm(e,t,l,r,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,s)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function wm(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function km(e){let t={};for(let n in e)t[n]=e[n];return t}function xm(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class Sm{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Em(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Nm(Em(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Nm(Em(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return Nm(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Sm(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Cm(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Cm(e.marks)}}function Cm(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Em(e){return e.document||window.document}const Mm=new WeakMap;function Om(e){let t=Mm.get(e);return void 0===t&&Mm.set(e,t=function(e){let t=null;function n(e){if(e&&"object"==typeof e)if(Array.isArray(e))if("string"==typeof e[0])t||(t=[]),t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}(e)),t}function Nm(e,t,n,r){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let o,i=t[0];if("string"!=typeof i)throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Om(r))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,l=i.indexOf(" ");l>0&&(n=i.slice(0,l),i=i.slice(l+1));let a=n?e.createElementNS(n,i):e.createElement(i),c=t[1],u=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){u=2;for(let e in c)if(null!=c[e]){let t=e.indexOf(" ");t>0?a.setAttributeNS(e.slice(0,t),e.slice(t+1),c[e]):"style"==e&&a.style?a.style.cssText=c[e]:a.setAttribute(e,c[e])}}for(let d=u;d<t.length;d++){let o=t[d];if(0===o){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:t,contentDOM:i}=Nm(e,o,n,r);if(a.appendChild(t),i){if(s)throw new RangeError("Multiple content holes");s=i}}}return{dom:a,contentDOM:s}}const Tm=Math.pow(2,16);function Dm(e){return 65535&e}class Rm{constructor(e,t,n){this.pos=e,this.delInfo=t,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 Pm{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Pm.empty)return Pm.empty}recover(e){let t=0,n=Dm(e);if(!this.inverted)for(let r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/Tm}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;
vendor: 10,787 bytes, line 62
62for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>e)break;let a=this.ranges[s+o],c=this.ranges[s+i],u=l+a;if(e<=u){let o=l+r+((a?e==l?-1:e==u?1:t:t)<0?0:c);if(n)return o;let i=e==(t<0?l:u)?null:s/3+(e-l)*Tm,d=e==l?2:e==u?1:4;return(t<0?e!=l:e!=u)&&(d|=8),new Rm(o,d,i)}r+=c-a}return n?e+r:new Rm(e+r,0,null)}touches(e,t){let n=0,r=Dm(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let t=this.ranges[s]-(this.inverted?n:0);if(t>e)break;let l=this.ranges[s+o];if(e<=t+l&&s==3*r)return!0;n+=this.ranges[s+i]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),l=i+(this.inverted?0:o),a=this.ranges[r+t],c=this.ranges[r+n];e(s,s+a,l,l+c),o+=c-a}}invert(){return new Pm(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?Pm.empty:new Pm(e<0?[0,-e,0]:[0,0,e])}}Pm.empty=new Pm([]);class zm{constructor(e,t,n=0,r=(e?e.length:0)){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new zm(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new zm;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let o=this.from;o<this.to;o++){let n=this._maps[o].mapResult(e,t);if(null!=n.recover){let t=this.getMirror(o);if(null!=t&&t>o&&t<this.to){o=t,e=this._maps[t].recover(n.recover);continue}}r|=n.delInfo,e=n.pos}return n?e:new Rm(e,r,null)}}const Am=Object.create(null);class Im{getMap(){return Pm.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Am[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Am)throw new RangeError("Duplicate use of step JSON ID "+e);return Am[e]=t,t.prototype.jsonID=e,t}}class Lm{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Lm(e,null)}static fail(e){return new Lm(null,e)}static fromReplace(e,t,n,r){try{return Lm.ok(e.replace(t,n,r))}catch(tC){if(tC instanceof Op)return Lm.fail(tC.message);throw tC}}}function $m(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy($m(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return xp.fromArray(r)}class _m extends Im{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new Np($m(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return Lm.fromReplace(e,this.from,this.to,o)}invert(){return new Fm(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new _m(t.pos,n.pos,this.mark)}merge(e){return e instanceof _m&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new _m(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new _m(t.from,t.to,e.markFromJSON(t.mark))}}Im.jsonID("addMark",_m);class Fm extends Im{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Np($m(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return Lm.fromReplace(e,this.from,this.to,n)}invert(){return new _m(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Fm(t.pos,n.pos,this.mark)}merge(e){return e instanceof Fm&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Fm(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Fm(t.from,t.to,e.markFromJSON(t.mark))}}Im.jsonID("removeMark",Fm);class Bm extends Im{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Lm.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Lm.fromReplace(e,this.pos,this.pos+1,new Np(xp.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new Bm(this.pos,t.marks[n]);return new Bm(this.pos,this.mark)}}return new Vm(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Bm(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Bm(t.pos,e.markFromJSON(t.mark))}}Im.jsonID("addNodeMark",Bm);class Vm extends Im{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Lm.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Lm.fromReplace(e,this.pos,this.pos+1,new Np(xp.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new Bm(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Vm(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Vm(t.pos,e.markFromJSON(t.mark))}}Im.jsonID("removeNodeMark",Vm);class jm extends Im{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Um(e,this.from,this.to)?Lm.fail("Structure replace would overwrite content"):Lm.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Pm([this.from,this.to-this.from,this.slice.size])}invert(e){return new jm(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new jm(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof jm)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?Np.empty:new Np(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new jm(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?Np.empty:new Np(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new jm(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new jm(t.from,t.to,Np.fromJSON(e,t.slice),!!t.structure)}}Im.jsonID("replace",jm);class Wm extends Im{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(Um(e,this.from,this.gapFrom)||Um(e,this.gapTo,this.to)))return Lm.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Lm.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?Lm.fromReplace(e,this.from,this.to,n):Lm.fail("Content does not fit in gap")}getMap(){return new Pm([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Wm(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new Wm(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Wm(t.from,t.to,t.gapFrom,t.gapTo,Np.fromJSON(e,t.slice),t.insert,!!t.structure)}}function Um(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function Hm(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],l=t+1;for(let a=0;a<i.childCount;a++){let t=i.child(a),c=l+t.nodeSize,u=r.matchType(t.type);if(u){r=u;for(let r=0;r<t.marks.length;r++)n.allowsMarkType(t.marks[r].type)||e.step(new Fm(l,c,t.marks[r]));if(o&&t.isText&&"pre"!=n.whitespace){let e,r,o=/\r?\n|\r/g;
vendor: 11,197 bytes, line 62
62for(;e=o.exec(t.text);)r||(r=new Np(xp.from(n.schema.text(" ",n.allowedMarks(t.marks))),0,0)),s.push(new jm(l+e.index,l+e.index+e[0].length,r))}}else s.push(new jm(l,c,Np.empty));l=c}if(!r.validEnd){let t=r.fillBefore(xp.empty,!0);e.replace(l,l,new Np(t,0,0))}for(let a=s.length-1;a>=0;a--)e.step(s[a])}function qm(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Km(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,o=0;;--n){let i=e.$from.node(n),s=e.$from.index(n)+r,l=e.$to.indexAfter(n)-o;if(n<e.depth&&i.canReplace(s,l,t))return n;if(0==n||i.type.spec.isolating||!qm(i,s,l))break;s&&(r=1),l<i.childCount&&(o=1)}return null}function Jm(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let a=r;l&&a<o;a++)l=l.matchType(n.child(a).type);return l&&l.validEnd?s:null}(r,t);return i?o.map(Qm).concat({type:t,attrs:n}).concat(i.map(Qm)):null}function Qm(e){return{type:e,attrs:null}}function Ym(e,t,n,r){t.forEach(((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let o=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}}))}function Xm(e,t,n,r){t.forEach(((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+i);e.replaceWith(o,o+1,t.type.schema.text("\n"))}}))}function Gm(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let e=o.node(c),t=o.index(c);if(e.type.spec.isolating)return!1;let n=e.content.cutByIndex(t,e.childCount),i=r&&r[u+1];i&&(n=n.replaceChild(0,i.type.create(i.attrs)));let s=r&&r[u]||e;if(!e.canReplace(t+1,e.childCount)||!s.type.validContent(n))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function Zm(e,t){let n=e.resolve(t),r=n.index();return eg(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function eg(e,t){return!(!e||!t||e.isLeaf||!function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o<t.childCount;o++){let i=t.child(o),s=i.type==r?e.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n)return!1;if(!e.type.allowsMarks(i.marks))return!1}return n.validEnd}(e,t))}function tg(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let e,i,s=r.index(o);if(o==r.depth?(e=r.nodeBefore,i=r.nodeAfter):n>0?(e=r.node(o+1),s++,i=r.node(o).maybeChild(s)):(e=r.node(o).maybeChild(s-1),i=r.node(o+1)),e&&!e.isTextblock&&eg(e,i)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function ng(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(0==n.openStart&&n.size?2:1);i++)for(let e=r.depth;e>=0;e--){let t=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,n=r.index(e)+(t>0?1:0),s=r.node(e),l=!1;if(1==i)l=s.canReplace(n,n,o);else{let e=s.contentMatchAt(n).findWrapping(o.firstChild.type);l=e&&s.canReplaceWith(n,n,e[0])}if(l)return 0==t?r.pos:t<0?r.before(e+1):r.after(e+1)}return null}function rg(e,t,n=t,r=Np.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return og(o,i,r)?new jm(t,n,r):new ig(o,i,r).fit()}function og(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Im.jsonID("replaceAround",Wm);class ig{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=xp.empty;for(let r=0;r<=e.depth;r++){let t=e.node(r);this.frontier.push({type:t.type,match:t.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=xp.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let l=new Np(o,i,s);return e>-1?new Wm(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new jm(n.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=ag(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let o=e.firstChild;for(let i=this.depth;i>=0;i--){let e,{type:s,match:l}=this.frontier[i],a=null;if(1==t&&(o?l.matchType(o.type)||(a=l.fillBefore(xp.from(o),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:i,parent:r,inject:a};if(2==t&&o&&(e=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:i,parent:r,wrap:e};if(r&&l.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=ag(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new Np(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=ag(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new Np(sg(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new Np(sg(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let p=0;p<o.length;p++)this.openFrontierNode(o[p]);let i=this.unplaced,s=n?n.content:i.content,l=i.openStart-e,a=0,c=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));u=u.matchFragment(r)}let f=s.size+e-(i.content.size-i.openEnd);for(;a<s.childCount;){let e=s.child(a),t=u.matchType(e.type);if(!t)break;a++,(a>1||0==l||e.content.size)&&(u=t,c.push(cg(e.mark(d.allowedMarks(e.marks)),1==a?l:0,a==s.childCount?f:-1)))}let h=a==s.childCount;h||(f=-1),this.placed=lg(this.placed,t,xp.from(c)),this.frontier[t].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 e=m.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),m=e.content}this.unplaced=h?0==e?Np.empty:new Np(sg(i.content,e-1,1),e-1,f<0?i.openEnd:e-1):new Np(sg(i.content,e,a),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!ug(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.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(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=ug(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=ug(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=lg(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=lg(this.placed,this.depth,xp.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(xp.empty,!0);e.childCount&&(this.placed=lg(this.placed,this.frontier.length,e))}}function sg(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(sg(e.firstChild.content,t-1,n)))}function lg(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(lg(e.lastChild.content,t-1,n)))}function ag(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function cg(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,cg(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(xp.empty,!0)))),e.copy(r)}function ug(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?l:null}function dg(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(dg(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(xp.empty,!0))}return e}function fg(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class hg extends Im{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return Lm.fail("No node at attribute step's position");let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return Lm.fromReplace(e,this.pos,this.pos+1,new Np(xp.from(r),0,t.isLeaf?0:1))}getMap(){return Pm.empty}invert(e){return new hg(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new hg(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new hg(t.pos,t.attr,t.value)}}Im.jsonID("attr",hg);class pg extends Im{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return Lm.ok(n)}getMap(){return Pm.empty}invert(e){return new pg(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new pg(t.attr,t.value)}}Im.jsonID("docAttr",pg);
vendor: 15,466 bytes, line 62
62let mg=class extends Error{};mg=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(mg.prototype=Object.create(Error.prototype)).constructor=mg,mg.prototype.name="TransformError";class gg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new zm}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new mg(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=Np.empty){let r=rg(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new Np(xp.from(n),0,0))}delete(e,t){return this.replace(e,t,Np.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(og(o,i,r))return e.step(new jm(t,n,r));let s=fg(o,i);0==s[s.length-1]&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let h=o.depth,p=o.pos-1;h>0;h--,p--){let e=o.node(h).type.spec;if(e.defining||e.definingAsContext||e.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(l),c=[],u=r.openStart;for(let h=r.content,p=0;;p++){let e=h.firstChild;if(c.push(e),p==r.openStart)break;h=e.content}for(let h=u-1;h>=0;h--){let e=c[h],t=(d=e.type).spec.defining||d.spec.definingForContent;if(t&&!e.sameMarkup(o.node(Math.abs(l)-1)))u=h;else if(t||!e.type.isTextblock)break}var d;for(let h=r.openStart;h>=0;h--){let t=(h+u+1)%(r.openStart+1),l=c[t];if(l)for(let c=0;c<s.length;c++){let u=s[(c+a)%s.length],d=!0;u<0&&(d=!1,u=-u);let f=o.node(u-1),h=o.index(u-1);if(f.canReplaceWith(h,h,l.type,l.marks))return e.replace(o.before(u),d?i.after(u):n,new Np(dg(r.content,0,r.openStart,t),t,r.openEnd))}}let f=e.steps.length;for(let h=s.length-1;h>=0&&(e.replace(t,n,r),!(e.steps.length>f));h--){let e=s[h];e<0||(t=o.before(e),n=i.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let o=r.depth-1;o>=0;o--){let e=r.index(o);if(r.node(o).canReplaceWith(e,e,n))return r.before(o+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let e=r.indexAfter(o);if(r.node(o).canReplaceWith(e,e,n))return r.after(o+1);if(e<r.node(o).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new Np(xp.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=fg(r,o);for(let s=0;s<i.length;s++){let t=i[s],n=s==i.length-1;if(n&&0==t||r.node(t).type.contentMatch.validEnd)return e.delete(r.start(t),o.end(t));if(t>0&&(n||r.node(t-1).canReplace(r.index(t-1),o.indexAfter(t-1))))return e.delete(r.before(t),o.after(t))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:i}=t,s=r.before(i+1),l=o.after(i+1),a=s,c=l,u=xp.empty,d=0;for(let p=i,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,u=xp.from(r.node(p).copy(u)),d++):a--;let f=xp.empty,h=0;for(let p=i,m=!1;p>n;p--)m||o.after(p+1)<o.end(p)?(m=!0,f=xp.from(o.node(p).copy(f)),h++):c++;e.step(new Wm(a,c,s,l,new Np(u.append(f),d,h),u.size-d,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(o);e&&!t?r=!1:!e&&t&&(r=!0)}let l=e.steps.length;if(!1===r){let r=e.doc.resolve(t+n);Xm(e,r.node(),r.before(),l)}s.inlineContent&&Hm(e,t+n-1,s,i.node().contentMatchAt(i.index()),null==r);let a=e.mapping.slice(l),c=a.map(t-n);if(e.step(new jm(c,a.map(t+n,-1),Np.empty,!0)),!0===r){let t=e.doc.resolve(c);Ym(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=xp.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let e=n[s].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=xp.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new Wm(o,i,o,i,new Np(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{let s="function"==typeof o?o(t):o;if(t.isTextblock&&!t.hasMarkup(r,s)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){let o=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?o=!1:!e&&t&&(o=!0)}!1===o&&Xm(e,t,n,i),Hm(e,e.mapping.slice(i).map(n,1),r,void 0,null===o);let l=e.mapping.slice(i),a=l.map(n,1),c=l.map(n+t.nodeSize,1);return e.step(new Wm(a,c,a+1,c-1,new Np(xp.from(r.create(s,null,t.marks)),0,0),1,!0)),!0===o&&Ym(e,t,n,i),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return function(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Wm(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Np(xp.from(s),0,0),1,!0))}(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new hg(e,t,n)),this}setDocAttribute(e,t){return this.step(new pg(e,t)),this}addNodeMark(e,t){return this.step(new Bm(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof Mp)t.isInSet(n.marks)&&this.step(new Vm(e,t));else{let r,o=n.marks,i=[];for(;r=t.isInSet(o);)i.push(new Vm(e,r)),o=r.removeFromSet(o);for(let e=i.length-1;e>=0;e--)this.step(i[e])}return this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),i=xp.empty,s=xp.empty;for(let l=o.depth,a=o.depth-n,c=n-1;l>a;l--,c--){i=xp.from(o.node(l).copy(i));let e=r&&r[c];s=xp.from(e?e.type.create(e.attrs,s):o.node(l).copy(s))}e.step(new jm(t,t,new Np(i.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],l=[];e.doc.nodesBetween(t,n,((e,a,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(a,t),d=Math.min(a+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:s.push(o=new Fm(c,d,u[e])));i&&i.to==c?i.to=d:l.push(i=new _m(c,d,r))}})),s.forEach((t=>e.step(t))),l.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;i++;let l=null;if(r instanceof um){let t,n=e.marks;for(;t=r.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(l=[r]):l=e.marks;if(l&&l.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,a=l[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&a.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=i):o.push({style:a,from:Math.max(s,t),to:r,step:i})}}})),o.forEach((t=>e.step(new Fm(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return Hm(this,e,t,n),this}}const yg=Object.create(null);class vg{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new bg(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Np.empty){let n=t.content.lastChild,r=null;for(let s=0;s<t.openEnd;s++)r=n,n=n.lastChild;let o=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:l,$to:a}=i[s],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(a.pos),s?Np.empty:t),0==s&&Tg(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],l=e.mapping.slice(n),a=l.map(i.pos),c=l.map(s.pos);o?e.deleteRange(a,c):(e.replaceRangeWith(a,c,t),Tg(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new xg(e):Ng(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let o=e.depth-1;o>=0;o--){let r=t<0?Ng(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):Ng(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(r)return r}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Mg(e.node(0))}static atStart(e){return Ng(e,e,0,0,1)||new Mg(e)}static atEnd(e){return Ng(e,e,e.content.size,e.childCount,-1)||new Mg(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=yg[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in yg)throw new RangeError("Duplicate use of selection JSON ID "+e);return yg[e]=t,t.prototype.jsonID=e,t}getBookmark(){return xg.between(this.$anchor,this.$head).getBookmark()}}vg.prototype.visible=!0;class bg{constructor(e,t){this.$from=e,this.$to=t}}let wg=!1;function kg(e){wg||e.parent.inlineContent||(wg=!0)}class xg extends vg{constructor(e,t=e){kg(e),kg(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return vg.near(n);let r=e.resolve(t.map(this.anchor));return new xg(r.parent.inlineContent?r:n,n)}replace(e,t=Np.empty){if(super.replace(e,t),t==Np.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof xg&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Sg(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new xg(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=vg.findFrom(t,n,!0)||vg.findFrom(t,-n,!0);if(!e)return vg.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(vg.findFrom(e,-n,!0)||vg.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new xg(e,t)}}vg.jsonID("text",xg);class Sg{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Sg(e.map(this.anchor),e.map(this.head))}resolve(e){return xg.between(e.resolve(this.anchor),e.resolve(this.head))}}class Cg extends vg{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?vg.near(o):new Cg(o)}content(){return new Np(xp.from(this.node),0,0)}eq(e){return e instanceof Cg&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Eg(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Cg(e.resolve(t.anchor))}static create(e,t){return new Cg(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Cg.prototype.visible=!1,vg.jsonID("node",Cg);class Eg{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Sg(n,n):new Eg(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Cg.isSelectable(n)?new Cg(t):vg.near(t)}}class Mg extends vg{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Np.empty){if(t==Np.empty){e.delete(0,e.doc.content.size);let t=vg.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Mg(e)}map(e){return new Mg(e)}eq(e){return e instanceof Mg}getBookmark(){return Og}}vg.jsonID("all",Mg);const Og={map(){return this},resolve:e=>new Mg(e)};function Ng(e,t,n,r,o,i=!1){if(t.inlineContent)return xg.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);if(r.isAtom){if(!i&&Cg.isSelectable(r))return Cg.create(e,n-(o<0?r.nodeSize:0))}else{let t=Ng(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function Tg(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,i=e.steps[r];(i instanceof jm||i instanceof Wm)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(vg.near(e.doc.resolve(o),n)))}class Dg extends gg{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return Mp.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Mp.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(vg.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Rg(e,t){return t&&e?e.bind(t):e}
vendor: 18,538 bytes, line 62
62class Pg{constructor(e,t,n){this.name=e,this.init=Rg(t.init,n),this.apply=Rg(t.apply,n)}}const zg=[new Pg("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Pg("selection",{init:(e,t)=>e.selection||vg.atStart(t.doc),apply:e=>e.selection}),new Pg("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Pg("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class Ag{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=zg.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new Pg(e.key,e.spec.state,e))}))}}class Ig{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let l=r?r[i].n:0,a=r?r[i].state:this,c=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,a,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Ig(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new Dg(this)}static create(e){let t=new Ag(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Ig(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new Ag(this.schema,e.plugins),n=t.fields,r=new Ig(t);for(let o=0;o<n.length;o++){let t=n[o].name;r[t]=this.hasOwnProperty(t)?this[t]:n[o].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new Ag(e.schema,e.plugins),o=new Ig(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=qp.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=vg.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],l=s.spec.state;if(s.key==r.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,i))return void(o[r.name]=l.fromJSON.call(s,e,t[i],o))}o[r.name]=r.init(e,o)}})),o}}function Lg(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=Lg(o,t,{})),n[r]=o}return n}class $g{constructor(e){this.spec=e,this.props={},e.props&&Lg(e.props,this,this.props),this.key=e.key?e.key.key:Fg("plugin")}getState(e){return e[this.key]}}const _g=Object.create(null);function Fg(e){return e in _g?e+"$"+ ++_g[e]:(_g[e]=0,e+"$")}class Bg{constructor(e="key"){this.key=Fg(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}function Vg(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}function jg(e,t,n){let r=t.nodeBefore,o=t.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let i=t.nodeAfter,s=t.pos+1;for(;!i.isTextblock;s++){if(i.type.spec.isolating)return!1;let e=i.firstChild;if(!e)return!1;i=e}let l=rg(e.doc,o,s,Np.empty);if(!l||l.from!=o||l instanceof jm&&l.slice.size>=s-o)return!1;if(n){let t=e.tr.step(l);t.setSelection(xg.create(t.doc,o)),n(t.scrollIntoView())}return!0}function Wg(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function Ug(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Hg(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}function qg(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function Kg(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Jg(e,t,n,r){let o,i,s=t.nodeBefore,l=t.nodeAfter,a=s.type.spec.isolating||l.type.spec.isolating;if(!a&&function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Zm(e.doc,t.pos)||(n&&n(e.tr.join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let c=!a&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(o=(i=s.contentMatchAt(s.childCount)).findWrapping(l.type))&&i.matchType(o[0]||l.type).validEnd){if(n){let r=t.pos+l.nodeSize,i=xp.empty;for(let e=o.length-1;e>=0;e--)i=xp.from(o[e].create(null,i));i=xp.from(s.copy(i));let a=e.tr.step(new Wm(t.pos-1,r,t.pos,r,new Np(i,1,0),o.length,!0)),c=a.doc.resolve(r+2*o.length);c.nodeAfter&&c.nodeAfter.type==s.type&&Zm(a.doc,c.pos)&&a.join(c.pos),n(a.scrollIntoView())}return!0}let u=l.type.spec.isolating||r>0&&a?null:vg.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&Km(d);if(null!=f&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(c&&Wg(l,"start",!0)&&Wg(s,"end")){let r=s,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let i=l,a=1;for(;!i.isTextblock;i=i.firstChild)a++;if(r.canReplace(r.childCount,r.childCount,i.content)){if(n){let r=xp.empty;for(let e=o.length-1;e>=0;e--)r=xp.from(o[e].copy(r));n(e.tr.step(new Wm(t.pos-o.length,t.pos+l.nodeSize,t.pos+a,t.pos+l.nodeSize-a,new Np(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Qg(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(xg.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}const Yg=Qg(-1),Xg=Qg(1);function Gg(e,t=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:r},$to:{pos:s}}=n.selection.ranges[i];n.doc.nodesBetween(r,s,((r,i)=>{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)o=!0;else{let t=n.doc.resolve(i),r=t.index();o=t.parent.canReplaceWith(r,r+1,e)}}))}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[r];o.setBlockType(i,s,e,t)}r(o.scrollIntoView())}return!0}}function Zg(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let l=r?n.tr:null;return!!function(e,t,n,r=null){let o=!1,i=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=s.resolve(t.start-2);i=new Up(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new Up(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let l=Jm(i,n,r,t);if(!l)return!1;e&&function(e,t,n,r,o){let i=xp.empty;for(let u=n.length-1;u>=0;u--)i=xp.from(n[u].type.create(n[u].attrs,i));e.step(new Wm(t.start-(r?2:0),t.end,t.start,t.end,new Np(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let l=n.length-s,a=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,d=t.endIndex,f=!0;u<d;u++,f=!1)!f&&Gm(e.doc,a,l)&&(e.split(a,l),a+=2*l),a+=c.child(u).nodeSize}(e,t,l,o,n);return!0}(l,s,e,t)&&(r&&r(l.scrollIntoView()),!0)}}function ey(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new Wm(i-1,s,i,s,new Np(xp.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Up(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=Km(r);if(null==l)return!1;o.lift(r,l);let a=o.doc.resolve(o.mapping.map(i,-1)-1);Zm(o.doc,a.pos)&&a.nodeBefore.type==a.nodeAfter.type&&o.join(a.pos);return t(o.scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=o.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,a=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?xp.empty:xp.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new Wm(d-(l?1:0),f+(a?1:0),d+1,f-1,new Np((l?xp.empty:xp.from(o.copy(xp.empty))).append(a?xp.empty:xp.from(o.copy(xp.empty))),l?0:1,a?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();const ty=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},ny=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let ry=null;const oy=function(e,t,n){let r=ry||(ry=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},iy=function(e,t,n,r){return n&&(ly(e,t,n,r,-1)||ly(e,t,n,r,1))},sy=/^(img|br|input|textarea|hr)$/i;function ly(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:ay(e))){let n=e.parentNode;if(!n||1!=n.nodeType||cy(e)||sy.test(e.nodeName)||"false"==e.contentEditable)return!1;t=ty(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;{let n=e.childNodes[t+(o<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable){if(!(null===(i=n.pmViewDesc)||void 0===i?void 0:i.ignoreForSelection))return!1;t+=o}else e=n,t=o<0?ay(e):0}}}}function ay(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function cy(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const uy=function(e){return e.focusNode&&iy(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function dy(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const fy="undefined"!=typeof navigator?navigator:null,hy="undefined"!=typeof document?document:null,py=fy&&fy.userAgent||"",my=/Edge\/(\d+)/.exec(py),gy=/MSIE \d/.exec(py),yy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(py),vy=!!(gy||yy||my),by=gy?document.documentMode:yy?+yy[1]:my?+my[1]:0,wy=!vy&&/gecko\/(\d+)/i.test(py);wy&&(/Firefox\/(\d+)/.exec(py)||[0,0])[1];const ky=!vy&&/Chrome\/(\d+)/.exec(py),xy=!!ky,Sy=ky?+ky[1]:0,Cy=!vy&&!!fy&&/Apple Computer/.test(fy.vendor),Ey=Cy&&(/Mobile\/\w+/.test(py)||!!fy&&fy.maxTouchPoints>2),My=Ey||!!fy&&/Mac/.test(fy.platform),Oy=!!fy&&/Win/.test(fy.platform),Ny=/Android \d/.test(py),Ty=!!hy&&"webkitFontSmoothing"in hy.documentElement.style,Dy=Ty?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Ry(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Py(e,t){return"number"==typeof e?e:e[t]}function zy(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Ay(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(1!=s.nodeType){s=ny(s);continue}let e=s,n=e==i.body,l=n?Ry(i):zy(e),a=0,c=0;if(t.top<l.top+Py(r,"top")?c=-(l.top-t.top+Py(o,"top")):t.bottom>l.bottom-Py(r,"bottom")&&(c=t.bottom-t.top>l.bottom-l.top?t.top+Py(o,"top")-l.top:t.bottom-l.bottom+Py(o,"bottom")),t.left<l.left+Py(r,"left")?a=-(l.left-t.left+Py(o,"left")):t.right>l.right-Py(r,"right")&&(a=t.right-l.right+Py(o,"right")),a||c)if(n)i.defaultView.scrollBy(a,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),a&&(e.scrollLeft+=a);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}let u=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(u))break;s="absolute"==u?s.offsetParent:ny(s)}}function Iy(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=ny(r));return t}function Ly(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let $y=null;function _y(e,t){let n,r,o,i,s=2e8,l=0,a=t.top,c=t.top;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(1==u.nodeType)e=u.getClientRects();else{if(3!=u.nodeType)continue;e=oy(u).getClientRects()}for(let f=0;f<e.length;f++){let h=e[f];if(h.top<=a&&h.bottom>=c){a=Math.max(h.bottom,a),c=Math.min(h.top,c);let e=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(e<s){n=u,s=e,r=e&&3==n.nodeType?{left:h.right<t.left?h.right:h.left,top:t.top}:t,1==u.nodeType&&e&&(l=d+(t.left>=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!o&&h.left<=t.left&&h.right>=t.left&&(o=u,i={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(l=d+1)}}return!n&&o&&(n=o,r=i,s=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=Wy(r,1);if(n.top!=n.bottom&&Fy(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:e,offset:l}:_y(n,r)}function Fy(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function By(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(Fy(t,o))return By(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function Vy(e,t){let n,r=e.dom.ownerDocument,o=0,i=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(ay(r.offsetNode),r.offset)}}catch(r){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(ay(r.startContainer),r.startOffset)}}}(r,t.left,t.top);i&&({node:n,offset:o}=i);let s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!Fy(t,n))return null;if(l=By(e.dom,t,n),!l)return null}if(Cy)for(let c=l;n&&c;c=ny(c))c.draggable&&(n=void 0);if(l=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(wy&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}let r;Ty&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let t,n=e.docView.nearestDesc(i,!0);if(!n)return null;if(1==n.dom.nodeType&&(n.node.isBlock&&n.parent||!n.contentDOM)&&((t=n.dom.getBoundingClientRect()).width||t.height)&&(n.node.isBlock&&n.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(n.dom.nodeName)&&(!s&&t.left>r.left||t.top>r.top?o=n.posBefore:(!s&&t.right<r.left||t.bottom<r.top)&&(o=n.posAfter),s=!0),!n.contentDOM&&o<0&&!n.node.isText))return(n.node.isBlock?r.top<(t.top+t.bottom)/2:r.left<(t.left+t.right)/2)?n.posBefore:n.posAfter;i=n.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,n,o,t))}null==s&&(s=function(e,t,n){let{node:r,offset:o}=_y(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,l,t));let a=e.docView.nearestDesc(l,!0);return{pos:s,inside:a?a.posAtStart-a.border:-1}}function jy(e){return e.top<e.bottom||e.left<e.right}function Wy(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(jy(e))return e}return Array.prototype.find.call(n,jy)||e.getBoundingClientRect()}const Uy=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Hy(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),s=Ty||wy;if(3==r.nodeType){if(!s||!Uy.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,qy(Wy(oy(r,e,t),i),i<0)}{let e=Wy(oy(r,o,o),n);if(wy&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=Wy(oy(r,o-1,o-1),-1);if(t.top==e.top){let n=Wy(oy(r,o,o+1),-1);if(n.top!=e.top)return qy(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==ay(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return Ky(e.getBoundingClientRect(),!1)}if(null==i&&o<ay(r)){let e=r.childNodes[o];if(1==e.nodeType)return Ky(e.getBoundingClientRect(),!0)}return Ky(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==ay(r))){let e=r.childNodes[o-1],t=3==e.nodeType?oy(e,ay(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return qy(Wy(t,1),!1)}if(null==i&&o<ay(r)){let e=r.childNodes[o];for(;
vendor: 16,355 bytes, line 62
62e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?oy(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return qy(Wy(t,-1),!0)}return qy(Wy(3==r.nodeType?oy(r):r,-n),n>=0)}function qy(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Ky(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Jy(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const Qy=/[\u0590-\u08ac]/;let Yy=null,Xy=null,Gy=!1;function Zy(e,t,n){return Yy==t&&Xy==n?Gy:(Yy=t,Xy=n,Gy="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return Jy(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=Hy(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=oy(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=e.domSelection();return l?Qy.test(r.parent.textContent)&&l.modify?Jy(e,t,(()=>{let{focusNode:t,focusOffset:o,anchorNode:i,anchorOffset:s}=e.domSelectionRange(),a=l.caretBidiLevel;l.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&o==d;try{l.collapse(i,s),t&&(t!=i||o!=s)&&l.extend&&l.extend(t,o)}catch(h){}return null!=a&&(l.caretBidiLevel=a),f})):"left"==n||"backward"==n?i:s:r.pos==r.start()||r.pos==r.end()}(e,t,n))}class ev{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)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(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.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(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>ty(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let o=0;n<this.children.length;n++){let t=this.children[n],i=o+t.size;if(i>e||t instanceof lv){r=e-o;break}o=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let o;n&&!(o=this.children[n-1]).size&&o instanceof tv&&o.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?ty(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?ty(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,s=0;;s++){let n=this.children[s],l=i+n.size;if(-1==r&&e<=l){let o=i+n.border;if(e>=o&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=ty(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||s==this.children.length-1)){t=l;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=ty(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let s=this.children[h],l=p+s.size;if(o>p&&i<l)return s.setSelection(e-p-s.border,t-p-s.border,n,r);p=l}let s=this.domFromPos(e,e?-1:1),l=t==e?s:this.domFromPos(t,t?-1:1),a=n.root.getSelection(),c=n.domSelectionRange(),u=!1;if((wy||Cy)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if(u=!(!t||"\n"!=e.nodeValue[t-1]),u&&t==e.nodeValue.length)for(let n,r=e;r;r=r.parentNode){if(n=r.nextSibling){"BR"==n.nodeName&&(s=l={node:n.parentNode,offset:ty(n)+1});break}let e=r.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(wy&&c.focusNode&&c.focusNode!=l.node&&1==c.focusNode.nodeType){let e=c.focusNode.childNodes[c.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||u&&Cy)&&iy(s.node,s.offset,c.anchorNode,c.anchorOffset)&&iy(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((a.extend||e==t)&&(!u||!wy)){a.collapse(s.node,s.offset);try{e!=t&&a.extend(l.node,l.offset),d=!0}catch(f){}}if(!d){if(e>t){let e=s;s=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(s.node,s.offset),a.removeAllRanges(),a.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,s=i-o.border;if(e>=r&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class tv extends ev{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class nv extends ev{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class rv extends ev{constructor(e,t,n,r,o){super(e,[],n,r),this.mark=t,this.spec=o}static create(e,t,n,r){let o=r.nodeViews[t.type.name],i=o&&o(t,r,n);return i&&i.dom||(i=Sm.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new rv(e,t,i.dom,i.contentDOM||i.dom,i)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=rv.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;t<i&&(o=wv(o,t,i,n)),e>0&&(o=wv(o,0,e,n));for(let s=0;s<o.length;s++)o[s].parent=r;return r.children=o,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ov extends ev{constructor(e,t,n,r,o,i,s,l,a){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(e,t,n,r,o,i){let s,l=o.nodeViews[t.type.name],a=l&&l(t,o,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:i),n,r),c=a&&a.dom,u=a&&a.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){let e=Sm.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:c,contentDOM:u}=e)}u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=mv(c,n,t),a?s=new av(e,t,n,r,c,u||null,d,a,o,i+1):t.isText?new sv(e,t,n,r,c,d,o):new ov(e,t,n,r,c,u||null,d,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>xp.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&gv(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,i=o&&o.pos>-1?o:null,s=o&&o.pos<0,l=new vv(this,i&&i.node,e);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,o,t.forChild(i,s),n),i+=s.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let u,d,f,h;for(;s<o.length&&o[s].to==i;){let e=o[s++];e.widget&&(u?(d||(d=[u])).push(e):u=e)}if(u)if(d){d.sort(bv);for(let e=0;e<d.length;e++)n(d[e],c,!!a)}else n(u,c,!!a);if(a)h=-1,f=a,a=null;else{if(!(c<e.childCount))break;h=c,f=e.child(c++)}for(let e=0;e<l.length;e++)l[e].to<=i&&l.splice(e--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let p=i+f.nodeSize;if(f.isText){let e=p;s<o.length&&o[s].from<e&&(e=o[s].from);for(let t=0;t<l.length;t++)l[t].to<e&&(e=l[t].to);e<p&&(a=f.cut(e-i),f=f.cut(0,e-i),p=e,h=-1)}else for(;s<o.length&&o[s].to<p;)s++;r(f,f.isInline&&!f.isLeaf?l.filter((e=>!e.inline)):l.slice(),t.forChild(i,f),h),i=p}}(this.node,this.innerDeco,((t,o,i)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!i&&l.syncToMarks(o==this.node.childCount?Mp.none:this.node.child(o).marks,n,e),l.placeWidget(t,e,r)}),((t,i,a,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,i,a,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(t,i,a,u,e)||l.updateNextNode(t,i,a,e,c,r)||l.addNode(t,i,a,e,r),r+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(i&&this.protectLocalComposition(e,i),cv(this.contentDOM,this.children,e),Ey&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof xg)||n<t||r>t+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,i=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let s=e.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;a+=t.text}if(i>=n){if(i>=r&&a.slice(r-t.length-l,r-l)==t)return r-t.length;let e=l<r?a.lastIndexOf(t,r-l-1):-1;if(e>=0&&e+t.length+l>=n)return l+e;if(n==r&&a.length>=r+t.length-l&&a.slice(r-l,r-l+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new nv(this,o,t,r);e.input.compositionNodes.push(i),this.children=wv(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(gv(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=hv(this.dom,this.nodeDOM,fv(this.outerDeco,this.node,t),fv(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function iv(e,t,n,r,o){mv(r,t,e);let i=new ov(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class sv extends ov{constructor(e,t,n,r,o,i,s){super(e,t,n,r,o,null,i,s,0
vendor: 5,539 bytes, line 62
62)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new sv(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class lv extends ev{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class av extends ov{constructor(e,t,n,r,o,i,s,l,a,c){super(e,t,n,r,o,i,s,a,c),this.spec=l}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function cv(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let s=t[i],l=s.dom;if(l.parentNode==e){for(;l!=r;)r=yv(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(l,r);if(s instanceof rv){let t=r?r.previousSibling:e.lastChild;cv(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=yv(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const uv=function(e){e&&(this.nodeName=e)};uv.prototype=Object.create(null);const dv=[new uv];function fv(e,t,n){if(0==e.length)return dv;let r=n?dv[0]:new uv,o=[r];for(let i=0;i<e.length;i++){let s=e[i].type.attrs;if(s){s.nodeName&&o.push(r=new uv(s.nodeName));for(let e in s){let i=s[e];null!=i&&(n&&1==o.length&&o.push(r=new uv(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function hv(e,t,n,r){if(n==dv&&r==dv)return t;let o=t;for(let i=0;i<r.length;i++){let t=r[i],s=n[i];if(i){let n;s&&s.nodeName==t.nodeName&&o!=e&&(n=o.parentNode)&&n.nodeName.toLowerCase()==t.nodeName||(n=document.createElement(t.nodeName),n.pmIsDeco=!0,n.appendChild(o),s=dv[0]),o=n}pv(o,s||dv[0],t)}return o}function pv(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function mv(e,t,n){return hv(e,e,dv,fv(t,n,1!=e.nodeType))}function gv(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function yv(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class vv{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,s=[];e:for(;o>0;){let l;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof rv)){l=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];
vendor: 5,425 bytes, line 62
62else{let r=rv.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let r=this.top.children[s];if(r.matchesNode(e,t,n)&&!this.preMatch.matched.has(r)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o,i){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof ov){let a=this.preMatch.matched.get(l);if(null!=a&&a!=o)return!1;let c,u=l.dom,d=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&3!=l.dirty&&gv(t,l.outerDeco));if(!d&&l.update(e,t,n,r))return this.destroyBetween(this.index,s),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(c=this.recreateWrapper(l,e,t,n,r,i)))return this.destroyBetween(this.index,s),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,i+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!gv(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let s=ov.create(this.top,t,n,r,o,i);if(s.contentDOM){s.children=e.children,e.children=[];for(let e of s.children)e.parent=s}return e.destroy(),s}addNode(e,t,n,r,o){let i=ov.create(this.top,e,t,n,r,o);i.contentDOM&&i.updateChildren(r,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new tv(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof rv;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof sv)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Cy||xy)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new lv(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function bv(e,t){return e.type.side-t.type.side}function wv(e,t,n,r,o){let i=[];for(let s=0,l=0;s<e.length;s++){let a=e[s],c=l,u=l+=a.size;c>=n||u<=t?i.push(a):(c<t&&i.push(a.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(a.slice(n-c,a.size,r)))}return i}function kv(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l,a,c=r.resolve(s);if(uy(n)){for(l=s;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&Cg.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==ay(e);r||o;){if(e==n)return!0;let t=ty(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==ay(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;a=new Cg(s==e?c:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=s,o=s;for(let r=0;r<n.rangeCount;r++){let i=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(i.startContainer,i.startOffset,1)),o=Math.max(o,e.docView.posFromDOM(i.endContainer,i.endOffset,-1))}if(t<0)return null;[l,s]=o==e.state.selection.anchor?[o,t]:[t,o],c=r.resolve(s)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!a){a=Dv(e,u,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1)}return a}function xv(e){return e.editable?e.hasFocus():Pv(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Sv(e,t=!1){let n=e.state.selection;if(Nv(e,n),xv(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&xy){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&iy(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r="IMG"==n.nodeName;r?t.collapse(n.parentNode,ty(n)+1):t.collapse(n,0);!r&&!e.state.selection.visible&&vy&&by<=11&&(n.disabled=!0,n.disabled=!1)}(e);else{let r,o,{anchor:i,head:s}=n;!Cv||n instanceof xg||(n.$from.parent.inlineContent||(r=Ev(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=Ev(e,n.to))
vendor: 54,674 bytes, line 62
62),e.docView.setSelection(i,s,e,t),Cv&&(r&&Ov(r),o&&Ov(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{xv(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Cv=Cy||xy&&Sy<63;function Ev(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Cy&&o&&"false"==o.contentEditable)return Mv(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Mv(o);if(i)return Mv(i)}}function Mv(e){return e.contentEditable="true",Cy&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ov(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Nv(e,t){if(t instanceof Cg){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Tv(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Tv(e)}function Tv(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Dv(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||xg.between(t,n,r)}function Rv(e){return!(e.editable&&!e.hasFocus())&&Pv(e)}function Pv(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function zv(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&vg.findFrom(i,t)}function Av(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Iv(e,t,n){let r=e.state.selection;if(!(r instanceof xg)){if(r instanceof Cg&&r.node.isInline)return Av(e,new xg(t>0?r.$to:r.$from));{let n=zv(e.state,t);return!!n&&Av(e,n)}}if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let i=e.state.doc.resolve(n.pos+o.nodeSize*(t<0?-1:1));return Av(e,new xg(r.$anchor,i))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=zv(e.state,t);return!!(n&&n instanceof Cg)&&Av(e,n)}if(!(My&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Cg.isSelectable(i)?Av(e,new Cg(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):!!Ty&&Av(e,new xg(e.state.doc.resolve(t<0?s:s+i.nodeSize))))}}function Lv(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function $v(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function _v(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;wy&&1==n.nodeType&&r<Lv(n)&&$v(n.childNodes[r],-1)&&(s=!0);for(;;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if($v(e,-1))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Fv(n))break;{let t=n.previousSibling;for(;t&&$v(t,-1);)o=n.parentNode,i=ty(t),t=t.previousSibling;if(t)n=t,r=Lv(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Bv(e,n,r):o&&Bv(e,o,i)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=Lv(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!$v(n.childNodes[r],1))break;o=n,i=++r}else{if(Fv(n))break;{let t=n.nextSibling;for(;t&&$v(t,1);)o=t.parentNode,i=ty(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=Lv(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}o&&Bv(e,o,i)}(e)}function Fv(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Bv(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!cy(e);)t=ty(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!cy(e);)t=ty(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(uy(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&Sv(e)}),50)}function Vv(e,t){let n=e.state.doc.resolve(t);if(!xy&&!Oy&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function jv(e,t,n){let r=e.state.selection;if(r instanceof xg&&!r.empty||n.indexOf("s")>-1)return!1;if(My&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=zv(e.state,t);if(n&&n instanceof Cg)return Av(e,n)}if(!o.parent.inlineContent){let n=t<0?o:i,s=r instanceof Mg?vg.near(n,t):vg.findFrom(n,t);return!!s&&Av(e,s)}return!1}function Wv(e,t){if(!(e.state.selection instanceof xg))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=e.state.tr;return t<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),e.dispatch(r),!0}return!1}function Uv(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Hv(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);if(8==n||My&&72==n&&"c"==r)return Wv(e,-1)||_v(e,-1);if(46==n&&!t.shiftKey||My&&68==n&&"c"==r)return Wv(e,1)||_v(e,1);if(13==n||27==n)return!0;if(37==n||My&&66==n&&"c"==r){let t=37==n?"ltr"==Vv(e,e.state.selection.from)?-1:1:-1;return Iv(e,t,r)||_v(e,t)}if(39==n||My&&70==n&&"c"==r){let t=39==n?"ltr"==Vv(e,e.state.selection.from)?1:-1:1;return Iv(e,t,r)||_v(e,t)}return 38==n||My&&80==n&&"c"==r?jv(e,-1,r)||_v(e,-1):40==n||My&&78==n&&"c"==r?function(e){if(!Cy||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Uv(e,n,"true"),setTimeout((()=>Uv(e,n,"false")),20)}return!1}(e)||jv(e,1,r)||_v(e,1):r==(My?"m":"c")&&(66==n||73==n||89==n||90==n)}function qv(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Sm.fromSchema(e.state.schema),l=nb(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c,u=a.firstChild,d=0;for(;u&&1==u.nodeType&&(c=eb[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=l.createElement(c[e]);for(;a.firstChild;)t.appendChild(a.firstChild);a.appendChild(t),d++}u=a.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:a,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function Kv(e,t,n,r,o){let i,s,l=o.parent.type.spec.code;if(!n&&!t)return null;let a=!!t&&(r||l||!n);if(a){if(e.someProp("transformPastedText",(n=>{t=n(t,l||r,e)})),l)return s=new Np(xp.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0),e.someProp("transformPasted",(t=>{s=t(s,e,!0)})),s;let n=e.someProp("clipboardTextParser",(n=>n(t,o,r,e)));if(n)s=n;else{let n=o.marks(),{schema:r}=e.state,s=Sm.fromSchema(r);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),i=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=nb().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&eb[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=function(e){let t=window.trustedTypes;if(!t)return e;rb||(rb=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:e=>e}));return rb.createHTML(e)}(e),n)for(let i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Ty&&function(e){let t=e.querySelectorAll(xy?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);let c=i&&i.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 e=i.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;i=e}if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||hm.fromSchema(e.state.schema);s=t.parseSlice(i,{preserveWhitespace:!(!a&&!u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Jv.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(tC){return e}let{content:o,openStart:i,openEnd:s}=e;for(let l=n.length-2;l>=0;l-=2){let e=r.nodes[n[l]];if(!e||e.hasRequiredAttrs())break;o=xp.from(e.create(n[l+1],o)),i++,s++}return new Np(o,i,s)}(Zv(s,+u[1],+u[2]),u[4]);else if(s=Np.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),i=[];if(e.forEach((e=>{if(!i)return;let t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&Yv(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Xv(i[i.length-1],r.length));let t=Qv(e,n);i.push(t),o=o.matchType(t.type),r=n}})),i)return xp.from(i)}return e}(s.content,o),!0),s.openStart||s.openEnd){let e=0,t=0;for(let n=s.content.firstChild;e<s.openStart&&!n.type.spec.isolating;e++,n=n.firstChild);for(let n=s.content.lastChild;t<s.openEnd&&!n.type.spec.isolating;t++,n=n.lastChild);s=Zv(s,e,t)}return e.someProp("transformPasted",(t=>{s=t(s,e,a)})),s}const Jv=/^(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 Qv(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,xp.from(e));return e}function Yv(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=Yv(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(xp.from(Qv(n,e,o+1))))}}function Xv(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,Xv(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(xp.empty,!0);return e.copy(n.append(r))}function Gv(e,t,n,r,o,i){let s=t<0?e.firstChild:e.lastChild,l=s.content;return e.childCount>1&&(i=0),o<r-1&&(l=Gv(l,t,n,r,o+1,i)),o>=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(xp.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function Zv(e,t,n){return t<e.openStart&&(e=new Np(Gv(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Np(Gv(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const eb={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 tb=null;function nb(){return tb||(tb=document.implementation.createHTMLDocument("title"))}let rb=null;const ob={},ib={},sb={touchstart:!0,touchmove:!0};class lb{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ab(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function cb(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>ub(e,t))}))}function ub(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function db(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function fb(e){return{left:e.clientX,top:e.clientY}}function hb(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,(t=>s>i.depth?t(e,n,i.nodeAfter,i.before(s),o,!0):t(e,n,i.node(s),i.before(s),o,!1))))return!0;return!1}function pb(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function mb(e,t,n,r,o){return hb(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof Cg&&(n=o.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let e=s>i.depth?i.nodeAfter:i.node(s);if(Cg.isSelectable(e)){r=n&&o.$from.depth>0&&s>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(s);break}}return null!=r&&(pb(e,Cg.create(e.state.doc,r)),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Cg.isSelectable(r))&&(pb(e,new Cg(n)),!0)}(e,n))}function gb(e,t,n,r){return hb(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function yb(e,t,n,r){return hb(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(pb(e,xg.create(r,0,r.content.size)),!0);let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let t=i>o.depth?o.nodeAfter:o.node(i),n=o.before(i);if(t.inlineContent)pb(e,xg.create(r,n+1,n+1+t.content.size));else{if(!Cg.isSelectable(t))continue;pb(e,Cg.create(r,n))}return!0}}(e,n,r)}function vb(e){return Mb(e)}ib.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!kb(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Ny||!xy||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ey||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||Hv(e,n)?n.preventDefault():ab(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,dy(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},ib.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},ib.keypress=(e,t)=>{let n=t;if(kb(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||My&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof xg&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(t).scrollIntoView();/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t,o)))||e.dispatch(o()),n.preventDefault()}};const bb=My?"metaKey":"ctrlKey";ob.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=vb(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[bb]&&e.input.lastClick.button==n.button&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(fb(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new wb(e,s,n,!!r)):("doubleClick"==i?gb:yb)(e,s.pos,s.inside,n)?n.preventDefault():ab(e,"pointer"))};class wb{constructor(e,t,n,r){let o,i;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[bb],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,i=n.depth?n.before():0}const s=r?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&1==l.nodeDOM.nodeType?l.nodeDOM:null;let{selection:a}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||a instanceof Cg&&a.from<=i&&a.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!wy||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ab(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Sv(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(fb(e))),this.updateAllowDefault(e),this.allowDefault||!t?ab(this.view,"pointer"):mb(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Cy&&this.mightDrag&&!this.mightDrag.node.isAtom||xy&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(pb(this.view,vg.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):ab(this.view,"pointer")}move(e){this.updateAllowDefault(e),ab(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function kb(e,t){return!!e.composing||!!(Cy&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ob.touchstart=e=>{e.input.lastTouch=Date.now(),vb(e),ab(e,"pointer")},ob.touchmove=e=>{e.input.lastTouch=Date.now(),ab(e,"pointer")},ob.contextmenu=e=>vb(e);const xb=Ny?5e3:-1;function Sb(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Mb(e)),t))}function Cb(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Eb(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=ay(e=e.childNodes[t-1])}else{if(!e.parentNode||cy(e))return null;t=ty(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||cy(e))return null;t=ty(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n||r}function Mb(e,t=!1){if(!(Ny&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Cb(e),t||e.docView&&e.docView.dirty){let n=kv(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):!e.markCursor&&!t||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.updateState(e.state):e.dispatch(e.state.tr.deleteSelection()),!0}return!1}}ib.compositionstart=ib.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof xg&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),Mb(e,!0),e.markCursor=null;else if(Mb(e,!t.selection.empty),wy&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}Sb(e,xb)},ib.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then((()=>e.domObserver.flush())),e.input.compositionID++,Sb(e,20))};const Ob=vy&&by<15||Ey&&Dy<604;function Nb(e,t,n,r,o){let i=Kv(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,o,i||Np.empty))))return!0;if(!i)return!1;let s=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),l=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Tb(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ob.copy=ib.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=Ob?null:n.clipboardData,s=r.content(),{dom:l,text:a}=qv(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ib.paste=(e,t)=>{let n=t;if(e.composing&&!Ny)return;let r=Ob?null:n.clipboardData,o=e.input.shiftKey&&45!=e.input.lastKeyCode;r&&Nb(e,Tb(r),r.getData("text/html"),o,n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Nb(e,r.value,null,o,t):Nb(e,r.textContent,r.innerHTML,o,t)}),50)}(e,n)};class Db{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const Rb=My?"altKey":"ctrlKey";function Pb(e,t){let n=e.someProp("dragCopies",(e=>!e(t)));return null!=n?n:!t[Rb]}ob.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o,i=e.state.selection,s=i.empty?null:e.posAtCoords(fb(n));if(s&&s.pos>=i.from&&s.pos<=(i instanceof Cg?i.to-1:i.to));else if(r&&r.mightDrag)o=Cg.create(e.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=Cg.create(e.state.doc,t.posBefore))}let l=(o||e.state.selection).content(),{dom:a,text:c,slice:u}=qv(e,l);(!n.dataTransfer.files.length||!xy||Sy>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ob?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ob||n.dataTransfer.setData("text/plain",c),e.dragging=new Db(u,Pb(e,n),o)},ob.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},ib.dragover=ib.dragenter=(e,t)=>t.preventDefault(),ib.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(fb(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",(t=>{s=t(s,e,!1)})):s=Kv(e,Tb(n.dataTransfer),Ob?null:n.dataTransfer.getData("text/html"),!1,i);let l=!(!r||!Pb(e,n));if(e.someProp("handleDrop",(t=>t(e,n,s||Np.empty,l))))return void n.preventDefault();if(!s)return;n.preventDefault();let a=s?ng(e.state.doc,i.pos,s):i.pos;null==a&&(a=i.pos);let c=e.state.tr;if(l){let{node:e}=r;e?e.replace(c):c.deleteSelection()}let u=c.mapping.map(a),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&&Cg.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Cg(h));else{let t=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(Dv(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},ob.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Sv(e)}),20))},ob.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ob.beforeinput=(e,t)=>{if(xy&&Ny&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,dy(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in ib)ob[os]=ib[os];function zb(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Ab{constructor(e,t){this.toDOM=e,this.spec=t||Fb,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new $b(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Ab&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&zb(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ib{constructor(e,t){this.attrs=e,this.spec=t||Fb}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new $b(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Ib&&zb(this.attrs,e.attrs)&&zb(this.spec,e.spec)}static is(e){return e.type instanceof Ib}destroy(){}}class Lb{constructor(e,t){this.attrs=e,this.spec=t||Fb}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new $b(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof Lb&&zb(this.attrs,e.attrs)&&zb(this.spec,e.spec)}destroy(){}}class $b{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new $b(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new $b(e,e,new Ab(t,n))}static inline(e,t,n,r){return new $b(e,t,new Ib(n,r))}static node(e,t,n,r){return new $b(e,t,new Lb(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ib}get widget(){return this.type instanceof Ab}}const _b=[],Fb={};class Bb{constructor(e,t){this.local=e.length?e:_b,this.children=t.length?t:_b}static create(e,t){return t.length?qb(t,e,0,Fb):Vb}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==Vb||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Fb)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,n,r);l&&l.type.valid(t,l)?(i||(i=[])).push(l):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let l=e.slice();for(let c=0,u=i;c<n.maps.length;c++){let e=0;n.maps[c].forEach(((t,n,r,o)=>{let i=o-r-(n-t);for(let s=0;s<l.length;s+=3){let r=l[s+1];if(r<0||t>r+u-e)continue;let o=l[s]+u-e;n>=o?l[s+1]=t<=o?-2:-1:t>=u&&i&&(l[s]+=i,l[s+1]+=i)}e+=i})),u=n.maps[c].map(u,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(-2==l[c+1]){a=!0,l[c+1]=-1;continue}let t=n.map(e[c]+i),u=t-o;if(u<0||u>=r.content.size){a=!0;continue}let d=n.map(e[c+1]+i,-1)-o,{index:f,offset:h}=r.content.findIndex(u),p=r.maybeChild(f);if(p&&h==u&&h+p.nodeSize==d){let r=l[c+2].mapInner(n,p,t+1,e[c]+i+1,s);r!=Vb?(l[c]=u,l[c+1]=d,l[c+2]=r):(l[c+1]=-2,a=!0)}else a=!0}if(a){let a=function(e,t,n,r,o,i,s){function l(e,t){for(let i=0;i<e.local.length;i++){let l=e.local[i].map(r,o,t);l?n.push(l):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)l(e.children[n+2],e.children[n]+t+1)}for(let a=0;a<e.length;a+=3)-1==e[a+1]&&l(e[a+2],t[a]+i+1);return n}(l,e,t,n,o,i,s),c=qb(a,r,0,s);t=c.local;for(let e=0;e<l.length;e+=3)l[e+1]<0&&(l.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<l.length&&l[t]<n;)t+=3;l.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new Bb(t.sort(Kb),l)}(this.children,i||[],e,t,n,r,o):i?new Bb(i.sort(Kb),_b):Vb}add(e,t){return t.length?this==Vb?Bb.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let s,l=i+n;if(s=Ub(t,e,l)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,l+1):r.splice(o,0,i,i+e.nodeSize,qb(s,e,l+1,Fb)),o+=3}}));let i=Wb(o?Hb(t):t,-n);for(let s=0;s<i.length;s++)i[s].type.valid(e,i[s])||i.splice(s--,1);return new Bb(i.length?this.local.concat(i).sort(Kb):this.local,r||this.children)}remove(e){return 0==e.length||this==Vb?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let o=0;o<n.length;o+=3){let r,i=n[o]+t,s=n[o+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(r||(r=[])).push(t));if(!r)continue;n==this.children&&(n=this.children.slice());let l=n[o+2].removeInner(r,i+1);l!=Vb?n[o+2]=l:(n.splice(o,3),o-=3)}if(r.length)for(let o,i=0;i<e.length;i++)if(o=e[i])for(let e=0;e<r.length;e++)r[e].eq(o,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Bb(r,n):Vb}forChild(e,t){if(this==Vb)return this;if(t.isLeaf)return Bb.empty;let n,r;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(n=this.children[s+2]);break}let o=e+1,i=o+t.content.size;for(let s=0;s<this.local.length;s++){let e=this.local[s];if(e.from<i&&e.to>o&&e.type instanceof Ib){let t=Math.max(o,e.from)-o,n=Math.min(i,e.to)-o;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let e=new Bb(r.sort(Kb),_b);return n?new jb([e,n]):e}return n||Vb}eq(e){if(this==e)return!0;if(!(e instanceof Bb)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Jb(this.localsInner(e))}localsInner(e){if(this==Vb)return _b;if(e.inlineContent||!this.local.some(Ib.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof Ib||t.push(this.local[n]);return t}forEachSet(e){e(this)}}Bb.empty=new Bb([],[]),Bb.removeOverlap=Jb;const Vb=Bb.empty;class jb{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,Fb)));return jb.from(n)}forChild(e,t){if(t.isLeaf)return Bb.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=Vb&&(o instanceof jb?n=n.concat(o.members):n.push(o))}return jb.from(n)}eq(e){if(!(e instanceof jb)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?Jb(n?t:t.sort(Kb)):_b}static from(e){switch(e.length){case 0:return Vb;case 1:return e[0];default:return new jb(e.every((e=>e instanceof Bb))?e:e.reduce(((e,t)=>e.concat(t instanceof Bb?t:t.members)),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function Wb(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new $b(o.from+t,o.to+t,o.type))}return n}function Ub(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let i,s=0;s<e.length;s++)(i=e[s])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),e[s]=null);return o}function Hb(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function qb(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let l=Ub(e,t,s+n);if(l){i=!0;let e=qb(l,t,n+s+1,r);e!=Vb&&o.push(s,s+t.nodeSize,e)}}));let s=Wb(i?Hb(e):e,-n).sort(Kb);for(let l=0;l<s.length;l++)s[l].type.valid(t,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new Bb(s,o):Vb}function Kb(e,t){return e.from-t.from||e.to-t.to}function Jb(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Qb(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Qb(t,o+1,i.copy(r.to,i.to)))}}return t}function Qb(e,t,n){for(;t<e.length&&Kb(n,e[t])>0;)t++;e.splice(t,0,n)}function Yb(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=Vb&&t.push(r)})),e.cursorWrapper&&t.push(Bb.create(e.state.doc,[e.cursorWrapper.deco])),jb.from(t)}const Xb={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Gb=vy&&by<=11;class Zb{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class ew{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Zb,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);vy&&by<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Gb&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.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,Xb)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Rv(this.view)){if(this.suppressingSelectionUpdates)return Sv(this.view);if(vy&&by<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&iy(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let o=e.focusNode;o;o=ny(o))n.add(o);for(let o=e.anchorNode;o;o=ny(o))if(n.has(o)){t=o;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Rv(e)&&!this.ignoreSelectionChange(n),o=-1,i=-1,s=!1,l=[];if(e.editable)for(let c=0;c<t.length;c++){let e=this.registerMutation(t[c],l);e&&(o=o<0?e.from:Math.min(e.from,o),i=i<0?e.to:Math.max(e.to,i),e.typeOver&&(s=!0))}if(wy&&l.length){let t=l.filter((e=>"BR"==e.nodeName));if(2==t.length){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;!t||"LI"!=t.nodeName||n&&ow(e,n)==t||r.remove()}}}let a=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&uy(n)&&(a=kv(e))&&a.eq(vg.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Sv(e),this.currentSelection.set(n),e.scrollToSelection()):(o>-1||r)&&(o>-1&&(e.docView.markDirty(o,i),function(e){if(tw.has(e))return;if(tw.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=wy,nw)return;nw=!0}}(e)),this.handleDOMChange(o,i,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Sv(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(vy&&by<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?ty(r)+1:0,s=n.localPosFromDOM(e.target,i,-1),l=o&&o.parentNode==e.target?ty(o):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let tw=new WeakMap,nw=!1;function rw(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return iy(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function ow(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function iw(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Cy&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||Cy&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const sw=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function lw(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=kv(e,t);if(n&&!e.state.selection.eq(n)){if(xy&&Ny&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(t=>t(e,dy(13,"Enter")))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),i&&r.setMeta("composition",i),e.dispatch(r)}return}let s=e.state.doc.resolve(t),l=s.sharedDepth(n);t=s.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a,c,u=e.state.selection,d=function(e,t,n){let r,{node:o,fromOffset:i,toOffset:s,from:l,to:a}=e.docView.parseRange(t,n),c=e.domSelectionRange(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],uy(c)||r.push({node:c.focusNode,offset:c.focusOffset})),xy&&8===e.input.lastKeyCode)for(let g=s;g>i;g--){let e=o.childNodes[g-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){s=g;break}if(!t||t.size)break}let d=e.state.doc,f=e.someProp("domParser")||hm.fromSchema(e.state.schema),h=d.resolve(l),p=null,m=f.parse(o,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:iw,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),p={anchor:e+l,head:t+l}}return{doc:m,sel:p,from:l,to:a}}(e,t,n),f=e.state.doc,h=f.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(a=e.state.selection.to,c="end"):(a=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let p=function(e,t,n,r,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a:s,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==o){r-=s+Math.max(0,i-Math.min(s,l))-i}if(s<i&&e.size<t.size){let e=r<=i&&r>=s?i-r:0;i-=e,i&&i<t.size&&uw(t.textBetween(i-1,i+1))&&(i+=e?1:-1),l=i+(l-s),s=i}else if(l<i){let t=r<=i&&r>=l?i-r:0;i-=t,i&&i<e.size&&uw(e.textBetween(i-1,i+1))&&(i+=t?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}(h.content,d.doc.content,d.from,a,c);if(p&&e.input.domChangeCount++,(Ey&&e.input.lastIOSEnter>Date.now()-225||Ny)&&o.some((e=>1==e.nodeType&&!sw.test(e.nodeName)))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",(t=>t(e,dy(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!p){if(!(r&&u instanceof xg&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let t=aw(e,e.state.doc,d.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);i&&n.setMeta("composition",i),e.dispatch(n)}}return}p={start:u.from,endA:u.to,endB:u.to}}e.state.selection.from<e.state.selection.to&&p.start==p.endB&&e.state.selection instanceof xg&&(p.start>e.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?p.start=e.state.selection.from:p.endA<e.state.selection.to&&p.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),vy&&by<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>d.from&&"  "==d.doc.textBetween(p.start-d.from-1,p.start-d.from+1)&&(p.start--,p.endA--,p.endB--);let m=d.doc.resolveNoCache(p.start-d.from),g=d.doc.resolveNoCache(p.endB-d.from),y=f.resolve(p.start),v=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA;if((Ey&&e.input.lastIOSEnter>Date.now()-225&&(!v||o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!v&&m.pos<d.doc.content.size&&(!m.sameParent(g)||!m.parent.inlineContent)&&m.pos<g.pos&&!/\S/.test(d.doc.textBetween(m.pos,g.pos,"","")))&&e.someProp("handleKeyDown",(t=>t(e,dy(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>p.start&&function(e,t,n,r,o){if(n-t<=o.pos-r.pos||cw(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(!r.parent.isTextblock){let e=i.nodeAfter;return null!=e&&n==t+e.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=e.resolve(cw(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||cw(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(f,p.start,p.endA,m,g)&&e.someProp("handleKeyDown",(t=>t(e,dy(8,"Backspace")))))return void(Ny&&xy&&e.domObserver.suppressSelectionUpdates());xy&&p.endB==p.start&&(e.input.lastChromeDelete=Date.now()),Ny&&!v&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==p.endA&&(p.endB-=2,g=d.doc.resolveNoCache(p.endB-d.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,dy(13,"Enter"))}))}),20));let b,w=p.start,k=p.endA,x=t=>{let n=t||e.state.tr.replace(w,k,d.doc.slice(p.start-d.from,p.endB-d.from));if(d.sel){let t=aw(e,n.doc,d.sel);t&&!(xy&&e.composing&&t.empty&&(p.start!=p.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==w||t.head==n.mapping.map(k)-1)||vy&&t.empty&&t.head==w)&&n.setSelection(t)}return i&&n.setMeta("composition",i),n.scrollIntoView()};if(v)if(m.pos==g.pos){vy&&by<=11&&0==m.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Sv(e)),20));let t=x(e.state.tr.delete(w,k)),n=f.resolve(p.start).marksAcross(f.resolve(p.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(p.endA==p.endB&&(b=function(e,t){let n,r,o,i=e.firstChild.marks,s=t.firstChild.marks,l=i,a=s;for(let u=0;u<s.length;u++)l=s[u].removeFromSet(l);for(let u=0;u<i.length;u++)a=i[u].removeFromSet(a);if(1==l.length&&0==a.length)r=l[0],n="add",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=a.length)return null;r=a[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let u=0;u<t.childCount;u++)c.push(o(t.child(u)));if(xp.from(c).eq(e))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start())))){let t=x(e.state.tr);"add"==b.type?t.addMark(w,k,b.mark):t.removeMark(w,k,b.mark),e.dispatch(t)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let t=m.parent.textBetween(m.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,w,k));e.someProp("handleTextInput",(r=>r(e,w,k,t,n)))||e.dispatch(n())}else e.dispatch(x());else e.dispatch(x())}function aw(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Dv(e,t.resolve(n.anchor),t.resolve(n.head))}function cw(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}function uw(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class dw{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new lb,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(gw),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=pw(this),hw(this),this.nodeViews=mw(this),this.docView=iv(this.state.doc,fw(this),Yb(this),this.dom,this),this.domObserver=new ew(this,((e,t,n,r)=>lw(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in ob){let n=ob[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!db(e,t)||ub(e,t)||!e.editable&&t.type in ib||n(e,t)},sb[t]?{passive:!0}:void 0)}Cy&&e.dom.addEventListener("input",(()=>null)),cb(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&cb(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(gw),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let r=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(Cb(this),i=!0),this.state=e;let s=r.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=mw(this);(function(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,o=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&cb(this),this.editable=pw(this),hw(this);let l=Yb(this),a=fw(this),c=r.plugins==e.plugins||r.doc.eq(e.doc)?e.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",u=o||!this.docView.matchesNode(e.doc,a,l);!u&&e.selection.eq(r.selection)||(i=!0);let d="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(i,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let l=r.getBoundingClientRect();if(l.top>=o-20){t=r,n=l.top;break}}return{refDOM:t,refTop:n,stack:Iy(e.dom)}}(this);if(i){this.domObserver.stop();let t=u&&(vy||xy)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(u){let n=xy?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Eb(this)),!o&&this.docView.update(e.doc,a,l,this)||(this.docView.updateOuterDeco(a),this.docView.destroy(),this.docView=iv(e.doc,a,l,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return iy(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Sv(this,t):(Nv(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Ly(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(1==e.nodeType?e:e.parentNode))if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof Cg){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&Ay(this,t.getBoundingClientRect(),e)}else Ay(this,this.coordsAtPos(this.state.selection.head,1),e);else;}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,t){let n=e.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;
vendor: 5,370 bytes, line 62
62else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new Db(e.slice,e.move,r<0?void 0:Cg.create(this.state.doc,r))}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let i=0;i<this.directPlugins.length;i++){let r=this.directPlugins[i].props[e];if(null!=r&&(n=t?t(r):r))return n}let o=this.state.plugins;if(o)for(let i=0;i<o.length;i++){let r=o[i].props[e];if(null!=r&&(n=t?t(r):r))return n}}hasFocus(){if(vy){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if($y)return e.focus($y);let t=Iy(e);e.focus(null==$y?{get preventScroll(){return $y={preventScroll:!0},!0}}:void 0),$y||($y=!1,Ly(t,0))}(this.dom),Sv(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return e||document}updateRoot(){this._root=null}posAtCoords(e){return Vy(this,e)}coordsAtPos(e,t=1){return Hy(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return Zy(this,t||this.state,e)}pasteHTML(e,t){return Nb(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Nb(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return qv(this,e)}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Yb(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ry=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){ub(e,t)||!ob[t.type]||!e.editable&&t.type in ib||ob[t.type](e,t)}(this,e)}domSelectionRange(){let e=this.domSelection();return e?Cy&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return rw(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?rw(e,n):null}(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function fw(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[$b.node(0,e.state.doc.content.size,t)]}function hw(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:$b.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function pw(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function mw(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function gw(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}dw.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};for(var yw={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:"'"},vw={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},bw="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),ww="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),kw=0;kw<10;
62kw++)yw[48+kw]=yw[96+kw]=String(kw);for(kw=1;kw<=24;kw++)yw[kw+111]="F"+kw;for(kw=65;kw<=90;kw++)yw[kw]=String.fromCharCode(kw+32),vw[kw]=String.fromCharCode(kw);for(var xw in yw)vw.hasOwnProperty(xw)||(vw[xw]=yw[xw]);const Sw="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Cw="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function Ew(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let l=0;l<i.length-1;l++){let e=i[l];if(/^(cmd|meta|m)$/i.test(e))o=!0;else if(/^a(lt)?$/i.test(e))t=!0;else if(/^(c|ctrl|control)$/i.test(e))n=!0;else if(/^s(hift)?$/i.test(e))r=!0;else{if(!/^mod$/i.test(e))throw new Error("Unrecognized modifier name: "+e);Sw?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Mw(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function Ow(e){let t=function(e){let t=Object.create(null);for(let n in e)t[Ew(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(bw&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ww&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?vw:yw)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=t[Mw(o,n)];if(i&&i(e.state,e.dispatch,e))return!0;if(1==o.length&&" "!=o){if(n.shiftKey){let r=t[Mw(o,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(Cw&&n.ctrlKey&&n.altKey)&&(r=yw[n.keyCode])&&r!=o){let o=t[Mw(r,n)];if(o&&o(e.state,e.dispatch,e))return!0}}return!1}}var Nw=Object.defineProperty,Tw=(e,t)=>{for(var n in t)Nw(e,n,{get:t[n],enumerable:!0})};function Dw(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var Rw=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!e,a=e||o.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(a,t),o=n(...e)(r);return s.push(o),c}]))),run:()=>(l||!t||a.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(a),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})]))),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:Dw({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(s)])))}};return s}},Pw={};Tw(Pw,{blur:()=>zw,clearContent:()=>Aw,clearNodes:()=>Iw,command:()=>Lw,createParagraphNear:()=>$w,cut:()=>_w,deleteCurrentNode:()=>Fw,deleteNode:()=>Vw,deleteRange:()=>jw,deleteSelection:()=>Ww,enter:()=>Uw,exitCode:()=>Hw,extendMarkRange:()=>Gw,first:()=>Zw,focus:()=>ok,forEach:()=>ik,insertContent:()=>sk,insertContentAt:()=>uk,joinBackward:()=>hk,joinDown:()=>fk,joinForward:()=>pk,joinItemBackward:()=>mk,joinItemForward:()=>gk,joinTextblockBackward:()=>yk,joinTextblockForward:()=>vk,joinUp:()=>dk,keyboardShortcut:()=>wk,lift:()=>xk,liftEmptyBlock:()=>Sk,liftListItem:()=>Ck,newlineInCode:()=>Ek,resetAttributes:()=>Nk,scrollIntoView:()=>Tk,selectAll:()=>Dk,selectNodeBackward:()=>Rk,selectNodeForward:()=>Pk,selectParentNode:()=>zk,selectTextblockEnd:()=>Ak,selectTextblockStart:()=>Ik,setContent:()=>$k,setMark:()=>vx,setMeta:()=>bx,setNode:()=>wx,setNodeSelection:()=>kx,setTextDirection:()=>xx,setTextSelection:()=>Sx,sinkListItem:()=>Cx,splitBlock:()=>Mx,splitListItem:()=>Ox,toggleList:()=>Dx,toggleMark:()=>Rx,toggleNode:()=>Px,toggleWrap:()=>zx,undoInputRule:()=>Ax,unsetAllMarks:()=>Ix,unsetMark:()=>Lx,unsetTextDirection:()=>$x,updateAttributes:()=>_x,wrapIn:()=>Fx,wrapInList:()=>Bx});var zw=()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null==(n=null==window?void 0:window.getSelection())||n.removeAllRanges())})),!0),Aw=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),Iw=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;
62return!n||(o.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:o}=t,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+e.nodeSize)),l=i.blockRange(s);if(!l)return;const a=Km(l);if(e.type.isTextblock){const{defaultType:e}=i.parent.contentMatchAt(i.index());t.setNodeMarkup(l.start,e)}(a||0===a)&&t.lift(l,a)}))})),!0)},Lw=e=>t=>e(t),$w=()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Mg||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Kg(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(n,i.createAndFill());s.setSelection(xg.create(s.doc,n+1)),t(s.scrollIntoView())}return!0})(e,t),_w=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new xg(r.doc.resolve(Math.max(s-1,0)))),!0},Fw=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1){if(o.node(i).type===r.type){if(t){const t=o.before(i),n=o.after(i);e.delete(t,n).scrollIntoView()}return!0}}return!1};function Bw(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var Vw=e=>({tr:t,state:n,dispatch:r})=>{const o=Bw(e,n.schema),i=t.selection.$anchor;for(let e=i.depth;e>0;e-=1){if(i.node(e).type===o){if(r){const n=i.before(e),r=i.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},jw=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},Ww=()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),Uw=()=>({commands:e})=>e.keyboardShortcut("Enter"),Hw=()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Kg(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,s.createAndFill());o.setSelection(vg.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0})(e,t);function qw(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function Kw(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:qw(t[r])?t[r].test(e[r]):t[r]===e[r]))}function Jw(e,t,n={}){return e.find((e=>e.type===t&&Kw(Object.fromEntries(Object.keys(n).map((t=>[t,e.attrs[t]]))),n)))}function Qw(e,t,n={}){return!!Jw(e,t,n)}function Yw(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if(o.node&&o.node.marks.some((e=>e.type===t))||(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some((e=>e.type===t)))return;n=n||(null==(r=o.node.marks[0])?void 0:r.attrs);if(!Jw([...o.node.marks],t,n))return;let i=o.index,s=e.start()+o.offset,l=i+1,a=s+o.node.nodeSize;for(;i>0&&Qw([...e.parent.child(i-1).marks],t,n);)i-=1,s-=e.parent.child(i).nodeSize;for(;l<e.parent.childCount&&Qw([...e.parent.child(l).marks],t,n);)a+=e.parent.child(l).nodeSize,l+=1;return{from:s,to:a}}function Xw(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var Gw=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const i=Xw(e,r.schema),{doc:s,selection:l}=n,{$from:a,from:c,to:u}=l;if(o){const e=Yw(a,i,t);if(e&&e.from<=c&&e.to>=u){const t=xg.create(s,e.from,e.to);n.setSelection(t)}}return!0},Zw=e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function ek(e){return e instanceof xg}function tk(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function nk(e,t=null){if(!t)return null;const n=vg.atStart(e),r=vg.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const o=n.from,i=r.to;return"all"===t?xg.create(e,tk(0,o,i),tk(e.content.size,o,i)):xg.create(e,tk(t,o,i),tk(t,o,i))}function rk(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var ok=(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{(rk()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;
62if(i&&null===e&&!ek(n.state.selection))return s(),!0;const l=nk(o.doc,e)||n.state.selection,a=n.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},ik=(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),sk=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),lk=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&lk(r)}return e};function ak(e){if("undefined"==typeof window)throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const t=`<body>${e}</body>`,n=(new window.DOMParser).parseFromString(t,"text/html").body;return lk(n)}function ck(e,t,n){if(e instanceof qp||e instanceof xp)return e;n={slice:!0,parseOptions:{},...n};const r="string"==typeof e;if("object"==typeof e&&null!==e)try{if(Array.isArray(e)&&e.length>0)return xp.fromArray(e.map((e=>t.nodeFromJSON(e))));const r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return ck("",t,n)}if(r){if(n.errorOnInvalidContent){let r=!1,o="";const i=new dm({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>(r=!0,o="string"==typeof e?e:e.outerHTML,null)}]}})});if(n.slice?hm.fromSchema(i).parseSlice(ak(e),n.parseOptions):hm.fromSchema(i).parse(ak(e),n.parseOptions),n.errorOnInvalidContent&&r)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${o}`)})}const r=hm.fromSchema(t);return n.slice?r.parseSlice(ak(e),n.parseOptions).content:r.parse(ak(e),n.parseOptions)}return ck("",t,n)}var uk=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){let o;const l=e=>{i.emit("contentError",{editor:i,error:e,disableCollaboration:()=>{"collaboration"in i.storage&&"object"==typeof i.storage.collaboration&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},a={preserveWhitespace:"full",...(n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n}).parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{ck(t,i.schema,{parseOptions:a,errorOnInvalidContent:!0})}catch(tC){l(tC)}try{o=ck(t,i.schema,{parseOptions:a,errorOnInvalidContent:null!=(s=n.errorOnInvalidContent)?s:i.options.enableContentCheck})}catch(tC){return l(tC),!1}let{from:c,to:u}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},d=!0,f=!0;if(("type"in o?[o]:o).forEach((e=>{e.check(),d=!!d&&(e.isText&&0===e.marks.length),f=!!f&&e.isBlock})),c===u&&f){const{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(c-=1,u+=1)}let h;if(d){if(Array.isArray(t))h=t.map((e=>e.text||"")).join("");else if(t instanceof xp){let e="";t.forEach((t=>{t.text&&(e+=t.text)})),h=e}else h="object"==typeof t&&t&&t.text?t.text:t;r.insertText(h,c,u)}else{h=o;const e=r.doc.resolve(c),t=e.node(),n=0===e.parentOffset,i=t.isText||t.isTextblock,s=t.content.size>0;n&&i&&s&&(c=Math.max(0,c-1)),r.replaceWith(c,u,h)}n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof jm||o instanceof Wm))return;const i=e.mapping.maps[r];let s=0;i.forEach(((e,t,n,r)=>{0===s&&(s=r)})),e.setSelection(vg.near(e.doc.resolve(s),n))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:h}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:h})}return!0},dk=()=>({state:e,dispatch:t})=>((e,t)=>{let n,r=e.selection,o=r instanceof Cg;if(o){if(r.node.isTextblock||!Zm(e.doc,r.from))return!1;n=r.from}else if(n=tg(e.doc,r.from,-1),null==n)return!1;if(t){let r=e.tr.join(n);o&&r.setSelection(Cg.create(r.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0})(e,t),fk=()=>({state:e,dispatch:t})=>((e,t)=>{let n,r=e.selection;if(r instanceof Cg){if(r.node.isTextblock||!Zm(e.doc,r.to))return!1;n=r.to}else if(n=tg(e.doc,r.to,1),null==n)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0})(e,t),hk=()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=Vg(e,n);if(!r)return!1;let o=Ug(r);if(!o){let n=r.blockRange(),o=n&&Km(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(Jg(e,o,t,-1))return!0;
62if(0==r.parent.content.size&&(Wg(i,"end")||Cg.isSelectable(i)))for(let s=r.depth;;s--){let n=rg(e.doc,r.before(s),r.after(s),Np.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Wg(i,"end")?vg.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):Cg.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}if(1==s||r.node(s-1).childCount>1)break}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),0))})(e,t),pk=()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=Hg(e,n);if(!r)return!1;let o=qg(r);if(!o)return!1;let i=o.nodeAfter;if(Jg(e,o,t,1))return!0;if(0==r.parent.content.size&&(Wg(i,"start")||Cg.isSelectable(i))){let n=rg(e.doc,r.before(),r.after(),Np.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Wg(i,"start")?vg.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):Cg.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))})(e,t),mk=()=>({state:e,dispatch:t,tr:n})=>{try{const r=tg(e.doc,e.selection.$from.pos,-1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},gk=()=>({state:e,dispatch:t,tr:n})=>{try{const r=tg(e.doc,e.selection.$from.pos,1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},yk=()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=Vg(e,n);if(!r)return!1;let o=Ug(r);return!!o&&jg(e,o,t)})(e,t),vk=()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=Hg(e,n);if(!r)return!1;let o=qg(r);return!!o&&jg(e,o,t)})(e,t);function bk(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}var wk=e=>({editor:t,view:n,tr:r,dispatch:o})=>{const i=function(e){const t=e.split(/-(?!$)/);let n,r,o,i,s=t[t.length-1];"Space"===s&&(s=" ");for(let l=0;l<t.length-1;l+=1){const e=t[l];if(/^(cmd|meta|m)$/i.test(e))i=!0;else if(/^a(lt)?$/i.test(e))n=!0;else if(/^(c|ctrl|control)$/i.test(e))r=!0;else if(/^s(hift)?$/i.test(e))o=!0;else{if(!/^mod$/i.test(e))throw new Error(`Unrecognized modifier name: ${e}`);rk()||bk()?i=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),o&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=i.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),l=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,l)))}));return null==a||a.steps.forEach((e=>{const t=e.map(r.mapping);t&&o&&r.maybeStep(t)})),!0};function kk(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Bw(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);l.push({node:e,from:n,to:i})}));const a=o-r,c=l.filter((e=>!s||s.name===e.node.type.name)).filter((e=>Kw(e.node.attrs,n,{strict:!1})));if(i)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=a}var xk=(e,t={})=>({state:n,dispatch:r})=>!!kk(n,Bw(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Km(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)})(n,r),Sk=()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Gm(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Km(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)})(e,t),Ck=e=>({state:t,dispatch:n})=>ey(Bw(e,t.schema))(t,n),Ek=()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t);function Mk(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Ok(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}var Nk=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=Mk("string"==typeof e?e:e.name,r.schema);if(!l)return!1;"node"===l&&(i=Bw(e,r.schema)),"mark"===l&&(s=Xw(e,r.schema));let a=!1;
62return n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{i&&i===e.type&&(a=!0,o&&n.setNodeMarkup(r,void 0,Ok(e.attrs,t))),s&&e.marks.length&&e.marks.forEach((i=>{s===i.type&&(a=!0,o&&n.addMark(r,r+e.nodeSize,s.create(Ok(i.attrs,t))))}))}))})),a},Tk=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Dk=()=>({tr:e,dispatch:t})=>{if(t){const t=new Mg(e.doc);e.setSelection(t)}return!0},Rk=()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Ug(r)}let s=i&&i.nodeBefore;return!(!s||!Cg.isSelectable(s)||(t&&t(e.tr.setSelection(Cg.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),0))})(e,t),Pk=()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=qg(r)}let s=i&&i.nodeAfter;return!(!s||!Cg.isSelectable(s)||(t&&t(e.tr.setSelection(Cg.create(e.doc,i.pos)).scrollIntoView()),0))})(e,t),zk=()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:o}=e.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),t&&t(e.tr.setSelection(Cg.create(e.doc,n))),!0)})(e,t),Ak=()=>({state:e,dispatch:t})=>Xg(e,t),Ik=()=>({state:e,dispatch:t})=>Yg(e,t);function Lk(e,t,n={},r={}){return ck(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var $k=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{const{doc:a}=i;if("full"!==r.preserveWhitespace){const l=Lk(e,o.schema,r,{errorOnInvalidContent:null!=t?t:o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,l).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:a.content.size},e,{parseOptions:r,errorOnInvalidContent:null!=t?t:o.options.enableContentCheck})};function _k(e,t){const n=Xw(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,(e=>{s.push(...e.marks)}));const l=s.find((e=>e.type.name===n.name));return l?{...l.attrs}:{}}function Fk(e,t){const n=new gg(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}function Bk(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}function Vk(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function jk(e,t,n){if(void 0===e.config[t]&&e.parent)return jk(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?jk(e.parent,t,n):null})}return e.config[t]}function Wk(e){return e.map((e=>{const t=jk(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...Wk(t())]:e})).flat(10)}function Uk(e,t){const n=Sm.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Hk(e){return"function"==typeof e}function qk(e,t=void 0,...n){return Hk(e)?t?e.bind(t)(...n):e(...n):e}function Kk(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function Jk(e){const t=[],{nodeExtensions:n,markExtensions:r}=Kk(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=jk(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage,extensions:o});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...i,...r}})}))}))}))})),o.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=jk(e,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,t.push({type:e.name,name:n,attribute:o})}))})),t}function Qk(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>
62{if(n[e])if("class"===e){const r=t?String(t).split(" "):[],o=n[e]?n[e].split(" "):[],i=r.filter((e=>!o.includes(e)));n[e]=[...o,...i].join(" ")}else if("style"===e){const r=t?t.split(";").map((e=>e.trim())).filter(Boolean):[],o=n[e]?n[e].split(";").map((e=>e.trim())).filter(Boolean):[],i=new Map;o.forEach((e=>{const[t,n]=e.split(":").map((e=>e.trim()));i.set(t,n)})),r.forEach((e=>{const[t,n]=e.split(":").map((e=>e.trim()));i.set(t,n)})),n[e]=Array.from(i.entries()).map((([e,t])=>`${e}: ${t}`)).join("; ")}else n[e]=t;else n[e]=t})),n}),{})}function Yk(e,t){return t.filter((t=>t.type===e.type.name)).filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>Qk(e,t)),{})}function Xk(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const o=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...o}}}}function Gk(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function Zk(e){var t,n;const r={};return!(null==(t=null==e?void 0:e.attribute)?void 0:t.isRequired)&&"default"in((null==e?void 0:e.attribute)||{})&&(r.default=e.attribute.default),void 0!==(null==(n=null==e?void 0:e.attribute)?void 0:n.validate)&&(r.validate=e.attribute.validate),[e.name,r]}function ex(e){return e.sort(((e,t)=>{const n=jk(e,"priority")||100,r=jk(t,"priority")||100;return n>r?-1:n<r?1:0}))}function tx(e){const t=ex(Wk(e));return function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return Array.from(new Set(t))}(t.map((e=>e.name))).length,t}function nx(e,t,n){const{from:r,to:o}=t,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let l="";return e.nodesBetween(r,o,((e,n,a,c)=>{var u;e.isBlock&&n>r&&(l+=i);const d=null==s?void 0:s[e.type.name];if(d)return a&&(l+=d({node:e,pos:n,parent:a,index:c,range:t})),!1;e.isText&&(l+=null==(u=null==e?void 0:e.text)?void 0:u.slice(Math.max(r,n)-n,o-n))})),l}function rx(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}function ox(e,t){const n=Mk("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=Bw(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,(e=>{i.push(e)}));const s=i.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?_k(e,t):{}}function ix(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>{const r=t.filter(((e,t)=>t!==n));return!r.some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}))}function sx(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,o)=>{const i=[];if(e.ranges.length)e.forEach(((e,t)=>{i.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;i.push({from:e,to:t})}i.forEach((({from:e,to:n})=>{const i=t.slice(o).map(e,-1),s=t.slice(o).map(n),l=t.invert().map(i,-1),a=t.invert().map(s);r.push({oldRange:{from:l,to:a},newRange:{from:i,to:s}})}))})),ix(r)}function lx(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const o=Yw(n.resolve(e),t.type);o&&r.push({mark:t,...o})})):n.nodesBetween(e,t,((e,t)=>{e&&void 0!==(null==e?void 0:e.nodeSize)&&r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}var ax=(e,t,n,r=20)=>{const o=e.doc.resolve(n);let i=r,s=null;for(;i>0&&null===s;){const e=o.node(i);(null==e?void 0:e.type.name)===t?s=e:i-=1}return[s,i]};function cx(e,t){return t.nodes[e]||t.marks[e]||null}function ux(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function dx(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Xw(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>
62!i||i.name===e.type.name)).find((e=>Kw(e.attrs,n,{strict:!1})));let s=0;const l=[];if(o.forEach((({$from:t,$to:n})=>{const r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);s+=i-n,l.push(...e.marks.map((e=>({mark:e,from:n,to:i}))))}))})),0===s)return!1;const a=l.filter((e=>!i||i.name===e.mark.type.name)).filter((e=>Kw(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=l.filter((e=>!i||e.mark.type!==i&&e.mark.type.excludes(i))).reduce(((e,t)=>e+t.to-t.from),0);return(a>0?a+c:a)>=s}var fx=(e,t)=>{const{$from:n,$to:r,$anchor:o}=e.selection;if(t){const n=Vk((e=>e.type.name===t))(e.selection);if(!n)return!1;const r=e.doc.resolve(n.pos+1);return o.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},hx=e=>{const{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function px(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}function mx(e,t){const{nodeExtensions:n}=Kk(t),r=n.find((t=>t.name===e));if(!r)return!1;const o=qk(jk(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function gx(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===e.type.name)return!0;if(e.isText)return/^\s*$/m.test(null!=(r=e.text)?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(0===e.content.childCount)return!0;if(t){let r=!0;return e.content.forEach((e=>{!1!==r&&(gx(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))})),r}return!1}function yx(e){return e instanceof Cg}var vx=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:l}=i,a=Xw(e,r.schema);if(o)if(s){const e=_k(r,a);n.addStoredMark(a.create({...e,...t}))}else l.forEach((e=>{const o=e.$from.pos,i=e.$to.pos;r.doc.nodesBetween(o,i,((e,r)=>{const s=Math.max(r,o),l=Math.min(r+e.nodeSize,i);e.marks.find((e=>e.type===a))?e.marks.forEach((e=>{a===e.type&&n.addMark(s,l,a.create({...e.attrs,...t}))})):n.addMark(s,l,a.create(t))}))}));return function(e,t,n){var r;const{selection:o}=t;let i=null;if(ek(o)&&(i=o.$cursor),i){const t=null!=(r=e.storedMarks)?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some((e=>e.type.excludes(n))))}const{ranges:s}=o;return s.some((({$from:t,$to:r})=>{let o=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(o)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),i=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));o=t&&i}return!o})),o}))}(r,n,a)},bx=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),wx=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Bw(e,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),!!i.isTextblock&&o().command((({commands:e})=>!!Gg(i,{...s,...t})(n)||e.clearNodes())).command((({state:e})=>Gg(i,{...s,...t})(e,r))).run()},kx=e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=tk(e,0,n.content.size),o=Cg.create(n,r);t.setSelection(o)}return!0},xx=(e,t)=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=r;let s,l;return"number"==typeof t?(s=t,l=t):t&&"from"in t&&"to"in t?(s=t.from,l=t.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,((t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})})),!0},Sx=e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:o}="number"==typeof e?{from:e,to:e}:e,i=xg.atStart(n).from,s=xg.atEnd(n).to,l=tk(r,i,s),a=tk(o,i,s),c=xg.create(n,l,a);t.setSelection(c)}return!0},Cx=e=>({state:t,dispatch:n})=>{const r=Bw(e,t.schema);return(o=r,function(e,t){let{$from:n,$to:r}=e.selection,i=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==o));if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=o)return!1;if(t){let n=a.lastChild&&a.lastChild.type==l.type,r=xp.from(n?o.create():null),s=new Np(xp.from(o.create(null,xp.from(l.type.create(null,r)))),n?3:1,0),c=i.start,u=i.end;t(e.tr.step(new Wm(c-(n?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0})(t,n);var o};function Ex(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>
vendor: 2,149 bytes, line 62
62null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}var Mx=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:l,$to:a}=i,c=ux(o.extensionManager.attributes,l.node().type.name,l.node().attrs);if(i instanceof Cg&&i.node.isBlock)return!(!l.parentOffset||!Gm(s,l.pos))&&(r&&(e&&Ex(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const u=a.parentOffset===a.parent.content.size,d=0===l.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(l.node(-1).contentMatchAt(l.indexAfter(-1)));let f=u&&d?[{type:d,attrs:c}]:void 0,h=Gm(t.doc,t.mapping.map(l.pos),1,f);if(f||h||!Gm(t.doc,t.mapping.map(l.pos),1,d?[{type:d}]:void 0)||(h=!0,f=d?[{type:d,attrs:c}]:void 0),r){if(h&&(i instanceof xg&&t.deleteSelection(),t.split(t.mapping.map(l.pos),1,f),d&&!u&&!l.parentOffset&&l.parent.type!==d)){const e=t.mapping.map(l.before()),n=t.doc.resolve(e);l.node(-1).canReplaceWith(n.index(),n.index()+1,d)&&t.setNodeMarkup(t.mapping.map(l.before()),d)}e&&Ex(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},Ox=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const l=Bw(e,r.schema),{$from:a,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(c))return!1;const d=a.node(-1);if(d.type!==l)return!1;const f=i.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let e=xp.empty;const r=a.index(-1)?1:a.index(-2)?2:3;for(let t=a.depth-r;t>=a.depth-3;t-=1)e=xp.from(a.node(t).copy(e));const o=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,i={...ux(f,a.node().type.name,a.node().attrs),...t},c=(null==(s=l.contentMatch.defaultType)?void 0:s.createAndFill(i))||void 0;e=e.append(xp.from(l.createAndFill(null,c)||void 0));const u=a.before(a.depth-(r-1));n.replace(u,a.after(-o),new Np(e,4-r,0));let d=-1;n.doc.nodesBetween(u,n.doc.content.size,((e,t)=>
62{if(d>-1)return!1;e.isTextblock&&0===e.content.size&&(d=t+1)})),d>-1&&n.setSelection(xg.near(n.doc.resolve(d))),n.scrollIntoView()}return!0}const h=c.pos===a.end()?d.contentMatchAt(0).defaultType:null,p={...ux(f,d.type.name,d.attrs),...t},m={...ux(f,a.node().type.name,a.node().attrs),...t};n.delete(a.pos,c.pos);const g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!Gm(n.doc,a.pos,2))return!1;if(o){const{selection:e,storedMarks:t}=r,{splittableMarks:s}=i.extensionManager,l=t||e.$to.parentOffset&&e.$from.marks();if(n.split(a.pos,2,g).scrollIntoView(),!l||!o)return!0;const c=l.filter((e=>s.includes(e.type.name)));n.ensureMarks(c)}return!0},Nx=(e,t)=>{const n=Vk((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!Zm(e.doc,n.pos)||(e.join(n.pos),!0)},Tx=(e,t)=>{const n=Vk((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!Zm(e.doc,r)||(e.join(r),!0)},Dx=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Bw(e,s.schema),p=Bw(t,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:v}=m,b=y.blockRange(v),w=g||m.$to.parentOffset&&m.$from.marks();if(!b)return!1;const k=Vk((e=>mx(e.type.name,d)))(m);if(b.depth>=1&&k&&b.depth-k.depth<=1){if(k.node.type===h)return c.liftListItem(p);if(mx(k.node.type.name,d)&&h.validContent(k.node.content)&&l)return a().command((()=>(i.setNodeMarkup(k.pos,h),!0))).command((()=>Nx(i,h))).command((()=>Tx(i,h))).run()}return n&&w&&l?a().command((()=>{const e=u().wrapInList(h,r),t=w.filter((e=>f.includes(e.type.name)));return i.ensureMarks(t),!!e||c.clearNodes()})).wrapInList(h,r).command((()=>Nx(i,h))).command((()=>Tx(i,h))).run():a().command((()=>!!u().wrapInList(h,r)||c.clearNodes())).wrapInList(h,r).command((()=>Nx(i,h))).command((()=>Tx(i,h))).run()},Rx=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Xw(e,r.schema);return dx(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},Px=(e,t,n={})=>({state:r,commands:o})=>{const i=Bw(e,r.schema),s=Bw(t,r.schema),l=kk(r,i,n);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(s,a):o.setNode(i,{...a,...n})},zx=(e,t={})=>({state:n,commands:r})=>{const o=Bw(e,n.schema);return kk(n,o,t)?r.lift(o):r.wrapIn(o,t)},Ax=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){const t=e.tr,n=i.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){const n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},Ix=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},Lx=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:l}=n,a=Xw(e,r.schema),{$from:c,empty:u,ranges:d}=l;if(!o)return!0;if(u&&s){let{from:e,to:t}=l;const r=null==(i=c.marks().find((e=>e.type===a)))?void 0:i.attrs,o=Yw(c,a,r);o&&(e=o.from,t=o.to),n.removeMark(e,t,a)}else d.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,a)}));return n.removeStoredMark(a),!0},$x=e=>({tr:t,state:n,dispatch:r})=>{const{selection:o}=n;let i,s;return"number"==typeof e?(i=e,s=e):e&&"from"in e&&"to"in e?(i=e.from,s=e.to):(i=o.from,s=o.to),r&&t.doc.nodesBetween(i,s,((e,n)=>{if(e.isText)return;const r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)})),!0},_x=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=Mk("string"==typeof e?e:e.name,r.schema);if(!l)return!1;"node"===l&&(i=Bw(e,r.schema)),"mark"===l&&(s=Xw(e,r.schema));let a=!1;return n.selection.ranges.forEach((e=>{const l=e.$from.pos,c=e.$to.pos;let u,d,f,h;n.selection.empty?r.doc.nodesBetween(l,c,((e,t)=>{i&&i===e.type&&(a=!0,f=Math.max(t,l),h=Math.min(t+e.nodeSize,c),u=t,d=e)})):r.doc.nodesBetween(l,c,((e,r)=>{r<l&&i&&i===e.type&&(a=!0,f=Math.max(r,l),h=Math.min(r+e.nodeSize,c),u=r,d=e),r>=l&&r<=c&&(i&&i===e.type&&(a=!0,o&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),s&&e.marks.length&&e.marks.forEach((i=>{if(s===i.type&&(a=!0,o)){const o=Math.max(r,l),a=Math.min(r+e.nodeSize,c);n.addMark(o,a,s.create({...i.attrs,...t}))}})))})),d&&(void 0!==u&&o&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),s&&d.marks.length&&d.marks.forEach((e=>{s===e.type&&o&&n.addMark(f,h,s.create({...e.attrs,...t}))})))})),a},Fx=(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Jm(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}(Bw(e,n.schema),t)(n,r),Bx=(e,t={})=>({state:n,dispatch:r})=>Zg(Bw(e,n.schema),t)(n,r),Vx=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];
62return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((e=>e!==t)):delete this.callbacks[e]),this}once(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},jx=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=null==(t=e.undoable)||t}};function Wx(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=e,{view:a}=n;if(a.composing)return!1;const c=a.state.doc.resolve(r);if(c.parent.type.spec.code||(null==(t=c.nodeBefore||c.nodeAfter)?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const d=((e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,((e,t,o,i)=>{var s,l;const a=(null==(l=(s=e.type.spec).toText)?void 0:l.call(s,{node:e,pos:t,parent:o,index:i}))||e.textContent||"%leaf%";n+=e.isAtom&&!e.isText?a:a.slice(0,Math.max(0,r-t))})),n})(c)+i;return s.forEach((e=>{if(u)return;const t=((e,t)=>{if(qw(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith),r.push(n.replaceWith)),r})(d,e.find);if(!t)return;const s=a.state.tr,c=Dw({state:a.state,transaction:s}),f={from:r-(t[0].length-i.length),to:o},{commands:h,chain:p,can:m}=new Rw({editor:n,state:c});null!==e.handler({state:c,range:f,match:t,commands:h,chain:p,can:m})&&s.steps.length&&(e.undoable&&s.setMeta(l,{transform:s,from:r,to:o,text:i}),a.dispatch(s),u=!0)})),u}function Ux(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Hx(e,t){const n={...e};return Ux(e)&&Ux(t)&&Object.keys(t).forEach((r=>{Ux(t[r])&&Ux(e[r])?n[r]=Hx(e[r],t[r]):n[r]=t[r]})),n}var qx=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...qk(jk(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...qk(jk(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){const t=this.extend({...this.config,addOptions:()=>Hx(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Kx=class e extends qx{constructor(){super(...arguments),this.type="mark"}static create(t={}){const n="function"==typeof t?t():t;return new e(n)}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!!!o.find((e=>(null==e?void 0:e.type.name)===t.name)))return!1;const i=o.find((e=>(null==e?void 0:e.type.name)===t.name));return i&&n.removeStoredMark(i),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){const t="function"==typeof e?e():e;return super.extend(t)}};var Jx=class{constructor(e){this.find=e.find,this.handler=e.handler}};function Qx(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=e,{commands:a,chain:c,can:u}=new Rw({editor:t,state:n}),d=[];n.doc.nodesBetween(r,o,((e,t)=>{var f,h,p,m,g;if((null==(h=null==(f=e.type)?void 0:f.spec)?void 0:h.code)||!(e.isText||e.isTextblock||e.isInline))return;const y=null!=(g=null!=(m=null==(p=e.content)?void 0:p.size)?m:e.nodeSize)?g:0,v=Math.max(r,t),b=Math.min(o,t+y);if(v>=b)return;((e,t,n)=>{if(qw(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map((t=>{const n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith),n.push(t.replaceWith)),n})):[]})(e.isText?e.text||"":e.textBetween(v-t,b-t,void 0,""),i.find,s).forEach((e=>{if(void 0===e.index)return;const t=v+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=i.handler({state:n,range:o,match:e,commands:a,chain:c,can:u,pasteEvent:s,dropEvent:l});d.push(f)}))}));return d.every((e=>null!==e))}var Yx=null;function Xx(e){const{editor:t,rules:n}=e;let r,o=null,i=!1,s=!1,l="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{r="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{r=null}const a=({state:e,from:n,to:o,rule:i,pasteEvt:s})=>{const a=e.tr,c=Dw({state:e,transaction:a});if(Qx({editor:t,state:c,from:Math.max(n-1,0),to:o.b-1,rule:i,pasteEvent:s,dropEvent:r})&&a.steps.length){try{r="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{r=null}return l="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}};return n.map((e=>new $g({view(e){const n=n=>{var r;o=(null==(r=e.dom.parentElement)?void 0:r.contains(n.target))?e.dom.parentElement:null,o&&(Yx=t)},r=()=>{Yx&&(Yx=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(s=o===e.dom.parentElement,r=t,!s){const e=Yx;(null==e?void 0:e.isEditable)&&setTimeout((()=>{const t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})}),10)}return!1},paste:(e,t)=>
62{var n;const r=null==(n=t.clipboardData)?void 0:n.getData("text/html");return l=t,i=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(t,n,r)=>{const o=t[0],c="paste"===o.getMeta("uiEvent")&&!i,u="drop"===o.getMeta("uiEvent")&&!s,d=o.getMeta("applyPasteRules"),f=!!d;if(!c&&!u&&!f)return;if(f){let{text:t}=d;"string"==typeof t||(t=Uk(xp.from(t),r.schema));const{from:n}=d,o=n+t.length,i=(e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null==(t=n.clipboardData)||t.setData("text/html",e),n})(t);return a({rule:e,state:r,from:n,to:{b:o},pasteEvt:i})}const h=n.doc.content.findDiffStart(r.doc.content),p=n.doc.content.findDiffEnd(r.doc.content);return"number"==typeof h&&p&&h!==p.b?a({rule:e,state:r,from:h,to:p,pasteEvt:l}):void 0}})))}var Gx=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=tx(e),this.schema=function(e,t){var n;const r=Jk(e),{nodeExtensions:o,markExtensions:i}=Kk(e),s=null==(n=o.find((e=>jk(e,"topNode"))))?void 0:n.name,l=Object.fromEntries(o.map((n=>{const o=r.filter((e=>e.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:t},s=Gk({...e.reduce(((e,t)=>{const r=jk(t,"extendNodeSchema",i);return{...e,...r?r(n):{}}}),{}),content:qk(jk(n,"content",i)),marks:qk(jk(n,"marks",i)),group:qk(jk(n,"group",i)),inline:qk(jk(n,"inline",i)),atom:qk(jk(n,"atom",i)),selectable:qk(jk(n,"selectable",i)),draggable:qk(jk(n,"draggable",i)),code:qk(jk(n,"code",i)),whitespace:qk(jk(n,"whitespace",i)),linebreakReplacement:qk(jk(n,"linebreakReplacement",i)),defining:qk(jk(n,"defining",i)),isolating:qk(jk(n,"isolating",i)),attrs:Object.fromEntries(o.map(Zk))}),l=qk(jk(n,"parseHTML",i));l&&(s.parseDOM=l.map((e=>Xk(e,o))));const a=jk(n,"renderHTML",i);a&&(s.toDOM=e=>a({node:e,HTMLAttributes:Yk(e,o)}));const c=jk(n,"renderText",i);return c&&(s.toText=c),[n.name,s]}))),a=Object.fromEntries(i.map((n=>{const o=r.filter((e=>e.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:t},s=Gk({...e.reduce(((e,t)=>{const r=jk(t,"extendMarkSchema",i);return{...e,...r?r(n):{}}}),{}),inclusive:qk(jk(n,"inclusive",i)),excludes:qk(jk(n,"excludes",i)),group:qk(jk(n,"group",i)),spanning:qk(jk(n,"spanning",i)),code:qk(jk(n,"code",i)),attrs:Object.fromEntries(o.map(Zk))}),l=qk(jk(n,"parseHTML",i));l&&(s.parseDOM=l.map((e=>Xk(e,o))));const a=jk(n,"renderHTML",i);return a&&(s.toDOM=e=>a({mark:e,HTMLAttributes:Yk(e,o)})),[n.name,s]})));return new dm({topNode:s,nodes:l,marks:a})}(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce(((e,t)=>{const n=jk(t,"addCommands",{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:cx(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this;return ex([...this.extensions].reverse()).flatMap((t=>{const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:cx(t.name,this.schema)},r=[],o=jk(t,"addKeyboardShortcuts",n);let i={};if("mark"===t.type&&jk(t,"exitable",n)&&(i.ArrowRight=()=>Kx.handleExit({editor:e,mark:t})),o){const t=Object.fromEntries(Object.entries(o()).map((([t,n])=>[t,()=>n({editor:e})])));i={...i,...t}}const s=new $g({props:{handleKeyDown:Ow(i)}});r.push(s);const l=jk(t,"addInputRules",n);if(px(t,e.options.enableInputRules)&&l){const t=l();if(t&&t.length){const n=function(e){const{editor:t,rules:n}=e,r=new $g({state:{init:()=>null,apply(e,o,i){const s=e.getMeta(r);if(s)return s;const l=e.getMeta("applyInputRules");return!!l&&setTimeout((()=>{let{text:e}=l;"string"==typeof e||(e=Uk(xp.from(e),i.schema));const{from:o}=l,s=o+e.length;Wx({editor:t,from:o,to:s,text:e,rules:n,plugin:r})})),e.selectionSet||e.docChanged?null:o}},props:{handleTextInput:(e,o,i,s)=>Wx({editor:t,from:o,to:i,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:o}=e.state.selection;o&&Wx({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,o){if("Enter"!==o.key)return!1;const{$cursor:i}=e.state.selection;return!!i&&Wx({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:t}),o=Array.isArray(n)?n:[n];r.push(...o)}}const a=jk(t,"addPasteRules",n);if(px(t,e.options.enablePasteRules)&&a){const t=a();if(t&&t.length){const n=Xx({editor:e,rules:t});r.push(...n)}}const c=jk(t,"addProseMirrorPlugins",n);if(c){const e=c();
62r.push(...e)}return r}))}get attributes(){return Jk(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Kk(this.extensions);return Object.fromEntries(t.filter((e=>!!jk(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Bw(t.name,this.schema)},o=jk(t,"addNodeView",r);if(!o)return[];const i=o();if(!i)return[];return[t.name,(r,o,s,l,a)=>{const c=Yk(r,n);return i({node:r,view:o,getPos:s,decorations:l,innerDecorations:a,editor:e,extension:t,HTMLAttributes:c})}]})))}get markViews(){const{editor:e}=this,{markExtensions:t}=Kk(this.extensions);return Object.fromEntries(t.filter((e=>!!jk(e,"addMarkView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Xw(t.name,this.schema)},o=jk(t,"addMarkView",r);if(!o)return[];return[t.name,(r,i,s)=>{const l=Yk(r,n);return o()({mark:r,view:i,inline:s,editor:e,extension:t,HTMLAttributes:l,updateAttributes:t=>{!function(e,t,n={}){const{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants(((t,r)=>{const o=i.mapping.map(r),l=i.mapping.map(r)+t.nodeSize;let a=null;if(t.marks.forEach((e=>{if(e!==s)return!1;a=e})),!a)return;let c=!1;if(Object.keys(n).forEach((e=>{n[e]!==a.attrs[e]&&(c=!0)})),c){const t=e.type.create({...e.attrs,...n});i.removeMark(o,l,e.type),i.addMark(o,l,t)}})),i.docChanged&&t.view.dispatch(i)}(r,e,t)}})}]})))}setupExtensions(){const e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map((e=>[e.name,e.storage]))),e.forEach((e=>{var t;const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:cx(e.name,this.schema)};if("mark"===e.type){(null==(t=qk(jk(e,"keepOnSplit",n)))||t)&&this.splittableMarks.push(e.name)}const r=jk(e,"onBeforeCreate",n),o=jk(e,"onCreate",n),i=jk(e,"onUpdate",n),s=jk(e,"onSelectionUpdate",n),l=jk(e,"onTransaction",n),a=jk(e,"onFocus",n),c=jk(e,"onBlur",n),u=jk(e,"onDestroy",n);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),i&&this.editor.on("update",i),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),a&&this.editor.on("focus",a),c&&this.editor.on("blur",c),u&&this.editor.on("destroy",u)}))}};Gx.resolve=tx,Gx.sort=ex,Gx.flatten=Wk;Tw({},{ClipboardTextSerializer:()=>eS,Commands:()=>tS,Delete:()=>nS,Drop:()=>rS,Editable:()=>oS,FocusEvents:()=>sS,Keymap:()=>lS,Paste:()=>aS,Tabindex:()=>cS,TextDirection:()=>uS,focusEventsPluginKey:()=>iS});var Zx=class e extends qx{constructor(){super(...arguments),this.type="extension"}static create(t={}){const n="function"==typeof t?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){const t="function"==typeof e?e():e;return super.extend(t)}},eS=Zx.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new $g({key:new Bg("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map((e=>e.$from.pos))),l=Math.max(...i.map((e=>e.$to.pos))),a=rx(n);return nx(r,{from:s,to:l},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),tS=Zx.create({name:"commands",addCommands:()=>({...Pw})}),nS=Zx.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;const i=()=>{var n,r,o,i;if(null!=(i=null==(o=null==(r=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:r.filterTransaction)?void 0:o.call(r,e))?i:e.getMeta("y-sync$"))return;const s=Fk(e.before,[e,...t]);sx(s).forEach((t=>{s.mapping.mapResult(t.oldRange.from).deletedAfter&&s.mapping.mapResult(t.oldRange.to).deletedBefore&&s.before.nodesBetween(t.oldRange.from,t.oldRange.to,((n,r)=>{const o=r+n.nodeSize-2,i=t.oldRange.from<=r&&o<=t.oldRange.to;this.editor.emit("delete",{type:"node",node:n,from:r,to:o,newFrom:s.mapping.map(r),newTo:s.mapping.map(o),deletedRange:t.oldRange,newRange:t.newRange,partial:!i,editor:this.editor,transaction:e,combinedTransform:s})}
62))}));const l=s.mapping;s.steps.forEach(((t,n)=>{var r,o;if(t instanceof Fm){const i=l.slice(n).map(t.from,-1),a=l.slice(n).map(t.to),c=l.invert().map(i,-1),u=l.invert().map(a),d=null==(r=s.doc.nodeAt(i-1))?void 0:r.marks.some((e=>e.eq(t.mark))),f=null==(o=s.doc.nodeAt(a))?void 0:o.marks.some((e=>e.eq(t.mark)));this.editor.emit("delete",{type:"mark",mark:t.mark,from:t.from,to:t.to,deletedRange:{from:c,to:u},newRange:{from:i,to:a},partial:Boolean(f||d),editor:this.editor,transaction:e,combinedTransform:s})}}))};null==(o=null==(r=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:r.async)||o?setTimeout(i,0):i()}}),rS=Zx.create({name:"drop",addProseMirrorPlugins(){return[new $g({key:new Bg("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),oS=Zx.create({name:"editable",addProseMirrorPlugins(){return[new $g({key:new Bg("editable"),props:{editable:()=>this.editor.options.editable}})]}}),iS=new Bg("focusEvents"),sS=Zx.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new $g({key:iS,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),lS=Zx.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:o,$anchor:i}=n,{pos:s,parent:l}=i,a=i.parent.isTextblock&&s>0?t.doc.resolve(s-1):i,c=a.parent.type.spec.isolating,u=i.pos-i.parentOffset,d=c&&1===a.parent.childCount?u===i.pos:vg.atStart(r).from===s;return!(!o||!l.type.isTextblock||l.textContent.length||!d||d&&"paragraph"===i.parent.type.name)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return rk()||bk()?o:r},addProseMirrorPlugins(){return[new $g({key:new Bg("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some((e=>e.getMeta("composition"))))return;const r=e.some((e=>e.docChanged))&&!t.doc.eq(n.doc),o=e.some((e=>e.getMeta("preventClearDocument")));if(!r||o)return;const{empty:i,from:s,to:l}=t.selection,a=vg.atStart(t.doc).from,c=vg.atEnd(t.doc).to;if(i||!(s===a&&l===c))return;if(!gx(n.doc))return;const u=n.tr,d=Dw({state:n,transaction:u}),{commands:f}=new Rw({editor:this.editor,state:d});return f.clearNodes(),u.steps.length?u:void 0}})]}}),aS=Zx.create({name:"paste",addProseMirrorPlugins(){return[new $g({key:new Bg("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),cS=Zx.create({name:"tabindex",addProseMirrorPlugins(){return[new $g({key:new Bg("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),uS=Zx.create({name:"textDirection",addOptions:()=>({direction:void 0}),addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:e}=Kk(this.extensions);return[{types:e.filter((e=>"text"!==e.name)).map((e=>e.name)),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const t=e.getAttribute("dir");return!t||"ltr"!==t&&"rtl"!==t&&"auto"!==t?this.options.direction:t},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new $g({key:new Bg("textDirection"),props:{attributes:()=>{const e=this.options.direction;return e?{dir:e}:{}}}})]}}),dS=class e{constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}
vendor: 4,188 bytes, line 62
62get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return null!=(e=this.actualDepth)?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return;t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){const t=[];return this.node.content.forEach(((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(s);if(!o&&l.depth<=this.depth)return;const a=new e(l,this.editor,o,o?n:null);o&&(a.actualDepth=this.depth+1),t.push(new e(l,this.editor,o,o?n:null))})),t}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){const e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];if(e[o]!==t[o])break}}else n=r;r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;const o=Object.keys(t);return this.children.forEach((i=>{if(!(n&&r.length>0)){if(i.node.type.name===e){o.every((e=>t[e]===i.node.attrs[e]))&&r.push(i)}n&&r.length>0||(r=r.concat(i.querySelectorAll(e,t,n)))}})),r}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}};var fS=class extends Vx{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:"undefined"!=typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",(({event:e,slice
62:t,moved:n})=>this.options.onDrop(e,t,n))),this.on("paste",(({event:e,slice:t})=>this.options.onPaste(e,t))),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=nk(t,this.options.autofocus);this.editorState=Ig.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if("undefined"==typeof document)throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout((()=>{this.isDestroyed||(!1!==this.options.autofocus&&null!==this.options.autofocus&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)}),0)}unmount(){if(this.editorView){const e=this.editorView.dom;(null==e?void 0:e.editor)&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{"function"==typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&"undefined"!=typeof document&&(this.css=function(e,t){const n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;const r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}
62\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}',this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if("state"===t)return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){const n=Hk(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach((e=>{const t="string"==typeof e?`${e}$`:e.key;n=n.filter((e=>!e.key.startsWith(t)))})),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const n=[...this.options.enableCoreExtensions?[oS,eS.configure({blockSeparator:null==(t=null==(e=this.options.coreExtensionOptions)?void 0:e.clipboardTextSerializer)?void 0:t.blockSeparator}),tS,sS,lS,cS,rS,aS,nS,uS.configure({direction:this.options.textDirection})].filter((e=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[e.name])):[],...this.options.extensions].filter((e=>["extension","node","mark"].includes(null==e?void 0:e.type)));this.extensionManager=new Gx(n,this)}createCommandManager(){this.commandManager=new Rw({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Lk(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(tC){if(!(tC instanceof Error&&["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(tC.message)))throw tC;this.emit("contentError",{editor:this,error:tC,disableCollaboration:()=>{"collaboration"in this.storage&&"object"==typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter((e=>"collaboration"!==e.name)),this.createExtensionManager()}}),e=Lk(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new dw(e,{...this.options.editorProps,attributes:{role:"textbox",...null==(t=this.options.editorProps)?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((e=>{var t;return null==(t=this.capturedTransaction)?void 0:t.step(e)})):void(this.capturedTransaction=e);const{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),o=n.includes(e),i=this.state;
62if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!o)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const s=n.findLast((e=>e.getMeta("focus")||e.getMeta("blur"))),l=null==s?void 0:s.getMeta("focus"),a=null==s?void 0:s.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),e.getMeta("preventUpdate")||!n.some((e=>e.docChanged))||i.doc.eq(t.doc)||this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return ox(this.state,e)}isActive(e,t){const n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return kk(e,null,n)||dx(e,null,n);const r=Mk(t,e.schema);return"node"===r?kk(e,t,n):"mark"===r&&dx(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Uk(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){return nx(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...rx(this.schema),...n}})}get isEmpty(){return gx(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return null==(t=null==(e=this.editorView)?void 0:e.isDestroyed)||t}$node(e,t){var n;return(null==(n=this.$doc)?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return(null==(n=this.$doc)?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new dS(t,this)}get $doc(){return this.$pos(0)}};function hS(e){return new jx({find:e.find,handler:({state:t,range:n,match:r})=>{const o=qk(e.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=t,s=r[r.length-1],l=r[0];if(s){const r=l.search(/\S/),a=n.from+l.indexOf(s),c=a+s.length;if(lx(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>a)).length)return null;c<n.to&&i.delete(c,n.to),a>n.from&&i.delete(n.from+r,a);const u=n.from+r+s.length;i.addMark(n.from+r,u,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function pS(e){return new jx({find:e.find,handler:({state:t,range:n,match:r})=>{const o=qk(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let l=n.to;const a=e.type.create(o);if(r[1]){let e=s+r[0].lastIndexOf(r[1]);e>l?e=l:l=e+r[1].length;const t=r[0][r[0].length-1];i.insertText(t,s+r[0].length-1),i.replaceWith(e,l,a)}else if(r[0]){const t=e.type.isInline?s:s-1;i.insert(t,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:e.undoable})}function mS(e){return new jx({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=qk(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function gS(e){return new jx({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=qk(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),a=l&&Jm(l,e.type,i);if(!a)return null;if(s.wrap(l,a),e.keepMarks&&e.editor){const{selection:n,storedMarks:r}=t,{splittableMarks:o}=e.editor.extensionManager,i=r||n.$to.parentOffset&&n.$from.marks();if(i){const e=i.filter((e=>o.includes(e.type.name)));s.ensureMarks(e)}}if(e.keepAttributes){const t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";o().updateAttributes(t,i).run()}const c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&Zm(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}var yS=class{constructor(e){var t,n,r,o,i;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.handleMouseMove=e=>{if(!this.isResizing||!this.activeHandle)return;const t=e.clientX-this.startX,n=e.clientY-this.startY;this.handleResize(t,n)},this.handleTouchMove=e=>{if(!this.isResizing||!this.activeHandle)return;const t=e.touches[0];if(!t)return;const n=t.clientX-this.startX,r=t.clientY-this.startY;this.handleResize(n,r)},this.handleMouseUp=()=>
62{if(!this.isResizing)return;const e=this.element.offsetWidth,t=this.element.offsetHeight;this.onCommit(e,t),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=e=>{"Shift"===e.key&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=e=>{"Shift"===e.key&&(this.isShiftKeyPressed=!1)},this.node=e.node,this.element=e.element,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,(null==(t=e.options)?void 0:t.min)&&(this.minSize={...this.minSize,...e.options.min}),(null==(n=e.options)?void 0:n.max)&&(this.maxSize=e.options.max),(null==(r=null==e?void 0:e.options)?void 0:r.directions)&&(this.directions=e.options.directions),(null==(o=e.options)?void 0:o.preserveAspectRatio)&&(this.preserveAspectRatio=e.options.preserveAspectRatio),(null==(i=e.options)?void 0:i.className)&&(this.classNames={container:e.options.className.container||"",wrapper:e.options.className.wrapper||"",handle:e.options.className.handle||"",resizing:e.options.className.resizing||""}),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles()}get dom(){return this.container}get contentDOM(){return this.contentElement}update(e,t,n){return e.type===this.node.type&&(this.node=e,!this.onUpdate||this.onUpdate(e,t,n))}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.container.remove()}createContainer(){const e=document.createElement("div");return e.dataset.resizeContainer="",e.dataset.node=this.node.type.name,e.style.display="flex",e.style.justifyContent="flex-start",e.style.alignItems="flex-start",this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){const e=document.createElement("div");return e.style.position="relative",e.style.display="block",e.dataset.resizeWrapper="",this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){const t=document.createElement("div");return t.dataset.resizeHandle=e,t.style.position="absolute",this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){const n=t.includes("top"),r=t.includes("bottom"),o=t.includes("left"),i=t.includes("right");n&&(e.style.top="0"),r&&(e.style.bottom="0"),o&&(e.style.left="0"),i&&(e.style.right="0"),"top"!==t&&"bottom"!==t||(e.style.left="0",e.style.right="0"),"left"!==t&&"right"!==t||(e.style.top="0",e.style.bottom="0")}attachHandles(){this.directions.forEach((e=>{const t=this.createHandle(e);this.positionHandle(t,e),t.addEventListener("mousedown",(t=>this.handleResizeStart(t,e))),t.addEventListener("touchstart",(t=>this.handleResizeStart(t,e))),this.wrapper.appendChild(t)}))}applyInitialSize(){const e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,"touches"in e?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:o}=this.calculateNewDimensions(this.activeHandle,e,t),i=this.applyConstraints(r,o,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(e,t,n){let r=this.startWidth,o=this.startHeight;const i=e.includes("right"),s=e.includes("left"),l=e.includes("bottom"),a=e.includes("top");i?r=this.startWidth+t:s&&(r=this.startWidth-t),l?o=this.startHeight+n:a&&(o=this.startHeight-n),"right"!==e&&"left"!==e||(r=this.startWidth+(i?t:-t)),"top"!==e&&"bottom"!==e||(o=this.startHeight+(l?n:-n));return this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,o,e):{width:r,height:o}}
62applyConstraints(e,t,n){var r,o,i,s;if(!n){let n=Math.max(this.minSize.width,e),i=Math.max(this.minSize.height,t);return(null==(r=this.maxSize)?void 0:r.width)&&(n=Math.min(this.maxSize.width,n)),(null==(o=this.maxSize)?void 0:o.height)&&(i=Math.min(this.maxSize.height,i)),{width:n,height:i}}let l=e,a=t;return l<this.minSize.width&&(l=this.minSize.width,a=l/this.aspectRatio),a<this.minSize.height&&(a=this.minSize.height,l=a*this.aspectRatio),(null==(i=this.maxSize)?void 0:i.width)&&l>this.maxSize.width&&(l=this.maxSize.width,a=l/this.aspectRatio),(null==(s=this.maxSize)?void 0:s.height)&&a>this.maxSize.height&&(a=this.maxSize.height,l=a*this.aspectRatio),{width:l,height:a}}applyAspectRatio(e,t,n){const r="top"===n||"bottom"===n;return"left"===n||"right"===n?{width:e,height:e/this.aspectRatio}:r?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}};function vS(e,t){const{selection:n}=e,{$from:r}=n;if(n instanceof Cg){const e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let o=r.depth;for(;o>=0;){const e=r.index(o);if(r.node(o).contentMatchAt(e).matchType(t))return!0;o-=1}return!1}function bS(e){if(!(null==e?void 0:e.trim()))return{};const t={},n=[],r=e.replace(/["']([^"']*)["']/g,(e=>(n.push(e),`__QUOTED_${n.length-1}__`))),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){const e=o.map((e=>e.trim().slice(1)));t.class=e.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(t.id=i[1]);Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach((([,e,r])=>{var o;const i=parseInt((null==(o=r.match(/__QUOTED_(\d+)__/))?void 0:o[1])||"0",10),s=n[i];s&&(t[e]=s.slice(1,-1))}));const s=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(s){s.split(/\s+/).filter(Boolean).forEach((e=>
62{e.match(/^[a-zA-Z][\w-]*$/)&&(t[e]=!0)}))}return t}function wS(e){if(!e||0===Object.keys(e).length)return"";const t=[];if(e.class){String(e.class).split(/\s+/).filter(Boolean).forEach((e=>t.push(`.${e}`)))}return e.id&&t.push(`#${e.id}`),Object.entries(e).forEach((([e,n])=>{"class"!==e&&"id"!==e&&(!0===n?t.push(e):!1!==n&&null!=n&&t.push(`${e}="${String(n)}"`))})),t.join(" ")}function kS(e){const{nodeName:t,name:n,parseAttributes:r=bS,serializeAttributes:o=wS,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=e,a=n||t;return{parseMarkdown:(e,n)=>{const r={...i,...e.attributes};return n.createNode(t,r,[])},markdownTokenizer:{name:t,level:"block",start(e){var t;const n=new RegExp(`^:::${a}(?:\\s|$)`,"m"),r=null==(t=e.match(n))?void 0:t.index;return void 0!==r?r:-1},tokenize(e,n,o){const i=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),l=e.match(i);if(!l)return;const c=l[1]||"",u=r(c);return s.find((e=>!(e in u)))?void 0:{type:t,raw:l[0],attributes:u}}},renderMarkdown:e=>{const t=(e=>{if(!l)return e;const t={};return l.forEach((n=>{n in e&&(t[n]=e[n])})),t})(e.attrs||{}),n=o(t);return`:::${a}${n?` {${n}}`:""} :::`}}}function xS(e){const{nodeName:t,name:n,getContent:r,parseAttributes:o=bS,serializeAttributes:i=wS,defaultAttributes:s={},content:l="block",allowedAttributes:a}=e,c=n||t;return{parseMarkdown:(e,n)=>{let o;if(r){const t=r(e);o="string"==typeof t?[{type:"text",text:t}]:t}else o="block"===l?n.parseChildren(e.tokens||[]):n.parseInline(e.tokens||[]);const i={...s,...e.attributes};return n.createNode(t,i,o)},markdownTokenizer:{name:t,level:"block",start(e){var t;const n=new RegExp(`^:::${c}`,"m"),r=null==(t=e.match(n))?void 0:t.index;return void 0!==r?r:-1},tokenize(e,n,r){var i;const s=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),a=e.match(s);if(!a)return;const[u,d=""]=a,f=o(d);let h=1;const p=u.length;let m="";const g=/^:::([\w-]*)(\s.*)?/gm,y=e.slice(p);for(g.lastIndex=0;;){const n=g.exec(y);if(null===n)break;const o=n.index,s=n[1];if(!(null==(i=n[2])?void 0:i.endsWith(":::")))if(s)h+=1;else if(h-=1,0===h){const i=y.slice(0,o);m=i.trim();const s=e.slice(0,p+o+n[0].length);let a=[];if(m)if("block"===l)for(a=r.blockTokens(i),a.forEach((e=>{!e.text||e.tokens&&0!==e.tokens.length||(e.tokens=r.inlineTokens(e.text))}));a.length>0;){const e=a[a.length-1];if("paragraph"!==e.type||e.text&&""!==e.text.trim())break;a.pop()}else a=r.inlineTokens(m);return{type:t,raw:s,attributes:f,content:m,tokens:a}}}}},renderMarkdown:(e,t)=>{const n=(e=>{if(!a)return e;const t={};return a.forEach((n=>{n in e&&(t[n]=e[n])})),t})(e.attrs||{}),r=i(n),o=r?` {${r}}`:"",s=t.renderChildren(e.content||[],"\n\n");return`:::${c}${o}\n\n${s}\n\n:::`}}}function SS(e){if(!e.trim())return{};const t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(e);for(;null!==r;){const[,o,i,s]=r;t[o]=i||s,r=n.exec(e)}return t}function CS(e){return Object.entries(e).filter((([,e])=>null!=e)).map((([e,t])=>`${e}="${t}"`)).join(" ")}function ES(e){const{nodeName:t,name:n,getContent:r,parseAttributes:o=SS,serializeAttributes:i=CS,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=e,c=n||t,u=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(e,n)=>{const o={...s,...e.attributes};if(l)return n.createNode(t,o);const i=r?r(e):e.content||"";return i?n.createNode(t,o,[n.createTextNode(i)]):n.createNode(t,o,[])},markdownTokenizer:{name:t,level:"inline",start(e){const t=l?new RegExp(`\\[${u}\\s*[^\\]]*\\]`):new RegExp(`\\[${u}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${u}\\]`),n=e.match(t),r=null==n?void 0:n.index;return void 0!==r?r:-1},tokenize(e,n,r){const i=l?new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`),s=e.match(i);if(!s)return;let a="",c="";if(l){const[,e]=s;c=e}else{const[,e,t]=s;c=e,a=t||""}const d=o(c.trim());return{type:t,raw:s[0],content:a.trim(),attributes:d}}},renderMarkdown:e=>{let t="";r?t=r(e):e.content&&e.content.length>0&&(t=e.content.filter((e=>"text"===e.type)).map((e=>e.text)).join(""));const n=(e=>{if(!a)return e;const t={};return a.forEach((n=>{n in e&&(t[n]=e[n])})),t})(e.attrs||{}),o=i(n),s=o?` ${o}`:"";return l?`[${c}${s}]`:`[${c}${s}]${t}[/${c}]`}}}function MS(e,t,n){var r,o,i,s;const l=e.split("\n"),a=[];let c="",u=0;const d=t.baseIndentSize||2;for(;u<l.length;){const e=l[u],f=e.match(t.itemPattern);if(!f){if(a.length>0)break;if(""===e.trim()){u+=1,c=`${c}${e}\n`;continue}return}const h=t.extractItemData(f),{indentLevel:p,mainContent:m}=h;c=`${c}${e}\n`;const g=[m];for(u+=1;u<l.length;){const e=l[u];if(""===e.trim()){const t=l.slice(u+1).findIndex((e=>""!==e.trim()));if(-1===t)break;
62if(((null==(o=null==(r=l[u+1+t].match(/^(\s*)/))?void 0:r[1])?void 0:o.length)||0)>p){g.push(e),c=`${c}${e}\n`,u+=1;continue}break}if(!(((null==(s=null==(i=e.match(/^(\s*)/))?void 0:i[1])?void 0:s.length)||0)>p))break;g.push(e),c=`${c}${e}\n`,u+=1}let y;const v=g.slice(1);if(v.length>0){const e=v.map((e=>e.slice(p+d))).join("\n");e.trim()&&(y=t.customNestedParser?t.customNestedParser(e):n.blockTokens(e))}const b=t.createToken(h,y);a.push(b)}if(0!==a.length)return{items:a,raw:c}}function OS(e,t,n,r){if(!e||!Array.isArray(e.content))return"";const o="function"==typeof n?n(r):n,[i,...s]=e.content,l=[`${o}${t.renderChildren([i])}`];return s&&s.length>0&&s.forEach((e=>{const n=t.renderChildren([e]);if(n){const e=n.split("\n").map((e=>e?t.indent(e):"")).join("\n");l.push(e)}})),l.join("\n")}Tw({},{createAtomBlockMarkdownSpec:()=>kS,createBlockMarkdownSpec:()=>xS,createInlineMarkdownSpec:()=>ES,parseAttributes:()=>bS,parseIndentedBlocks:()=>MS,renderNestedMarkdownContent:()=>OS,serializeAttributes:()=>wS});var NS=class e extends qx{constructor(){super(...arguments),this.type="node"}static create(t={}){const n="function"==typeof t?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){const t="function"==typeof e?e():e;return super.extend(t)}};function TS(e){return new Jx({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=qk(e.getAttributes,void 0,r,o);if(!1===i||null===i)return null;const{tr:s}=t,l=r[r.length-1],a=r[0];let c=n.to;if(l){const r=a.search(/\S/),o=n.from+a.indexOf(l),u=o+l.length;if(lx(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>o)).length)return null;u<n.to&&s.delete(u,n.to),o>n.from&&s.delete(n.from+r,o),c=n.from+r+l.length,s.addMark(n.from+r,c,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}var DS=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var s=i[o];if(("_owner"!==s||!t.$$typeof)&&!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n};const RS=n(DS);var PS={exports:{}},zS={},AS=V,IS=vp;var LS="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},$S=IS.useSyncExternalStore,_S=AS.useRef,FS=AS.useEffect,BS=AS.useMemo,VS=AS.useDebugValue;zS.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=_S(null);if(null===i.current){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=BS((function(){function e(e){if(!a){if(a=!0,i=e,e=r(e),void 0!==o&&s.hasValue){var t=s.value;if(o(t,e))return l=t}return l=e}if(t=l,LS(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,l=n)}var i,l,a=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var l=$S(e,i[0],i[1]);return FS((function(){s.hasValue=!0,s.value=l}),[l]),VS(l),l},PS.exports=zS;var jS=PS.exports,WS=(...e)=>t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))},US=({contentComponent:e})=>{const t=vp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return X.jsx(X.Fragment,{children:Object.values(t)})};var HS=class extends j.Component{constructor(e){var t;super(e),this.editorContentRef=j.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:Bo
62olean(null==(t=e.editor)?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(e.view.dom),e.setOptions({element:t}),e.contentComponent=function(){const e=new Set;let t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:id.createPortal(r.reactElement,r.element,n)},e.forEach((e=>e()))},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach((e=>e()))}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe((()=>{this.setState((e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0})),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()}))),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;const t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.firstChild))return;const n=document.createElement("div");n.append(t.view.dom),t.setOptions({element:n})}catch{}}}render(){const{editor:e,innerRef:t,...n}=this.props;return X.jsxs(X.Fragment,{children:[X.jsx("div",{ref:WS(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&X.jsx(US,{contentComponent:e.contentComponent})]})}},qS=V.forwardRef(((e,t)=>{const n=j.useMemo((()=>Math.floor(4294967295*Math.random()).toString()),[e.editor]);return j.createElement(HS,{key:n,innerRef:t,...e})})),KS=j.memo(qS),JS="undefined"!=typeof window?V.useLayoutEffect:V.useEffect,QS=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach((e=>e()))},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}};var YS="undefined"==typeof window,XS=YS||Boolean("undefined"!=typeof window&&window.next),GS=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((e=>e()))}getInitialEditor(){return void 0===this.options.current.immediatelyRender?YS||XS?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)}};return new fS(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every((n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every(((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])})):e[n]===t[n])))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){
62if(null===this.previousDeps)return void(this.previousDeps=e);if(this.previousDeps.length===e.length&&this.previousDeps.every(((t,n)=>t===e[n])))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout((()=>{this.isComponentMounted&&this.instanceId===e?t&&t.setOptions(this.options.current):t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))}),1)}};function ZS(e={},t=[]){const n=V.useRef(e);n.current=e;const[r]=V.useState((()=>new GS(n))),o=vp.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return V.useDebugValue(o),V.useEffect(r.onRender(t)),function(e){var t;const[n]=V.useState((()=>new QS(e.editor))),r=jS.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:RS);JS((()=>n.watch(e.editor)),[e.editor,n]),V.useDebugValue(r)}({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}V.createContext({editor:null}).Consumer;var eC=V.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});j.forwardRef(((e,t)=>{const{onDragStart:n}=V.useContext(eC),r=e.as||"div";return X.jsx(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})})),j.createContext({markViewContentRef:()=>{}});export{Np as $,vS as A,yx as B,Cg as C,pS as D,Fk as E,sx as F,Bk as G,lx as H,ox as I,OS as J,Zx as K,Nf as L,Kx as M,hf as N,MS as O,$g as P,Bw as Q,j as R,vg as S,xg as T,ax as U,kk as V,hx as W,fx as X,ng as Y,Ow as Z,xp as _,W as a,Bb as a0,$b as a1,zm as a2,qk as a3,jk as a4,gx as a5,yS as a6,ZS as a7,KS as a8,t as a9,Tf as aa,gf as ab,pf as ac,sd as ad,Ef as ae,od as b,Fh as c,ip as d,lp as e,op as f,n as g,sp as h,id as i,X as j,Af as k,rp as l,nf as m,tf as n,tp as o,Zd as p,NS as q,V as r,np as s,Qk as t,Zh as u,hS as v,gS as w,TS as x,mS as y,Bg as z};
63//# sourceMappingURL=chunk-Dn8Knuz1.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.