PageSourceSearch

https://vodi.app/assets/index-BC7liZns.js

js vodi.app collected 2026-10-10 02:26:12 UTC 616,487 bytes, 533 lines download raw bytes

vendor: 19,524 bytes, lines 1-34
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function xg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var kg={exports:{}},ba={},wg={exports:{}},H={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var eo=Symbol.for("react.element"),_x=Symbol.for("react.portal"),Bx=Symbol.for("react.fragment"),$x=Symbol.for("react.strict_mode"),Fx=Symbol.for("react.profiler"),Vx=Symbol.for("react.provider"),Hx=Symbol.for("react.context"),Ux=Symbol.for("react.forward_ref"),Wx=Symbol.for("react.suspense"),qx=Symbol.for("react.memo"),Kx=Symbol.for("react.lazy"),Mh=Symbol.iterator;function Jx(t){return t===null||typeof t!="object"?null:(t=Mh&&t[Mh]||t["@@iterator"],typeof t=="function"?t:null)}var Sg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cg=Object.assign,Eg={};function Ai(t,e,n){this.props=t,this.context=e,this.refs=Eg,this.updater=n||Sg}Ai.prototype.isReactComponent={};Ai.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)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,t,e,"setState")};Ai.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function bg(){}bg.prototype=Ai.prototype;function $d(t,e,n){this.props=t,this.context=e,this.refs=Eg,this.updater=n||Sg}var Fd=$d.prototype=new bg;Fd.constructor=$d;Cg(Fd,Ai.prototype);Fd.isPureReactComponent=!0;var Nh=Array.isArray,Mg=Object.prototype.hasOwnProperty,Vd={current:null},Ng={key:!0,ref:!0,__self:!0,__source:!0};function Tg(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)Mg.call(e,r)&&!Ng.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:eo,type:t,key:s,ref:o,props:i,_owner:Vd.current}}function Gx(t,e){return{$$typeof:eo,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Hd(t){return typeof t=="object"&&t!==null&&t.$$typeof===eo}function Qx(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Th=/\/+/g;function lu(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Qx(""+t.key):e.toString(36)}function qo(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case eo:case _x:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+lu(o,0):r,Nh(i)?(n="",t!=null&&(n=t.replace(Th,"$&/")+"/"),qo(i,e,n,"",function(u){return u})):i!=null&&(Hd(i)&&(i=Gx(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Th,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Nh(t))for(var l=0;l<t.length;l++){s=t[l];var a=r+lu(s,l);o+=qo(s,e,n,a,i)}else if(a=Jx(t),typeof a=="function")for(t=a.call(t),l=0;!(s=t.next()).done;)s=s.value,a=r+lu(s,l++),o+=qo(s,e,n,a,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function mo(t,e,n){if(t==null)return t;var r=[],i=0;return qo(t,r,"","",function(s){return e.call(n,s,i++)}),r}function Yx(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Je={current:null},Ko={transition:null},Xx={ReactCurrentDispatcher:Je,ReactCurrentBatchConfig:Ko,ReactCurrentOwner:Vd};function Ag(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:mo,forEach:function(t,e,n){mo(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return mo(t,function(){e++}),e},toArray:function(t){return mo(t,function(e){return e})||[]},only:function(t){if(!Hd(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};H.Component=Ai;H.Fragment=Bx;H.Profiler=Fx;H.PureComponent=$d;H.StrictMode=$x;H.Suspense=Wx;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xx;H.act=Ag;H.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Cg({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Vd.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(a in e)Mg.call(e,a)&&!Ng.hasOwnProperty(a)&&(r[a]=e[a]===void 0&&l!==void 0?l[a]:e[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:eo,type:t.type,key:i,ref:s,props:r,_owner:o}};H.createContext=function(t){return t={$$typeof:Hx,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Vx,_context:t},t.Consumer=t};H.createElement=Tg;H.createFactory=function(t){var e=Tg.bind(null,t);return e.type=t,e};H.createRef=function(){return{current:null}};H.forwardRef=function(t){return{$$typeof:Ux,render:t}};H.isValidElement=Hd;H.lazy=function(t){return{$$typeof:Kx,_payload:{_status:-1,_result:t},_init:Yx}};H.memo=function(t,e){return{$$typeof:qx,type:t,compare:e===void 0?null:e}};H.startTransition=function(t){var e=Ko.transition;Ko.transition={};try{t()}finally{Ko.transition=e}};H.unstable_act=Ag;H.useCallback=function(t,e){return Je.current.useCallback(t,e)};H.useContext=function(t){return Je.current.useContext(t)};H.useDebugValue=function(){};H.useDeferredValue=function(t){return Je.current.useDeferredValue(t)};H.useEffect=function(t,e){return Je.current.useEffect(t,e)};H.useId=function(){return Je.current.useId()};H.useImperativeHandle=function(t,e,n){return Je.current.useImperativeHandle(t,e,n)};H.useInsertionEffect=function(t,e){return Je.current.useInsertionEffect(t,e)};H.useLayoutEffect=function(t,e){return Je.current.useLayoutEffect(t,e)};H.useMemo=function(t,e){return Je.current.useMemo(t,e)};H.useReducer=function(t,e,n){return Je.current.useReducer(t,e,n)};H.useRef=function(t){return Je.current.useRef(t)};H.useState=function(t){return Je.current.useState(t)};H.useSyncExternalStore=function(t,e,n){return Je.current.useSyncExternalStore(t,e,n)};H.useTransition=function(){return Je.current.useTransition()};H.version="18.3.1";wg.exports=H;var C=wg.exports;const Sr=xg(C);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Zx=C,ek=Symbol.for("react.element"),tk=Symbol.for("react.fragment"),nk=Object.prototype.hasOwnProperty,rk=Zx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ik={key:!0,ref:!0,__self:!0,__source:!0};function Og(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)nk.call(e,r)&&!ik.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:ek,type:t,key:s,ref:o,props:i,_owner:rk.current}}ba.Fragment=tk;ba.jsx=Og;ba.jsxs=Og;kg.exports=ba;var x=kg.exports,Rg={exports:{}},ut={},Ig={exports:{}},Dg={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(L,B){var V=L.length;L.push(B);e:for(;0<V;){var he=V-1>>>1,Ee=L[he];if(0<i(Ee,B))L[he]=B,L[V]=Ee,V=he;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var B=L[0],V=L.pop();if(V!==B){L[0]=V;e:for(var he=0,Ee=L.length,ho=Ee>>>1;he<ho;){var nr=2*(he+1)-1,ou=L[nr],rr=nr+1,po=L[rr];if(0>i(ou,V))rr<Ee&&0>i(po,ou)?(L[he]=po,L[rr]=V,he=rr):(L[he]=ou,L[nr]=V,he=nr);else if(rr<Ee&&0>i(po,V))L[he]=po,L[rr]=V,he=rr;else break e}}return B}function i(L,B){var V=L.sortIndex-B.sortIndex;return V!==0?V:L.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,d=null,f=3,h=!1,p=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(L){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=L)r(u),B.sortIndex=B.expirationTime,e(a,B);else break;B=n(u)}}function w(L){if(g=!1,k(L),!p)if(n(a)!==null)p=!0,zt(S);else{var B=n(u);B!==null&&Gt(w,B.startTime-L)}}function S(L,B){p=!1,g&&(g=!1,m(N),N=-1),h=!0;var V=f;try{for(k(B),d=n(a);d!==null&&(!(d.expirationTime>B)||L&&!_());){var he=d.callback;if(typeof he=="function"){d.callback=null,f=d.priorityLevel;var Ee=he(d.expirationTime<=B);B=t.unstable_now(),typeof Ee=="function"?d.callback=Ee:d===n(a)&&r(a),k(B)}else r(a);d=n(a)}if(d!==null)var ho=!0;else{var nr=n(u);nr!==null&&Gt(w,nr.startTime-B),ho=!1}return ho}finally{d=null,f=V,h=!1}}var b=!1,E=null,N=-1,M=5,R=-1;function _(){return!(t.unstable_now()-R<M)}function Z(){if(E!==null){var L=t.unstable_now();R=L;var B=!0;try{B=E(!0,L)}finally{B?G():(b=!1,E=null)}}else b=!1}var G;if(typeof v=="function")G=function(){v(Z)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ee=ue.port2;ue.port1.onmessage=Z,G=function(){ee.postMessage(null)}}else G=function(){y(Z,0)};function zt(L){E=L,b||(b=!0,G())}function Gt(L,B){N=y(function(){L(t.unstable_now())},B)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){p||h||(p=!0,zt(S))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(L){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var V=f;f=B;try{return L()}finally{f=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,B){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var V=f;f=L;try{return B()}finally{f=V}},t.unstable_scheduleCallback=function(L,B,V){var he=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?he+V:he):V=he,L){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=V+Ee,L={id:c++,callback:B,priorityLevel:L,startTime:V,expirationTime:Ee,sortIndex:-1},V>he?(L.sortIndex=V,e(u,L),n(a)===null&&L===n(u)&&(g?(m(N),N=-1):g=!0,Gt(w,V-he))):(L.sortIndex=Ee,e(a,L),p||h||(p=!0,zt(S))),L},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(L){var B=f;return function(){var V=f;f=B;try{return L.apply(this,arguments)}finally{f=V}}}})(Dg);Ig.exports=Dg;var sk=Ig.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var ok=C,at=sk;function O(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Lg=new Set,bs={};function Dr(t,e){pi(t,e),pi(t+"Capture",e)}function pi(t,e){for(bs[t]=e,t=0;t<e.length;t++)Lg.add(e[t])}var cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mc=Object.prototype.hasOwnProperty,lk=/^[: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]*$/,Ah={},Oh={};function ak(t){return mc.call(Oh,t)?!0:mc.call(Ah,t)?!1:lk.test(t)?Oh[t]=!0:(Ah[t]=!0,!1)}function uk(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function ck(t,e,n,r){if(e===null||typeof e>"u"||uk(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ge(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Pe[t]=new Ge(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Pe[e]=new Ge(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Pe[t]=new Ge(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Pe[t]=new Ge(t,2,!1,t,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(t){Pe[t]=new Ge(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Pe[t]=new Ge(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Pe[t]=new Ge(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Pe[t]=new Ge(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Pe[t]=new Ge(t,5,!1,t.toLowerCase(),null,!1,!1)});var Ud=/[\-:]([a-z])/g;function Wd(t){return t[1].toUpperCase()}"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(t){var e=t.replace(Ud,Wd);Pe[e]=new Ge(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Ud,Wd);Pe[e]=new Ge(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Ud,Wd);Pe[e]=new Ge(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Pe[t]=new Ge(t,1,!1,t.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Pe[t]=new Ge(t,1,!1,t.toLowerCase(),null,!0,!0)});function qd(t,e,n,r){var i=Pe.hasOwnProperty(e)?Pe[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(ck(e,n,i,r)&&(n=null),r||i===null?ak(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var mn=ok.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,go=Symbol.for("react.element"),Wr=Symbol.for("react.portal"),qr=Symbol.for("react.fragment"),Kd=Symbol.for("react.strict_mode"),gc=Symbol.for("react.profiler"),Pg=Symbol.for("react.provider"),zg=Symbol.for("react.context"),Jd=Symbol.for("react.forward_ref"),yc=Symbol.for("react.suspense"),vc=Symbol.for("react.suspense_list"),Gd=Symbol.for("react.memo"),kn=Symbol.for("react.lazy"),jg=Symbol.for("react.offscreen"),Rh=Symbol.iterator;function Pi(t){return t===null||typeof t!="object"?null:(t=Rh&&t[Rh]||t["@@iterator"],typeof t=="function"?t:null)}var oe=Object.assign,au;function Ji(t){if(au===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);au=e&&e[1]||""}return`
34`+au+t}var uu=!1;function cu(t,e){if(!t||uu)return"";uu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}
vendor: 16,007 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),s=r.stack.split(`
36`),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var a=`
37`+i[o].replace(" at new "," at ");return t.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{uu=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ji(t):""}function dk(t){switch(t.tag){case 5:return Ji(t.type);case 16:return Ji("Lazy");case 13:return Ji("Suspense");case 19:return Ji("SuspenseList");case 0:case 2:case 15:return t=cu(t.type,!1),t;case 11:return t=cu(t.type.render,!1),t;case 1:return t=cu(t.type,!0),t;default:return""}}function xc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case qr:return"Fragment";case Wr:return"Portal";case gc:return"Profiler";case Kd:return"StrictMode";case yc:return"Suspense";case vc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case zg:return(t.displayName||"Context")+".Consumer";case Pg:return(t._context.displayName||"Context")+".Provider";case Jd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Gd:return e=t.displayName||null,e!==null?e:xc(t.type)||"Memo";case kn:e=t._payload,t=t._init;try{return xc(t(e))}catch{}}return null}function fk(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xc(e);case 8:return e===Kd?"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(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function qn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _g(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function hk(t){var e=_g(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yo(t){t._valueTracker||(t._valueTracker=hk(t))}function Bg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=_g(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function dl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function kc(t,e){var n=e.checked;return oe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Ih(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=qn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $g(t,e){e=e.checked,e!=null&&qd(t,"checked",e,!1)}function wc(t,e){$g(t,e);var n=qn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Sc(t,e.type,n):e.hasOwnProperty("defaultValue")&&Sc(t,e.type,qn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Dh(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Sc(t,e,n){(e!=="number"||dl(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Gi=Array.isArray;function si(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+qn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Cc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(O(91));return oe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Lh(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(O(92));if(Gi(n)){if(1<n.length)throw Error(O(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:qn(n)}}function Fg(t,e){var n=qn(e.value),r=qn(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Ph(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Vg(t){switch(t){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 Ec(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Vg(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var vo,Hg=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(vo=vo||document.createElement("div"),vo.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=vo.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ms(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var is={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},pk=["Webkit","ms","Moz","O"];Object.keys(is).forEach(function(t){pk.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),is[e]=is[t]})});function Ug(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||is.hasOwnProperty(t)&&is[t]?(""+e).trim():e+"px"}function Wg(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ug(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var mk=oe({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 bc(t,e){if(e){if(mk[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(O(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(O(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(O(61))}if(e.style!=null&&typeof e.style!="object")throw Error(O(62))}}function Mc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Nc=null;function Qd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Tc=null,oi=null,li=null;function zh(t){if(t=ro(t)){if(typeof Tc!="function")throw Error(O(280));var e=t.stateNode;e&&(e=Oa(e),Tc(t.stateNode,t.type,e))}}function qg(t){oi?li?li.push(t):li=[t]:oi=t}function Kg(){if(oi){var t=oi,e=li;if(li=oi=null,zh(t),e)for(t=0;t<e.length;t++)zh(e[t])}}function Jg(t,e){return t(e)}function Gg(){}var du=!1;function Qg(t,e,n){if(du)return t(e,n);du=!0;try{return Jg(t,e,n)}finally{du=!1,(oi!==null||li!==null)&&(Gg(),Kg())}}function Ns(t,e){var n=t.stateNode;if(n===null)return null;var r=Oa(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(O(231,e,typeof n));return n}var Ac=!1;if(cn)try{var zi={};Object.defineProperty(zi,"passive",{get:function(){Ac=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{Ac=!1}function gk(t,e,n,r,i,s,o,l,a){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var ss=!1,fl=null,hl=!1,Oc=null,yk={onError:function(t){ss=!0,fl=t}};function vk(t,e,n,r,i,s,o,l,a){ss=!1,fl=null,gk.apply(yk,arguments)}function xk(t,e,n,r,i,s,o,l,a){if(vk.apply(this,arguments),ss){if(ss){var u=fl;ss=!1,fl=null}else throw Error(O(198));hl||(hl=!0,Oc=u)}}function Lr(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Yg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function jh(t){if(Lr(t)!==t)throw Error(O(188))}function kk(t){var e=t.alternate;if(!e){if(e=Lr(t),e===null)throw Error(O(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return jh(i),t;if(s===r)return jh(i),e;s=s.sibling}throw Error(O(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?t:e}function Xg(t){return t=kk(t),t!==null?Zg(t):null}function Zg(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Zg(t);if(e!==null)return e;t=t.sibling}return null}var ey=at.unstable_scheduleCallback,_h=at.unstable_cancelCallback,wk=at.unstable_shouldYield,Sk=at.unstable_requestPaint,pe=at.unstable_now,Ck=at.unstable_getCurrentPriorityLevel,Yd=at.unstable_ImmediatePriority,ty=at.unstable_UserBlockingPriority,pl=at.unstable_NormalPriority,Ek=at.unstable_LowPriority,ny=at.unstable_IdlePriority,Ma=null,Ht=null;function bk(t){if(Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(Ma,t,void 0,(t.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:Tk,Mk=Math.log,Nk=Math.LN2;function Tk(t){return t>>>=0,t===0?32:31-(Mk(t)/Nk|0)|0}var xo=64,ko=4194304;function Qi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ml(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=Qi(l):(s&=o,s!==0&&(r=Qi(s)))}else o=n&~i,o!==0?r=Qi(o):s!==0&&(r=Qi(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Rt(e),i=1<<n,r|=t[n],e&=~i;return r}function Ak(t,e){switch(t){case 1:case 2:case 4:return e+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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ok(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Rt(s),l=1<<o,a=i[o];a===-1?(!(l&n)||l&r)&&(i[o]=Ak(l,e)):a<=e&&(t.expiredLanes|=l),s&=~l}}function Rc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function ry(){var t=xo;return xo<<=1,!(xo&4194240)&&(xo=64),t}function fu(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function to(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Rt(e),t[e]=n}function Rk(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Rt(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function Xd(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Rt(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var q=0;function iy(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var sy,Zd,oy,ly,ay,Ic=!1,wo=[],Ln=null,Pn=null,zn=null,Ts=new Map,As=new Map,bn=[],Ik="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 Bh(t,e){switch(t){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":Ts.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(e.pointerId)}}function ji(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=ro(e),e!==null&&Zd(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function Dk(t,e,n,r,i){switch(e){case"focusin":return Ln=ji(Ln,t,e,n,r,i),!0;case"dragenter":return Pn=ji(Pn,t,e,n,r,i),!0;case"mouseover":return zn=ji(zn,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ts.set(s,ji(Ts.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,As.set(s,ji(As.get(s)||null,t,e,n,r,i)),!0}return!1}function uy(t){var e=ar(t.target);if(e!==null){var n=Lr(e);
vendor: 1,098 bytes, line 37
37if(n!==null){if(e=n.tag,e===13){if(e=Yg(n),e!==null){t.blockedOn=e,ay(t.priority,function(){oy(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Jo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Dc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Nc=r,n.target.dispatchEvent(r),Nc=null}else return e=ro(n),e!==null&&Zd(e),t.blockedOn=n,!1;e.shift()}return!0}function $h(t,e,n){Jo(t)&&n.delete(e)}function Lk(){Ic=!1,Ln!==null&&Jo(Ln)&&(Ln=null),Pn!==null&&Jo(Pn)&&(Pn=null),zn!==null&&Jo(zn)&&(zn=null),Ts.forEach($h),As.forEach($h)}function _i(t,e){t.blockedOn===e&&(t.blockedOn=null,Ic||(Ic=!0,at.unstable_scheduleCallback(at.unstable_NormalPriority,Lk)))}function Os(t){function e(i){return _i(i,t)}if(0<wo.length){_i(wo[0],t);for(var n=1;n<wo.length;n++){var r=wo[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Ln!==null&&_i(Ln,t),Pn!==null&&_i(Pn,t),zn!==null&&_i(zn,t),Ts.forEac
vendor: 5,438 bytes, line 37
37h(e),As.forEach(e),n=0;n<bn.length;n++)r=bn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<bn.length&&(n=bn[0],n.blockedOn===null);)uy(n),n.blockedOn===null&&bn.shift()}var ai=mn.ReactCurrentBatchConfig,gl=!0;function Pk(t,e,n,r){var i=q,s=ai.transition;ai.transition=null;try{q=1,ef(t,e,n,r)}finally{q=i,ai.transition=s}}function zk(t,e,n,r){var i=q,s=ai.transition;ai.transition=null;try{q=4,ef(t,e,n,r)}finally{q=i,ai.transition=s}}function ef(t,e,n,r){if(gl){var i=Dc(t,e,n,r);if(i===null)Su(t,e,r,yl,n),Bh(t,r);else if(Dk(i,t,e,n,r))r.stopPropagation();else if(Bh(t,r),e&4&&-1<Ik.indexOf(t)){for(;i!==null;){var s=ro(i);if(s!==null&&sy(s),s=Dc(t,e,n,r),s===null&&Su(t,e,r,yl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Su(t,e,r,null,n)}}var yl=null;function Dc(t,e,n,r){if(yl=null,t=Qd(r),t=ar(t),t!==null)if(e=Lr(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Yg(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return yl=t,null}function cy(t){switch(t){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(Ck()){case Yd:return 1;case ty:return 4;case pl:case Ek:return 16;case ny:return 536870912;default:return 16}default:return 16}}var An=null,tf=null,Go=null;function dy(){if(Go)return Go;var t,e=tf,n=e.length,r,i="value"in An?An.value:An.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return Go=i.slice(t,1<r?1-r:void 0)}function Qo(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function So(){return!0}function Fh(){return!1}function ct(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?So:Fh,this.isPropagationStopped=Fh,this}return oe(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=So)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=So)},persist:function(){},isPersistent:So}),e}var Oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nf=ct(Oi),no=oe({},Oi,{view:0,detail:0}),jk=ct(no),hu,pu,Bi,Na=oe({},no,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Bi&&(Bi&&t.type==="mousemove"?(hu=t.screenX-Bi.screenX,pu=t.screenY-Bi.screenY):pu=hu=0,Bi=t),hu)},movementY:function(t){return"movementY"in t?t.movementY:pu}}),Vh=ct(Na),_k=oe({},Na,{dataTransfer:0}),Bk=ct(_k),$k=oe({},no,{relatedTarget:0}),mu=ct($k),Fk=oe({},Oi,{animationName:0,elapsedTime:0,pseudoElement:0}),Vk=ct(Fk),Hk=oe({},Oi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Uk=ct(Hk),Wk=oe({},Oi,{data:0}),Hh=ct(Wk),qk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kk={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"},Jk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gk(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Jk[t])?!!e[t]:!1}function rf(){return Gk}var Qk=oe({},no,{key:function(t){if(t.key){var e=qk[t.key]||t.key;if(e!=="Unidentified")return e}
vendor: 4,754 bytes, line 37
37return t.type==="keypress"?(t=Qo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Kk[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rf,charCode:function(t){return t.type==="keypress"?Qo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Qo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Yk=ct(Qk),Xk=oe({},Na,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uh=ct(Xk),Zk=oe({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rf}),ew=ct(Zk),tw=oe({},Oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),nw=ct(tw),rw=oe({},Na,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),iw=ct(rw),sw=[9,13,27,32],sf=cn&&"CompositionEvent"in window,ls=null;cn&&"documentMode"in document&&(ls=document.documentMode);var ow=cn&&"TextEvent"in window&&!ls,fy=cn&&(!sf||ls&&8<ls&&11>=ls),Wh=" ",qh=!1;function hy(t,e){switch(t){case"keyup":return sw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function py(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Kr=!1;function lw(t,e){switch(t){case"compositionend":return py(e);case"keypress":return e.which!==32?null:(qh=!0,Wh);case"textInput":return t=e.data,t===Wh&&qh?null:t;default:return null}}function aw(t,e){if(Kr)return t==="compositionend"||!sf&&hy(t,e)?(t=dy(),Go=tf=An=null,Kr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return fy&&e.locale!=="ko"?null:e.data;default:return null}}var uw={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 Kh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!uw[t.type]:e==="textarea"}function my(t,e,n,r){qg(r),e=vl(e,"onChange"),0<e.length&&(n=new nf("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var as=null,Rs=null;function cw(t){My(t,0)}function Ta(t){var e=Qr(t);if(Bg(e))return t}function dw(t,e){if(t==="change")return e}var gy=!1;if(cn){var gu;if(cn){var yu="oninput"in document;if(!yu){var Jh=document.createElement("div");Jh.setAttribute("oninput","return;"),yu=typeof Jh.oninput=="function"}gu=yu}else gu=!1;gy=gu&&(!document.documentMode||9<document.documentMode)}function Gh(){as&&(as.detachEvent("onpropertychange",yy),Rs=as=null)}function yy(t){if(t.propertyName==="value"&&Ta(Rs)){var e=[];my(e,Rs,t,Qd(t)),Qg(cw,e)}}function fw(t,e,n){t==="focusin"?(Gh(),as=e,Rs=n,as.attachEvent("onpropertychange",yy)):t==="focusout"&&Gh()}function hw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ta(Rs)}function pw(t,e){if(t==="click")return Ta(e)}function mw(t,e){if(t==="input"||t==="change")return Ta(e)}function gw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Pt=typeof Object.is=="function"?Object.is:gw;function Is(t,e){if(Pt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!mc.call(e,i)||!Pt(t[i],e[i]))return!1}return!0}function Qh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Yh(t,e){var n=Qh(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qh(n)}}function vy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?vy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function xy(){for(var t=window,e=dl();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=dl(t.document)}return e}function of(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function yw(t){var e=xy(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&vy(n.ownerDocument.documentElement,n)){if(r!==null&&of(n)){if
vendor: 5,073 bytes, line 37
37(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Yh(n,s);var o=Yh(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var vw=cn&&"documentMode"in document&&11>=document.documentMode,Jr=null,Lc=null,us=null,Pc=!1;function Xh(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pc||Jr==null||Jr!==dl(r)||(r=Jr,"selectionStart"in r&&of(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),us&&Is(us,r)||(us=r,r=vl(Lc,"onSelect"),0<r.length&&(e=new nf("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Jr)))}function Co(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Gr={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},vu={},ky={};cn&&(ky=document.createElement("div").style,"AnimationEvent"in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),"TransitionEvent"in window||delete Gr.transitionend.transition);function Aa(t){if(vu[t])return vu[t];if(!Gr[t])return t;var e=Gr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in ky)return vu[t]=e[n];return t}var wy=Aa("animationend"),Sy=Aa("animationiteration"),Cy=Aa("animationstart"),Ey=Aa("transitionend"),by=new Map,Zh="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 Qn(t,e){by.set(t,e),Dr(e,[t])}for(var xu=0;xu<Zh.length;xu++){var ku=Zh[xu],xw=ku.toLowerCase(),kw=ku[0].toUpperCase()+ku.slice(1);Qn(xw,"on"+kw)}Qn(wy,"onAnimationEnd");Qn(Sy,"onAnimationIteration");Qn(Cy,"onAnimationStart");Qn("dblclick","onDoubleClick");Qn("focusin","onFocus");Qn("focusout","onBlur");Qn(Ey,"onTransitionEnd");pi("onMouseEnter",["mouseout","mouseover"]);pi("onMouseLeave",["mouseout","mouseover"]);pi("onPointerEnter",["pointerout","pointerover"]);pi("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="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(" "),ww=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yi));function ep(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,xk(r,e,void 0,t),t.currentTarget=null}function My(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var l=r[o],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==s&&i.isPropagationStopped())break e;ep(i,l,u),s=a}else for(o=0;o<r.length;o++){if(l=r[o],a=l.instance,u=l.currentTarget,l=l.listener,a!==s&&i.isPropagationStopped())break e;ep(i,l,u),s=a}}}if(hl)throw t=Oc,hl=!1,Oc=null,t}function Q(t,e){var n=e[$c];n===void 0&&(n=e[$c]=new Set);var r=t+"__bubble";n.has(r)||(Ny(e,t,2,!1),n.add(r))}function wu(t,e,n){var r=0;e&&(r|=4),Ny(n,t,r,e)}var Eo="_reactListening"+Math.random().toString(36).slice(2);
vendor: 3,228 bytes, line 37
37function Ds(t){if(!t[Eo]){t[Eo]=!0,Lg.forEach(function(n){n!=="selectionchange"&&(ww.has(n)||wu(n,!1,t),wu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Eo]||(e[Eo]=!0,wu("selectionchange",!1,e))}}function Ny(t,e,n,r){switch(cy(e)){case 1:var i=Pk;break;case 4:i=zk;break;default:i=ef}n=i.bind(null,e,n,t),i=void 0,!Ac||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Su(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;o=o.return}for(;l!==null;){if(o=ar(l),o===null)return;if(a=o.tag,a===5||a===6){r=s=o;continue e}l=l.parentNode}}r=r.return}Qg(function(){var u=s,c=Qd(n),d=[];e:{var f=by.get(t);if(f!==void 0){var h=nf,p=t;switch(t){case"keypress":if(Qo(n)===0)break e;case"keydown":case"keyup":h=Yk;break;case"focusin":p="focus",h=mu;break;case"focusout":p="blur",h=mu;break;case"beforeblur":case"afterblur":h=mu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Bk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=ew;break;case wy:case Sy:case Cy:h=Vk;break;case Ey:h=nw;break;case"scroll":h=jk;break;case"wheel":h=iw;break;case"copy":case"cut":case"paste":h=Uk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Uh}var g=(e&4)!==0,y=!g&&t==="scroll",m=g?f!==null?f+"Capture":null:f;g=[];for(var v=u,k;v!==null;){k=v;var w=k.stateNode;if(k.tag===5&&w!==null&&(k=w,m!==null&&(w=Ns(v,m),w!=null&&g.push(Ls(v,w,k)))),y)break;v=v.return}0<g.length&&(f=new h(f,p,null,n,c),d.push({event:f,listeners:g}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==Nc&&(p=n.relatedTarget||n.fromElement)&&(ar(p)||p[dn]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?ar(p):null,p!==null&&(y=Lr(p),p!==y||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(g=Vh,w="onMouseLeave",m="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(g=Uh,w="onPointerLeave",m="onPointerEnter",v="pointer"),y=h==null?f:Qr(h),k=p==null?f:Qr(p),f=new g(w,v+"leave",h,n,c),f.target=y,f.relatedTarget=k,w=null,ar(c)===u&&(g=new g(m,v+"enter",p,n,c),g.target=k,g.relatedTarget=y,w=g),y=w,h&&p)t:{for(g=h,m=p,v=0,k=g;k;k=Br(k))v++;for(k=0,w=m;w;w=Br(w))k++;for(;0<v-k;)g=Br(g),v--;for(;0<k-v;)m=Br(m),k--;for(;v--;){if(g===m||m!==null&&g===m.alternate)break t;g=Br(g),m=Br(m)}g=null}else g=null;h!==null&&tp(d,f,h,g,!1),p!==null&&y!==null&&tp(d,y,p,g,!0)}}
vendor: 5,734 bytes, lines 37-38
37e:{if(f=u?Qr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=dw;else if(Kh(f))if(gy)S=mw;else{S=hw;var b=fw}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=pw);if(S&&(S=S(t,u))){my(d,S,n,c);break e}b&&b(t,f,u),t==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Sc(f,"number",f.value)}switch(b=u?Qr(u):window,t){case"focusin":(Kh(b)||b.contentEditable==="true")&&(Jr=b,Lc=u,us=null);break;case"focusout":us=Lc=Jr=null;break;case"mousedown":Pc=!0;break;case"contextmenu":case"mouseup":case"dragend":Pc=!1,Xh(d,n,c);break;case"selectionchange":if(vw)break;case"keydown":case"keyup":Xh(d,n,c)}var E;if(sf)e:{switch(t){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Kr?hy(t,n)&&(N="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(fy&&n.locale!=="ko"&&(Kr||N!=="onCompositionStart"?N==="onCompositionEnd"&&Kr&&(E=dy()):(An=c,tf="value"in An?An.value:An.textContent,Kr=!0)),b=vl(u,N),0<b.length&&(N=new Hh(N,t,null,n,c),d.push({event:N,listeners:b}),E?N.data=E:(E=py(n),E!==null&&(N.data=E)))),(E=ow?lw(t,n):aw(t,n))&&(u=vl(u,"onBeforeInput"),0<u.length&&(c=new Hh("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=E))}My(d,e)})}function Ls(t,e,n){return{instance:t,listener:e,currentTarget:n}}function vl(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ns(t,n),s!=null&&r.unshift(Ls(t,s,i)),s=Ns(t,e),s!=null&&r.push(Ls(t,s,i))),t=t.return}return r}function Br(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function tp(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=Ns(n,s),a!=null&&o.unshift(Ls(n,a,l))):i||(a=Ns(n,s),a!=null&&o.push(Ls(n,a,l)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var Sw=/\r\n?/g,Cw=/\u0000|\uFFFD/g;function np(t){return(typeof t=="string"?t:""+t).replace(Sw,`
38`).replace(Cw,"")}function bo(t,e,n){if(e=np(e),np(t)!==e&&n)throw Error(O(425))}function xl(){}var zc=null,jc=null;function _c(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Bc=typeof setTimeout=="function"?setTimeout:void 0,Ew=typeof clearTimeout=="function"?clearTimeout:void 0,rp=typeof Promise=="function"?Promise:void 0,bw=typeof queueMicrotask=="function"?queueMicrotask:typeof rp<"u"?function(t){return rp.resolve(null).then(t).catch(Mw)}:Bc;function Mw(t){setTimeout(function(){throw t})}function Cu(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Os(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Os(e)}function jn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function ip(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Ri=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Ri,Ps="__reactProps$"+Ri,dn="__reactContainer$"+Ri,$c="__reactEvents$"+Ri,Nw="__reactListeners$"+Ri,Tw="__reactHandles$"+Ri;function ar(t){var e=t[Vt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[dn]||n[Vt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=ip(t);t!==null;){if(n=t[Vt])return n;t=ip(t)}return e}t=n,n=t.parentNode}return null}function ro(t){return t=t[Vt]||t[dn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Qr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(O(33))}function Oa(t){return t[Ps]||null}var Fc=[],Yr=-1;function Yn(t){return{current:t}}function X(t){0>Yr||(t.current=Fc[Yr],Fc[Yr]=null,Yr--)}function J(t,e){Yr++,Fc[Yr]=t.current,t.current=e}var Kn={},$e=Yn(Kn),Ze=Yn(!1),Cr=Kn;function mi(t,e){var n=t.type.contextTypes;if(!n)return Kn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function et(t){return t=t.childContextTypes,t!=null}function kl(){X(Ze),X($e)}function sp(t,e,n){if($e.current!==Kn)throw Error(O(168));J($e,e),J(Ze,n)}function Ty(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(O(108,fk(t)||"Unknown",i));return oe({},n,r)}function wl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Kn,Cr=$e.current,J($e,t),J(Ze,Ze.current),!0}function op(t,e,n){var r=t.stateNode;if(!r)throw Error(O(169));n?(t=Ty(t,e,Cr),r.__reactInternalMemoizedMergedChildContext=t,X(Ze),X($e),J($e,t)):X(Ze),J(Ze,n)}var nn=null,Ra=!1,Eu=!1;function Ay(t){nn===null?nn=[t]:nn.push(t)}function Aw(t){Ra=!0,Ay(t)}function Xn(){if(!Eu&&nn!==null){Eu=!0;var t=0,e=q;try{var n=nn;for(q=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}nn=null,Ra=!1}catch(i){throw nn!==null&&(nn=nn.slice(t+1)),ey(Yd,Xn),i}finally{q=e,Eu=!1}}return null}var Xr=[],Zr=0,Sl=null,Cl=0,pt=[],mt=0,Er=null,rn=1,sn="";function sr(t,e){Xr[Zr++]=Cl,Xr[Zr++]=Sl,Sl=t,Cl=e}function Oy(t,e,n){pt[mt++]=rn,pt[mt++]=sn,pt[mt++]=Er,Er=t;var r=rn;
vendor: 27,438 bytes, lines 38-40
38t=sn;var i=32-Rt(r)-1;r&=~(1<<i),n+=1;var s=32-Rt(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,rn=1<<32-Rt(e)+i|n<<i|r,sn=s+t}else rn=1<<s|n<<i|r,sn=t}function lf(t){t.return!==null&&(sr(t,1),Oy(t,1,0))}function af(t){for(;t===Sl;)Sl=Xr[--Zr],Xr[Zr]=null,Cl=Xr[--Zr],Xr[Zr]=null;for(;t===Er;)Er=pt[--mt],pt[mt]=null,sn=pt[--mt],pt[mt]=null,rn=pt[--mt],pt[mt]=null}var lt=null,ot=null,te=!1,Tt=null;function Ry(t,e){var n=yt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function lp(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,lt=t,ot=jn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,lt=t,ot=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Er!==null?{id:rn,overflow:sn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=yt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,lt=t,ot=null,!0):!1;default:return!1}}function Vc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Hc(t){if(te){var e=ot;if(e){var n=e;if(!lp(t,e)){if(Vc(t))throw Error(O(418));e=jn(n.nextSibling);var r=lt;e&&lp(t,e)?Ry(r,n):(t.flags=t.flags&-4097|2,te=!1,lt=t)}}else{if(Vc(t))throw Error(O(418));t.flags=t.flags&-4097|2,te=!1,lt=t}}}function ap(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;lt=t}function Mo(t){if(t!==lt)return!1;if(!te)return ap(t),te=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!_c(t.type,t.memoizedProps)),e&&(e=ot)){if(Vc(t))throw Iy(),Error(O(418));for(;e;)Ry(t,e),e=jn(e.nextSibling)}if(ap(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(O(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){ot=jn(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}ot=null}}else ot=lt?jn(t.stateNode.nextSibling):null;return!0}function Iy(){for(var t=ot;t;)t=jn(t.nextSibling)}function gi(){ot=lt=null,te=!1}function uf(t){Tt===null?Tt=[t]:Tt.push(t)}var Ow=mn.ReactCurrentBatchConfig;function $i(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,t))}return t}function No(t,e){throw t=Object.prototype.toString.call(e),Error(O(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function up(t){var e=t._init;return e(t._payload)}function Dy(t){function e(m,v){if(t){var k=m.deletions;k===null?(m.deletions=[v],m.flags|=16):k.push(v)}}function n(m,v){if(!t)return null;for(;v!==null;)e(m,v),v=v.sibling;return null}function r(m,v){for(m=new Map;v!==null;)v.key!==null?m.set(v.key,v):m.set(v.index,v),v=v.sibling;return m}function i(m,v){return m=Fn(m,v),m.index=0,m.sibling=null,m}function s(m,v,k){return m.index=k,t?(k=m.alternate,k!==null?(k=k.index,k<v?(m.flags|=2,v):k):(m.flags|=2,v)):(m.flags|=1048576,v)}function o(m){return t&&m.alternate===null&&(m.flags|=2),m}function l(m,v,k,w){return v===null||v.tag!==6?(v=Ru(k,m.mode,w),v.return=m,v):(v=i(v,k),v.return=m,v)}function a(m,v,k,w){var S=k.type;return S===qr?c(m,v,k.props.children,w,k.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===kn&&up(S)===v.type)?(w=i(v,k.props),w.ref=$i(m,v,k),w.return=m,w):(w=rl(k.type,k.key,k.props,null,m.mode,w),w.ref=$i(m,v,k),w.return=m,w)}function u(m,v,k,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==k.containerInfo||v.stateNode.implementation!==k.implementation?(v=Iu(k,m.mode,w),v.return=m,v):(v=i(v,k.children||[]),v.return=m,v)}function c(m,v,k,w,S){return v===null||v.tag!==7?(v=gr(k,m.mode,w,S),v.return=m,v):(v=i(v,k),v.return=m,v)}function d(m,v,k){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Ru(""+v,m.mode,k),v.return=m,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case go:return k=rl(v.type,v.key,v.props,null,m.mode,k),k.ref=$i(m,null,v),k.return=m,k;case Wr:return v=Iu(v,m.mode,k),v.return=m,v;case kn:var w=v._init;return d(m,w(v._payload),k)}if(Gi(v)||Pi(v))return v=gr(v,m.mode,k,null),v.return=m,v;No(m,v)}return null}function f(m,v,k,w){var S=v!==null?v.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return S!==null?null:l(m,v,""+k,w);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case go:return k.key===S?a(m,v,k,w):null;case Wr:return k.key===S?u(m,v,k,w):null;case kn:return S=k._init,f(m,v,S(k._payload),w)}if(Gi(k)||Pi(k))return S!==null?null:c(m,v,k,w,null);No(m,k)}return null}function h(m,v,k,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return m=m.get(k)||null,l(v,m,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case go:return m=m.get(w.key===null?k:w.key)||null,a(v,m,w,S);case Wr:return m=m.get(w.key===null?k:w.key)||null,u(v,m,w,S);case kn:var b=w._init;return h(m,v,k,b(w._payload),S)}if(Gi(w)||Pi(w))return m=m.get(k)||null,c(v,m,w,S,null);No(v,w)}return null}function p(m,v,k,w){for(var S=null,b=null,E=v,N=v=0,M=null;E!==null&&N<k.length;N++){E.index>N?(M=E,E=null):M=E.sibling;var R=f(m,E,k[N],w);if(R===null){E===null&&(E=M);break}t&&E&&R.alternate===null&&e(m,E),v=s(R,v,N),b===null?S=R:b.sibling=R,b=R,E=M}if(N===k.length)return n(m,E),te&&sr(m,N),S;if(E===null){for(;N<k.length;N++)E=d(m,k[N],w),E!==null&&(v=s(E,v,N),b===null?S=E:b.sibling=E,b=E);return te&&sr(m,N),S}for(E=r(m,E);N<k.length;N++)M=h(E,m,N,k[N],w),M!==null&&(t&&M.alternate!==null&&E.delete(M.key===null?N:M.key),v=s(M,v,N),b===null?S=M:b.sibling=M,b=M);return t&&E.forEach(function(_){return e(m,_)}),te&&sr(m,N),S}function g(m,v,k,w){var S=Pi(k);if(typeof S!="function")throw Error(O(150));if(k=S.call(k),k==null)throw Error(O(151));for(var b=S=null,E=v,N=v=0,M=null,R=k.next();E!==null&&!R.done;N++,R=k.next()){E.index>N?(M=E,E=null):M=E.sibling;var _=f(m,E,R.value,w);if(_===null){E===null&&(E=M);break}t&&E&&_.alternate===null&&e(m,E),v=s(_,v,N),b===null?S=_:b.sibling=_,b=_,E=M}if(R.done)return n(m,E),te&&sr(m,N),S;if(E===null){for(;!R.done;N++,R=k.next())R=d(m,R.value,w),R!==null&&(v=s(R,v,N),b===null?S=R:b.sibling=R,b=R);return te&&sr(m,N),S}for(E=r(m,E);!R.done;N++,R=k.next())R=h(E,m,N,R.value,w),R!==null&&(t&&R.alternate!==null&&E.delete(R.key===null?N:R.key),v=s(R,v,N),b===null?S=R:b.sibling=R,b=R);return t&&E.forEach(function(Z){return e(m,Z)}),te&&sr(m,N),S}function y(m,v,k,w){if(typeof k=="object"&&k!==null&&k.type===qr&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case go:e:{for(var S=k.key,b=v;b!==null;){if(b.key===S){if(S=k.type,S===qr){if(b.tag===7){n(m,b.sibling),v=i(b,k.props.children),v.return=m,m=v;break e}}else if(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===kn&&up(S)===b.type){n(m,b.sibling),v=i(b,k.props),v.ref=$i(m,b,k),v.return=m,m=v;break e}n(m,b);break}else e(m,b);b=b.sibling}k.type===qr?(v=gr(k.props.children,m.mode,w,k.key),v.return=m,m=v):(w=rl(k.type,k.key,k.props,null,m.mode,w),w.ref=$i(m,v,k),w.return=m,m=w)}return o(m);case Wr:e:{for(b=k.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===k.containerInfo&&v.stateNode.implementation===k.implementation){n(m,v.sibling),v=i(v,k.children||[]),v.return=m,m=v;break e}else{n(m,v);break}else e(m,v);v=v.sibling}v=Iu(k,m.mode,w),v.return=m,m=v}return o(m);case kn:return b=k._init,y(m,v,b(k._payload),w)}if(Gi(k))return p(m,v,k,w);if(Pi(k))return g(m,v,k,w);No(m,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,v!==null&&v.tag===6?(n(m,v.sibling),v=i(v,k),v.return=m,m=v):(n(m,v),v=Ru(k,m.mode,w),v.return=m,m=v),o(m)):n(m,v)}return y}var yi=Dy(!0),Ly=Dy(!1),El=Yn(null),bl=null,ei=null,cf=null;function df(){cf=ei=bl=null}function ff(t){var e=El.current;X(El),t._currentValue=e}function Uc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ui(t,e){bl=t,cf=ei=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Xe=!0),t.firstContext=null)}function St(t){var e=t._currentValue;if(cf!==t)if(t={context:t,memoizedValue:e,next:null},ei===null){if(bl===null)throw Error(O(308));ei=t,bl.dependencies={lanes:0,firstContext:t}}else ei=ei.next=t;return e}var ur=null;function hf(t){ur===null?ur=[t]:ur.push(t)}function Py(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,hf(e)):(n.next=i.next,i.next=n),e.interleaved=n,fn(t,r)}function fn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var wn=!1;function pf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zy(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ln(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function _n(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,fn(t,n)}return i=r.interleaved,i===null?(e.next=e,hf(r)):(e.next=i.next,i.next=e),r.interleaved=e,fn(t,n)}function Yo(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Xd(t,n)}}function cp(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ml(t,e,n,r){var i=t.updateQueue;wn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=t.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var d=i.baseState;o=0,c=u=a=null,l=s;do{var f=l.lane,h=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=t,g=l;switch(f=e,h=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=oe({},d,f);break e;case 2:wn=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else h={eventTime:h,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Mr|=o,t.lanes=o,t.memoizedState=d}}function dp(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(O(191,i));i.call(r)}}}var io={},Ut=Yn(io),zs=Yn(io),js=Yn(io);function cr(t){if(t===io)throw Error(O(174));return t}function mf(t,e){switch(J(js,e),J(zs,t),J(Ut,io),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ec(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ec(e,t)}X(Ut),J(Ut,e)}function vi(){X(Ut),X(zs),X(js)}function jy(t){cr(js.current);var e=cr(Ut.current),n=Ec(e,t.type);e!==n&&(J(zs,t),J(Ut,n))}function gf(t){zs.current===t&&(X(Ut),X(zs))}var ne=Yn(0);function Nl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var bu=[];function yf(){for(var t=0;t<bu.length;t++)bu[t]._workInProgressVersionPrimary=null;bu.length=0}var Xo=mn.ReactCurrentDispatcher,Mu=mn.ReactCurrentBatchConfig,br=0,ie=null,we=null,be=null,Tl=!1,cs=!1,_s=0,Rw=0;function ze(){throw Error(O(321))}function vf(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Pt(t[n],e[n]))return!1;return!0}function xf(t,e,n,r,i,s){if(br=s,ie=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Xo.current=t===null||t.memoizedState===null?Pw:zw,t=n(r,i),cs){s=0;do{if(cs=!1,_s=0,25<=s)throw Error(O(301));s+=1,be=we=null,e.updateQueue=null,Xo.current=jw,t=n(r,i)}while(cs)}if(Xo.current=Al,e=we!==null&&we.next!==null,br=0,be=we=ie=null,Tl=!1,e)throw Error(O(300));return t}function kf(){var t=_s!==0;return _s=0,t}function _t(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ie.memoizedState=be=t:be=be.next=t,be}function Ct(){if(we===null){var t=ie.alternate;t=t!==null?t.memoizedState:null}else t=we.next;var e=be===null?ie.memoizedState:be.next;if(e!==null)be=e,we=t;else{if(t===null)throw Error(O(310));we=t,t={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},be===null?ie.memoizedState=be=t:be=be.next=t}return be}function Bs(t,e){return typeof e=="function"?e(t):e}function Nu(t){var e=Ct(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=we,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,a=null,u=s;do{var c=u.lane;if((br&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,o=r):a=a.next=d,ie.lanes|=c,Mr|=c}u=u.next}while(u!==null&&u!==s);a===null?o=r:a.next=l,Pt(r,e.memoizedState)||(Xe=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,ie.lanes|=s,Mr|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Tu(t){var e=Ct(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Pt(s,e.memoizedState)||(Xe=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function _y(){}function By(t,e){var n=ie,r=Ct(),i=e(),s=!Pt(r.memoizedState,i);if(s&&(r.memoizedState=i,Xe=!0),r=r.queue,wf(Vy.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||be!==null&&be.memoizedState.tag&1){if(n.flags|=2048,$s(9,Fy.bind(null,n,r,i,e),void 0,null),Me===null)throw Error(O(349));br&30||$y(n,e,i)}return i}function $y(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ie.updateQueue,e===null?(e={lastEffect:null,stores:null},ie.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Fy(t,e,n,r){e.value=n,e.getSnapshot=r,Hy(e)&&Uy(t)}function Vy(t,e,n){return n(function(){Hy(e)&&Uy(t)})}function Hy(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Pt(t,n)}catch{return!0}}function Uy(t){var e=fn(t,1);e!==null&&It(e,t,1,-1)}function fp(t){var e=_t();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bs,lastRenderedState:t},e.queue=t,t=t.dispatch=Lw.bind(null,ie,t),[e.memoizedState,t]}function $s(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ie.updateQueue,e===null?(e={lastEffect:null,stores:null},ie.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Wy(){return Ct().memoizedState}function Zo(t,e,n,r){var i=_t();ie.flags|=t,i.memoizedState=$s(1|e,n,void 0,r===void 0?null:r)}function Ia(t,e,n,r){var i=Ct();r=r===void 0?null:r;var s=void 0;if(we!==null){var o=we.memoizedState;if(s=o.destroy,r!==null&&vf(r,o.deps)){i.memoizedState=$s(e,n,s,r);return}}ie.flags|=t,i.memoizedState=$s(1|e,n,s,r)}function hp(t,e){return Zo(8390656,8,t,e)}function wf(t,e){return Ia(2048,8,t,e)}function qy(t,e){return Ia(4,2,t,e)}function Ky(t,e){return Ia(4,4,t,e)}function Jy(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Gy(t,e,n){return n=n!=null?n.concat([t]):null,Ia(4,4,Jy.bind(null,e,t),n)}function Sf(){}function Qy(t,e){var n=Ct();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&vf(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Yy(t,e){var n=Ct();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&vf(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Xy(t,e,n){return br&21?(Pt(n,e)||(n=ry(),ie.lanes|=n,Mr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Xe=!0),t.memoizedState=n)}function Iw(t,e){var n=q;q=n!==0&&4>n?n:4,t(!0);var r=Mu.transition;Mu.transition={};try{t(!1),e()}finally{q=n,Mu.transition=r}}function Zy(){return Ct().memoizedState}function Dw(t,e,n){var r=$n(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},e0(t))t0(e,n);else if(n=Py(t,e,n,r),n!==null){var i=We();It(n,t,r,i),n0(n,e,r)}}function Lw(t,e,n){var r=$n(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(e0(t))t0(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,Pt(l,o)){var a=e.interleaved;a===null?(i.next=i,hf(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=Py(t,e,i,r),n!==null&&(i=We(),It(n,t,r,i),n0(n,e,r))}}function e0(t){var e=t.alternate;return t===ie||e!==null&&e===ie}function t0(t,e){cs=Tl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function n0(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Xd(t,n)}}var Al={readContext:St,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useInsertionEffect:ze,useLayoutEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useMutableSource:ze,useSyncExternalStore:ze,useId:ze,unstable_isNewReconciler:!1},Pw={readContext:St,useCallback:function(t,e){return _t().memoizedState=[t,e===void 0?null:e],t},useContext:St,useEffect:hp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Zo(4194308,4,Jy.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Zo(4194308,4,t,e)},useInsertionEffect:function(t,e){return Zo(4,2,t,e)},useMemo:function(t,e){var n=_t();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=_t();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Dw.bind(null,ie,t),[r.memoizedState,t]},useRef:function(t){var e=_t();return t={current:t},e.memoizedState=t},useState:fp,useDebugValue:Sf,useDeferredValue:function(t){return _t().memoizedState=t},useTransition:function(){var t=fp(!1),e=t[0];return t=Iw.bind(null,t[1]),_t().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ie,i=_t();if(te){if(n===void 0)throw Error(O(407));n=n()}else{if(n=e(),Me===null)throw Error(O(349));br&30||$y(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,hp(Vy.bind(null,r,s,t),[t]),r.flags|=2048,$s(9,Fy.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=_t(),e=Me.identifierPrefix;if(te){var n=sn,r=rn;n=(r&~(1<<32-Rt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=_s++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=Rw++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},zw={readContext:St,useCallback:Qy,useContext:St,useEffect:wf,useImperativeHandle:Gy,useInsertionEffect:qy,useLayoutEffect:Ky,useMemo:Yy,useReducer:Nu,useRef:Wy,useState:function(){return Nu(Bs)},useDebugValue:Sf,useDeferredValue:function(t){var e=Ct();return Xy(e,we.memoizedState,t)},useTransition:function(){var t=Nu(Bs)[0],e=Ct().memoizedState;return[t,e]},useMutableSource:_y,useSyncExternalStore:By,useId:Zy,unstable_isNewReconciler:!1},jw={readContext:St,useCallback:Qy,useContext:St,useEffect:wf,useImperativeHandle:Gy,useInsertionEffect:qy,useLayoutEffect:Ky,useMemo:Yy,useReducer:Tu,useRef:Wy,useState:function(){return Tu(Bs)},useDebugValue:Sf,useDeferredValue:function(t){var e=Ct();return we===null?e.memoizedState=t:Xy(e,we.memoizedState,t)},useTransition:function(){var t=Tu(Bs)[0],e=Ct().memoizedState;return[t,e]},useMutableSource:_y,useSyncExternalStore:By,useId:Zy,unstable_isNewReconciler:!1};function Mt(t,e){if(t&&t.defaultProps){e=oe({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Wc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:oe({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Da={isMounted:function(t){return(t=t._reactInternals)?Lr(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=We(),i=$n(t),s=ln(r,i);s.payload=e,n!=null&&(s.callback=n),e=_n(t,s,i),e!==null&&(It(e,t,i,r),Yo(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=We(),i=$n(t),s=ln(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=_n(t,s,i),e!==null&&(It(e,t,i,r),Yo(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=We(),r=$n(t),i=ln(n,r);i.tag=2,e!=null&&(i.callback=e),e=_n(t,i,r),e!==null&&(It(e,t,r,n),Yo(e,t,r))}};function pp(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Is(n,r)||!Is(i,s):!0}function r0(t,e,n){var r=!1,i=Kn,s=e.contextType;return typeof s=="object"&&s!==null?s=St(s):(i=et(e)?Cr:$e.current,r=e.contextTypes,s=(r=r!=null)?mi(t,i):Kn),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Da,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function mp(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Da.enqueueReplaceState(e,e.state,null)}function qc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},pf(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=St(s):(s=et(e)?Cr:$e.current,i.context=mi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Wc(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Da.enqueueReplaceState(i,i.state,null),Ml(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function xi(t,e){try{var n="",r=e;do n+=dk(r),r=r.return;while(r);var i=n}catch(s){i=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Au(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Kc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var _w=typeof WeakMap=="function"?WeakMap:Map;function i0(t,e,n){n=ln(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Rl||(Rl=!0,rd=r),Kc(t,e)},n}function s0(t,e,n){n=ln(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Kc(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Kc(t,e),typeof r!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function gp(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new _w;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Xw.bind(null,t,e,n),e.then(t,t))}function yp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function vp(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ln(-1,1),e.tag=2,_n(n,e,1))),n.lanes|=1),t)}var Bw=mn.ReactCurrentOwner,Xe=!1;function He(t,e,n,r){e.child=t===null?Ly(e,null,n,r):yi(e,t.child,n,r)}function xp(t,e,n,r,i){n=n.render;var s=e.ref;return ui(e,i),r=xf(t,e,n,r,s,i),n=kf(),t!==null&&!Xe?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,hn(t,e,i)):(te&&n&&lf(e),e.flags|=1,He(t,e,r,i),e.child)}function kp(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!Of(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,o0(t,e,s,r,i)):(t=rl(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Is,n(o,r)&&t.ref===e.ref)return hn(t,e,i)}return e.flags|=1,t=Fn(s,r),t.ref=e.ref,t.return=e,e.child=t}function o0(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Is(s,r)&&t.ref===e.ref)if(Xe=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Xe=!0);else return e.lanes=t.lanes,hn(t,e,i)}return Jc(t,e,n,r,i)}function l0(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(ni,it),it|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,J(ni,it),it|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,J(ni,it),it|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,J(ni,it),it|=r;return He(t,e,i,n),e.child}function a0(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 5,243 bytes, line 40
40function Jc(t,e,n,r,i){var s=et(n)?Cr:$e.current;return s=mi(e,s),ui(e,i),n=xf(t,e,n,r,s,i),r=kf(),t!==null&&!Xe?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,hn(t,e,i)):(te&&r&&lf(e),e.flags|=1,He(t,e,n,i),e.child)}function wp(t,e,n,r,i){if(et(n)){var s=!0;wl(e)}else s=!1;if(ui(e,i),e.stateNode===null)el(t,e),r0(e,n,r),qc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=St(u):(u=et(n)?Cr:$e.current,u=mi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&mp(e,o,r,u),wn=!1;var f=e.memoizedState;o.state=f,Ml(e,r,o,i),a=e.memoizedState,l!==r||f!==a||Ze.current||wn?(typeof c=="function"&&(Wc(e,n,c,r),a=e.memoizedState),(l=wn||pp(e,n,l,r,f,a,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,zy(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:Mt(e.type,l),o.props=u,d=e.pendingProps,f=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=St(a):(a=et(n)?Cr:$e.current,a=mi(e,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||f!==a)&&mp(e,o,r,a),wn=!1,f=e.memoizedState,o.state=f,Ml(e,r,o,i);var p=e.memoizedState;l!==d||f!==p||Ze.current||wn?(typeof h=="function"&&(Wc(e,n,h,r),p=e.memoizedState),(u=wn||pp(e,n,u,r,f,p,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,a)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),o.props=r,o.state=p,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return Gc(t,e,n,r,s,i)}function Gc(t,e,n,r,i,s){a0(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&op(e,n,!1),hn(t,e,s);r=e.stateNode,Bw.current=e;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=yi(e,t.child,null,s),e.child=yi(e,null,l,s)):He(t,e,l,s),e.memoizedState=r.state,i&&op(e,n,!0),e.child}function u0(t){var e=t.stateNode;e.pendingContext?sp(t,e.pendingContext,e.pendingContext!==e.context):e.context&&sp(t,e.context,!1),mf(t,e.containerInfo)}function Sp(t,e,n,r,i){return gi(),uf(i),e.flags|=256,He(t,e,n,r),e.child}var Qc={dehydrated:null,treeContext:null,retryLane:0};function Yc(t){return{baseLanes:t,cachePool:null,transitions:null}}function c0(t,e,n){var r=e.pendingProps,i=ne.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),J(ne,i&1),t===null)return Hc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=za(o,r,0,null),t=gr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Yc(n),e.memoizedState=Qc,t):Cf(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return $w(t,e,o,r,l,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=Fn(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Fn(l,s):(s=gr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Yc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Qc,r}return s=t.child,t=s.sibling,r=Fn(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Cf(t,e){return e=za({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function To(t,e,n,r){return r!==null&&uf(r),yi(e,t.child,null,n),t=Cf(e,e.pen
vendor: 8,364 bytes, line 40
40dingProps.children),t.flags|=2,e.memoizedState=null,t}function $w(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Au(Error(O(422))),To(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=za({mode:"visible",children:r.children},i,0,null),s=gr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&yi(e,t.child,null,o),e.child.memoizedState=Yc(o),e.memoizedState=Qc,s);if(!(e.mode&1))return To(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(O(419)),r=Au(s,r,void 0),To(t,e,o,r)}if(l=(o&t.childLanes)!==0,Xe||l){if(r=Me,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,fn(t,i),It(r,t,i,-1))}return Af(),r=Au(Error(O(421))),To(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=Zw.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,ot=jn(i.nextSibling),lt=e,te=!0,Tt=null,t!==null&&(pt[mt++]=rn,pt[mt++]=sn,pt[mt++]=Er,rn=t.id,sn=t.overflow,Er=e),e=Cf(e,r.children),e.flags|=4096,e)}function Cp(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Uc(t.return,e,n)}function Ou(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function d0(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(He(t,e,r.children,n),r=ne.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Cp(t,n,e);else if(t.tag===19)Cp(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(J(ne,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Nl(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Ou(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Nl(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Ou(e,!0,n,null,s);break;case"together":Ou(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function el(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function hn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Mr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(O(153));if(e.child!==null){for(t=e.child,n=Fn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Fn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Fw(t,e,n){switch(e.tag){case 3:u0(e),gi();break;case 5:jy(e);break;case 1:et(e.type)&&wl(e);break;case 4:mf(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;J(El,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(J(ne,ne.current&1),e.flags|=128,null):n&e.child.childLanes?c0(t,e,n):(J(ne,ne.current&1),t=hn(t,e,n),t!==null?t.sibling:null);J(ne,ne.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return d0(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),J(ne,ne.current),r)break;return null;case 22:case 23:return e.lanes=0,l0(t,e,n)}return hn(t,e,n)}var f0,Xc,h0,p0;f0=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xc=function(){};h0=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,cr(Ut.current);var s=null;switch(n){case"input":i=kc(t,i),r=kc(t,r),s=[];break;case"select":i=oe({},i,{value:void 0}),r=oe({},r,{value:void 0}),s=[];break;case"textarea":i=Cc(t,i),r=Cc(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=xl)}bc(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(bs.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(bs.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Q("scroll",t),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};p0=function(t,e,n,r){n!==r&&(e.flags|=4)};function Fi(t,e){if(!te)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function je(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Vw(t,e,n){var r=e.pendingProps;switch(af(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return je(e),null;case 1:return et(e.type)&&kl(),je(e),null;case 3:return r=e.stateNode,vi(),X(Ze),X($e),yf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Mo(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Tt!==null&&(od(Tt),Tt=null))),Xc(t,e),je(e),null;case 5:gf(e);var i=cr(js.current);if(n=e.type,t!==null&&e.stateNode!=null)h0(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(O(166));return je(e),null}if(t=cr(Ut.current),Mo(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Vt]=e,r[Ps]=s,t=(e.mode&1)!==0,n){case"dialog":Q("cancel",r),Q("close",r);break;case"iframe":case"object":case"embed":Q("load",r);break;case"video":case"audio":for(i=0;i<Yi.length;i++)Q(Yi[i],r);break;case"source":Q("error",r);break;case"img":case"image":case"link":Q("error",r),Q("load",r);break;case"details":Q("toggle",r);break;case"input":Ih(r,s),Q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Q("invalid",r);break;case"textarea":Lh(r,s),Q("invalid",r)}bc(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&bo(r.textContent,l,t),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&bo(r.textContent,l,t),i=["children",""+l]):bs.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Q("scroll",r)}switch(n){case"input":yo(r),Dh(r,s,!0);break;case"textarea":yo(r),Ph(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=xl)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Vg(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>
40",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Vt]=e,t[Ps]=r,f0(t,e,!1,!1),e.stateNode=t;e:{switch(o=Mc(n,r),n){case"dialog":Q("cancel",t),Q("close",t),i=r;break;case"iframe":case"object":case"embed":Q("load",t),i=r;break;case"video":case"audio":for(i=0;i<Yi.length;i++)Q(Yi[i],t);i=r;break;case"source":Q("error",t),i=r;break;case"img":case"image":case"link":Q("error",t),Q("load",t),i=r;break;case"details":Q("toggle",t),i=r;break;case"input":Ih(t,r),i=kc(t,r),Q("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=oe({},r,{value:void 0}),Q("invalid",t);break;case"textarea":Lh(t,r),i=Cc(t,r),Q("invalid",t);break;default:i=r}bc(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?Wg(t,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Hg(t,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ms(t,a):typeof a=="number"&&Ms(t,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(bs.hasOwnProperty(s)?a!=null&&s==="onScroll"&&Q("scroll",t):a!=null&&qd(t,s,a,o))}switch(n){case"input":yo(t),Dh(t,r,!1);break;case"textarea":yo(t),Ph(t);break;case"option":r.value!=null&&t.setAttribute("value",""+qn(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?si(t,!!r.multiple,s,!1):r.defaultValue!=null&&si(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=xl)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return je(e),null;case 6:if(t&&e.stateNode!=null)p0(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(O(166));if(n=cr(js.current),cr(Ut.current),Mo(e)){if(r=e.stateNode,n=e.memoizedProps,r[Vt]=e,(s=r.nodeValue!==n)&&(t=lt,t!==null))switch(t.tag){case 3:bo(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&bo(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vt]=e,e.stateNode=r}return je(e),null;case 13:if(X(ne),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(te&&ot!==null&&e.mode&1&&!(e.flags&128))Iy(),gi(),e.flags|=98560,s=!1;else if(s=Mo(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(O(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(O(317));s[Vt]=e}else gi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;je(e),s=!1}else Tt!==null&&(od(Tt),Tt=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ne.current&1?Se===0&&(Se=3):Af())),e.updateQueue!==null&&(e.flags|=4),je(e),null);case 4:return vi(),Xc(t,e),t===null&&Ds(e.stateNode.containerInfo),je(e),null;case 10:return ff(e.type._context),je(e),null;case 17:return et(e.type)&&kl(),je(e),null;case 19:if(X(ne),s=e.memoizedState,s===null)return je(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Fi(s,!1);else{if(Se!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Nl(t),o!==null){for(e.flags|=128,Fi(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return J(ne,ne.current&1|2),e.child}t=t.sibling}s.tail!==null&&pe()>ki&&(e.flags|=128,r=!0,Fi(s,!1),e.lanes=4194304)}else{if(!r)if(t=Nl(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Fi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!te)return je(e),null}else 2*pe()-s.renderingStartTime>ki&&n!==1073741824&&(e.flags|=128,r=!0,Fi(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=pe(),e.sibling=null,n=ne.current,J(ne,r?n&1|2:n&1),e):(je(e),null);case 22:case 23:return Tf(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?it&1073741824&&(je(e),e.subtreeFlags&6&&(e.flags|=8192)):je(e),null;case 24:return null;case 25:return null}throw Error(O(156,e.tag))}function Hw(t,e){switch(af(e),e.tag){case 1:return et(e.type)&&kl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;
vendor: 25,395 bytes, line 40
40case 3:return vi(),X(Ze),X($e),yf(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return gf(e),null;case 13:if(X(ne),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(O(340));gi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return X(ne),null;case 4:return vi(),null;case 10:return ff(e.type._context),null;case 22:case 23:return Tf(),null;case 24:return null;default:return null}}var Ao=!1,Be=!1,Uw=typeof WeakSet=="function"?WeakSet:Set,D=null;function ti(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(t,e,r)}else n.current=null}function Zc(t,e,n){try{n()}catch(r){de(t,e,r)}}var Ep=!1;function Ww(t,e){if(zc=gl,t=xy(),of(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(a=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===i&&(l=o),f===s&&++c===r&&(a=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(jc={focusedElem:t,selectionRange:n},gl=!1,D=e;D!==null;)if(e=D,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,D=t;else for(;D!==null;){e=D;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,y=p.memoizedState,m=e.stateNode,v=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:Mt(e.type,g),y);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var k=e.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(w){de(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,D=t;break}D=e.return}return p=Ep,Ep=!1,p}function ds(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Zc(e,n,s)}i=i.next}while(i!==r)}}function La(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function ed(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function m0(t){var e=t.alternate;e!==null&&(t.alternate=null,m0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Vt],delete e[Ps],delete e[$c],delete e[Nw],delete e[Tw])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function g0(t){return t.tag===5||t.tag===3||t.tag===4}function bp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||g0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function td(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=xl));else if(r!==4&&(t=t.child,t!==null))for(td(t,e,n),t=t.sibling;t!==null;)td(t,e,n),t=t.sibling}function nd(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(nd(t,e,n),t=t.sibling;t!==null;)nd(t,e,n),t=t.sibling}var Ae=null,Nt=!1;function yn(t,e,n){for(n=n.child;n!==null;)y0(t,e,n),n=n.sibling}function y0(t,e,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Ma,n)}catch{}switch(n.tag){case 5:Be||ti(n,e);case 6:var r=Ae,i=Nt;Ae=null,yn(t,e,n),Ae=r,Nt=i,Ae!==null&&(Nt?(t=Ae,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ae.removeChild(n.stateNode));break;case 18:Ae!==null&&(Nt?(t=Ae,n=n.stateNode,t.nodeType===8?Cu(t.parentNode,n):t.nodeType===1&&Cu(t,n),Os(t)):Cu(Ae,n.stateNode));break;case 4:r=Ae,i=Nt,Ae=n.stateNode.containerInfo,Nt=!0,yn(t,e,n),Ae=r,Nt=i;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Zc(n,e,o),i=i.next}while(i!==r)}yn(t,e,n);break;case 1:if(!Be&&(ti(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){de(n,e,l)}yn(t,e,n);break;case 21:yn(t,e,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,yn(t,e,n),Be=r):yn(t,e,n);break;default:yn(t,e,n)}}function Mp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Uw),e.forEach(function(r){var i=eS.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ae=l.stateNode,Nt=!1;break e;case 3:Ae=l.stateNode.containerInfo,Nt=!0;break e;case 4:Ae=l.stateNode.containerInfo,Nt=!0;break e}l=l.return}if(Ae===null)throw Error(O(160));y0(s,o,i),Ae=null,Nt=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){de(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)v0(e,t),e=e.sibling}function v0(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(bt(e,t),jt(t),r&4){try{ds(3,t,t.return),La(3,t)}catch(g){de(t,t.return,g)}try{ds(5,t,t.return)}catch(g){de(t,t.return,g)}}break;case 1:bt(e,t),jt(t),r&512&&n!==null&&ti(n,n.return);break;case 5:if(bt(e,t),jt(t),r&512&&n!==null&&ti(n,n.return),t.flags&32){var i=t.stateNode;try{Ms(i,"")}catch(g){de(t,t.return,g)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,l=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&$g(i,s),Mc(l,o);var u=Mc(l,s);for(o=0;o<a.length;o+=2){var c=a[o],d=a[o+1];c==="style"?Wg(i,d):c==="dangerouslySetInnerHTML"?Hg(i,d):c==="children"?Ms(i,d):qd(i,c,d,u)}switch(l){case"input":wc(i,s);break;case"textarea":Fg(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?si(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?si(i,!!s.multiple,s.defaultValue,!0):si(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ps]=s}catch(g){de(t,t.return,g)}}break;case 6:if(bt(e,t),jt(t),r&4){if(t.stateNode===null)throw Error(O(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(g){de(t,t.return,g)}}break;case 3:if(bt(e,t),jt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(e.containerInfo)}catch(g){de(t,t.return,g)}break;case 4:bt(e,t),jt(t);break;case 13:bt(e,t),jt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Mf=pe())),r&4&&Mp(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Be=(u=Be)||c,bt(e,t),Be=u):bt(e,t),jt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(D=t,c=t.child;c!==null;){for(d=D=c;D!==null;){switch(f=D,h=f.child,f.tag){case 0:case 11:case 14:case 15:ds(4,f,f.return);break;case 1:ti(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(g){de(r,n,g)}}break;case 5:ti(f,f.return);break;case 22:if(f.memoizedState!==null){Tp(d);continue}}h!==null?(h.return=f,D=h):Tp(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,a=d.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Ug("display",o))}catch(g){de(t,t.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){de(t,t.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bt(e,t),jt(t),r&4&&Mp(t);break;case 21:break;default:bt(e,t),jt(t)}}function jt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(g0(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ms(i,""),r.flags&=-33);var s=bp(t);nd(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=bp(t);td(t,l,o);break;default:throw Error(O(161))}}catch(a){de(t,t.return,a)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function qw(t,e,n){D=t,x0(t)}function x0(t,e,n){for(var r=(t.mode&1)!==0;D!==null;){var i=D,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Ao;if(!o){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Be;l=Ao;var u=Be;if(Ao=o,(Be=a)&&!u)for(D=i;D!==null;)o=D,a=o.child,o.tag===22&&o.memoizedState!==null?Ap(i):a!==null?(a.return=o,D=a):Ap(i);for(;s!==null;)D=s,x0(s),s=s.sibling;D=i,Ao=l,Be=u}Np(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,D=s):Np(t)}}function Np(t){for(;D!==null;){var e=D;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Be||La(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Be)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Mt(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&dp(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}dp(e,o,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var a=e.memoizedProps;switch(e.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:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Os(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Be||e.flags&512&&ed(e)}catch(f){de(e,e.return,f)}}if(e===t){D=null;break}if(n=e.sibling,n!==null){n.return=e.return,D=n;break}D=e.return}}function Tp(t){for(;D!==null;){var e=D;if(e===t){D=null;break}var n=e.sibling;if(n!==null){n.return=e.return,D=n;break}D=e.return}}function Ap(t){for(;D!==null;){var e=D;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{La(4,e)}catch(a){de(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(a){de(e,i,a)}}var s=e.return;try{ed(e)}catch(a){de(e,s,a)}break;case 5:var o=e.return;try{ed(e)}catch(a){de(e,o,a)}}}catch(a){de(e,e.return,a)}if(e===t){D=null;break}var l=e.sibling;if(l!==null){l.return=e.return,D=l;break}D=e.return}}var Kw=Math.ceil,Ol=mn.ReactCurrentDispatcher,Ef=mn.ReactCurrentOwner,vt=mn.ReactCurrentBatchConfig,U=0,Me=null,ve=null,Le=0,it=0,ni=Yn(0),Se=0,Fs=null,Mr=0,Pa=0,bf=0,fs=null,Qe=null,Mf=0,ki=1/0,en=null,Rl=!1,rd=null,Bn=null,Oo=!1,On=null,Il=0,hs=0,id=null,tl=-1,nl=0;function We(){return U&6?pe():tl!==-1?tl:tl=pe()}function $n(t){return t.mode&1?U&2&&Le!==0?Le&-Le:Ow.transition!==null?(nl===0&&(nl=ry()),nl):(t=q,t!==0||(t=window.event,t=t===void 0?16:cy(t.type)),t):1}function It(t,e,n,r){if(50<hs)throw hs=0,id=null,Error(O(185));to(t,n,r),(!(U&2)||t!==Me)&&(t===Me&&(!(U&2)&&(Pa|=n),Se===4&&Mn(t,Le)),tt(t,r),n===1&&U===0&&!(e.mode&1)&&(ki=pe()+500,Ra&&Xn()))}function tt(t,e){var n=t.callbackNode;Ok(t,e);var r=ml(t,t===Me?Le:0);if(r===0)n!==null&&_h(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&_h(n),e===1)t.tag===0?Aw(Op.bind(null,t)):Ay(Op.bind(null,t)),bw(function(){!(U&6)&&Xn()}),n=null;else{switch(iy(r)){case 1:n=Yd;break;case 4:n=ty;break;case 16:n=pl;break;case 536870912:n=ny;break;default:n=pl}n=N0(n,k0.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function k0(t,e){if(tl=-1,nl=0,U&6)throw Error(O(327));var n=t.callbackNode;if(ci()&&t.callbackNode!==n)return null;var r=ml(t,t===Me?Le:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Dl(t,r);else{e=r;var i=U;U|=2;var s=S0();(Me!==t||Le!==e)&&(en=null,ki=pe()+500,mr(t,e));do try{Qw();break}catch(l){w0(t,l)}while(!0);df(),Ol.current=s,U=i,ve!==null?e=0:(Me=null,Le=0,e=Se)}if(e!==0){if(e===2&&(i=Rc(t),i!==0&&(r=i,e=sd(t,i))),e===1)throw n=Fs,mr(t,0),Mn(t,r),tt(t,pe()),n;if(e===6)Mn(t,r);else{if(i=t.current.alternate,!(r&30)&&!Jw(i)&&(e=Dl(t,r),e===2&&(s=Rc(t),s!==0&&(r=s,e=sd(t,s))),e===1))throw n=Fs,mr(t,0),Mn(t,r),tt(t,pe()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(O(345));case 2:or(t,Qe,en);break;case 3:if(Mn(t,r),(r&130023424)===r&&(e=Mf+500-pe(),10<e)){if(ml(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){We(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Bc(or.bind(null,t,Qe,en),e);break}or(t,Qe,en);break;case 4:if(Mn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Rt(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Kw(r/1960))-r,10<r){t.timeoutHandle=Bc(or.bind(null,t,Qe,en),r);break}or(t,Qe,en);break;case 5:or(t,Qe,en);break;default:throw Error(O(329))}}}return tt(t,pe()),t.callbackNode===n?k0.bind(null,t):null}function sd(t,e){var n=fs;return t.current.memoizedState.isDehydrated&&(mr(t,e).flags|=256),t=Dl(t,e),t!==2&&(e=Qe,Qe=n,e!==null&&od(e)),t}function od(t){Qe===null?Qe=t:Qe.push.apply(Qe,t)}function Jw(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Pt(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Mn(t,e){for(e&=~bf,e&=~Pa,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Rt(e),r=1<<n;t[n]=-1,e&=~r}}function Op(t){if(U&6)throw Error(O(327));ci();var e=ml(t,0);if(!(e&1))return tt(t,pe()),null;var n=Dl(t,e);if(t.tag!==0&&n===2){var r=Rc(t);r!==0&&(e=r,n=sd(t,r))}if(n===1)throw n=Fs,mr(t,0),Mn(t,e),tt(t,pe()),n;if(n===6)throw Error(O(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,or(t,Qe,en),tt(t,pe()),null}function Nf(t,e){var n=U;U|=1;try{return t(e)}finally{U=n,U===0&&(ki=pe()+500,Ra&&Xn())}}function Nr(t){On!==null&&On.tag===0&&!(U&6)&&ci();var e=U;U|=1;var n=vt.transition,r=q;try{if(vt.transition=null,q=1,t)return t()}finally{q=r,vt.transition=n,U=e,!(U&6)&&Xn()}}function Tf(){it=ni.current,X(ni)}function mr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,Ew(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(af(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&kl();break;case 3:vi(),X(Ze),X($e),yf();break;case 5:gf(r);break;case 4:vi();break;case 13:X(ne);break;case 19:X(ne);break;case 10:ff(r.type._context);break;case 22:case 23:Tf()}n=n.return}if(Me=t,ve=t=Fn(t.current,null),Le=it=e,Se=0,Fs=null,bf=Pa=Mr=0,Qe=fs=null,ur!==null){for(e=0;e<ur.length;e++)if(n=ur[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ur=null}return t}function w0(t,e){do{var n=ve;try{if(df(),Xo.current=Al,Tl){for(var r=ie.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Tl=!1}if(br=0,be=we=ie=null,cs=!1,_s=0,Ef.current=null,n===null||n.return===null){Se=1,Fs=e,ve=null;break}e:{var s=t,o=n.return,l=n,a=e;if(e=Le,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=yp(o);if(h!==null){h.flags&=-257,vp(h,o,l,s,e),h.mode&1&&gp(s,u,e),e=h,a=u;var p=e.updateQueue;if(p===null){var g=new Set;g.add(a),e.updateQueue=g}else p.add(a);break e}else{if(!(e&1)){gp(s,u,e),Af();break e}a=Error(O(426))}}else if(te&&l.mode&1){var y=yp(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),vp(y,o,l,s,e),uf(xi(a,l));break e}}s=a=xi(a,l),Se!==4&&(Se=2),fs===null?fs=[s]:fs.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var m=i0(s,a,e);cp(s,m);break e;case 1:l=a;var v=s.type,k=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Bn===null||!Bn.has(k)))){s.flags|=65536,e&=-e,s.lanes|=e;var w=s0(s,l,e);cp(s,w);break e}}s=s.return}while(s!==null)}E0(n)}catch(S){e=S,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(!0)}function S0(){var t=Ol.current;return Ol.current=Al,t===null?Al:t}function Af(){(Se===0||Se===3||Se===2)&&(Se=4),Me===null||!(Mr&268435455)&&!(Pa&268435455)||Mn(Me,Le)}function Dl(t,e){var n=U;U|=2;var r=S0();(Me!==t||Le!==e)&&(en=null,mr(t,e));do try{Gw();break}catch(i){w0(t,i)}while(!0);if(df(),U=n,Ol.current=r,ve!==null)throw Error(O(261));return Me=null,Le=0,Se}function Gw(){for(;ve!==null;)C0(ve)}function Qw(){for(;ve!==null&&!wk();)C0(ve)}function C0(t){var e=M0(t.alternate,t,it);t.memoizedProps=t.pendingProps,e===null?E0(t):ve=e,Ef.current=null}function E0(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=Hw(n,e),n!==null){n.flags&=32767,ve=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Se=6,ve=null;return}}else if(n=Vw(n,e,it),n!==null){ve=n;return}if(e=e.sibling,e!==null){ve=e;return}ve=e=t}while(e!==null);Se===0&&(Se=5)}function or(t,e,n){var r=q,i=vt.transition;try{vt.transition=null,q=1,Yw(t,e,n,r)}finally{vt.transition=i,q=r}return null}function Yw(t,e,n,r){do ci();while(On!==null);if(U&6)throw Error(O(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(O(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(Rk(t,s),t===Me&&(ve=Me=null,Le=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Oo||(Oo=!0,N0(pl,function(){return ci(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=vt.transition,vt.transition=null;var o=q;q=1;var l=U;U|=4,Ef.current=null,Ww(t,n),v0(n,t),yw(jc),gl=!!zc,jc=zc=null,t.current=n,qw(n),Sk(),U=l,q=o,vt.transition=s}else t.current=n;if(Oo&&(Oo=!1,On=t,Il=i),s=t.pendingLanes,s===0&&(Bn=null),bk(n.stateNode),tt(t,pe()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Rl)throw Rl=!1,t=rd,rd=null,t;return Il&1&&t.tag!==0&&ci(),s=t.pendingLanes,s&1?t===id?hs++:(hs=0,id=t):hs=0,Xn(),null}function ci(){if(On!==null){var t=iy(Il),e=vt.transition,n=q;try{if(vt.transition=null,q=16>t?16:t,On===null)var r=!1;else{if(t=On,On=null,Il=0,U&6)throw Error(O(331));var i=U;for(U|=4,D=t.current;D!==null;){var s=D,o=s.child;if(D.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(D=u;D!==null;){var c=D;switch(c.tag){case 0:case 11:case 15:ds(8,c,s)}var d=c.child;if(d!==null)d.return=c,D=d;else for(;D!==null;){c=D;var f=c.sibling,h=c.return;if(m0(c),c===u){D=null;break}if(f!==null){f.return=h,D=f;break}D=h}}}var p=s.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}D=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,D=o;else e:for(;D!==null;){if(s=D,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ds(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,D=m;break e}D=s.return}}var v=t.current;for(D=v;D!==null;){o=D;var k=o.child;if(o.subtreeFlags&2064&&k!==null)k.return=o,D=k;else e:for(o=v;D!==null;){if(l=D,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:La(9,l)}}catch(S){de(l,l.return,S)}if(l===o){D=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,D=w;break e}D=l.return}}if(U=i,Xn(),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(Ma,t)}catch{}r=!0}return r}finally{q=n,vt.transition=e}}return!1}function Rp(t,e,n){e=xi(n,e),e=i0(t,e,1),t=_n(t,e,1),e=We(),t!==null&&(to(t,1,e),tt(t,e))}function de(t,e,n){if(t.tag===3)Rp(t,t,n);else for(;e!==null;){if(e.tag===3){Rp(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bn===null||!Bn.has(r))){t=xi(n,t),t=s0(e,t,1),e=_n(e,t,1),t=We(),e!==null&&(to(e,1,t),tt(e,t));break}}e=e.return}}function Xw(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=We(),t.pingedLanes|=t.suspendedLanes&n,Me===t&&(Le&n)===n&&(Se===4||Se===3&&(Le&130023424)===Le&&500>pe()-Mf?mr(t,0):bf|=n),tt(t,e)}function b0(t,e){e===0&&(t.mode&1?(e=ko,ko<<=1,!(ko&130023424)&&(ko=4194304)):e=1);var n=We();t=fn(t,e),t!==null&&(to(t,e,n),tt(t,n))}function Zw(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),b0(t,n)}function eS(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(e),b0(t,n)}var M0;M0=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ze.current)Xe=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Xe=!1,Fw(t,e,n);Xe=!!(t.flags&131072)}else Xe=!1,te&&e.flags&1048576&&Oy(e,Cl,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;el(t,e),t=e.pendingProps;var i=mi(e,$e.current);ui(e,n),i=xf(null,e,r,t,i,n);var s=kf();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,et(r)?(s=!0,wl(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pf(e),i.updater=Da,e.stateNode=i,i._reactInternals=e,qc(e,r,t,n),e=Gc(null,e,r,!0,s,n)):(e.tag=0,te&&s&&lf(e),He(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(el(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=nS(r),t=Mt(r,t),i){case 0:e=Jc(null,e,r,t,n);break e;case 1:e=wp(null,e,r,t,n);break e;case 11:e=xp(null,e,r,t,n);break e;case 14:e=kp(null,e,r,Mt(r.type,t),n);break e}throw Error(O(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mt(r,i),Jc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mt(r,i),wp(t,e,r,i,n);case 3:e:{if(u0(e),t===null)throw Error(O(387));r=e.pendingProps,s=e.memoizedState,i=s.element,zy(t,e),Ml(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=xi(Error(O(423)),e),e=Sp(t,e,r,n,i);break e}else if(r!==i){i=xi(Error(O(424)),e),e=Sp(t,e,r,n,i);break e}else for(ot=jn(e.stateNode.containerInfo.firstChild),lt=e,te=!0,Tt=null,n=Ly(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gi(),r===i){e=hn(t,e,n);break e}He(t,e,r,n)}e=e.child}return e;case 5:return jy(e),t===null&&Hc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,_c(r,i)?o=null:s!==null&&_c(r,s)&&(e.flags|=32),a0(t,e),He(t,e,o,n),e.child;case 6:return t===null&&Hc(e),null;case 13:return c0(t,e,n);case 4:return mf(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=yi(e,null,r,n):He(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mt(r,i),xp(t,e,r,i,n);case 7:return He(t,e,e.pendingProps,n),e.child;case 8:return He(t,e,e.pendingProps.children,n),e.child;case 12:return He(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,J(El,r._currentValue),r._currentValue=o,s!==null)if(Pt(s.value,o)){if(s.children===i.children&&!Ze.current){e=hn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=ln(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Uc(s.return,n,e),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(O(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Uc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}He(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ui(e,n),i=St(i),r=r(i),e.flags|=1,He(t,e,r,n),e.child;
vendor: 4,908 bytes, line 40
40case 14:return r=e.type,i=Mt(r,e.pendingProps),i=Mt(r.type,i),kp(t,e,r,i,n);case 15:return o0(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Mt(r,i),el(t,e),e.tag=1,et(r)?(t=!0,wl(e)):t=!1,ui(e,n),r0(e,r,i),qc(e,r,i,n),Gc(null,e,r,!0,t,n);case 19:return d0(t,e,n);case 22:return l0(t,e,n)}throw Error(O(156,e.tag))};function N0(t,e){return ey(t,e)}function tS(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 yt(t,e,n,r){return new tS(t,e,n,r)}function Of(t){return t=t.prototype,!(!t||!t.isReactComponent)}function nS(t){if(typeof t=="function")return Of(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Jd)return 11;if(t===Gd)return 14}return 2}function Fn(t,e){var n=t.alternate;return n===null?(n=yt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function rl(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")Of(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case qr:return gr(n.children,i,s,e);case Kd:o=8,i|=8;break;case gc:return t=yt(12,n,e,i|2),t.elementType=gc,t.lanes=s,t;case yc:return t=yt(13,n,e,i),t.elementType=yc,t.lanes=s,t;case vc:return t=yt(19,n,e,i),t.elementType=vc,t.lanes=s,t;case jg:return za(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Pg:o=10;break e;case zg:o=9;break e;case Jd:o=11;break e;case Gd:o=14;break e;case kn:o=16,r=null;break e}throw Error(O(130,t==null?t:typeof t,""))}return e=yt(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function gr(t,e,n,r){return t=yt(7,t,r,e),t.lanes=n,t}function za(t,e,n,r){return t=yt(22,t,r,e),t.elementType=jg,t.lanes=n,t.stateNode={isHidden:!1},t}function Ru(t,e,n){return t=yt(6,t,null,e),t.lanes=n,t}function Iu(t,e,n){return e=yt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function rS(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fu(0),this.expirationTimes=fu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Rf(t,e,n,r,i,s,o,l,a){return t=new rS(t,e,n,l,a),e===1?(e=1,s===!0&&(e|=8)):e=0,s=yt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pf(s),t}function iS(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Wr,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function T0(t){if(!t)return Kn;t=t._reactInternals;e:{if(Lr(t)!==t||t.tag!==1)throw Error(O(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(et(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(O(171))}if(t.tag===1){var n=t.type;if(et(n))return Ty(t,n,e)}return e}function A0(t,e,n,r,i,s,o,l,a){return t=Rf(n,r,!0,t,i,s,o,l,a),t.context=T0(null),n=t.current,r=We(),i=$n(n),s=ln(r,i),s.callback=e??null,_n(n,s,i),t.current.lanes=i,to(t,i,r),tt(t,r),t}function ja(t,e,n,r){var i=e.current,s=We(),o=$n(i);return n=T0(n),e.context===null?e.context=n:e.pendingContext=n,e=ln(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=_n(i,e,o),t!==null&&(It(t,i,o,s),Yo(t,i,o)),o}function Ll(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Ip(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function If(t,e){Ip(t,e),(t=t.alternate)&&Ip(t,e)}function sS(){return null}var O0=typeof reportError=="function"?reportError:function(t){console.error(t)};function Df(t){this._internalRoot=t}_a.prototype.render=Df.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(O(409));ja(t,e,null,null)};
40_a.prototype.unmount=Df.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Nr(function(){ja(null,t,null,null)}),e[dn]=null}};function _a(t){this._internalRoot=t}_a.prototype.unstable_scheduleHydration=function(t){if(t){var e=ly();t={blockedOn:null,target:t,priority:e};for(var n=0;n<bn.length&&e!==0&&e<bn[n].priority;n++);bn.splice(n,0,t),n===0&&uy(t)}};function Lf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Ba(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Dp(){}function oS(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Ll(o);s.call(u)}}var o=A0(e,r,t,0,null,!1,!1,"",Dp);return t._reactRootContainer=o,t[dn]=o.current,Ds(t.nodeType===8?t.parentNode:t),Nr(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Ll(a);l.call(u)}}var a=Rf(t,0,!1,null,null,!1,!1,"",Dp);return t._reactRootContainer=a,t[dn]=a.current,Ds(t.nodeType===8?t.parentNode:t),Nr(function(){ja(e,a,n,r)}),a}function $a(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var a=Ll(o);l.call(a)}}ja(e,o,t,i)}else o=oS(n,e,t,i,r);return Ll(o)}sy=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Qi(e.pendingLanes);n!==0&&(Xd(e,n|1),tt(e,pe()),!(U&6)&&(ki=pe()+500,Xn()))}break;case 13:Nr(function(){var r=fn(t,1);if(r!==null){var i=We();It(r,t,1,i)}}),If(t,1)}};Zd=function(t){if(t.tag===13){var e=fn(t,134217728);if(e!==null){var n=We();It(e,t,134217728,n)}If(t,134217728)}};oy=function(t){if(t.tag===13){var e=$n(t),n=fn(t,e);if(n!==null){var r=We();It(n,t,e,r)}If(t,e)}};ly=function(){return q};ay=function(t,e){var n=q;try{return q=t,e()}finally{q=n}};Tc=function(t,e,n){switch(e){case"input":if(wc(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=Oa(r);if(!i)throw Error(O(90));Bg(r),wc(r,i)}}}break;case"textarea":Fg(t,n);break;case"select":e=n.value,e!=null&&si(t,!!n.multiple,e,!1)}};Jg=Nf;Gg=Nr;var lS={usingClientEntryPoint:!1,Events:[ro,Qr,Oa,qg,Kg,Nf]},Vi={findFiberByHostInstance:ar,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aS={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Xg(t),t===null?null:t.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||sS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ro.isDisabled&&Ro.supportsFiber)try{Ma=Ro.inject(aS),Ht=Ro}catch{}}ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lS;ut.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lf(e))throw Error(O(200));return iS(t,e,null,n)};ut.createRoot=function(t,e){if(!Lf(t))throw Error(O(299));var n=!1,r="",i=O0;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Rf(t,1,!1,null,null,n,!1,r,i),t[dn]=e.current,Ds(t.nodeType===8?t.parentNode:t),new Df(e)};ut.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(O(188)):(t=Object.keys(t).join(","),Error(O(268,t)));return t=Xg(e),t=t===null?null:t.stateNode,t};ut.flushSync=function(t){return Nr(t)};ut.hydrate=function(t,e,n){if(!Ba(e))throw Error(O(200));return $a(null,t,e,!0,n)};ut.hydrateRoot=function(t,e,n){if(!Lf(t))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=O0;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=A0(e,null,t,1,n??null,i,!1,s,o),t[dn]=e.current,Ds(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new _a(e)};ut.render=function(t,e,n){if(!Ba(e))throw Error(O(200));return $a(null,t,e,!1,n)};ut.unmountComponentAtNode=function(t){if(!Ba(t))throw Error(O(40));return t._reactRootContainer?(Nr(function(){$a(null,null,t,!1,function(){t._reactRootContainer=null,t[dn]=null})}),!0):!1};ut.unstable_batchedUpdates=Nf;ut.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Ba(n))throw Error(O(200));if(t==null||t._reactInternals===void 0)throw Error(O(38));return $a(t,e,n,!1,r)};ut.version="18.3.1-next-f1338f8080-20240426";function R0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(R0)}catch(t){console.error(t)}}R0(),Rg.exports=ut;var I0=Rg.exports;const uS=xg(I0);var D0,Lp=I0;D0=Lp.createRoot,Lp.hydrateRoot;/**
41 * react-router v7.13.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */var Pp="popstate";function cS(t={}){function e(r,i){let{pathname:s,search:o,hash:l}=r.location;return ld("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vs(i)}return fS(e,n,null,t)}function se(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Wt(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function dS(){return Math.random().toString(36).substring(2,10)}function zp(t,e){return{usr:t.state,key:t.key,idx:e}}function ld(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Ii(e):e,state:n,key:e&&e.key||r||dS()}}function Vs({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ii(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function fS(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l="POP",a=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function d(){l="POP";let y=c(),m=y==null?null:y-u;u=y,a&&a({action:l,location:g.location,delta:m})}function f(y,m){l="PUSH";let v=ld(g.location,y,m);u=c()+1;let k=zp(v,u),w=g.createHref(v);try{o.pushState(k,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(w)}s&&a&&a({action:l,location:g.location,delta:1})}function h(y,m){l="REPLACE";let v=ld(g.location,y,m);u=c();let k=zp(v,u),w=g.createHref(v);o.replaceState(k,"",w),s&&a&&a({action:l,location:g.location,delta:0})}function p(y){return hS(y)}let g={get action(){return l},get location(){return t(i,o)},listen(y){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Pp,d),a=y,()=>{i.removeEventListener(Pp,d),a=null}},createHref(y){return e(i,y)},createURL:p,encodeLocation(y){let m=p(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(y){return o.go(y)}};return g}function hS(t,e=!1){let n="http://localhost";
49typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),se(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Vs(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function L0(t,e,n="/"){return pS(t,e,n,!1)}function pS(t,e,n,r){let i=typeof e=="string"?Ii(e):e,s=pn(i.pathname||"/",n);if(s==null)return null;let o=P0(t);mS(o);let l=null;for(let a=0;l==null&&a<o.length;++a){let u=MS(s);l=ES(o[a],u,r)}return l}function P0(t,e=[],n=[],r="",i=!1){let s=(o,l,a=i,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;se(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let d=an([r,c.relativePath]),f=n.concat(c);o.children&&o.children.length>0&&(se(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),P0(o.children,e,f,d,a)),!(o.path==null&&!o.index)&&e.push({path:d,score:SS(d,o.index),routesMeta:f})};return t.forEach((o,l)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,l);else for(let u of z0(o.path))s(o,l,!0,u)}),e}function z0(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=z0(r.join("/")),l=[];return l.push(...o.map(a=>a===""?s:[s,a].join("/"))),i&&l.push(...o),l.map(a=>t.startsWith("/")&&a===""?"/":a)}function mS(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:CS(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var gS=/^:[\w-]+$/,yS=3,vS=2,xS=1,kS=10,wS=-2,jp=t=>t==="*";function SS(t,e){let n=t.split("/"),r=n.length;return n.some(jp)&&(r+=wS),e&&(r+=vS),n.filter(i=>!jp(i)).reduce((i,s)=>i+(gS.test(s)?yS:s===""?xS:kS),r)}function CS(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function ES(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let l=0;l<r.length;++l){let a=r[l],u=l===r.length-1,c=s==="/"?e:e.slice(s.length)||"/",d=Pl({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},c),f=a.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Pl({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},c)),!d)return null;
49Object.assign(i,d.params),o.push({params:i,pathname:an([s,d.pathname]),pathnameBase:OS(an([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=an([s,d.pathnameBase]))}return o}function Pl(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=bS(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let p=l[f]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}const h=l[f];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function bS(t,e=!1,n=!0){Wt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function MS(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Wt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function pn(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var NS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function TS(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Ii(t):t,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=_p(n.substring(1),"/"):s=_p(n,e)):s=e,{pathname:s,search:RS(r),hash:IS(i)}}function _p(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Du(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` 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 AS(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function j0(t){let e=AS(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function _0(t,e,n,r=!1){let i;typeof t=="string"?i=Ii(t):(i={...t},se(!i.pathname||!i.pathname.includes("?"),Du("?","pathname","search",i)),se(!i.pathname||!i.pathname.includes("#"),Du("#","pathname","hash",i)),se(!i.search||!i.search.includes("#"),Du("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}l=d>=0?e[d]:"/"}let a=TS(i,l),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}var an=t=>t.join("/").replace(/\/\/+/g,"/"),OS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),RS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,IS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,DS=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function LS(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function PS(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var B0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $0(t,e){let n=t;if(typeof n!="string"||!NS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(B0)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),l=pn(o.pathname,e);o.origin===s.origin&&l!=null?n=l+o.search+o.hash:i=!0}catch{Wt(!1,`<Link to="${n}">
49 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var F0=["POST","PUT","PATCH","DELETE"];new Set(F0);var zS=["GET",...F0];new Set(zS);var Di=C.createContext(null);Di.displayName="DataRouter";var Fa=C.createContext(null);Fa.displayName="DataRouterState";var jS=C.createContext(!1),V0=C.createContext({isTransitioning:!1});V0.displayName="ViewTransition";var _S=C.createContext(new Map);_S.displayName="Fetchers";var BS=C.createContext(null);BS.displayName="Await";var Et=C.createContext(null);Et.displayName="Navigation";var so=C.createContext(null);so.displayName="Location";var Jt=C.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var Pf=C.createContext(null);Pf.displayName="RouteError";var H0="REACT_ROUTER_ERROR",$S="REDIRECT",FS="ROUTE_ERROR_RESPONSE";function VS(t){if(t.startsWith(`${H0}:${$S}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function HS(t){if(t.startsWith(`${H0}:${FS}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new DS(e.status,e.statusText,e.data)}catch{}}function US(t,{relative:e}={}){se(oo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=C.useContext(Et),{hash:i,pathname:s,search:o}=lo(t,{relative:e}),l=s;return n!=="/"&&(l=s==="/"?n:an([n,s])),r.createHref({pathname:l,search:o,hash:i})}function oo(){return C.useContext(so)!=null}function Pr(){return se(oo(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(so).location}var U0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function W0(t){C.useContext(Et).static||C.useLayoutEffect(t)}function WS(){let{isDataRoute:t}=C.useContext(Jt);return t?sC():qS()}function qS(){se(oo(),"useNavigate() may be used only in the context of a <Router> component.");let t=C.useContext(Di),{basename:e,navigator:n}=C.useContext(Et),{matches:r}=C.useContext(Jt),{pathname:i}=Pr(),s=JSON.stringify(j0(r)),o=C.useRef(!1);return W0(()=>{o.current=!0}),C.useCallback((a,u={})=>{if(Wt(o.current,U0),!o.current)return;if(typeof a=="number"){n.go(a);return}let c=_0(a,JSON.parse(s),i,u.relative==="path");t==null&&e!=="/"&&(c.pathname=c.pathname==="/"?e:an([e,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[e,n,s,i,t])}C.createContext(null);function KS(){let{matches:t}=C.useContext(Jt),e=t[t.length-1];return e?e.params:{}}function lo(t,{relative:e}={}){let{matches:n}=C.useContext(Jt),{pathname:r}=Pr(),i=JSON.stringify(j0(n));return C.useMemo(()=>_0(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function JS(t,e){return q0(t,e)}function q0(t,e,n,r,i){var v;se(oo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=C.useContext(Et),{matches:o}=C.useContext(Jt),l=o[o.length-1],a=l?l.params:{},u=l?l.pathname:"/",c=l?l.pathnameBase:"/",d=l&&l.route;{let k=d&&d.path||"";J0(u,!d||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
51Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let f=Pr(),h;if(e){let k=typeof e=="string"?Ii(e):e;se(c==="/"||((v=k.pathname)==null?void 0:v.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${k.pathname}" was given in the \`location\` prop.`),h=k}else h=f;let p=h.pathname||"/",g=p;if(c!=="/"){let k=c.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(k.length).join("/")}let y=L0(t,{pathname:g});Wt(d||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Wt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let m=ZS(y&&y.map(k=>Object.assign({},k,{params:Object.assign({},a,k.params),pathname:an([c,s.encodeLocation?s.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?c:an([c,s.encodeLocation?s.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),o,n,r,i);return e&&m?C.createElement(so.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},m):m}function GS(){let t=iC(),e=LS(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:s},"ErrorBoundary")," or"," ",C.createElement("code",{style:s},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application 
51Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),n?C.createElement("pre",{style:i},n):null,o)}var QS=C.createElement(GS,null),K0=class extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=HS(t.digest);n&&(t=n)}let e=t!==void 0?C.createElement(Jt.Provider,{value:this.props.routeContext},C.createElement(Pf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?C.createElement(YS,{error:t},e):e}};K0.contextType=jS;var Lu=new WeakMap;function YS({children:t,error:e}){let{basename:n}=C.useContext(Et);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=VS(e.digest);if(r){let i=Lu.get(e);if(i)throw i;let s=$0(r.location,n);if(B0&&!Lu.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Lu.set(e,o),o}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function XS({routeContext:t,match:e,children:n}){let r=C.useContext(Di);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),C.createElement(Jt.Provider,{value:t},n)}function ZS(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,o=n==null?void 0:n.errors;if(o!=null){let c=s.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);se(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,a=-1;if(n)for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(a=c),d.route.id){let{loaderData:f,errors:h}=n,p=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||p){l=!0,a>=0?s=s.slice(0,a+1):s=[s[0]];break}}}let u=n&&r?(c,d)=>{var f,h;r(c,{location:n.location,params:((h=(f=n.matches)==null?void 0:f[0])==null?void 0:h.params)??{},unstable_pattern:PS(n.matches),errorInfo:d})}:void 0;return s.reduceRight((c,d,f)=>{let h,p=!1,g=null,y=null;n&&(h=o&&d.route.id?o[d.route.id]:void 0,g=d.route.errorElement||QS,l&&(a<0&&f===0?(J0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,y=null):a===f&&(p=!0,y=d.route.hydrateFallbackElement||null)));let m=e.concat(s.slice(0,f+1)),v=()=>{let k;return h?k=g:p?k=y:d.route.Component?k=C.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=c,C.createElement(XS,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?C.createElement(K0,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):v()},null)}function zf(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function eC(t){let e=C.useContext(Di);return se(e,zf(t)),e}function tC(t){let e=C.useContext(Fa);return se(e,zf(t)),e}function nC(t){let e=C.useContext(Jt);return se(e,zf(t)),e}function jf(t){let e=nC(t),n=e.matches[e.matches.length-1];return se(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function rC(){return jf("useRouteId")}function iC(){var r;let t=C.useContext(Pf),e=tC("useRouteError"),n=jf("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function sC(){let{router:t}=eC("useNavigate"),e=jf("useNavigate"),n=C.useRef(!1);return W0(()=>{n.current=!0}
51),C.useCallback(async(i,s={})=>{Wt(n.current,U0),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Bp={};function J0(t,e,n){!e&&!Bp[t]&&(Bp[t]=!0,Wt(!1,n))}C.memo(oC);function oC({routes:t,future:e,state:n,onError:r}){return q0(t,void 0,n,r,e)}function Xi(t){se(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function lC({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){se(!oo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),a=C.useMemo(()=>({basename:l,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[l,i,s,o]);typeof n=="string"&&(n=Ii(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=n,p=C.useMemo(()=>{let g=pn(u,l);return g==null?null:{location:{pathname:g,search:c,hash:d,state:f,key:h},navigationType:r}},[l,u,c,d,f,h,r]);return Wt(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:C.createElement(Et.Provider,{value:a},C.createElement(so.Provider,{children:e,value:p}))}function aC({children:t,location:e}){return JS(ad(t),e)}function ad(t,e=[]){let n=[];return C.Children.forEach(t,(r,i)=>{if(!C.isValidElement(r))return;let s=[...e,i];if(r.type===C.Fragment){n.push.apply(n,ad(r.props.children,s));return}se(r.type===Xi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),se(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ad(r.props.children,s)),n.push(o)}),n}var il="get",sl="application/x-www-form-urlencoded";function Va(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function uC(t){return Va(t)&&t.tagName.toLowerCase()==="button"}function cC(t){return Va(t)&&t.tagName.toLowerCase()==="form"}function dC(t){return Va(t)&&t.tagName.toLowerCase()==="input"}function fC(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function hC(t,e){return t.button===0&&(!e||e==="_self")&&!fC(t)}var Io=null;function pC(){if(Io===null)try{new FormData(document.createElement("form"),0),Io=!1}catch{Io=!0}return Io}var mC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pu(t){return t!=null&&!mC.has(t)?(Wt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${sl}"`),null):t}function gC(t,e){let n,r,i,s,o;if(cC(t)){let l=t.getAttribute("action");r=l?pn(l,e):null,n=t.getAttribute("method")||il,i=Pu(t.getAttribute("enctype"))||sl,s=new FormData(t)}else if(uC(t)||dC(t)&&(t.type==="submit"||t.type==="image")){let l=t.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=t.getAttribute("formaction")||l.getAttribute("action");if(r=a?pn(a,e):null,n=t.getAttribute("formmethod")||l.getAttribute("method")||il,i=Pu(t.getAttribute("formenctype"))||Pu(l.getAttribute("enctype"))||sl,s=new FormData(l,t),!pC()){let{name:u,type:c,value:d}=t;if(c==="image"){let f=u?`${u}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else u&&s.append(u,d)}}else{if(Va(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=il,r=null,i=sl,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function _f(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function yC(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&pn(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function vC(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.
51isSpaMode,window.location.reload(),new Promise(()=>{})}}function xC(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function kC(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await vC(s,n);return o.links?o.links():[]}return[]}));return EC(r.flat(1).filter(xC).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function $p(t,e,n,r,i,s){let o=(a,u)=>n[u]?a.route.id!==n[u].route.id:!0,l=(a,u)=>{var c;return n[u].pathname!==a.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==a.params["*"]};return s==="assets"?e.filter((a,u)=>o(a,u)||l(a,u)):s==="data"?e.filter((a,u)=>{var d;let c=r.routes[a.route.id];if(!c||!c.hasLoader)return!1;if(o(a,u)||l(a,u))return!0;if(a.route.shouldRevalidate){let f=a.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(t,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function wC(t,e,{includeHydrateFallback:n}={}){return SC(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function SC(t){return[...new Set(t)]}function CC(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function EC(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(CC(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function G0(){let t=C.useContext(Di);return _f(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function bC(){let t=C.useContext(Fa);return _f(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Bf=C.createContext(void 0);Bf.displayName="FrameworkContext";function Q0(){let t=C.useContext(Bf);return _f(t,"You must render this element inside a <HydratedRouter> element"),t}function MC(t,e){let n=C.useContext(Bf),[r,i]=C.useState(!1),[s,o]=C.useState(!1),{onFocus:l,onBlur:a,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=e,f=C.useRef(null);C.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let g=m=>{m.forEach(v=>{o(v.isIntersecting)})},y=new IntersectionObserver(g,{threshold:.5});return f.current&&y.observe(f.current),()=>{y.disconnect()}}},[t]),C.useEffect(()=>{if(r){let g=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(g)}}},[r]);let h=()=>{i(!0)},p=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,f,{}]:[s,f,{onFocus:Hi(l,h),onBlur:Hi(a,p),onMouseEnter:Hi(u,h),onMouseLeave:Hi(c,p),onTouchStart:Hi(d,h)}]:[!1,f,{}]}function Hi(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function NC({page:t,...e}){let{router:n}=G0(),r=C.useMemo(()=>L0(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?C.createElement(AC,{page:t,matches:r,...e}):null}function TC(t){let{manifest:e,routeModules:n}=Q0(),[r,i]=C.useState([]);return C.useEffect(()=>{let s=!1;return kC(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function AC({page:t,matches:e,...n}){let r=Pr(),{future:i,manifest:s,routeModules:o}=Q0(),{basename:l}=G0(),{loaderData:a,matches:u}=bC(),c=C.useMemo(()=>$p(t,e,u,s,r,"data"),[t,e,u,s,r]),d=C.useMemo(()=>$p(t,e,u,s,r,"assets"),[t,e,u,s,r]),f=C.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let g=new Set,y=!1;if(e.forEach(v=>{var w;let k=s.routes[v.route.id];!k||!k.hasLoader||(!c.some(S=>S.route.id===v.route.id)&&v.route.id in a&&((w=o[v.route.id])!=null&&w.shouldRevalidate)||k.hasClientLoader?y=!0:g.add(v.route.id))}),g.size===0)return[];let m=yC(t,l,i.unstable_trailingSlashAwareDataRequests,"data");return y&&g.size>0&&m.searchParams.set("_routes",e.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[m.pathname+m.search]},[l,i.unstable_trailingSlashAwareDataRequests,a,r,s,c,e,t,o]),h=C.useMemo(()=>wC(d,s),[d,s]),p=TC(d);return C.createElement(C.Fragment,null,f.map(g=>C.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>C.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),p.map(({key:g,link:y})=>C.createElement("link",{key:g,nonce:n.nonce,...y,crossOrigin:y.crossOrigin??n.crossOrigin})))}function OC(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var RC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{RC&&(window.__reactRouterVersion="7.13.0")}catch{}function IC({basename:t,children:e,unstable_useTransitions:n,window:r}){let i=C.useRef();i.current==null&&(i.current=cS({window:r,v5Compat:!0}));let s=i.current,[o,l]=C.useState({action:s.action,location:s.location}),a=C.useCallback(u=>{n===!1?l(u):C.startTransition(()=>l(u))},[n]);return C.useLayoutEffect(()=>s.listen(a),[s,a]),C.createElement(lC,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:n})}var Y0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dt=C.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:l,target:a,to:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f,...h},p){let{basename:g,unstable_useTransitions:y}=C.useContext(Et),m=typeof u=="string"&&Y0.test(u),v=$0(u,g);u=v.to;let k=US(u,{relative:i}),[w,S,b]=MC(r,h),E=zC(u,{replace:o,state:l,target:a,preventScrollReset:c,relative:i,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:y});function N(R){e&&e(R),R.defaultPrevented||E(R)}let M=C.createElement("a",{...h,...b,href:v.absoluteURL||k,onClick:v.isExternal||s?e:N,ref:OC(p,S),target:a,"data-discover":!m&&n==="render"?"true":void 0});return w&&!m?C.createElement(C.Fragment,null,M,C.createElement(NC,{page:k})):M});Dt.displayName="Link";var DC=C.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:l,children:a,...u},c){let d=lo(o,{relative:u.relative}),f=Pr(),h=C.useContext(Fa),{navigator:p,basename:g}=C.useContext(Et),y=h!=null&&FC(d)&&l===!0,m=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,v=f.pathname,k=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(v=v.toLowerCase(),k=k?k.toLowerCase():null,m=m.toLowerCase()),k&&g&&(k=pn(k,g)||k);const w=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=v===m||!i&&v.startsWith(m)&&v.charAt(w)==="/",b=k!=null&&(k===m||!i&&k.startsWith(m)&&k.charAt(m.length)==="/"),E={isActive:S,isPending:b,isTransitioning:y},N=S?e:void 0,M;typeof r=="function"?M=r(E):M=[r,S?"active":null,b?"pending":null,y?"transitioning":null].filter(
51Boolean).join(" ");let R=typeof s=="function"?s(E):s;return C.createElement(Dt,{...u,"aria-current":N,className:M,ref:c,style:R,to:o,viewTransition:l},typeof a=="function"?a(E):a)});DC.displayName="NavLink";var LC=C.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=il,action:l,onSubmit:a,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f,...h},p)=>{let{unstable_useTransitions:g}=C.useContext(Et),y=BC(),m=$C(l,{relative:u}),v=o.toLowerCase()==="get"?"get":"post",k=typeof l=="string"&&Y0.test(l),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let b=S.nativeEvent.submitter,E=(b==null?void 0:b.getAttribute("formmethod"))||o,N=()=>y(b||S.currentTarget,{fetcherKey:e,method:E,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:f});g&&n!==!1?C.startTransition(()=>N()):N()};return C.createElement("form",{ref:p,method:v,action:m,onSubmit:r?a:w,...h,"data-discover":!k&&t==="render"?"true":void 0})});LC.displayName="Form";function PC(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function X0(t){let e=C.useContext(Di);return se(e,PC(t)),e}function zC(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:l,unstable_useTransitions:a}={}){let u=WS(),c=Pr(),d=lo(t,{relative:s});return C.useCallback(f=>{if(hC(f,e)){f.preventDefault();let h=n!==void 0?n:Vs(c)===Vs(d),p=()=>u(t,{replace:h,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:l});a?C.startTransition(()=>p()):p()}},[c,u,d,n,r,e,t,i,s,o,l,a])}var jC=0,_C=()=>`__${String(++jC)}__`;function BC(){let{router:t}=X0("useSubmit"),{basename:e}=C.useContext(Et),n=rC(),r=t.fetch,i=t.navigate;return C.useCallback(async(s,o={})=>{let{action:l,method:a,encType:u,formData:c,body:d}=gC(s,e);if(o.navigate===!1){let f=o.fetcherKey||_C();await r(f,n,o.action||l,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||a,formEncType:o.encType||u,flushSync:o.flushSync})}else await i(o.action||l,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||a,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function $C(t,{relative:e}={}){let{basename:n}=C.useContext(Et),r=C.useContext(Jt);se(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...lo(t||".",{relative:e})},o=Pr();if(t==null){s.search=o.search;let l=new URLSearchParams(s.search),a=l.getAll("index");if(a.some(c=>c==="")){l.delete("index"),a.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();s.search=c?`?${c}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:an([n,s.pathname])),Vs(s)}function FC(t,{relative:e}={}){let n=C.useContext(V0);se(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=X0("useViewTransitionState"),i=lo(t,{relative:e});if(!n.isTransitioning)return!1;
51let s=pn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=pn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Pl(i.pathname,o)!=null||Pl(i.pathname,s)!=null}function VC(){return x.jsxs("div",{className:"min-h-screen bg-black text-white relative flex flex-col",children:[x.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center px-4 pt-24 bg-[url('/background.jpg')] bg-cover bg-center bg-no-repeat",children:x.jsxs("div",{className:"w-full max-w-md space-y-8 bg-black/80 p-8 rounded border border-[#1e90ff]/30",children:[x.jsx("div",{className:"text-center",children:x.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-6",children:"LOGIN"})}),x.jsxs("form",{className:"space-y-6",onSubmit:t=>t.preventDefault(),children:[x.jsx("div",{children:x.jsx("input",{type:"email",className:"block w-full px-3 py-2 bg-transparent border border-gray-600 rounded placeholder-gray-400 focus:outline-none focus:border-[#1e90ff] cursor-not-allowed opacity-50",placeholder:"Votre email",disabled:!0,readOnly:!0})}),x.jsx("div",{children:x.jsx("input",{type:"password",className:"block w-full px-3 py-2 bg-transparent border border-gray-600 rounded placeholder-gray-400 focus:outline-none focus:border-[#1e90ff] cursor-not-allowed opacity-50",placeholder:"Votre mot de passe",disabled:!0,readOnly:!0})}),x.jsx("div",{children:x.jsx("a",{href:"https://vodi.app",target:"_blank",rel:"noopener noreferrer",className:"block w-full py-2 px-4 bg-[#1e90ff] rounded text-white font-medium hover:bg-[#1e90ff]/90 transition-colors text-center",children:"CONNEXION"})})]}),x.jsxs("div",{className:"text-center text-sm space-x-2",children:[x.jsx("a",{href:"https://vodi.app",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-[#1e90ff]",children:"Inscription"}),x.jsx("span",{className:"text-gray-400",children:"-"}),x.jsx("a",{href:"https://vodi.app",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-[#1e90ff]",children:"Mot de passe oublié ?"}),x.jsx("span",{className:"text-gray-400",children:"-"}),x.jsx("a",{href:"https://vodi.app",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-[#1e90ff]",children:"Contact"})]})]})}),x.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-24 space-y-8",children:[x.jsx("h1",{className:"text-4xl font-bold mb-8",children:"Vodi.to : L'héritier d'Eos.to et Mflix, une plateforme de streaming controversée"}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Introduction"}),x.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Le monde du streaming illégal est en perpétuel changement, avec la fermeture et l'apparition régulière de nouvelles plateformes. Vodi.to s'impose aujourd'hui comme le nouveau site qui attire l'attention des amateurs de streaming gratuit. Successeur de Eos.to, qui lui-même avait remplacé Mflix, cette plateforme semble poursuivre la tradition en offrant un catalogue riche de films et de séries en libre accès."})]}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Origines et ascension de Vodi.to"}),x.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Vodi.to est apparu après la disparition de Eos.to, qui était lui-même l'héritier du célèbre Mflix. Ces plateformes partageaient un objectif commun : donner accès gratuitement à des milliers de contenus audiovisuels, souvent en haute définition et avec des sous-titres. L'un des points forts de Vodi.to réside dans son interface fluide et ergonomique, qui permet aux utilisateurs de naviguer facilement à travers un large choix de films, séries et documentaires. Grâce à une organisation bien pensée et un moteur de recherche performant, la plateforme est rapidement devenue un refuge pour les anciens adeptes d'Eos.to."})]}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Pourquoi Eos.to a-t-il disparu ?"}),x.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Comme ses prédécesseurs, Eos.to a été victime des mesures de lutte contre le piratage. Exploitant un modèle illégal de diffusion de contenus protégés par des droits d'auteur, le site a rapidement attiré l'attention des autorités et des ayants droit. Depuis plusieurs années, les actions visant à fermer ces plateformes se sont intensifiées. Des sites emblématiques comme Zone-Téléchargement, Papystreaming et StreamComplet ont tous connu des blocages ou des poursuites judiciaires. Eos.to n'a pas échappé à cette répression, laissant un vide que Vodi.to tente aujourd'hui de combler."})]}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Vodi.to : Une alternative temporaire ?"}),x.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Comme chaque site qui renaît après une fermeture, Vodi.to pourrait connaître le même sort que ses prédécesseurs. Son modèle repose sur l'hébergement et le partage illégal de contenus sous copyright, ce qui le rend vulnérable aux mesures de répression. Cependant, le site semble déjà séduire une large audience, grâce à un catalogue régulièrement mis à jour et une accessibilité simplifiée. Il est encore trop tôt pour savoir combien de temps Vodi.to restera en ligne avant d'être potentiellement ciblé par les autorités."})]}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Les dangers du streaming illégal"}),x.jsxs("ul",{className:"list-disc list-inside space-y-4 text-gray-300",children:[x.jsxs("li",{children:[x.jsx("span",{className:"font-semibold",children:"Juri
51dique :"})," Visionner ou télécharger des contenus protégés sans autorisation est interdit dans de nombreux pays et peut entraîner des sanctions."]}),x.jsxs("li",{children:[x.jsx("span",{className:"font-semibold",children:"Sécurité :"})," Les sites de streaming illégaux sont souvent remplis de publicités douteuses, de virus et de risques de vol de données."]}),x.jsxs("li",{children:[x.jsx("span",{className:"font-semibold",children:"Fiabilité :"})," Ces plateformes disparaissent régulièrement du jour au lendemain, laissant les utilisateurs sans accès à leurs contenus préférés."]})]})]}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Quelles alternatives légales ?"}),x.jsxs("ul",{className:"list-disc list-inside space-y-4 text-gray-300",children:[x.jsxs("li",{children:[x.jsx("span",{className:"font-semibold",children:"Netflix, Disney+, Amazon Prime Video :"})," Un large choix de films et séries en haute définition."]}),x.jsxs("li",{children:[x.jsx("span",{className:"font-semibold",children:"CANAL+ VOD et OCS :"})," Des contenus exclusifs, notamment pour les amateurs de cinéma et de séries récentes."]}),x.jsxs("li",{children:[x.jsx("span",{className:"font-semibold",children:"Pluto TV, Arte.tv et Rakuten TV :"})," Des services gratuits et légaux pour visionner des films et des émissions en streaming."]})]})]}),x.jsxs("section",{className:"space-y-6",children:[x.jsx("h2",{className:"text-3xl font-semibold",children:"Conclusion"}),x.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Vodi.to semble s'imposer comme le nouvel héritier d'Eos.to, mais son avenir est incertain. Comme toutes les plateformes de streaming illégales avant lui, il risque d'être confronté aux autorités et de disparaître à son tour. Pour éviter ces désagréments et profiter d'une expérience fluide et sécurisée, il est recommandé de privilégier les plateformes légales qui offrent une qualité de service optimale et un respect des droits des créateurs."})]}),x.jsx("p",{className:"text-gray-300 italic mt-8",children:"Vodi.app n'est pas une plateforme de streaming et n'est pas affilié à Vodi.to."}),x.jsx("p",{className:"text-gray-300 mt-4",children:"Pour tout contact : [email protected]"})]}),x.jsx("footer",{className:"bg-black/90 border-t border-[#1e90ff]/30 py-6",children:x.jsx("div",{className:"max-w-4xl mx-auto px-4 text-center",children:x.jsx(Dt,{to:"/blog",className:"text-gray-400 hover:text-[#1e90ff] transition-colors",children:"Blog"})})})]})}const Z0=[{id:"vodi-vs-cinepulse",title:"Vodi.to vs Cinepulse",competitor:"Cinepulse",shortDescription:"Comparaison détaillée entre Vodi.to et Cinepulse, deux plateformes de wiflistreaming populaires.",content:`
52Vodi.to et Cinepulse sont deux des plus grandes plateformes de streaming qui offrent un large choix de contenus. Cet article propose une analyse comparative complète de ces deux services.
53
54## Catalogue de Contenus
55
56Vodi.to propose un catalogue impressionnant de films, séries et documentaires. La plateforme est particulièrement réputée pour son accès à des contenus récents et des sorties cinéma. Cinepulse, de son côté, offre également un large répertoire mais se distingue par un classement très bien organisé par genres et par années, facilitant la navigation.
57
58## Interface et Expérience Utilisateur
59
60Vodi.to se démarque par son interface épurée et intuitive, avec un moteur de recherche performant. Les utilisateurs apprécient la rapidité de chargement et la fluidité de navigation. Cinepulse propose une interface plus colorée avec des recommandations personnalisées basées sur l'historique de visionnage.
61
62## Qualité et Résolutions Disponibles
63
64Vodi.to offre généralement une qualité 720p à 1080p selon les contenus. Cinepulse propose aussi des contenus en haute définition, avec certains titres disponibles en 4K. Les deux plateformes proposent des sous-titres en plusieurs langues.
65
66## Stabilité et Fiabilité
67
68Vodi.to a maintenu une présence relativement stable depuis son lancement. Cinepulse, bien que populaire, a connu plusieurs incidents de disponibilité au cours de son histoire. La fiabilité est un avantage pour Vodi.to.
69
70## Sécurité et Risques
71
72Comme tous les sites de streaming non-officiels, les deux plateformes présentent des risques de sécurité similaires, notamment la présence potentielle de publicités douteuses et de malwares. Il est recommandé d'utiliser un VPN et un bloqueur de publicités.
73
74## Conclusion
75
76Vodi.to se distingue par une interface supérieure et une meilleure stabilité, tandis que Cinepulse offre de meilleures recommandations personnalisées. Le choix dépendra de vos préférences en termes d'interface et de contenus recherchés.
77    `,pros:["Interface intuitive et épurée","Moteur de recherche performant","Bonne stabilité et fiabilité","Catalogues régulièrement mis à jour","Qualité vidéo correcte"],cons:["Risques de sécurité inhérents aux sites non-officiels","Présence de publicités","Légalité questionnable"]},{id:"vodi-vs-movix",title:"Vodi.to vs Movix",competitor:"Movix",shortDe
77scription:"Analyse comparative entre Vodi.to et Movix pour les amateurs de cinéma et de séries.",content:`
78Vodi.to et Movix sont deux alternatives populaires pour le streaming de contenus audiovisuels. Découvrez les différences clés entre ces deux plateformes.
79
80## Disponibilité et Accessibilité
81
82Vodi.to est accessible via plusieurs domaines alternatifs et proxies, offrant une grande disponibilité malgré les blocages. Movix propose également plusieurs points d'accès, bien que moins nombreux que Vodi.to.
83
84## Sélection de Films et Séries
85
86Vodi.to excelle dans la variété avec un catalogue comprenant des milliers de titres, des plus grands succès hollywoodiens aux productions indépendantes. Movix se concentre davantage sur les blockbusters récents et les séries populaires, avec un catalogue légèrement plus restreint mais particulièrement riche en nouveautés.
87
88## Interface et Design
89
90L'interface de Vodi.to est minimaliste et efficace, privilégiant la rapidité de chargement. Movix propose une interface plus moderne avec un design épuré et des sections bien définies pour différents types de contenu.
91
92## Vitesse de Chargement
93
94Vodi.to est reconnu pour sa vitesse de chargement exceptionnelle, même en haute définition. Movix offre également une bonne performance, mais peut être légèrement plus lent lors des heures de forte utilisation.
95
96## Qualité des Flux Vidéo
97
98Les deux plateformes offrent généralement une qualité similaire (720p à 1080p). Cependant, Vodi.to est réputé pour avoir moins de problèmes de buffering.
99
100## Support et Communauté
101
102Vodi.to bénéficie d'une large communauté d'utilisateurs partageant des conseils et des astuces. Movix a une communauté plus réduite mais tout aussi engagée.
103
104## Conclusion
105
106Vodi.to offre une meilleure performance et une plus grande variété de contenus, tandis que Movix propose une interface plus moderne et se concentre sur les nouveautés. Pour un utilisateur cherchant la variété, Vodi.to est le meilleur choix.
107    `,pros:["Excellent catalogue très varié","Performance exceptionnelle","Interface rapide et efficace","Bonne disponibilité avec plusieurs accès","Peu de publicités invasives"],cons:["Risques légaux associés au streaming illégal","Sécurité informatique compromettable","Interface moins moderne que certains concurrents"]},{id:"vodi-vs-animesama",title:"Vodi.to vs Animesama",competitor:"Animesama",shortDescription:"Comparaison entre Vodi.to et Animesama pour les fans d'anime et de contenu asiatique.",content:`
108Vodi.to et Animesama ciblent des publics légèrement différents. Vodi.to est une plateforme généraliste tandis qu'Animesama se spécialise dans l'anime. Voici une comparaison détaillée.
109
110## Spécialisation et Contenu
111
112Animesama est exclusivement dédié à l'anime avec un catalogue impressionnant de séries, films et OVAs. Vodi.to, bien qu'offrant des animes, ne les hiérarchise pas de la même manière et se concentre davantage sur les films et séries occidentales.
113
114## Qualité de l'Anime
115
116Animesama propose généralement une meilleure qualité pour les contenus anime avec des sous-titres professionnels et plusieurs versions disponibles (VF, VOSTFR). Vodi.to offre une couverture moins complète pour les animes.
117
118## Catalogue Anime
119
120Animesama compte avec un répertoire de plus de 10 000 episodes d'anime disponibles. Vodi.to, bien qu'ayant une sélection d'animes, est moins exhaustif dans cette catégorie.
121
122## Interface Spécialisée
123
124Animesama propose une interface optimisée pour l'anime avec des filtres par genre, année et statut (en cours, terminé). Vodi.to utilise une interface générale qui ne privilégie pas l'anime.
125
126## Sous-titres et VF/VOSTFR
127
128Pour les amateurs d'anime, Animesama offre un avantage significatif avec des options de sous-titres mieux gérées et une distinction claire entre VF et VOSTFR. Vodi.to propose généralement une seule version.
129
130## Mises à Jour
131
132Animesama est réputé pour ses mises à jour rapides des nouveaux épisodes animé. Vodi.to met également à jour son contenu, mais moins rapidement pour les animes.
133
134## Conclusion
135
136Pour les fans d'anime, Animesama est clairement le meilleur choix avec une spécialisation inégalée et un catalogue exhaustif. Vodi.to reste une meilleure option pour les contenus occidentaux en général.
137    `,pros:["Spécialisation anime inégalée","Catalogue exhaustif d'animes","Sous-titres professionnels","Mises à jour rapides des nouveaux épisodes","Interface optimisée pour l'anime"],cons:["Catalogue limité en dehors de l'anime","Moins de contenus occidentaux","Sécurité informatique à risque"]},{id:"vodi-vs-filmoflix",title:"Vodi.to vs Filmoflix",competitor:"Filmoflix",shortDe
137scription:"Analyse approfondie de Vodi.to et Filmoflix pour les cinéphiles.",content:`
138Vodi.to et Filmoflix sont deux plateformes populaires auprès des cinéphiles. Voici une comparaison exhaustive de ces deux services.
139
140## Orientation du Catalogue
141
142Filmoflix se concentre fortement sur les films de qualité cinéma, avec un catalogue riche en classiques et en productions indépendantes. Vodi.to propose un mélange équilibré entre films et séries.
143
144## Sélection de Films Classiques
145
146Filmoflix se distingue par sa collection impressionnante de films classiques et de films d'art et essai. C'est un véritable paradis pour les cinéphiles. Vodi.to, bien que possédant des classiques, s'oriente davantage vers les films contemporains.
147
148## Nouvelles Sorties
149
150Vodi.to excelle dans la rapidité de mise à disposition des nouvelles sorties cinéma. Filmoflix est également rapide mais accorde davantage de temps à l'ajout de contenus classiques.
151
152## Organisation et Classification
153
154Filmoflix propose une classification très détaillée avec des catégories thématiques et des listes de films par réalisateur. Vodi.to utilise une organisation plus simple basée sur les genres standards.
155
156## Commentaires et Notes
157
158Filmoflix intègre des notes et avis pour chaque film, permettant aux utilisateurs de faire des choix éclairés. Vodi.to ne propose généralement pas cette fonctionnalité.
159
160## Recommandations Intelligentes
161
162Filmoflix propose un système de recommandations basé sur l'historique de visionnage. Vodi.to laisse l'utilisateur naviguer manuellement.
163
164## Qualité Vidéo pour Films
165
166Pour les films, Filmoflix offre généralement une meilleure qualité avec une attention particulière au respect du format original. Vodi.to standardise plus.
167
168## Conclusion
169
170Pour les cinéphiles passionnés, Filmoflix offre une expérience supérieure avec un catalogue plus riche en classiques et une meilleure organisation. Vodi.to convient mieux à ceux cherchant un équilibre entre films et séries récentes.
171    `,pros:["Excellent catalogue de films classiques","Organisation très détaillée","Système de recommandations","Respect du format original des films","Notes et avis sur les films"],cons:["Catalogue moins complet pour les séries","Moins de blockbusters récents","Risques légaux du streaming non-officiel"]},{id:"vodi-vs-lumeo",title:"Vodi.to vs Lumeo",competitor:"Lumeo",shortDescription:"Comparaison détaillée entre Vodi.to et Lumeo, deux grandes plateformes de streaming.",content:`
172Vodi.to et Lumeo sont deux des plus grands noms du streaming gratuit. Découvrez comment ils se comparent dans cette analyse approfondie.
173
174## Taille du Catalogue
175
176Vodi.to et Lumeo possèdent tous les deux des catalogues massifs avec plusieurs milliers de titres. Lumeo a historiquement maintenu une légère avance en termes de volume, mais Vodi.to s'est rapidement rattrapé.
177
178## Vitesse de Mise à Jour
179
180Vodi.to est réputé pour des mises à jour très rapides et fréquentes. Lumeo met également à jour régulièrement son catalogue, mais à un rythme légèrement moins rapide.
181
182## Stabilité des Serveurs
183
184Lumeo a historiquement souffert de problèmes de stabilité et a connu plusieurs périodes de temps d'arrêt. Vodi.to s'est avéré plus fiable avec une meilleure disponibilité.
185
186## Infrastructure Technique
187
188Vodi.to bénéficie d'une infrastructure technique solide avec plusieurs serveurs miroir. Lumeo, bien que possédant des serveurs multiples, a souvent rencontré des goulots d'étranglement.
189
190## Qualité des Flux
191
192Les deux plateformes offrent une qualité vidéo similaire. Cependant, Vodi.to a généralement moins de problèmes de buffering grâce à sa meilleure infrastru
192cture.
193
194## Design et Interface
195
196Vodi.to propose une interface épurée et moderne. Lumeo propose un design fonctionnel mais moins élégant.
197
198## Accessibilité Internationale
199
200Vodi.to est accessible facilement depuis la plupart des pays avec plusieurs domaines. Lumeo offre également une bonne accessibilité mais avec moins d'alternatives.
201
202## Sécurité des Utilisateurs
203
204Les deux plateformes présentent des risques similaires. Il est recommandé d'utiliser un VPN avec les deux services.
205
206## Conclusion
207
208Vodi.to surpasse Lumeo en stabilité, vitesse de mise à jour et design. Pour les utilisateurs cherchant la fiabilité, Vodi.to est le meilleur choix.
209    `,pros:["Catalogue massif et très complet","Très bonne stabilité","Vitesse de mise à jour impressionnante","Infrastructure solide","Design moderne et intuitif"],cons:["Statut légal questionnable","Risques de sécurité informatique","Publicités potentiellement invasives"]},{id:"vodi-vs-wiflix",title:"Vodi.to vs Wiflix",competitor:"Wiflix",shortDescription:"Analyse comparative entre Vodi.to et Wiflix pour les utilisateurs de streaming.",content:`
210Vodi.to et Wiflix sont deux plateformes de streaming qui ciblent des publics légèrement différents. Voici une comparaison détaillée.
211
212## Positionnement et Audience
213
214Vodi.to cible un public large avec une approche généraliste. Wiflix s'oriente davantage vers un public français avec un catalogue optimisé pour le marché francophone.
215
216## Catalogue en Français
217
218Wiflix propose généralement une meilleure sélection de contenus français et francophones. Vodi.to, bien qu'ayant du contenu français, n'en fait pas sa spécialité.
219
220## Contenu Exclusif
221
222Wiflix propose exclusivement des films et séries en français ou avec des sous-titres français. Vodi.to propose un catalogue plus international.
223
224## Interface Localisée
225
226Wiflix offre une interface entièrement en français et optimisée pour les utilisateurs français. Vodi.to propose également une interface en français mais moins adaptée au marché local.
227
228## Disponibilité Technique
229
230Vodi.to bénéficie d'une meilleure disponibilité avec plusieurs serveurs et domaines alternatifs. Wiflix a historiquement connu des problèmes de disponibilité.
231
232## Mises à Jour des Nouveautés
233
234Vodi.to met à jour plus rapidement ses nouveautés. Wiflix peut être plus lent à ajouter les dernières sorties.
235
236## Qualité des Sous-titres
237
238Pour le contenu français, Wiflix propose généralement de meilleurs sous-titres et une meilleure qualité audio en VF. Vodi.to offre une qualité acceptable mais moins optimisée.
239
240## Vitesse de Chargement
241
242Vodi.to est réputé pour ses vitesses de chargement exceptionnelles. Wiflix peut être plus lent, particulièrement lors des heures de pointe.
243
244## Communauté Francophone
245
246Wiflix jouit d'une forte communauté francophone. Vodi.to a aussi une communauté active mais plus diverse linguistiquement.
247
248## Conclusion
249
250Pour un utilisateur francophone cherchant du contenu français optimisé, Wiflix est le meilleur choix. Pour une expérience générale avec une meilleure stabilité et rapidité, Vodi.to est préférable.
251    `,pros:["Catalogue optimisé pour le français","Interface localisée","Meilleurs sous-titres français","Forte communauté francophone","Contenu exclusif en français"],cons:["Catalogue limité en dehors du français","Stabilité technique inférieure à Vodi.to","Mises à jour moins fréquentes","Problèmes légaux du streaming"]}],$f="vodi_custom_articles";function Ha(){try{const t=localStorage.getItem($f);return t?JSON.parse(t):[]}catch{return[]}}function ri(){const t=Ha(),e=new Set(t.map(n=>n.id));return[...Z0.filter(n=>!e.has(n.id)),...t]}function Fp(t){return Z0.some(e=>e.id===t)}function HC(t){const e=Ha(),n=e.findIndex(r=>
251r.id===t.id);n>=0?e[n]=t:e.push(t),localStorage.setItem($f,JSON.stringify(e))}function UC(t){const e=Ha().filter(n=>n.id!==t);localStorage.setItem($f,JSON.stringify(e))}/**
252 * @license lucide-react v0.344.0 - ISC
253 *
254 * This source code is licensed under the ISC license.
255 * See the LICENSE file in the root directory of this source tree.
256 */var WC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
257 * @license lucide-react v0.344.0 - ISC
258 *
259 * This source code is licensed under the ISC license.
260 * See the LICENSE file in the root directory of this source tree.
261 */const qC=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),le=(t,e)=>{const n=C.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:l="",children:a,...u},c)=>C.createElement("svg",{ref:c,...WC,width:i,height:i,stroke:r,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${qC(t)}`,l].join(" "),...u},[...e.map(([d,f])=>C.createElement(d,f)),...Array.isArray(a)?a:[a]]));return n.displayName=`${t}`,n};/**
262 * @license lucide-react v0.344.0 - ISC
263 *
264 * This source code is licensed under the ISC license.
265 * See the LICENSE file in the root directory of this source tree.
266 */const Ff=le("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
267 * @license lucide-react v0.344.0 - ISC
268 *
269 * This source code is licensed under the ISC license.
270 * See the LICENSE file in the root directory of this source tree.
271 */const Vp=le("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
272 * @license lucide-react v0.344.0 - ISC
273 *
274 * This source code is licensed under the ISC license.
275 * See the LICENSE file in the root directory of this source tree.
276 */const KC=le("Bold",[["path",{d:"M14 12a4 4 0 0 0 0-8H6v8",key:"v2sylx"}],["path",{d:"M15 20a4 4 0 0 0 0-8H6v8Z",key:"1ef5ya"}]]);/**
277 * @license lucide-react v0.344.0 - ISC
278 *
279 * This source code is licensed under the ISC license.
280 * See the LICENSE file in the root directory of this source tree.
281 */const e1=le("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
282 * @license lucide-react v0.344.0 - ISC
283 *
284 * This source code is licensed under the ISC license.
285 * See the LICENSE file in the root directory of this source tree.
286 */const JC=le("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
287 * @license lucide-react v0.344.0 - ISC
288 *
289 * This source code is licensed under the ISC license.
290 * See the LICENSE file in the root directory of this source tree.
291 */const GC=le("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
292 * @license lucide-react v0.344.0 - ISC
293 *
294 * This source code is licensed under the ISC license.
295 * See the LICENSE file in the root directory of this source tree.
296 */const QC=le("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);/**
297 * @license lucide-react v0.344.0 - ISC
298 *
299 * This source code is licensed under the ISC license.
300 * See the LICENSE file in the root directory of this source tree.
301 */const YC=le("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/**
302 * @license lucide-react v0.344.0 - ISC
303 *
304 * This source code is licensed under the ISC license.
305 * See the LICENSE file in the root directory of this source tree.
306 */const XC=le("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
307 * @license lucide-react v0.344.0 - ISC
308 *
309 * This source code is licensed under the ISC license.
310 * See the LICENSE file in the root directory of this source tree.
311 */const ZC=le("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
312 * @license lucide-react v0.344.0 - ISC
313 *
314 * This source code is licensed under the ISC license.
315 * See the LICENSE file in the root directory of this source tree.
316 */const eE=le("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
317 * @license lucide-react v0.344.0 - ISC
318 *
319 * This source code is licensed under the ISC license.
320 * See the LICENSE file in the root directory of this source tree.
321 */const tE=le("ListOrdered",[["line",{x1:"10",x2:"21",y1:"6",y2:"6",key:"76qw6h"}],["line",{x1:"10",x2:"21",y1:"12",y2:"12",key:"16nom4"}],["line",{x1:"10",x2:"21",y1:"18",y2:"18",key:"u3jurt"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
322 * @license lucide-react v0.344.0 - ISC
323 *
324 * This source code is licensed under the ISC license.
325 * See the LICENSE file in the root directory of this source tree.
326 */const nE=le("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
327 * @license lucide-react v0.344.0 - ISC
328 *
329 * This source code is licensed under the ISC license.
330 * See the LICENSE file in the root directory of this source tree.
331 */const rE=le("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
332 * @license lucide-react v0.344.0 - ISC
333 *
334 * This source code is licensed under the ISC license.
335 * See the LICENSE file in the root directory of this source tree.
336 */const iE=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
337 * @license lucide-react v0.344.0 - ISC
338 *
339 * This source code is licensed under the ISC license.
340 * See the LICENSE file in the root directory of this source tree.
341 */const sE=le("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
342 * @license lucide-react v0.344.0 - ISC
343 *
344 * This source code is licensed under the ISC license.
345 * See the LICENSE file in the root directory of this source tree.
346 */const oE=le("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
347 * @license lucide-react v0.344.0 - ISC
348 *
349 * This source code is licensed under the ISC license.
350 * See the LICENSE file in the root directory of this source tree.
351 */const lE=le("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
352 * @license lucide-react v0.344.0 - ISC
353 *
354 * This source code is licensed under the ISC license.
355 * See the LICENSE file in the root directory of this source tree.
356 */const aE=le("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
357 * @license lucide-react v0.344.0 - ISC
358 *
359 * This source code is licensed under the ISC license.
360 * See the LICENSE file in the root directory of this source tree.
361 */const uE=le("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);/**
362 * @license lucide-react v0.344.0 - ISC
363 *
364 * This source code is licensed under the ISC license.
365 * See the LICENSE file in the root directory of this source tree.
366 */const cE=le("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
367 * @license lucide-react v0.344.0 - ISC
368 *
369 * This source code is licensed under the ISC license.
370 * See the LICENSE file in the root directory of this source tree.
371 */const dE=le("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
372 * @license lucide-react v0.344.0 - ISC
373 *
374 * This source code is licensed under the ISC license.
375 * See the LICENSE file in the root directory of this source tree.
376 */const ud=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
376],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Hp(t){return t?new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}):null}const zu=["from-[#1e90ff]/20 to-[#1e90ff]/5","from-purple-500/20 to-purple-500/5","from-emerald-500/20 to-emerald-500/5","from-orange-500/20 to-orange-500/5","from-pink-500/20 to-pink-500/5","from-cyan-500/20 to-cyan-500/5"];function fE(){const t=ri();return x.jsxs("div",{className:"min-h-screen bg-black text-white",children:[x.jsx("div",{className:"border-b border-[#1e90ff]/10 py-10",children:x.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[x.jsxs(Dt,{to:"/",className:"inline-flex items-center gap-1.5 text-[#1e90ff] hover:text-[#1e90ff]/80 transition-colors mb-6 text-sm",children:[x.jsx(Ff,{size:15})," Retour à l'accueil"]}),x.jsx("h1",{className:"text-5xl font-bold mb-3",children:"Blog"}),x.jsx("p",{className:"text-gray-400 text-lg max-w-xl",children:"Comparaisons détaillées entre Vodi.to et les meilleures plateformes de streaming."})]})}),x.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-12",children:[t.length===0&&x.jsx("p",{className:"text-gray-500 text-center py-20",children:"Aucun article pour l'instant."}),t.length>0&&(()=>{const e=t[0],n=zu[0];return x.jsx(Dt,{to:`/blog/${e.id}`,className:"group block mb-8 bg-[#0a0a0a] border border-[#1e90ff]/20 rounded-2xl overflow-hidden hover:border-[#1e90ff]/50 transition-all duration-300 hover:shadow-xl hover:shadow-[#1e90ff]/10",children:x.jsxs("div",{className:"md:flex",children:[x.jsx("div",{className:"md:w-2/5 h-56 md:h-auto shrink-0 overflow-hidden",children:e.featuredImage?x.jsx("img",{src:e.featuredImage,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):x.jsx("div",{className:`w-full h-full bg-gradient-to-br ${n} flex items-center justify-center`,children:x.jsx("span",{className:"text-5xl font-black text-white/10",children:e.title.charAt(0)})})}),x.jsxs("div",{className:"flex flex-col justify-center p-6 md:p-8",children:[e.competitor&&x.jsxs("span",{className:"inline-block text-xs font-semibold uppercase tracking-widest text-[#1e90ff] mb-3",children:["vs ",e.competitor]}),x.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-3 text-white group-hover:text-[#1e90ff] transition-colors",children:e.title}),x.jsx("p",{className:"text-gray-400 mb-5 line-clamp-2",children:e.shortDescription}),x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("span",{className:"inline-flex items-center gap-2 text-[#1e90ff] font-semibold text-sm group-hover:gap-3 transition-all",children:["Lire l'article ",x.jsx(Vp,{size:16})]}),e.publishedAt&&x.jsxs("span",{className:"text-gray-600 text-xs flex items-center gap-1",children:[x.jsx(e1,{size:11})," ",Hp(e.publishedAt)]})]})]})]})})})(),t.length>1&&x.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:t.slice(1).map((e,n)=>{const r=zu[(n+1)%zu.length];return x.jsxs(Dt,{to:`/blog/${e.id}`,className:"group flex flex-col bg-[#0a0a0a] border border-[#1e90ff]/15 rounded-2xl overflow-hidden hover:border-[#1e90ff]/45 transition-all duration-300 hover:shadow-lg hover:shadow-[#1e90ff]/5 hover:-translate-y-0.5",children:[x.jsx("div",{className:"h-44 overflow-hidden shrink-0",children:e.featuredImage?x.jsx("img",{src:e.featuredImage,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):x.jsx("div",{className:`w-full h-full bg-gradient-to-br ${r} flex items-center justify-center`,children:x.jsx("span",{className:"text-4xl font-black text-white/10",children:e.title.charAt(0)})})}),x.jsxs("div",{className:"flex flex-col flex-1 p-5",children:[e.competitor&&x.jsxs("span",{className:"text-xs font-semibold uppercase tracking-widest text-[#1e90ff] mb-2",children:["vs ",e.competitor]}),x.jsx("h2",{className:"font-bold text-base text-white group-hover:text-[#1e90ff] transition-colors mb-2 line-clamp-2",children:e.title}),x.jsx("p",{className:"text-gray-500 text-sm line-clamp-2 flex-1 mb-4",children:e.shortDescription}),x.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[x.jsxs("span",{className:"text-[#1e90ff] text-sm font-medium inline-flex items-center gap-1.5 group-hover:gap-2.5 transition-all",children:["Lire ",x.jsx(Vp,{size:13})]}),e.publishedAt&&x.jsx("span",{className:"text-gray-600 text-xs",children:Hp(e.publishedAt)})]})]})]},e.id)})})]}),x.jsx("footer",{className:"border-t border-[#1e90ff]/10 py-6 mt-8",children:x.jsxs("div",{className:"max-w-5xl mx-auto px-4 text-center text-gray-600 text-sm",children:["© ",new Date().getFullYear()," Vodi.app"]})})]})}function hE(t){return/<[a-z][\s\S]*>/i.test(t.trim())}function pE(t){return t?new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}):null}function mE(){const{id:t}=KS(),e=ri().find(r=>r.id===t);if(!e)return x.jsx("div",{className:"min-h-screen bg-black text-white flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Article non trouvé"}),x.jsx("p",{className:"text-gray-400 mb-6",children:"Désolé, cet article n'existe pas."}),x.jsx(Dt,{to:"/blog",className:"text-[#1e90ff] hover:text-[#1e90ff]/80 transition-colors",children:"Retour au blog"})]})});const n=hE(e.content);return x.jsxs("div",{className:"min-h-screen bg-black text-white",children:[e.featuredImage&&x.jsx("div",{className:"w-full h-64 md:h-96 overflow-hidden",children:x.jsx("img",{src:e.featuredImage,alt:e.title,className:"w-full h-full object-cover"})}),x.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-12",children:[x.jsxs(Dt,{to:"/blog",className:"text-[#1e90ff] hover:text-[#1e90ff]/80 transition-colors mb-8 inl
376ine-flex items-center gap-2 text-sm",children:[x.jsx(Ff,{size:16})," Retour aux articles"]}),x.jsxs("article",{children:[x.jsxs("div",{className:"mb-8",children:[e.competitor&&x.jsxs("span",{className:"inline-block text-xs font-semibold uppercase tracking-widest text-[#1e90ff] mb-3",children:["vs ",e.competitor]}),x.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 leading-tight",children:e.title}),x.jsx("p",{className:"text-gray-400 text-lg mb-3",children:e.shortDescription}),e.publishedAt&&x.jsxs("span",{className:"text-gray-600 text-sm inline-flex items-center gap-1.5",children:[x.jsx(e1,{size:13})," ",pE(e.publishedAt)]})]}),x.jsx("hr",{className:"border-[#1e90ff]/10 mb-10"}),n?x.jsx("div",{className:"rich-content mb-12",dangerouslySetInnerHTML:{__html:e.content}}):x.jsx("div",{className:"rich-content mb-12",children:e.content.split(`
377`).map((r,i)=>r.startsWith("## ")?x.jsx("h2",{children:r.replace("## ","")},i):r.trim()?x.jsx("p",{children:r},i):null)}),(e.pros.length>0||e.cons.length>0)&&x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 my-12",children:[e.pros.length>0&&x.jsxs("div",{className:"bg-black/50 border border-green-500/20 rounded-xl p-6",children:[x.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2 text-green-400",children:[x.jsx(JC,{size:20})," Avantages"]}),x.jsx("ul",{className:"space-y-2",children:e.pros.map((r,i)=>x.jsxs("li",{className:"text-gray-300 flex items-start gap-2 text-sm",children:[x.jsx("span",{className:"text-green-500 mt-0.5 shrink-0",children:"+"}),x.jsx("span",{children:r})]},i))})]}),e.cons.length>0&&x.jsxs("div",{className:"bg-black/50 border border-red-500/20 rounded-xl p-6",children:[x.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2 text-red-400",children:[x.jsx(dE,{size:20})," Inconvénients"]}),x.jsx("ul",{className:"space-y-2",children:e.cons.map((r,i)=>x.jsxs("li",{className:"text-gray-300 flex items-start gap-2 text-sm",children:[x.jsx("span",{className:"text-red-500 mt-0.5 shrink-0",children:"-"}),x.jsx("span",{children:r})]},i))})]})]}),x.jsx("div",{className:"bg-[#1e90ff]/5 border border-[#1e90ff]/20 rounded-xl p-5 mb-10",children:x.jsx("p",{className:"text-gray-400 text-sm italic",children:"Vodi.app n'est pas une plateforme de streaming et n'est pas affilié à Vodi.to ou à ses concurrents. Cet article est fourni à titre informatif uniquement."})}),x.jsx("div",{className:"text-center",children:x.jsx(Dt,{to:"/blog",className:"inline-flex items-center gap-2 px-6 py-3 bg-[#1e90ff] rounded-lg text-white font-medium hover:bg-[#1e90ff]/90 transition-colors",children:"Voir les autres articles"})})]})]}),x.jsx("footer",{className:"border-t border-[#1e90ff]/10 py-6 mt-8",children:x.jsxs("div",{className:"max-w-3xl mx-auto px-4 text-center text-gray-600 text-sm",children:["© ",new Date().getFullYear()," Vodi.app"]})})]})}var t1={exports:{}},n1={};/**
378 * @license React
379 * use-sync-external-store-shim.production.js
380 *
381 * Copyright (c) Meta Platforms, Inc. and affiliates.
382 *
383 * This source code is licensed under the MIT license found in the
384 * LICENSE file in the root directory of this source tree.
385 */var wi=C;function gE(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yE=typeof Object.is=="function"?Object.is:gE,vE=wi.useState,xE=wi.useEffect,kE=wi.useLayoutEffect,wE=wi.useDebugValue;function SE(t,e){var n=e(),r=vE({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return kE(function(){i.value=n,i.getSnapshot=e,ju(i)&&s({inst:i})},[t,n,e]),xE(function(){return ju(i)&&s({inst:i}),t(function(){ju(i)&&s({inst:i})})},[t]),wE(n),n}function ju(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!yE(t,n)}catch{return!0}}function CE(t,e){return e()}var EE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?CE:SE;n1.useSyncExternalStore=wi.useSyncExternalStore!==void 0?wi.useSyncExternalStore:EE;t1.exports=n1;var Vf=t1.exports;function Oe(t){this.content=t}Oe.prototype={constructor:Oe,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new Oe(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Oe(n)},addToStart:function(t,e){return new Oe([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Oe(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new Oe(i)}
vendor: 31,179 bytes, lines 385-386
385,forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Oe.from(t),t.size?new Oe(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Oe.from(t),t.size?new Oe(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Oe.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Oe.from=function(t){if(t instanceof Oe)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Oe(e)};function r1(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=r1(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function i1(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let u=0,c=Math.min(o.text.length,l.text.length);for(;u<c&&o.text[o.text.length-u-1]==l.text[l.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(o.content.size||l.content.size){let u=i1(o.content,l.content,n-1,r-1);if(u)return u}n-=a,r-=a}}class T{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],u=l+a.nodeSize;if(u>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,i+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=u},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new T(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new T(r,i)}cutByIndex(e,n){return e==n?T.empty:e==0&&n==this.content.length?this:new T(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new T(i,s)}addToStart(e){return new T([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new T(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return r1(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return i1(this,e,n,r)}findIndex(e){if(e==0)return Do(0,e);if(e==this.size)return Do(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?Do(n+1,s):Do(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return T.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new T(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return T.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new T(n||e,r)}static from(e){if(!e)return T.empty;if(e instanceof T)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new T([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}T.empty=new T([],0);const _u={index:0,offset:0};function Do(t,e){return _u.index=t,_u.offset=e,_u}function zl(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!zl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!zl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let K=class cd{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&zl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return cd.none;if(e instanceof cd)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};K.none=[];class jl extends Error{}class I{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=o1(this.content,e+this.openStart,n);return r&&new I(r,this.openStart,this.openEnd)}removeBetween(e,n){return new I(s1(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return I.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new I(T.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new I(e,r,i)}}I.empty=new I(T.empty,0,0);function s1(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(s1(s.content,e-i-1,n-i-1)))}function o1(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=o1(o.content,e-s-1,n,o);return l&&t.replaceChild(i,o.copy(l))}function bE(t,e,n){if(n.openStart>t.depth)throw new jl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new jl("Inconsistent open depths");return l1(t,e,n,0)}function l1(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=l1(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return vr(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=ME(n,t);return vr(s,u1(t,o,l,e,r))}else return vr(s,_l(t,e,r))}function a1(t,e){if(!e.type.compatibleContent(t.type))throw new jl("Cannot join "+e.type.name+" onto "+t.type.name)}function dd(t,e,n){let r=t.node(n);return a1(r,e.node(n)),r}function yr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function ps(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(yr(t.nodeAfter,r),s++));for(let l=s;l<o;l++)yr(i.child(l),r);e&&e.depth==n&&e.textOffset&&yr(e.nodeBefore,r)}function vr(t,e){return t.type.checkContent(e),t.copy(e)}function u1(t,e,n,r,i){let s=t.depth>i&&dd(t,e,i+1),o=r.depth>i&&dd(n,r,i+1),l=[];return ps(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(a1(s,o),yr(vr(s,u1(t,e,n,r,i+1)),l)):(s&&yr(vr(s,_l(t,e,i+1)),l),ps(e,n,i,l),o&&yr(vr(o,_l(n,r,i+1)),l)),ps(r,null,i,l),new T(l)}function _l(t,e,n){let r=[];if(ps(null,t,n,r),t.depth>n){let i=dd(t,e,n+1);yr(vr(i,_l(t,e,n+1)),r)}return ps(e,null,n,r),new T(r)}function ME(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(T.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Hs{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return K.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Bl(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),u=s-a;if(r.push(o,l,i+a),!u||(o=o.child(l),o.isText))break;s=u-1,i+=a+1}return new Hs(n,r,s)}static resolveCached(e,n){let r=Up.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else Up.set(e,r=new NE);let i=r.elts[r.i]=Hs.resolve(e,n);return r.i=(r.i+1)%TE,i}}class NE{constructor(){this.elts=[],this.i=0}}const TE=12,Up=new WeakMap;class Bl{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const AE=Object.create(null);class Lt{constructor(e,n,r,i=K.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||T.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&zl(this.attrs,n||e.defaultAttrs||AE)&&K.sameSet(this.marks,r||K.none)}copy(e=null){return e==this.content?this:new Lt(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Lt(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return I.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),u=i.node(o).content.cut(i.pos-l,s.pos-l);return new I(u,i.depth-o,s.depth-o)}replace(e,n,r){return bE(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Hs.resolveCached(this,e)}resolveNoCache(e){return Hs.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),c1(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=T.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=K.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!K.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=T.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}}Lt.prototype.text=void 0;class $l extends Lt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):c1(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new $l(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new $l(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function c1(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Tr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new OE(e,n);if(r.next==null)return Tr.empty;let i=d1(r);r.next&&r.err("Unexpected trailing text");let s=jE(zE(i));return _E(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return T.from(l.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:c,next:d}=o.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(c));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
386`)}}Tr.empty=new Tr(!0);class OE{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function d1(t){let e=[];do e.push(RE(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function RE(t){let e=[];do e.push(IE(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function IE(t){let e=PE(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=DE(t,e);else break;return e}function Wp(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function DE(t,e){let n=Wp(t),r=n;return t.eat(",")&&(t.next!="}"?r=Wp(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function LE(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function PE(t){if(t.eat("(")){let e=d1(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=LE(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function zE(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,l,a){let u={term:a,to:l};return e[o].push(u),u}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(o.type=="seq")for(let a=0;;a++){let u=s(o.exprs[a],l);if(a==o.exprs.length-1)return u;i(u,l=n())}else if(o.type=="star"){let a=n();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=n();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let u=0;u<o.min;u++){let c=n();i(s(o.expr,a),c),a=c}if(o.max==-1)i(s(o.expr,a),a);else for(let u=o.min;u<o.max;u++){let c=n();r(a,c),i(s(o.expr,a),c),a=c}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function f1(t,e){return e-t}function qp(t,e){let n=[];return r(e),n.sort(f1);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&n.indexOf(a)==-1&&r(a)}}}function jE(t){let e=Object.create(null);return n(qp(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<i.length;c++)i[c][0]==l&&(u=i[c][1]);qp(t,a).forEach(c=>{u||i.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=e[r.join(",")]=new Tr(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(f1);s.next.push({type:i[o][0],next:e[l.join(",")]||n(l)})}return s}}function _E(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:u}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function h1(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function p1(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function m1(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let s=t[i];s.validate&&s.validate(e[i])}}function g1(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new $E(t,r,e[r]);return n}let Kp=class y1{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=g1(e,r.attrs),this.defaultAttrs=h1(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Tr.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:p1(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Lt(this,this.computeAttrs(e),T.from(n),K.setFrom(r))}createChecked(e=null,n,r){return n=T.from(n),this.checkContent(n),new Lt(this,this.computeAttrs(e),n,K.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=T.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(T.empty,!0);return s?new Lt(this,e,n.append(s),K.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){m1(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:K.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new y1(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function BE(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class $E{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?BE(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ua{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=g1(e,i.attrs),this.excluded=null;let s=h1(this.attrs);this.instance=s?new K(this,s):null}create(e=null){return!e&&this.instance?this.instance:new K(this,p1(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ua(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){m1(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class v1{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Oe.from(e.nodes),n.marks=Oe.from(e.marks||{}),this.nodes=Kp.compile(this.spec.nodes,this),this.marks=Ua.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Tr.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Jp(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Jp(this,o.split(" "))}this.nodeFromJSON=i=>Lt.fromJSON(this,i),this.markFromJSON=i=>K.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Kp){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new $l(r,r.defaultAttrs,e,K.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Jp(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let l in t.marks){let a=t.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function FE(t){return t.tag!=null}function VE(t){return t.style!=null}class Vn{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];
vendor: 5,126 bytes, lines 386-387
386n.forEach(i=>{if(FE(i))this.tags.push(i);else if(VE(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new Qp(this,n,!1);return r.addAll(e,K.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Qp(this,n,!0);return r.addAll(e,K.none,n.from,n.to),I.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(WE(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(o.getAttrs){let a=o.getAttrs(n);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let l=n[o];if((l.priority==null?50:l.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Yp(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Yp(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Vn(e,Vn.schemaRules(e)))}}const x1={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},HE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},k1={ol:!0,ul:!0},Us=1,fd=2,ms=4;function Gp(t,e,n){return e!=null?(e?Us:0)|(e==="full"?fd:0):t&&t.whitespace=="pre"?Us|fd:n&~ms}class Lo{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=K.none,this.match=s||(o&ms?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(T.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Us)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=T.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(T.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!x1.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Qp{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=Gp(null,n.preserveWhitespace,0)|(r?ms:0);i?s=new Lo(i.type,i.attrs,K.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new Lo(null,null,K.none,!0,null,o):s=new Lo(e.schema.topNodeType,null,K.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&fd?"full":this.localPreserveWS||(i.options&Us)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
387`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(o.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;k1.hasOwnProperty(o)&&this.parser.normalizeLists&&UE(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:HE.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let u,c=this.needsBlock;
vendor: 5,107 bytes, lines 387-388
387if(x1.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),u=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=a&&a.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(s),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,a,u,a.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
388`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(s,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(u=>!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,n.attrs||null,r,n.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],u=a.findWrapping(e);if(u&&(!i||i.length>u.length+l)&&(i=u,s=a,!u.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=K.none;for(let l of i.concat(e.marks))(s.type?s.type.allowsMarkType(l.type):Xp(l.type,e.type))&&(o=l.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Gp(e,s,o.options);o.options&ms&&o.content.length==0&&(l|=ms);let a=K.none;return r=r.filter(u=>(o.type?o.type.allowsMarkType(u.type):Xp(u.type,e))?(a=u.addToSet(a),!1):!0),this.nodes.push(new Lo(e,n,a,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Us)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let c=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;
vendor: 7,936 bytes, line 388
388if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function UE(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&k1.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function WE(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Yp(t){let e={};for(let n in t)e[n]=t[n];return e}function Xp(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==e||s.indexOf(c)<0&&o(c))return!0}};if(o(i.contentMatch))return!0}}class zr{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Bu(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let u=o.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)i=s.pop()[1];for(;a<o.marks.length;){let u=o.marks[a++],c=this.serializeMark(u,o.isInline,n);c&&(s.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=ol(Bu(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&ol(Bu(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return ol(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Zp(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Zp(e.marks)}}function Zp(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Bu(t){return t.document||window.document}const em=new WeakMap;function qE(t){let e=em.get(t);return e===void 0&&em.set(t,e=KE(t)),e}function KE(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function ol(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=qE(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let l,a=n?t.createElementNS(n,i):t.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=ol(t,f,n,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const w1=65535,S1=Math.pow(2,16);function JE(t,e){return t+e*S1}function tm(t){return t&w1}function GE(t){return(t-(t&w1))/S1}const C1=1,E1=2,ll=4,b1=8;class hd{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&b1)>0}get deletedBefore(){return(this.delInfo&(C1|ll))>0}get deletedAfter(){return(this.delInfo&(E1|ll))>0}get deletedAcross(){return(this.delInfo&ll)>0}}class st{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&st.empty)return st.empty}recover(e){let n=0,r=tm(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+GE(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let u=this.ranges[l+s],c=this.ranges[l+o],d=a+u;if(e<=d){let f=u?e==a?-1:e==d?1:n:n,h=a+i+(f<0?0:c);if(r)return h;let p=e==(n<0?a:d)?null:JE(l/3,e-a),g=e==a?E1:e==d?C1:ll;return(n<0?e!=a:e!=d)&&(g|=b1),new hd(h,g,p)}i+=c-u}return r?e+i:new hd(e+i,0,null)}touches(e,n){let r=0,i=tm(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+s],c=a+u;if(e<=c&&l==i*3)return!0;r+=this.ranges[l+o]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),u=this.ranges[i+n],c=this.ranges[i+r];e(l,l+u,a,a+c),s+=c-u}}invert(){return new st(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?st.empty:new st(e<0?[0,-e,0]:[0,0,e])}}st.empty=new st([]);class Ws{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Ws(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Ws;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],l=o.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new hd(e,i,null)}}const $u=Object.create(null);class Ve{getMap(){return st.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=$u[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in $u)throw new RangeError("Duplicate use of step JSON ID "+e);return $u[e]=n,n.prototype.jsonID=e,n}}class xe{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new xe(e,null)}static fail(e){return new xe(null,e)}static fromReplace(e,n,r,i){try{return xe.ok(e.replace(n,r,i))}catch(s){if(s instanceof jl)return xe.fail(s.message);throw s}}}function Hf(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(Hf(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return T.fromArray(r)}class Rn extends Ve{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.no
vendor: 13,359 bytes, lines 388-389
388de(r.sharedDepth(this.to)),s=new I(Hf(n.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return xe.fromReplace(e,this.from,this.to,s)}invert(){return new Ot(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Rn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Rn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Rn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Rn(n.from,n.to,e.markFromJSON(n.mark))}}Ve.jsonID("addMark",Rn);class Ot extends Ve{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new I(Hf(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return xe.fromReplace(e,this.from,this.to,r)}invert(){return new Rn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ot(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ot&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ot(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ot(n.from,n.to,e.markFromJSON(n.mark))}}Ve.jsonID("removeMark",Ot);class In extends Ve{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return xe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return xe.fromReplace(e,this.pos,this.pos+1,new I(T.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new In(this.pos,n.marks[i]);return new In(this.pos,this.mark)}}return new Ar(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new In(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new In(n.pos,e.markFromJSON(n.mark))}}Ve.jsonID("addNodeMark",In);class Ar extends Ve{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return xe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return xe.fromReplace(e,this.pos,this.pos+1,new I(T.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new In(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ar(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ar(n.pos,e.markFromJSON(n.mark))}}Ve.jsonID("removeNodeMark",Ar);class ye extends Ve{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&pd(e,this.from,this.to)?xe.fail("Structure replace would overwrite content"):xe.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new st([this.from,this.to-this.from,this.slice.size])}invert(e){return new ye(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&ye.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new ye(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof ye)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?I.empty:new I(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ye(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?I.empty:new I(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ye(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ye(n.from,n.to,I.fromJSON(e,n.slice),!!n.structure)}}ye.MAP_BIAS=1;Ve.jsonID("replace",ye);class Ne extends Ve{constructor(e,n,r,i,s,o,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(pd(e,this.from,this.gapFrom)||pd(e,this.gapTo,this.to)))return xe.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return xe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?xe.fromReplace(e,this.from,this.to,r):xe.fail("Content does not fit in gap")}getMap(){return new st([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Ne(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Ne(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ne(n.from,n.to,n.gapFrom,n.gapTo,I.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ve.jsonID("replaceAround",Ne);function pd(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function QE(t,e,n,r){let i=[],s=[],o,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,e),h=Math.min(u+a.nodeSize,n),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:i.push(o=new Ot(f,h,d[g])));l&&l.to==f?l.to=h:s.push(l=new Rn(f,h,r))}}),i.forEach(a=>t.step(a)),s.forEach(a=>t.step(a))}function YE(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Ua){let u=o.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let u=Math.min(l+o.nodeSize,n);for(let c=0;c<a.length;c++){let d=a[c],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=u,f.step=s):i.push({style:d,from:Math.max(l,e),to:u,step:s})}}}),i.forEach(o=>t.step(new Ot(o.from,o.to,o.style)))}function Uf(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<s.childCount;a++){let u=s.child(a),c=l+u.nodeSize,d=r.matchType(u.type);if(!d)o.push(new ye(l,c,I.empty));else{r=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||t.step(new Ot(l,c,u.marks[f]));if(i&&u.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(u.text);)p||(p=new I(T.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),o.push(new ye(l+f.index,l+f.index+f[0].length,p))}}l=c}if(!r.validEnd){let a=r.fillBefore(T.empty,!0);t.replace(l,l,new I(a,0,0))}for(let a=o.length-1;a>=0;a--)t.step(o[a])}function XE(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Li(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let o=t.$from.node(r),l=t.$from.index(r)+i,a=t.$to.indexAfter(r)-s;if(r<t.depth&&o.canReplace(l,a,n))return r;if(r==0||o.type.spec.isolating||!XE(o,l,a))break;l&&(i=1),a<o.childCount&&(s=1)}return null}function ZE(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),l=i.after(s+1),a=o,u=l,c=T.empty,d=0;for(let p=s,g=!1;p>n;p--)g||r.index(p)>0?(g=!0,c=T.from(r.node(p).copy(c)),d++):a--;let f=T.empty,h=0;for(let p=s,g=!1;p>n;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=T.from(i.node(p).copy(f)),h++):u++;t.step(new Ne(a,u,o,l,new I(c.append(f),d,h),c.size-d,!0))}function Wf(t,e,n=null,r=t){let i=eb(t,e),s=i&&tb(r,e);return s?i.map(nm).concat({type:e,attrs:n}).concat(s.map(nm)):null}function nm(t){return{type:t,attrs:null}}function eb(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function tb(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let u=r;a&&u<i;u++)a=a.matchType(n.child(u).type);return!a||!a.validEnd?null:o}function nb(t,e,n){let r=T.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let l=n[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=T.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new Ne(i,s,i,s,new I(r,0,0),n.length,!0))}function rb(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&ib(t.doc,t.mapping.slice(s).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?u=!1:!h&&p&&(u=!0)}u===!1&&N1(t,o,l,s),Uf(t,t.mapping.slice(s).map(l,1),r,void 0,u===null);let c=t.mapping.slice(s),d=c.map(l,1),f=c.map(l+o.nodeSize,1);return t.step(new Ne(d,f,d+1,f-1,new I(T.from(r.create(a,null,o.marks)),0,0),1,!0)),u===!0&&M1(t,o,l,s),!1}})}function M1(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function N1(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
389`))}})}function ib(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function sb(t,e,n,r,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let o=n.create(r,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,o);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Ne(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new I(T.from(o),0,0),1,!0))}function di(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=n-2;u>s;u--,c--){let d=i.node(u),f=i.index(u);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[c+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(h))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function ob(t,e,n=1,r){let i=t.doc.resolve(e),s=T.empty,o=T.empty;for(let l=i.depth,a=i.depth-n,u=n-1;l>a;l--,u--){s=T.from(i.node(l).copy(s));let c=r&&r[u];o=T.from(c?c.type.create(c.attrs,o):i.node(l).copy(o))}t.step(new ye(e,e,new I(s.append(o),n,n),!0))}function Zn(t,e){let n=t.resolve(e),r=n.index();return T1(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function lb(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let s=e.child(i),o=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function T1(t,e){return!!(t&&e&&!t.isLeaf&&lb(t,e))}function Wa(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;
vendor: 4,470 bytes, line 389
389i--){let s,o,l=r.index(i);if(i==r.depth?(s=r.nodeBefore,o=r.nodeAfter):n>0?(s=r.node(i+1),l++,o=r.node(i).maybeChild(l)):(s=r.node(i).maybeChild(l-1),o=r.node(i+1)),s&&!s.isTextblock&&T1(s,o)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function ab(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-n),o=s.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let l=t.steps.length;if(r===!1){let c=t.doc.resolve(e+n);N1(t,c.node(),c.before(),l)}o.inlineContent&&Uf(t,e+n-1,o,s.node().contentMatchAt(s.index()),r==null);let a=t.mapping.slice(l),u=a.map(e-n);if(t.step(new ye(u,a.map(e+n,-1),I.empty,!0)),r===!0){let c=t.doc.resolve(u);M1(t,c.node(),c.before(),t.steps.length)}return t}function ub(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function A1(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let o=r.depth;o>=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),u=r.node(o),c=!1;if(s==1)c=u.canReplace(a,a,i);else{let d=u.contentMatchAt(a).findWrapping(i.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function qa(t,e,n=e,r=I.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),s=t.resolve(n);return O1(i,s,r)?new ye(e,n,r):new cb(i,s,r).fit()}function O1(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class cb{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=T.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=T.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new I(s,o,l);return e>-1?new Ne(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new ye(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=Fu(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(o?u.matchType(o.type)||(d=u.fillBefore(T.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(n==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Fu(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new I(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Fu(e,n);if(i.childCount<=1&&n>0){let s=e.size-n<=n+i.size;this.unplaced=new I(Zi(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new I(Zi(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let g=0;g<s.length;g++)this.openFrontierNode(s[g]);let o=this.unplaced,l=r?r.content:o.content,a=o.openStart-e,u=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let g=0;g<i.childCount;g++)c.push(i.child(g));d=d.matchFragment(i)}let h=l.size+e-(o.content.size-o.openEnd);for(;u<l.childCount;){let g=l.child(u),y=d.matchType(g.type);if(!y)break;u++,(u>
vendor: 11,371 bytes, line 389
3891||a==0||g.content.size)&&(d=y,c.push(R1(g.mark(f.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?h:-1)))}let p=u==l.childCount;p||(h=-1),this.placed=es(this.placed,n,T.from(c)),this.frontier[n].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=l;g<h;g++){let m=y.lastChild;this.frontier.push({type:m.type,match:m.contentMatchAt(m.childCount)}),y=m.content}this.unplaced=p?e==0?I.empty:new I(Zi(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new I(Zi(o.content,e,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Vu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=Vu(e,n,i,r,s);if(o){for(let l=n-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],c=Vu(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:o,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=es(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=es(this.placed,this.depth,T.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(T.empty,!0);n.childCount&&(this.placed=es(this.placed,this.frontier.length,n))}}function Zi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Zi(t.firstChild.content,e-1,n)))}function es(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(es(t.lastChild.content,e-1,n)))}function Fu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function R1(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,R1(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(T.empty,!0)))),t.copy(r)}function Vu(t,e,n,r,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!db(n,s.content,o)?l:null}function db(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function fb(t){return t.spec.defining||t.spec.definingForContent}function hb(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(O1(i,s,r))return t.step(new ye(e,n,r));let o=D1(i,s);o[o.length-1]==0&&o.pop();let l=-(i.depth+1);o.unshift(l);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?l=f:i.before(f)==h&&o.splice(1,0,-f)}let a=o.indexOf(l),u=[],c=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(u.push(p),h==r.openStart)break;f=p.content}for(let f=c-1;f>=0;f--){let h=u[f],p=fb(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))c=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+c+1)%(r.openStart+1),p=u[h];if(p)for(let g=0;g<o.length;g++){let y=o[(g+a)%o.length],m=!0;y<0&&(m=!1,y=-y);let v=i.node(y-1),k=i.index(y-1);if(v.canReplaceWith(k,k,p.type,p.marks))return t.replace(i.before(y),m?s.after(y):n,new I(I1(r.content,0,r.openStart,h),h,r.openEnd))}}let d=t.steps.length;for(let f=o.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let h=o[f];h<0||(e=i.before(h),n=s.after(h))}}function I1(t,e,n,r,i){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(I1(s.content,e+1,n,r,s)))}if(e>r){let s=i.contentMatchAt(0),o=s.fillBefore(t).append(t);t=o.append(s.matchFragment(o).fillBefore(T.empty,!0))}return t}function pb(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=ub(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new I(T.from(r),0,0))}function mb(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(n),l=!1;for(let a=r.depth;a>o;a--)r.node(a).type.spec.isolating&&(l=!0);for(let a=i.depth;a>o;a--)i.node(a).type.spec.isolating&&(l=!0);if(!l){for(let a=r.depth;a>0&&e==r.start(a);a--)e=r.before(a);for(let a=i.depth;a>0&&n==i.start(a);a--)n=i.before(a);r=t.doc.resolve(e),i=t.doc.resolve(n)}}let s=D1(r,i);for(let o=0;o<s.length;o++){let l=s[o],a=o==s.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),i.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return t.delete(r.before(l),i.after(l))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function D1(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let s=t.start(i);if(s<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&n.push(i)}return n}class fi extends Ve{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return xe.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return xe.fromReplace(e,this.pos,this.pos+1,new I(T.from(i),0,n.isLeaf?0:1))}getMap(){return st.empty}invert(e){return new fi(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new fi(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new fi(n.pos,n.attr,n.value)}}Ve.jsonID("attr",fi);class qs extends Ve{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return xe.ok(r)}getMap(){return st.empty}invert(e){return new qs(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new qs(n.attr,n.value)}}Ve.jsonID("docAttr",qs);let Si=class extends Error{};Si=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Si.prototype=Object.create(Error.prototype);Si.prototype.constructor=Si;Si.prototype.name="TransformError";class L1{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ws}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Si(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(e=i.map(e,1),n=i.map(n,-1)),i.forEach((s,o,l,a)=>{e=Math.min(e,l),n=Math.max(n,a)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=I.empty){let i=qa(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new I(T.from(r),0,0))}delete(e,n){return this.replace(e,n,I.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return hb(this,e,n,r),this}replaceRangeWith(e,n,r){return pb(this,e,n,r),this}deleteRange(e,n){return mb(this,e,n),this}lift(e,n){return ZE(this,e,n),this}join(e,n=1){return ab(this,e,n),this}wrap(e,n){return nb(this,e,n),this}setBlockType(e,n=e,r,i=null){return rb(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return sb(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new fi(e,n,r)),this}setDocAttribute(e,n){return this.step(new qs(e,n)),this}addNodeMark(e,n){return this.step(new In(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof K)n.isInSet(r.marks)&&this.step(new Ar(e,n));else{let i=r.marks,s,o=[];for(;s=n.isInSet(i);)o.push(new Ar(e,s)),i=s.removeFromSet(i);for(let l=o.length-1;l>=0;l--)this.step(o[l])}return this}split(e,n=1,r){return ob(this,e,n,r),this}addMark(e,n,r){return QE(this,e,n,r),this}removeMark(e,n,r){return YE(this,e,n,r),this}clearIncompatible(e,n,r){return Uf(this,e,n,r),this}}const Hu=Object.create(null);class F{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new gb(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=I.empty){let r=n.content.lastChild,i=null;for(let l=0;l<n.openEnd;l++)i=r,r=r.lastChild;let s=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:u}=o[l],c=e.mapping.slice(s);e.replaceRange(c.map(a.pos),c.map(u.pos),l?I.empty:n),l==0&&sm(e,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:o,$to:l}=i[s],a=e.mapping.slice(r),u=a.map(o.pos),c=a.map(l.pos);s?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),sm(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new j(e):Vr(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let s=e.depth-1;s>=0;s--){let o=n<0?Vr(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):Vr(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(o)return o}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new xt(e.node(0))}static atStart(e){return Vr(e,e,0,0,1)||new xt(e)}static atEnd(e){return Vr(e,e,e.content.size,e.childCount,-1)||new xt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Hu[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Hu)throw new RangeError("Duplicate use of selection JSON ID "+e);return Hu[e]=n,n.prototype.jsonID=e,n}getBookmark(){return j.between(this.$anchor,this.$head).getBookmark()}}F.prototype.visible=!0;class gb{constructor(e,n){this.$from=e,this.$to=n}}let rm=!1;function im(t){!rm&&!t.parent.inlineContent&&(rm=!0,console.warn("TextSelection endpoint not pointing into a 
389node with inline content ("+t.parent.type.name+")"))}class j extends F{constructor(e,n=e){im(e),im(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return F.near(r);let i=e.resolve(n.map(this.anchor));return new j(i.parent.inlineContent?i:r,r)}replace(e,n=I.empty){if(super.replace(e,n),n==I.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof j&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ka(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new j(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=F.findFrom(n,r,!0)||F.findFrom(n,-r,!0);if(s)n=s.$head;else return F.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(F.findFrom(e,-r,!0)||F.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new j(e,n)}}F.jsonID("text",j);class Ka{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Ka(e.map(this.anchor),e.map(this.head))}resolve(e){return j.between(e.resolve(this.anchor),e.resolve(this.head))}}class z extends F{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),s=e.resolve(i);return r?F.near(s):new z(s)}content(){return new I(T.from(this.node),0,0)}eq(e){return e instanceof z&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new qf(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new z(e.resolve(n.anchor))}static create(e,n){return new z(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}z.prototype.visible=!1;F.jsonID("node",z);class qf{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Ka(r,r):new qf(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&z.isSelectable(r)?new z(n):F.near(n)}}class xt extends F{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=I.empty){if(n==I.empty){e.delete(0,e.doc.content.size);let r=F.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new xt(e)}map(e){return new xt(e)}eq(e){return e instanceof xt}getBookmark(){return yb}}F.jsonID("all",xt);const yb={map(){return this},resolve(t){return new xt(t)}};function Vr(t,e,n,r,i,s=!1){if(e.inlineContent)return j.create(t,n);for(let o=r-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let l=e.child(o);if(l.isAtom){if(!s&&z.isSelectable(l))return z.create(t,n-(i<0?l.nodeSize:0))}else{let a=Vr(t,l,n+i,i<0?l.childCount:0,i,s);if(a)return a}n+=l.nodeSize*i}return null}function sm(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof ye||i instanceof Ne))return;let s=t.mapping.maps[r],o;s.forEach((l,a,u,c)=>{o==null&&(o=c)}),t.setSelection(F.near(t.doc.resolve(o),n))}const om=1,Po=2,lm=4;class vb extends L1{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|om)&~Po,this.storedMarks=null,this}get selectionSet(){return(this.updated&om)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Po,this}ensureMarks(e){return K.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Po)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Po,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||K.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(n);s=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,s)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(F.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=lm,this}get scrolledIntoView(){return(this.updated&lm)>0}}function am(t,e){return!e||!t?t:t.bind(e)}class ts{constructor(e,n,r){this.name=e,this.init=am(n.init,r),this.apply=am(n.apply,r)}}const xb=[new ts("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ts("selection",{init(t,e){return t.selection||F.atStart(e.doc)},apply(t){return t.selection}}),new ts("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new ts("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Uu{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=xb.slice(),n&&n.forEac
vendor: 14,457 bytes, lines 389-390
389h(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ts(r.key,r.spec.state,r))})}}class ii{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let a=i?i[o].n:0,u=i?i[o].state:this,c=a<n.length&&l.spec.appendTransaction.call(l,a?n.slice(a):n,u,r);if(c&&r.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<o?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),s=!0}i&&(i[o]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ii(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new vb(this)}static create(e){let n=new Uu(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ii(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new Uu(this.schema,e.plugins),r=n.fields,i=new ii(n);for(let s=0;s<r.length;s++){let o=r[s].name;i[o]=this.hasOwnProperty(o)?this[o]:r[s].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Uu(e.schema,e.plugins),s=new ii(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Lt.fromJSON(e.schema,n.doc);else if(o.name=="selection")s.selection=F.fromJSON(s.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){s[o.name]=u.fromJSON.call(a,e,n[l],s);return}}s[o.name]=o.init(e,s)}}),s}}function P1(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=P1(i,e,{})),n[r]=i}return n}class ae{constructor(e){this.spec=e,this.props={},e.props&&P1(e.props,this,this.props),this.key=e.key?e.key.key:z1("plugin")}getState(e){return e[this.key]}}const Wu=Object.create(null);function z1(t){return t in Wu?t+"$"+ ++Wu[t]:(Wu[t]=0,t+"$")}class Ce{constructor(e="key"){this.key=z1(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const kb=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function j1(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const wb=(t,e,n)=>{let r=j1(t,n);if(!r)return!1;let i=Kf(r);if(!i){let o=r.blockRange(),l=o&&Li(o);return l==null?!1:(e&&e(t.tr.lift(o,l).scrollIntoView()),!0)}let s=i.nodeBefore;if(F1(t,i,e,-1))return!0;if(r.parent.content.size==0&&(Ci(s,"end")||z.isSelectable(s)))for(let o=r.depth;;o--){let l=qa(t.doc,r.before(o),r.after(o),I.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=t.tr.step(l);a.setSelection(Ci(s,"end")?F.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):z.create(a.doc,i.pos-s.nodeSize)),e(a.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},Sb=(t,e,n)=>{let r=j1(t,n);if(!r)return!1;let i=Kf(r);return i?_1(t,i,e):!1},Cb=(t,e,n)=>{let r=B1(t,n);if(!r)return!1;let i=Jf(r);return i?_1(t,i,e):!1};function _1(t,e,n){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=qa(t.doc,s,a,I.empty);if(!u||u.from!=s||u instanceof ye&&u.slice.size>=a-s)return!1;if(n){let c=t.tr.step(u);c.setSelection(j.create(c.doc,s)),n(c.scrollIntoView())}return!0}function Ci(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Eb=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=Kf(r)}let o=s&&s.nodeBefore;return!o||!z.isSelectable(o)?!1:(e&&e(t.tr.setSelection(z.create(t.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function Kf(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function B1(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const bb=(t,e,n)=>{let r=B1(t,n);if(!r)return!1;let i=Jf(r);if(!i)return!1;let s=i.nodeAfter;if(F1(t,i,e,1))return!0;if(r.parent.content.size==0&&(Ci(s,"start")||z.isSelectable(s))){let o=qa(t.doc,r.before(),r.after(),I.empty);if(o&&o.slice.size<o.to-o.from){if(e){let l=t.tr.step(o);l.setSelection(Ci(s,"start")?F.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):z.create(l.doc,l.mapping.map(i.pos))),e(l.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},Mb=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=Jf(r)}let o=s&&s.nodeAfter;return!o||!z.isSelectable(o)?!1:(e&&e(t.tr.setSelection(z.create(t.doc,s.pos)).scrollIntoView()),!0)};function Jf(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Nb=(t,e)=>{let n=t.selection,r=n instanceof z,i;if(r){if(n.node.isTextblock||!Zn(t.doc,n.from))return!1;i=n.from}else if(i=Wa(t.doc,n.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);r&&s.setSelection(z.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Tb=(t,e)=>{let n=t.selection,r;if(n instanceof z){if(n.node.isTextblock||!Zn(t.doc,n.to))return!1;r=n.to}else if(r=Wa(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Ab=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),s=i&&Li(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},Ob=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
390`).scrollIntoView()),!0)};function $1(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Rb=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),o=$1(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,o.createAndFill());a.setSelection(F.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Ib=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof xt||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=$1(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=t.tr.insert(o,s.createAndFill());l.setSelection(j.create(l.doc,o+1)),e(l.scrollIntoView())}return!0},Db=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(di(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Li(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},Lb=(t,e)=>{let{$from:n,to:r}=t.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),e&&e(t.tr.setSelection(z.create(t.doc,i))),!0)};function Pb(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||Zn(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function F1(t,e,n,r){let i=e.nodeBefore,s=e.nodeAfter,o,l,a=i.type.spec.isolating||s.type.spec.isolating;if(!a&&Pb(t,e,n))return!0;let u=!a&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(l=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&l.matchType(o[0]||s.type).validEnd){if(n){let h=e.pos+s.nodeSize,p=T.empty;for(let m=o.length-1;m>=0;m--)p=T.from(o[m].create(null,p));p=T.from(i.copy(p));let g=t.tr.step(new Ne(e.pos-1,h,e.pos,h,new I(p,1,0),o.length,!0)),y=g.doc.resolve(h+2*o.length);y.nodeAfter&&y.nodeAfter.type==i.type&&Zn(g.doc,y.pos)&&g.join(y.pos),n(g.scrollIntoView())}return!0}let c=s.type.spec.isolating||r>0&&a?null:F.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),f=d&&Li(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(u&&Ci(s,"start",!0)&&Ci(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let g=s,y=1;for(;!g.isTextblock;g=g.firstChild)y++;if(h.canReplace(h.childCount,h.childCount,g.content)){if(n){let m=T.empty;for(let k=p.length-1;k>=0;k--)m=T.from(p[k].copy(m));let v=t.tr.step(new Ne(e.pos-p.length,e.pos+s.nodeSize,e.pos+y,e.pos+s.nodeSize-y,new I(m,p.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function V1(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(e.tr.setSelection(j.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const zb=V1(-1),jb=V1(1);function _b(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s),l=o&&Wf(o,t,e);return l?(r&&r(n.tr.wrap(o,l).scrollIntoView()),!0):!1}}function um(t,e=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:o},$to:{pos:l}}=n.selection.ranges[s];n.doc.nodesBetween(o,l,(a,u)=>{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)i=!0;else{let c=n.doc.resolve(u),d=c.index();i=c.parent.canReplaceWith(d,d+1,t)}})}if(!i)return!1;if(r){let s=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[o];s.setBlockType(l,a,t,e)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Bb(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s);if(!o)return!1;let l=r?n.tr:null;return $b(l,o,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function $b(t,e,n,r=null){let i=!1,s=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=o.resolve(e.start-2);s=new Bl(a,a,e.depth),e.endIndex<e.parent.childCount&&(e=new Bl(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let l=Wf(s,n,r,e);return l?(t&&Fb(t,e,l,i,n),!0):!1}function Fb(t,e,n,r,i){let s=T.empty;for(let c=n.length-1;c>=0;c--)s=T.from(n[c].type.create(n[c].attrs,s));t.step(new Ne(e.start-(r?2:0),e.end,e.start,e.end,new I(s,0,0),n.length,!0));let o=0;for(let c=0;c<n.length;c++)n[c].type==i&&(o=c+1);let l=n.length-o,a=e.start+n.length-(r?2:0),u=e.parent;for(let c=e.startIndex,d=e.endIndex,f=!0;c<d;c++,f=!1)!f&&di(t.doc,a,l)&&(t.split(a,l),a+=2*l),a+=u.child(c).nodeSize;return t}function Vb(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,o=>o.childCount>0&&o.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?Hb(e,n,t,s):Ub(e,n,s):!0:!1}}function Hb(t,e,n,r){let i=t.tr,s=r.end,o=r.$to.end(r.depth);s<o&&(i.step(new Ne(s-1,o,s,o,new I(T.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Bl(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));const l=Li(r);if(l==null)return!1;i.lift(r,l);let a=i.doc.resolve(i.mapping.map(s,-1)-1);return Zn(i.doc,a.pos)&&a.nodeBefore.type==a.nodeAfter.type&&i.join(a.pos),e(i.scrollIntoView()),!0}function Ub(t,e,n){let r=t.tr,i=n.parent;for(let h=n.end,p=n.endIndex-1,g=n.startIndex;p>g;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(l?0:1),c+1,o.content.append(a?T.empty:T.from(i))))return!1;let d=s.pos,f=d+o.nodeSize;return r.step(new Ne(d-(l?1:0),f+(a?1:0),d+1,f-1,new I((l?T.empty:T.from(i.copy(T.empty))).append(a?T.empty:T.from(i.copy(T.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Wb(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,u=>u.childCount>0&&u.firstChild.type==t);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=t)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=T.from(u?t.create():null),d=new I(T.from(t.create(null,T.from(l.type.create(null,c)))),u?3:1,0),f=s.start,h=s.end;n(e.tr.step(new Ne(f-(u?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}const Re=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Ei=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let md=null;const tn=function(t,e,n){let r=md||(md=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},qb=function(){md=null},Or=function(t,e,n,r){return n&&(cm(t,e,n,r,-1)||cm(t,e,n,r,1))},Kb=/^(img|br|input|textarea|hr)$/i;function cm(t,e,n,r,i){for(var s;;){if(t==n&&e==r)return!0;if(e==(i<0?0:gt(t))){let o=t.parentNode;
vendor: 18,039 bytes, lines 390-391
390if(!o||o.nodeType!=1||ao(t)||Kb.test(t.nodeName)||t.contentEditable=="false")return!1;e=Re(t)+(i<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=o,e=i<0?gt(t):0}else return!1}}function gt(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Jb(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=gt(t)}else if(t.parentNode&&!ao(t))e=Re(t),t=t.parentNode;else return null}}function Gb(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!ao(t))e=Re(t)+1,t=t.parentNode;else return null}}function Qb(t,e,n){for(let r=e==0,i=e==gt(t);r||i;){if(t==n)return!0;let s=Re(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,i=i&&s==gt(t)}}function ao(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Ja=function(t){return t.focusNode&&Or(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function lr(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Yb(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Xb(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(gt(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(gt(r.startContainer),r.startOffset)}}}const qt=typeof navigator<"u"?navigator:null,dm=typeof document<"u"?document:null,er=qt&&qt.userAgent||"",gd=/Edge\/(\d+)/.exec(er),H1=/MSIE \d/.exec(er),yd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(er),nt=!!(H1||yd||gd),Hn=H1?document.documentMode:yd?+yd[1]:gd?+gd[1]:0,kt=!nt&&/gecko\/(\d+)/i.test(er);kt&&+(/Firefox\/(\d+)/.exec(er)||[0,0])[1];const vd=!nt&&/Chrome\/(\d+)/.exec(er),De=!!vd,U1=vd?+vd[1]:0,Fe=!nt&&!!qt&&/Apple Computer/.test(qt.vendor),bi=Fe&&(/Mobile\/\w+/.test(er)||!!qt&&qt.maxTouchPoints>2),ht=bi||(qt?/Mac/.test(qt.platform):!1),W1=qt?/Win/.test(qt.platform):!1,on=/Android \d/.test(er),uo=!!dm&&"webkitFontSmoothing"in dm.documentElement.style,Zb=uo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function eM(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Qt(t,e){return typeof t=="number"?t:t[e]}function tM(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function fm(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=Ei(o);continue}let l=o,a=l==s.body,u=a?eM(s):tM(l),c=0,d=0;if(e.top<u.top+Qt(r,"top")?d=-(u.top-e.top+Qt(i,"top")):e.bottom>u.bottom-Qt(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+Qt(i,"top")-u.top:e.bottom-u.bottom+Qt(i,"bottom")),e.left<u.left+Qt(r,"left")?c=-(u.left-e.left+Qt(i,"left")):e.right>u.right-Qt(r,"right")&&(c=e.right-u.right+Qt(i,"right")),c||d)if(a)s.defaultView.scrollBy(c,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let g=l.scrollLeft-h,y=l.scrollTop-p;e={left:e.left-g,top:e.top-y,right:e.right-g,bottom:e.bottom-y}}let f=a?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:Ei(o)}}function nM(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let l=t.root.elementFromPoint(s,o);if(!l||l==t.dom||!t.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=n-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:q1(t.dom)}}function q1(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ei(r));return e}function rM({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;K1(n,r==0?0:r-e)}function K1(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:s}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let $r=null;function iM(t){if(t.setActive)return t.setActive();if($r)return t.focus($r);let e=q1(t);t.focus($r==null?{get preventScroll(){return $r={preventScroll:!0},!0}}:void 0),$r||($r=!1,K1(e,0))}function J1(t,e){let n,r=2e8,i,s=0,o=e.top,l=e.top,a,u;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=tn(c).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=o&&p.bottom>=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let g=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(g<r){n=c,r=g,i=g&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,c.nodeType==1&&g&&(s=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!n&&a&&(n=a,i=u,r=0),n&&n.nodeType==3?sM(n,i):!n||r&&n.nodeType==1?{node:t,offset:s}:J1(n,i)}function sM(t,e){let n=t.nodeValue.length,r=document.createRange(),i;for(let s=0;s<n;s++){r.setEnd(t,s+1),r.setStart(t,s);let o=xn(r,1);if(o.top!=o.bottom&&Gf(e,o)){i={node:t,offset:s+(e.left>=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:t,offset:0}}function Gf(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function oM(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function lM(t,e,n){let{node:r,offset:i}=J1(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();s=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,i,s)}function aM(t,e,n,r){let i=-1;for(let s=e,o=!1;s!=t.dom;){let l=t.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!o&&a.left>r.left||a.top>r.top?i=l.posBefore:(!o&&a.right<r.left||a.bottom<r.top)&&(i=l.posAfter),o=!0),!l.contentDOM&&i<0&&!l.node.isText))return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter;s=l.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function G1(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let o=t.childNodes[s];if(o.nodeType==1){let l=o.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(Gf(e,u))return G1(o,e,u)}}if((s=(s+1)%r)==i)break}return t}function uM(t,e){let n=t.dom.ownerDocument,r,i=0,s=Xb(n,e.left,e.top);s&&({node:r,offset:i}=s);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=t.dom.getBoundingClientRect();if(!Gf(e,u)||(o=G1(t.dom,e,u),!o))return null}if(Fe)for(let u=o;r&&u;u=Ei(u))u.draggable&&(r=void 0);if(o=oM(o,e),r){if(kt&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}let u;uo&&i&&r.nodeType==1&&(u=r.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=aM(t,r,i,e))}l==null&&(l=lM(t,o,e));let a=t.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function hm(t){return t.top<t.bottom||t.left<t.right}function xn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(hm(r))return r}return Array.prototype.find.call(n,hm)||t.getBoundingClientRect()}const cM=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Q1(t,e,n){let{node:r,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),o=uo||kt;if(r.nodeType==3)if(o&&(cM.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let a=xn(tn(r,i,i),n);if(kt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let u=xn(tn(r,i-1,i-1),-1);if(u.top==a.top){let c=xn(tn(r,i,i+1),-1);if(c.top!=a.top)return Ui(c,c.left<u.left)}}return a}else{let a=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:u++,Ui(xn(tn(r,a,u),c),c<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==gt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return qu(a.getBoundingClientRect(),!1)}if(s==null&&i<gt(r)){let a=r.childNodes[i];if(a.nodeType==1)return qu(a.getBoundingClientRect(),!0)}return qu(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==gt(r))){let a=r.childNodes[i-1],u=a.nodeType==3?tn(a,gt(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Ui(xn(u,1),!1)}if(s==null&&i<gt(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?tn(a,0,o?0:1):a.nodeType==1?a:null:null;if(u)return Ui(xn(u,-1),!0)}return Ui(xn(r.nodeType==3?tn(r):r,-n),n>=0)}function Ui(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function qu(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Y1(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function dM(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return Y1(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=Q1(t,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=tn(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let c=a[u];if(c.bottom>c.top+1&&(n=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const fM=/[\u0590-\u08ac]/;function hM(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,l=t.domSelection();return l?!fM.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:o:Y1(t,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:p,focusOffset:g}=t.domSelectionRange(),y=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&u==g;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),y}):r.pos==r.start()||r.pos==r.end()}let pm=null,mm=null,gm=!1;function pM(t,e,n){return pm==e&&mm==n?gm:(pm=e,mm=n,gm=n=="up"||n=="down"?dM(t,e,n):hM(t,e,n))}const wt=0,ym=1,dr=2,Kt=3;class co{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=wt,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,o;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(o)+o.size:this.posAtStart}else{let s,o;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>Re(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!n||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==e&&s!=r){for(;!i.border&&i.children.length;)for(let o=0;o<i.children.length;o++){let l=i.children[o];if(l.size){i=l;break}}return i}if(e<s)return i.descAt(e-r-i.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.size;if(l>e||o instanceof Z1){i=e-s;break}s=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof X1&&s.side>=0;r--);if(n<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&n&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?Re(s.dom)+1:0}}else{let s,o=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,o=!1);return s&&o&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?Re(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let o=r,l=0;;l++){let a=this.children[l],u=o+a.size;if(i==-1&&e<=u){let c=o+a.border;if(e>=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,c);e=o;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Re(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=Re(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let s=Math.min(e,n),o=Math.max(e,n);for(let h=0,p=0;h<this.children.length;h++){let g=this.children[h],y=p+g.size;if(s>p&&o<y)return g.setSelection(e-p-g.border,n-p-g.border,r,i);p=y}let l=this.domFromPos(e,e?-1:1),a=n==e?l:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((kt||Fe)&&e==n){let{node:h,offset:p}=l;if(h.nodeType==3){if(d=!!(p&&h.nodeValue[p-1]==`
391`),d&&p==h.nodeValue.length)for(let g=h,y;g;g=g.parentNode){if(y=g.nextSibling){y.nodeName=="BR"&&(l=a={node:y.parentNode,offset:Re(y)+1});break}let m=g.pmViewDesc;if(m&&m.node&&m.node.isBlock)break}}else{let g=h.childNodes[p-1];d=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(kt&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||d&&Fe)&&Or(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Or(a.node,a.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||e==n)&&!(d&&kt)){u.collapse(l.node,l.offset);try{e!=n&&u.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>n){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],o=r+s.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let l=r+s.border,a=o-s.border;if(e>=l&&n<=a){this.dirty=e==r||n==o?dr:ym,e==l&&n==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Kt:s.markDirty(e-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?dr:Kt}r=o}this.dirty=dr}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?dr:ym;n.dirty<r&&(n.dirty=r)}
vendor: 3,737 bytes, line 391
391}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class X1 extends co{constructor(e,n,r,i){let s,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==wt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class mM extends co{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Rr extends co{constructor(e,n,r,i,s){super(e,[],r,i),this.mark=n,this.spec=s}static create(e,n,r,i){let s=i.nodeViews[n.type.name],o=s&&s(n,i,r);return(!o||!o.dom)&&(o=zr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Rr(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Kt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Kt&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=wt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=wt}}slice(e,n,r){let i=Rr.create(this.parent,this.mark,!0,r),s=this.children,o=this.size;n<o&&(s=kd(s,n,o,r)),e>0&&(s=kd(s,0,e,r));for(let l=0;l<s.length;l++)s[l].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Un extends co{constructor(e,n,r,i,s,o,l,a,u){super(e,[],s,o),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=l}static create(e,n,r,i,s,o){let l=s.nodeViews[n.type.name],a,u=l&&l(n,s,()=>{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=zr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=nv(c,r,n),u?a=new gM(e,n,r,i,c,d||null,f,u,s,o+1):n.isText?new Ga(e,n,r,i,c,f,s):new Un(e,n,r,i,c,d||null,f,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>T.empty)}return e}matchesNode(e,n,r){return this.dirty==wt&&e.eq(this.node)&&Fl(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}
vendor: 11,395 bytes, line 391
391updateChildren(e,n){let r=this.node.inlineContent,i=n,s=e.composing?this.localCompositionInfo(e,n):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new vM(this,o&&o.node,e);wM(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?K.none:this.node.child(c).marks,r,e,c),a.placeWidget(u,e,i)},(u,c,d,f)=>{a.syncToMarks(u.marks,r,e,f);let h;a.findNodeMatch(u,c,d,f)||l&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(h=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(u,c,d,h,e)||a.updateNextNode(u,c,d,e,f,i)||a.addNode(u,c,d,e,i),i+=u.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==dr)&&(o&&this.protectLocalComposition(e,o),ev(this.contentDOM,this.children,e),bi&&SM(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof j)||r<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,l=CM(this.node.content,o,r-n,i-n);return l<0?null:{node:s,pos:l,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new mM(this,s,n,i);e.input.compositionNodes.push(o),this.children=kd(this.children,r,r+i.length,e,o)}update(e,n,r,i){return this.dirty==Kt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=wt}updateOuterDeco(e){if(Fl(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=tv(this.dom,this.nodeDOM,xd(this.outerDeco,this.node,n),xd(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function vm(t,e,n,r,i){nv(r,e,t);let s=new Un(void 0,t,e,n,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class Ga extends Un{constructor(e,n,r,i,s,o,l){super(e,n,r,i,s,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==Kt||this.dirty!=wt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=wt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=wt,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),s=document.createTextNode(i.text);return new Ga(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Kt)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Z1 extends co{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==wt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class gM extends Un{constructor(e,n,r,i,s,o,l,a,u,c){super(e,n,r,i,s,o,l,u,c),this.spec=a}update(e,n,r,i){if(this.dirty==Kt)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function ev(t,e,n){let r=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let o=e[s],l=o.dom;if(l.parentNode==t){for(;l!=r;)r=xm(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(l,r);if(o instanceof Rr){let a=r?r.previousSibling:t.lastChild;ev(o.contentDOM,o.children,n),r=a?a.nextSibling:t.firstChild}}for(;r;)r=xm(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const gs=function(t){t&&(this.nodeName=t)};gs.prototype=Object.create(null);const fr=[new gs];function xd(t,e,n){if(t.length==0)return fr;let r=n?fr[0]:new gs,i=[r];for(let s=0;s<t.length;s++){let o=t[s].type.attrs;if(o){o.nodeName&&i.push(r=new gs(o.nodeName));for(let l in o){let a=o[l];a!=null&&(n&&i.length==1&&i.push(r=new gs(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return i}function tv(t,e,n,r){if(n==fr&&r==fr)return e;let i=e;for(let s=0;s<r.length;s++){let o=r[s],l=n[s];if(s){let a;l&&l.nodeName==o.nodeName&&i!=t&&(a=i.parentNode)&&a.nodeName.toLowerCase()==o.nodeName||(a=document.createElement(o.nodeName),a.pmIsDeco=!0,a.appendChild(i),l=fr[0]),i=a}yM(i,l||fr[0],o)}return i}function yM(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)i.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&t.classList.add(i[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function nv(t,e,n){return tv(t,t,fr,xd(e,n,t.nodeType!=1))}function Fl(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function xm(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class vM{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=xM(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let s=0,o=this.stack.length>>1,l=Math.min(o,e.length);for(;s<l&&(s==o-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<o;)this.destroyRest(),this.top.dirty=wt,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(e[o])&&!this.isLocked(d.dom)){a=c;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=Rr.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,s){let o=this.top.children[i];return o.dirty==Kt&&o.dom==o.contentDOM&&(o.dirty=dr),o.update(e,n,r,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,s,o){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof Un){let u=this.preMatch.matched.get(a);if(u!=null&&u!=s)return!1;let c=a.dom,d,f=this.isLocked(c)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Kt&&Fl(n,a.outerDeco));if(!f&&a.update(e,n,r,i))return this.destroyBetween(this.index,l),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(a,e,n,r,i,o)))return this.destroyBetween(this.index,l),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=dr,d.updateChildren(i,o+1),d.dirty=wt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,s,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Fl(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let l=Un.create(this.top,n,r,i,s,o);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,n,r,i,s){let o=Un.create(this.top,e,n,r,i,s);o.contentDOM&&o.updateChildren(i,s+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new X1(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Rr;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ga)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Fe||De)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new Z1(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function xM(t,e){let n=e,r=n.children.length,i=t.childCount,s=new Map,o=[];e:for(;i>0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Rr)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(i-1))break;
vendor: 4,314 bytes, line 391
391--i,s.set(l,i),o.push(l)}}return{index:i,matched:s,matches:o.reverse()}}function kM(t,e){return t.type.side-e.type.side}function wM(t,e,n,r){let i=e.locals(t),s=0;if(i.length==0){for(let u=0;u<t.childCount;u++){let c=t.child(u);r(c,i,e.forChild(s,c),u),s+=c.nodeSize}return}let o=0,l=[],a=null;for(let u=0;;){let c,d;for(;o<i.length&&i[o].to==s;){let y=i[o++];y.widget&&(c?(d||(d=[c])).push(y):c=y)}if(c)if(d){d.sort(kM);for(let y=0;y<d.length;y++)n(d[y],u,!!a)}else n(c,u,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(u<t.childCount)h=u,f=t.child(u++);else break;for(let y=0;y<l.length;y++)l[y].to<=s&&l.splice(y--,1);for(;o<i.length&&i[o].from<=s&&i[o].to>s;)l.push(i[o++]);let p=s+f.nodeSize;if(f.isText){let y=p;o<i.length&&i[o].from<y&&(y=i[o].from);for(let m=0;m<l.length;m++)l[m].to<y&&(y=l[m].to);y<p&&(a=f.cut(y-s),f=f.cut(0,y-s),p=y,h=-1)}else for(;o<i.length&&i[o].to<p;)o++;let g=f.isInline&&!f.isLeaf?l.filter(y=>!y.inline):l.slice();r(f,g,e.forChild(s,f),h),s=p}}function SM(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function CM(t,e,n,r){for(let i=0,s=0;i<t.childCount&&s<=r;){let o=t.child(i++),l=s;if(s+=o.nodeSize,!o.isText)continue;let a=o.text;for(;i<t.childCount;){let u=t.child(i++);if(s+=u.nodeSize,!u.isText)break;a+=u.text}if(s>=n){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l<r?a.lastIndexOf(e,r-l-1):-1;if(u>=0&&u+e.length+l>=n)return l+u;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function kd(t,e,n,r,i){let s=[];for(let o=0,l=0;o<t.length;o++){let a=t[o],u=l,c=l+=a.size;u>=n||c<=e?s.push(a):(u<e&&s.push(a.slice(0,e-u,r)),i&&(s.push(i),i=void 0),c>n&&s.push(a.slice(n-u,a.size,r)))}return s}function Qf(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=i&&i.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,u;if(Ja(n)){for(a=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&z.isSelectable(d)&&i.parent&&!(d.isInline&&Qb(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;u=new z(o==f?l:r.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=o,f=o;for(let h=0;h<n.rangeCount;h++){let p=n.getRangeAt(h);d=Math.min(d,t.docView.posFromDOM(p.startContainer,p.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(d<0)return null;[a,o]=f==t.state.selection.anchor?[f,d]:[d,f],l=r.resolve(o)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=r.resolve(a);if(!u){let d=e=="pointer"||t.state.selection.head<l.pos&&!s?1:-1;u=Yf(t,c,l,d)}return u}function rv(t){return t.editable?t.hasFocus():sv(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function un(t,e=!1){let n=t.state.selection;if(iv(t,n),!!rv(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&De){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Or(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)bM(t);else{let{anchor:r,head:i}=n,s,o;km&&!(n instanceof j)&&(n.$from.parent.inlineContent||(s=wm(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=wm(t,n.to))),t.docView.setSelection(r,i,t,e),km&&(s&&Sm(s),o&&Sm(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&EM(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const km=Fe||De&&U1<63;function wm(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(Fe&&i&&i.contentEditable=="false")return Ku(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return Ku(i);if(s)return Ku(s)}}function Ku(t){return t.contentEditable="true",Fe&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Sm(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function EM(t){let e=t.dom.ownerDocument;
vendor: 8,163 bytes, lines 391-394
391e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!rv(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function bM(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Re(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&nt&&Hn<=11&&(n.disabled=!0,n.disabled=!1)}function iv(t,e){if(e instanceof z){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Cm(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Cm(t)}function Cm(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Yf(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||j.between(e,n,r)}function Em(t){return t.editable&&!t.hasFocus()?!1:sv(t)}function sv(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function MM(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Or(e.node,e.offset,n.anchorNode,n.anchorOffset)}function wd(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&F.findFrom(s,e)}function Sn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function bm(t,e,n){let r=t.state.selection;if(r instanceof j)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Sn(t,new j(r.$anchor,o))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=wd(t.state,e);return i&&i instanceof z?Sn(t,i):!1}else if(!(ht&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=t.docView.descAt(l))&&!o.contentDOM?z.isSelectable(s)?Sn(t,new z(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):uo?Sn(t,new j(t.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof z&&r.node.isInline)return Sn(t,new j(e>0?r.$to:r.$from));{let i=wd(t.state,e);return i?Sn(t,i):!1}}}function Vl(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ys(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Fr(t,e){return e<0?NM(t):TM(t)}function NM(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,s,o=!1;for(kt&&n.nodeType==1&&r<Vl(n)&&ys(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(ys(l,-1))i=n,s=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(ov(n))break;{let l=n.previousSibling;for(;l&&ys(l,-1);)i=n.parentNode,s=Re(l),l=l.previousSibling;if(l)n=l,r=Vl(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?Sd(t,n,r):i&&Sd(t,i,s)}function TM(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=Vl(n),s,o;for(;;)if(r<i){if(n.nodeType!=1)break;let l=n.childNodes[r];if(ys(l,1))s=n,o=++r;else break}else{if(ov(n))break;{let l=n.nextSibling;for(;l&&ys(l,1);)s=l.parentNode,o=Re(l)+1,l=l.nextSibling;if(l)n=l,r=0,i=Vl(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}s&&Sd(t,s,o)}function ov(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function AM(t,e){for(;t&&e==t.childNodes.length&&!ao(t);)e=Re(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function OM(t,e){for(;t&&!e&&!ao(t);)e=Re(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Sd(t,e,n){if(e.nodeType!=3){let s,o;(o=AM(e,n))?(e=o,n=0):(s=OM(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Ja(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&un(t)},50)}function Mm(t,e){let n=t.state.doc.resolve(e);if(!(De||W1)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),o=(s.top+s.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Nm(t,e,n){let r=t.state.selection;if(r instanceof j&&!r.empty||n.indexOf("s")>-1||ht&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=wd(t.state,e);if(o&&o instanceof z)return Sn(t,o)}if(!i.parent.inlineContent){let o=e<0?i:s,l=r instanceof xt?F.near(o,e):F.findFrom(o,e);return l?Sn(t,l):!1}return!1}function Tm(t,e){if(!(t.state.selection instanceof j))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let o=t.state.tr;return e<0?o.delete(n.pos-s.nodeSize,n.pos):o.delete(n.pos,n.pos+s.nodeSize),t.dispatch(o),!0}return!1}function Am(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function RM(t){if(!Fe||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Am(t,r,"true"),setTimeout(()=>Am(t,r,"false"),20)}return!1}function IM(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function DM(t,e){let n=e.keyCode,r=IM(e);if(n==8||ht&&n==72&&r=="c")return Tm(t,-1)||Fr(t,-1);if(n==46&&!e.shiftKey||ht&&n==68&&r=="c")return Tm(t,1)||Fr(t,1);if(n==13||n==27)return!0;if(n==37||ht&&n==66&&r=="c"){let i=n==37?Mm(t,t.state.selection.from)=="ltr"?-1:1:-1;return bm(t,i,r)||Fr(t,i)}else if(n==39||ht&&n==70&&r=="c"){let i=n==39?Mm(t,t.state.selection.from)=="ltr"?1:-1:1;return bm(t,i,r)||Fr(t,i)}else{if(n==38||ht&&n==80&&r=="c")return Nm(t,-1,r)||Fr(t,-1);if(n==40||ht&&n==78&&r=="c")return RM(t)||Nm(t,1,r)||Fr(t,1);if(r==(ht?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Xf(t,e){t.someProp("transformCopied",h=>{e=h(e,t)});let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=t.someProp("clipboardSerializer")||zr.fromSchema(t.state.schema),l=fv(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=dv[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let p=l.createElement(c[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",h=>h(e,t))||e.content.textBetween(0,e.content.size,`
392
393`);return{dom:a,text:f,slice:e}}function lv(t,e,n,r,i){let s=i.parent.type.spec.code,o,l;if(!n&&!e)return null;let a=!!e&&(r||s||!n);if(a){if(t.someProp("transformPastedText",f=>{e=f(e,s||r,t)}),s)return l=new I(T.from(t.state.schema.text(e.replace(/\r\n?/g,`
394`))),0,0),t.someProp("transformPasted",f=>{l=f(l,t,!0)}),l;let d=t.someProp("clipboardTextParser",f=>f(e,i,r,t));if(d)l=d;else{let f=i.marks(),{schema:h}=t.state,p=zr.fromSchema(h);
vendor: 8,811 bytes, line 394
394o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=o.appendChild(document.createElement("p"));g&&y.appendChild(p.serializeNode(h.text(g,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=jM(n),uo&&_M(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Vn.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!LM.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=BM(Om(l,+c[1],+c[2]),c[4]);else if(l=I.maxOpen(PM(l.content,i),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d<l.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=Om(l,d,f)}return t.someProp("transformPasted",d=>{l=d(l,t,a)}),l}const LM=/^(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 PM(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),s,o=[];if(t.forEach(l=>{if(!o)return;let a=i.findWrapping(l.type),u;if(!a)return o=null;if(u=o.length&&s.length&&uv(a,s,l,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=cv(o[o.length-1],s.length));let c=av(l,a);o.push(c),i=i.matchType(c.type),s=a}}),o)return T.from(o)}return t}function av(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,T.from(t));return t}function uv(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=uv(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(T.from(av(n,t,i+1))))}}function cv(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,cv(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(T.empty,!0);return t.copy(n.append(r))}function Cd(t,e,n,r,i,s){let o=e<0?t.firstChild:t.lastChild,l=o.content;return t.childCount>1&&(s=0),i<r-1&&(l=Cd(l,e,n,r,i+1,s)),i>=n&&(l=e<0?o.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(T.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(l))}function Om(t,e,n){return e<t.openStart&&(t=new I(Cd(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new I(Cd(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const dv={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 Rm=null;function fv(){return Rm||(Rm=document.implementation.createHTMLDocument("title"))}let Ju=null;function zM(t){let e=window.trustedTypes;return e?(Ju||(Ju=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ju.createHTML(t)):t}function jM(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=fv().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&dv[r[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=zM(t),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function _M(t){let e=t.querySelectorAll(De?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function BM(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:s,openEnd:o}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=T.from(a.create(r[l+1],i)),s++,o++}return new I(i,s,o)}const qe={},Ke={},$M={touchstart:!0,touchmove:!0};class FM{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function VM(t){for(let e in qe){let n=qe[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{UM(t,r)&&!Zf(t,r)&&(t.editable||!(r.type in Ke))&&n(t,r)},$M[e]?{passive:!0}:void 0)}Fe&&t.dom.addEventListener("input",()=>null),Ed(t)}function Dn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function HM(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Ed(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Zf(t,r))})}function Zf(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function UM(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function WM(t,e){!Zf(t,e)&&qe[e.type]&&(t.editable||!(e.type in Ke))&&qe[e.type](t,e)}Ke.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!pv(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(on&&De&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),bi&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,lr(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||DM(t,n)?n.preventDefault():Dn(t,"key")};Ke.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ke.keypress=(t,e)=>{let n=e;if(pv(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||ht&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof j)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i,s))&&t.dispatch(s()),n.preventDefault()}};function Qa(t){return{left:t.clientX,top:t.clientY}}function qM(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function eh(t,e,n,r,i){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(t.someProp(e,l=>o>s.depth?l(t,n,s.nodeAfter,s.before(o),i,!0):l(t,n,s.node(o),s.before(o),i,!1)))return!0;return!1}function hi(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function KM(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&z.isSelectable(r)?(hi(t,new z(n)),!0):!1}function JM(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof z&&(r=n.node);let s=t.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(z.isSelectable(l)){r&&n.$from.depth>0&&o>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(o);break}}return i!=null?(hi(t,z.create(t.state.doc,i)),!0):!1}function GM(t,e,n,r,i){return eh(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(i?JM(t,n):KM(t,n))}function QM(t,e,n,r){return eh(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function YM(t,e,n,r){return eh(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||XM(t,n,r)}function XM(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(hi(t,j.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(o.inlineContent)hi(t,j.create(r,l+1,l+1+o.content.size));else if(z.isSelectable(o))hi(t,z.create(r,l));else continue;return!0}}function th(t){return Hl(t)}const hv=ht?"metaKey":"ctrlKey";qe.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=th(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&qM(n,t.input.lastClick)&&!n[hv]&&t.input.lastClick.button==n.button&&(t.input.last
vendor: 4,625 bytes, line 394
394Click.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s,button:n.button};let o=t.posAtCoords(Qa(n));o&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new ZM(t,o,n,!!r)):(s=="doubleClick"?QM:YM)(t,o.pos,o.inside,n)?n.preventDefault():Dn(t,"pointer"))};class ZM{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[hv],this.allowDefault=r.shiftKey;let s,o;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),o=n.inside;else{let c=e.state.doc.resolve(n.pos);s=c.parent,o=c.depth?c.before():0}const l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof z&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&kt&&!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)),Dn(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(()=>un(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Qa(e))),this.updateAllowDefault(e),this.allowDefault||!n?Dn(this.view,"pointer"):GM(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Fe&&this.mightDrag&&!this.mightDrag.node.isAtom||De&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(hi(this.view,F.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Dn(this.view,"pointer")}move(e){this.updateAllowDefault(e),Dn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}qe.touchstart=t=>{t.input.lastTouch=Date.now(),th(t),Dn(t,"pointer")};qe.touchmove=t=>{t.input.lastTouch=Date.now(),Dn(t,"pointer")};qe.contextmenu=t=>th(t);function pv(t,e){return t.composing?!0:Fe&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const eN=on?5e3:-1;Ke.compositionstart=Ke.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof j&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||De&&W1&&tN(t)))t.markCursor=t.state.storedMarks||n.marks(),Hl(t,!0),t.markCursor=null;else if(Hl(t,!e.selection.empty),kt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let l=t.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}t.input.composing=!0}mv(t,eN)};function tN(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Ke.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,mv(t,20))};function mv(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Hl(t),e))}
vendor: 4,656 bytes, line 394
394function gv(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=rN());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function nN(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Jb(e.focusNode,e.focusOffset),r=Gb(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function rN(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Hl(t,e=!1){if(!(on&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),gv(t),e||t.docView&&t.docView.dirty){let n=Qf(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function iN(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Ks=nt&&Hn<15||bi&&Zb<604;qe.copy=Ke.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let s=Ks?null:n.clipboardData,o=r.content(),{dom:l,text:a}=Xf(t,o);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):iN(t,l),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function sN(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function oN(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Js(t,r.value,null,i,e):Js(t,r.textContent,r.innerHTML,i,e)},50)}function Js(t,e,n,r,i){let s=lv(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,i,s||I.empty)))return!0;if(!s)return!1;let o=sN(s),l=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function yv(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ke.paste=(t,e)=>{let n=e;if(t.composing&&!on)return;let r=Ks?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Js(t,yv(r),r.getData("text/html"),i,n)?n.preventDefault():oN(t,n)};class vv{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const lN=ht?"altKey":"ctrlKey";function xv(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[lN]}qe.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(Qa(n)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof z?i.to-1:i.to))){if(r&&r.mightDrag)o=z.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(o=z.create(t.state.doc,d.posBefore))}}let l=(o||t.state.selection).content(),{dom:a,text:u,slice:c}=Xf(t,l);(!n.dataTransfer.files.length||!De||U1>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ks?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ks||n.dataTransfer.setData("text/plain",u),t.dragging=new vv(c,xv(t,n),o)};qe.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ke.dragover=Ke.dragenter=(t,e)=>e.preventDefault();Ke.drop=(t,e)=>{try{aN(t,e,t.dragging)}finally{t.dragging=null}};function aN(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Qa(e));if(!r)return;let i=t.state.doc.resolve(r.pos),s=n&&n.slice;s?t.someProp("transformPasted",h=>{s=h(s,t,!1)}):s=lv(t,yv(e.dataTransfer),Ks?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(n&&xv(t,e));if(t.someProp("handleDrop",h=>h(t,e,s||I.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let l=s?A1(t.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let a=t.state.tr;if(o){let{node:h}=n;h?h.replace(a):a.deleteSelection()}
vendor: 9,548 bytes, line 394
394let u=a.mapping.map(l),c=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,s.content.firstChild):a.replaceRange(u,u,s),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&z.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))a.setSelection(new z(f));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((p,g,y,m)=>h=m),a.setSelection(Yf(t,f,a.doc.resolve(h)))}t.focus(),t.dispatch(a.setMeta("uiEvent","drop"))}qe.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&un(t)},20))};qe.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};qe.beforeinput=(t,e)=>{if(De&&on&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,lr(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Ke)qe[t]=Ke[t];function Gs(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Ul{constructor(e,n){this.toDOM=e,this.spec=n||xr,this.side=this.spec.side||0}map(e,n,r,i){let{pos:s,deleted:o}=e.mapResult(n.from+i,this.side<0?-1:1);return o?null:new Ue(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ul&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Gs(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Wn{constructor(e,n){this.attrs=e,this.spec=n||xr}map(e,n,r,i){let s=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new Ue(s,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Wn&&Gs(this.attrs,e.attrs)&&Gs(this.spec,e.spec)}static is(e){return e.type instanceof Wn}destroy(){}}class nh{constructor(e,n){this.attrs=e,this.spec=n||xr}map(e,n,r,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let o=e.mapResult(n.to+i,-1);return o.deleted||o.pos<=s.pos?null:new Ue(s.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(r)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof nh&&Gs(this.attrs,e.attrs)&&Gs(this.spec,e.spec)}destroy(){}}class Ue{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Ue(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Ue(e,e,new Ul(n,r))}static inline(e,n,r,i){return new Ue(e,n,new Wn(r,i))}static node(e,n,r,i){return new Ue(e,n,new nh(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Wn}get widget(){return this.type instanceof Ul}}const Hr=[],xr={};class re{constructor(e,n){this.local=e.length?e:Hr,this.children=n.length?n:Hr}static create(e,n){return n.length?Wl(n,e,0,xr):_e}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,s){for(let o=0;o<this.local.length;o++){let l=this.local[o];l.from<=n&&l.to>=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let l=this.children[o]+1;this.children[o+2].findInner(e-l,n-l,r,i+l,s)}}map(e,n,r){return this==_e||e.maps.length==0?this:this.mapInner(e,n,0,0,r||xr)}mapInner(e,n,r,i,s){let o;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,i);a&&a.type.valid(n,a)?(o||(o=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?uN(this.children,o||[],e,n,r,i,s):o?new re(o.sort(kr),Hr):_e}add(e,n){return n.length?this==_e?re.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,s=0;e.forEach((l,a)=>{let u=a+r,c;if(c=wv(n,l,u)){for(i||(i=this.children.slice());s<i.length&&i[s]<a;)s+=3;i[s]==a?i[s+2]=i[s+2].addInner(l,c,u+1):i.splice(s,0,a,a+l.nodeSize,Wl(c,l,u+1,xr)),s+=3}});let o=kv(s?Sv(n):n,-r);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||o.splice(l--,1);return new re(o.length?this.local.concat(o).sort(kr):this.local,i||this.children)}remove(e){return e.length==0||this==_e?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let o,l=r[s]+n,a=r[s+1]+n;for(let c=0,d;c<e.length;c++)(d=e[c])&&d.from>l&&d.to<a&&(e[c]=null,(o||(o=[])).push(d));if(!o)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(o,l+1);u!=_e?r[s+2]=u:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,o;s<e.length;s++)if(o=e[s])for(let l=0;l<i.length;l++)i[l].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new re(i,r):_e}forChild(e,n){if(this==_e)return this;if(n.isLeaf)return re.empty;let r,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,o=s+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<o&&a.to>s&&a.type instanceof Wn){let u=Math.max(s,a.from)-s,c=Math.min(o,a.to)-s;u<c&&(i||(i=[])).push(a.copy(u,c))}}if(i){let l=new re(i.sort(kr),Hr);return r?new Nn([l,r]):l}return r||_e}eq(e){if(this==e)return!0;if(!(e instanceof re)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return rh(this.localsInner(e))}localsInner(e){if(this==_e)return Hr;if(e.inlineContent||!this.local.some(Wn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Wn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}re.empty=new re([],[]);re.removeOverlap=rh;const _e=re.empty;class Nn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,xr));return Nn.from(r)}forChild(e,n){if(n.isLeaf)return re.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=_e&&(s instanceof Nn?r=r.concat(s.members):r.push(s))}return Nn.from(r)}eq(e){if(!(e instanceof Nn)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let o=0;o<s.length;o++)n.push(s[o])}}return n?rh(r?n:n.sort(kr)):Hr}static from(e){switch(e.length){case 0:return _e;case 1:return e[0];default:return new Nn(e.every(n=>n instanceof re)?e:e.reduce((n,r)=>n.concat(r instanceof re?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function uN(t,e,n,r,i,s,o){let l=t.slice();for(let u=0,c=s;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,h,p,g)=>{let y=g-p-(h-f);for(let m=0;m<l.length;m+=3){let v=l[m+1];if(v<0||f>v+c-d)continue;let k=l[m]+c-d;h>=k?l[m+1]=f<=k?-2:-1:f>=c&&y&&(l[m]+=y,l[m+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=n.map(t[u]+s),d=c-i;if(d<0||d>=r.content.size){a=!0;continue}let f=n.map(t[u+1]+s,-1),h=f-i,{index:p,offset:g}=r.content.findIndex(d),y=r.maybeChild(p);if(y&&g==d&&g+y.nodeSize==h){let m=l[u+2].mapInner(n,y,c+1,t[u]+s+1,o);m!=_e?(l[u]=d,l[u+1]=h,l[u+2]=m):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=cN(l,t,e,n,i,s,o),c=Wl(u,r,0,o);e=c.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let h=c.children[d];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new re(e.sort(kr),l)}function kv(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Ue(i.from+e,i.to+e,i.type))}return n}function cN(t,e,n,r,i,s,o){function l(a,u){for(let c=0;c<a.local.length;c++){let d=a.local[c].map(r,i,u);d?n.push(d):o.onRemove&&o.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&l(t[a+2],e[a]+s+1);return n}function wv(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let s=0,o;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function Sv(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Wl(t,e,n,r){let i=[],s=!1;e.forEach((l,a)=>{let u=wv(t,l,a+n);if(u){s=!0;let c=Wl(u,l,n+a+1,r);c!=_e&&i.push(a,a+l.nodeSize,c)}});let o=kv(s?Sv(t):t,-n).sort(kr);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||(r.onRemove&&r.onRemove(o[l].spec),o.splice(l--,1));return o.length||i.length?new re(o,i):_e}function kr(t,e){return t.from-e.from||t.to-e.to}function rh(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let s=e[i];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,r.to),Im(e,i+1,s.c
vendor: 9,923 bytes, line 394
394opy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),Im(e,i,r.copy(s.from,r.to)));break}}}return e}function Im(t,e,n){for(;e<t.length&&kr(n,t[e])>0;)e++;t.splice(e,0,n)}function Gu(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=_e&&e.push(r)}),t.cursorWrapper&&e.push(re.create(t.state.doc,[t.cursorWrapper.deco])),Nn.from(e)}const dN={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fN=nt&&Hn<=11;class hN{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 pN{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new hN,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);nt&&Hn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Fe&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),fN&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,dN)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Em(this.view)){if(this.suppressingSelectionUpdates)return un(this.view);if(nt&&Hn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Or(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let s=e.focusNode;s;s=Ei(s))n.add(s);for(let s=e.anchorNode;s;s=Ei(s))if(n.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Em(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,l=!1,a=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],a);d&&(s=s<0?d.from:Math.min(d.from,s),o=o<0?d.to:Math.max(d.to,o),d.typeOver&&(l=!0))}if(a.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of a)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(kt&&a.length){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||yN(e,d)!=h)&&f.remove()}}}let u=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ja(r)&&(u=Qf(e))&&u.eq(F.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,un(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||i)&&(s>-1&&(e.docView.markDirty(s,o),mN(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,vN(e,a)),this.handleDOMChange(s,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||un(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let d=e.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,s=e.nextSibling;if(nt&&Hn<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=e.addedNodes[c];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(i=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(s=f)}let o=i&&i.parentNode==e.target?Re(i)+1:0,l=r.localPosFromDOM(e.target,o,-1),a=s&&s.parentNode==e.target?Re(s):e.target.childNodes.length,u=r.localPosFromDOM(e.target,a,1);return{from:l,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Dm=new WeakMap,Lm=!1;function mN(t){if(!Dm.has(t)&&(Dm.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=kt,Lm)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Lm=!0}}function Pm(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return Or(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function gN(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Pm(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Pm(t,n):null}function yN(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function vN(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let s of e)if(((n=s.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let o=s.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let l=o;for(;;){let a=l.firstChild;if(!a||a.nodeType!=1||a.contentEditable=="false"||/^(BR|IMG)$/.test(a.nodeName))break;l=a}l.insertBefore(s,l.firstChild),r==s&&t.domSelection().collapse(s,i)}else s.parentNode.removeChild(s)}}function xN(t,e,n){let{node:r,fromOffset:i,toOffset:s,from:o,to:l}=t.docView.parseRange(e,n),a=t.domSelectionRange(),u,c=a.anchorNode;if(c&&t.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:a.anchorOffset}],Ja(a)||u.push({node:a.focusNode,offset:a.focusOffset})),De&&t.input.lastKeyCode===8)for(let y=s;y>i;y--){let m=r.childNodes[y-1],v=m.pmViewDesc;if(m.nodeName=="BR"&&!v){s=y;break}if(!v||v.size)break}let d=t.state.doc,f=t.someProp("domParser")||Vn.fromSchema(t.state.schema),h=d.resolve(o),p=null,g=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:kN,context:h});if(u&&u[0].pos!=null){let y=u[0].pos,m=u[1]&&u[1].pos;m==null&&(m=y),p={anchor:y+o,head:m+o}}return{doc:g,sel:p,from:o,to:l}}function kN(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Fe&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Fe&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const wN=/^(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 SN(t,e,n,r,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let E=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,N=Qf(t,E);if(N&&!t.state.selection.eq(N)){if(De&&on&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",R=>R(t,lr(13,"Enter"))))return;let M=t.state.tr.setSelection(N);E=="pointer"?M.setMeta("pointer",!0):E=="key"&&M.scrollIntoView(),s&&M.setMeta("composition",s),t.dis
vendor: 4,876 bytes, line 394
394patch(M)}return}let o=t.state.doc.resolve(e),l=o.sharedDepth(n);e=o.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,u=xN(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),f,h;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,h="end"):(f=t.state.selection.from,h="start"),t.input.lastKeyCode=null;let p=bN(d.content,u.doc.content,u.from,f,h);if(p&&t.input.domChangeCount++,(bi&&t.input.lastIOSEnter>Date.now()-225||on)&&i.some(E=>E.nodeType==1&&!wN.test(E.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",E=>E(t,lr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof j&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let E=zm(t,t.state.doc,u.sel);if(E&&!E.eq(t.state.selection)){let N=t.state.tr.setSelection(E);s&&N.setMeta("composition",s),t.dispatch(N)}}return}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof j&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),nt&&Hn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let g=u.doc.resolveNoCache(p.start-u.from),y=u.doc.resolveNoCache(p.endB-u.from),m=c.resolve(p.start),v=g.sameParent(y)&&g.parent.inlineContent&&m.end()>=p.endA;if((bi&&t.input.lastIOSEnter>Date.now()-225&&(!v||i.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!v&&g.pos<u.doc.content.size&&(!g.sameParent(y)||!g.parent.inlineContent)&&g.pos<y.pos&&!/\S/.test(u.doc.textBetween(g.pos,y.pos,"","")))&&t.someProp("handleKeyDown",E=>E(t,lr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&EN(c,p.start,p.endA,g,y)&&t.someProp("handleKeyDown",E=>E(t,lr(8,"Backspace")))){on&&De&&t.domObserver.suppressSelectionUpdates();return}De&&p.endB==p.start&&(t.input.lastChromeDelete=Date.now()),on&&!v&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,y=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(E){return E(t,lr(13,"Enter"))})},20));let k=p.start,w=p.endA,S=E=>{let N=E||t.state.tr.replace(k,w,u.doc.slice(p.start-u.from,p.endB-u.from));if(u.sel){let M=zm(t,N.doc,u.sel);M&&!(De&&t.composing&&M.empty&&(p.start!=p.endB||t.input.lastChromeDelete<Date.now()-100)&&(M.head==k||M.head==N.mapping.map(w)-1)||nt&&M.empty&&M.head==k)&&N.setSelection(M)}return s&&N.setMeta("composition",s),N.scrollIntoView()},b;if(v)if(g.pos==y.pos){nt&&Hn<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>un(t),20));let E=S(t.state.tr.delete(k,w)),N=c.resolve(p.start).marksAcross(c.resolve(p.endA));N&&E.ensureMarks(N),t.dispatch(E)}else if(p.endA==p.endB&&(b=CN(g.parent.content.cut(g.parentOffset,y.parentOffset),m.parent.content.cut(m.parentOffset,p.endA-m.start())))){let E=S(t.state.tr);b.type=="add"?E.addMark(k,w,b.mark):E.removeMark(k,w,b.mark),t.dispatch(E)}else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let E=g.parent.textBetween(g.parentOffset,y.parentOffset),N=()=>S(t.state.tr.insertText(E,k,w));t.someProp("handleTextInput",M=>M(t,k,w,E,N))||t.dispatch(N())}else t.dispatch(S());else t.dispatch(S())}function zm(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Yf(t,e.resolve(n.anchor),e.resolve(n.head))}function CN(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,s=r,o,l,a;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)s=n[c].removeFromSet(s);if(i.length==1&&s.length==0)l=i[0],o="add",a=c=>c.mark(l.addToSet(c.marks));else if(i.length==0&&s.length==1)l=s[0],o="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<e.childCount;c++)u.push(a(e.child(c)));if(T.from(u).eq(t))return{mark:l,type:o}}function EN(t,e,n,r,i){if(n-e<=i.pos-r.pos||Qu(r,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let l=s.nodeAfter;return l!=null&&n==e+l.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let o=t.resolve(Qu(s,!0,!0));return!o.parent.isTextblock||o.pos>n||Qu(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Qu(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function bN(t,e,n,r,i){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:o,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);
vendor: 4,448 bytes, line 394
394if(i=="end"){let a=Math.max(0,s-Math.min(o,l));r-=o+a-s}if(o<s&&t.size<e.size){let a=r<=s&&r>=o?s-r:0;s-=a,s&&s<e.size&&jm(e.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-o),o=s}else if(l<s){let a=r<=s&&r>=l?s-r:0;s-=a,s&&s<t.size&&jm(t.textBetween(s-1,s+1))&&(s+=a?1:-1),o=s+(o-l),l=s}return{start:s,endA:o,endB:l}}function jm(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class Cv{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new FM,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Vm),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=$m(this),Bm(this),this.nodeViews=Fm(this),this.docView=vm(this.state.doc,_m(this),Gu(this),this.dom,this),this.domObserver=new pN(this,(r,i,s,o)=>SN(this,r,i,s,o)),this.domObserver.start(),VM(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ed(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Vm),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(gv(this),o=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=Fm(this);NN(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ed(this),this.editable=$m(this),Bm(this);let a=Gu(this),u=_m(this),c=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,u,a);(d||!e.selection.eq(i.selection))&&(o=!0);let f=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&nM(this);if(o){this.domObserver.stop();let h=d&&(nt||De)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&MN(i.selection,e.selection);if(d){let p=De?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=nN(this)),(s||!this.docView.update(e.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=vm(e.doc,u,a,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&MM(this))?un(this,h):(iv(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&rM(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&fm(this,n.getBoundingClientRect(),e)}else fm(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,i=-1;
vendor: 5,208 bytes, line 394
394if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&s<this.state.doc.content.size&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new vv(e.slice,e.move,i<0?void 0:z.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let o=0;o<this.directPlugins.length;o++){let l=this.directPlugins[o].props[e];if(l!=null&&(i=n?n(l):l))return i}let s=this.state.plugins;if(s)for(let o=0;o<s.length;o++){let l=s[o].props[e];if(l!=null&&(i=n?n(l):l))return i}}hasFocus(){if(nt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&iM(this.dom),un(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return uM(this,e)}coordsAtPos(e,n=1){return Q1(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return pM(this,n||this.state,e)}pasteHTML(e,n){return Js(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Js(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Xf(this,e)}destroy(){this.docView&&(HM(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Gu(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,qb())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return WM(this,e)}domSelectionRange(){let e=this.domSelection();return e?Fe&&this.root.nodeType===11&&Yb(this.dom.ownerDocument)==this.dom&&gN(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Cv.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function _m(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Ue.node(0,t.state.doc.content.size,e)]}function Bm(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ue.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function $m(t){return!t.someProp("editable",e=>e(t.state)===!1)}function MN(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function Fm(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function NN(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function Vm(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Jn={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:"'"},ql={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},TN=typeof navigator<"u"&&/Mac/.test(navigator.platform),AN=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ie=0;Ie<10;Ie++)Jn[48+Ie]=Jn[96+Ie]=String(Ie);for(var Ie=1;Ie<=24;Ie++)Jn[Ie+111]="F"+Ie;for(var Ie=65;Ie<=90;Ie++)Jn[Ie]=String.fromCharCode(Ie+32),ql[Ie]=String.fromCharCode(Ie);for(var Yu in Jn)ql.hasOwnProperty(Yu)||(ql[Yu]=Jn[Yu]);function ON(t){var e=TN&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||AN&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?ql:Jn
vendor: 18,737 bytes, line 394
394)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const RN=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),IN=typeof navigator<"u"&&/Win/.test(navigator.platform);function DN(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,s,o;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))RN?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),o&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function LN(t){let e=Object.create(null);for(let n in t)e[DN(n)]=t[n];return e}function Xu(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function PN(t){return new ae({props:{handleKeyDown:Ev(t)}})}function Ev(t){let e=LN(t);return function(n,r){let i=ON(r),s,o=e[Xu(i,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[Xu(i,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(IN&&r.ctrlKey&&r.altKey)&&(s=Jn[r.keyCode])&&s!=i){let l=e[Xu(s,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}var zN=Object.defineProperty,ih=(t,e)=>{for(var n in e)zN(t,n,{get:e[n],enumerable:!0})};function Ya(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}var Xa=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([o,l])=>[o,(...u)=>{const c=l(...u)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,o=[],l=!!t,a=t||i.tr,u=()=>(!l&&e&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(a),o.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...p)=>{const g=this.buildProps(a,e),y=f(...p)(g);return o.push(y),c}])),run:u};return c}createCan(t){const{rawCommands:e,state:n}=this,r=!1,i=t||n.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...u)=>a(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,o={tr:t,editor:r,view:s,state:Ya({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,a])=>[l,(...u)=>a(...u)(o)]))}};return o}},bv={};ih(bv,{blur:()=>jN,clearContent:()=>_N,clearNodes:()=>BN,command:()=>$N,createParagraphNear:()=>FN,cut:()=>VN,deleteCurrentNode:()=>HN,deleteNode:()=>UN,deleteRange:()=>WN,deleteSelection:()=>qN,enter:()=>KN,exitCode:()=>JN,extendMarkRange:()=>GN,first:()=>QN,focus:()=>XN,forEach:()=>ZN,insertContent:()=>eT,insertContentAt:()=>rT,joinBackward:()=>oT,joinDown:()=>sT,joinForward:()=>lT,joinItemBackward:()=>aT,joinItemForward:()=>uT,joinTextblockBackward:()=>cT,joinTextblockForward:()=>dT,joinUp:()=>iT,keyboardShortcut:()=>hT,lift:()=>pT,liftEmptyBlock:()=>mT,liftListItem:()=>gT,newlineInCode:()=>yT,resetAttributes:()=>vT,scrollIntoView:()=>xT,selectAll:()=>kT,selectNodeBackward:()=>wT,selectNodeForward:()=>ST,selectParentNode:()=>CT,selectTextblockEnd:()=>ET,selectTextblockStart:()=>bT,setContent:()=>MT,setMark:()=>KT,setMeta:()=>JT,setNode:()=>GT,setNodeSelection:()=>QT,setTextDirection:()=>YT,setTextSelection:()=>XT,sinkListItem:()=>ZT,splitBlock:()=>e2,splitListItem:()=>t2,toggleList:()=>r2,toggleMark:()=>i2,toggleNode:()=>s2,toggleWrap:()=>o2,undoInputRule:()=>l2,unsetAllMarks:()=>a2,unsetMark:()=>u2,unsetTextDirection:()=>c2,updateAttributes:()=>d2,wrapIn:()=>f2,wrapInList:()=>h2});var jN=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),_N=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),BN=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:o})=>{t.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(a)),f=u.resolve(c.map(a+l.nodeSize)),h=d.blockRange(f);if(!h)return;const p=Li(h);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,g)}(p||p===0)&&e.lift(h,p)})}),!0},$N=t=>e=>t(e),FN=()=>({state:t,dispatch:e})=>Ib(t,e),VN=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new j(r.doc.resolve(Math.max(o-1,0)))),!0},HN=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const l=i.before(s),a=i.after(s);t.delete(l,a).scrollIntoView()}return!0}return!1};function ke(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var UN=t=>({tr:e,state:n,dispatch:r})=>{const i=ke(t,n.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const a=s.before(o),u=s.after(o);e.delete(a,u).scrollIntoView()}return!0}return!1},WN=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},qN=()=>({state:t,dispatch:e})=>kb(t,e),KN=()=>({commands:t})=>t.keyboardShortcut("Enter"),JN=()=>({state:t,dispatch:e})=>Rb(t,e);function sh(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Kl(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:sh(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function Mv(t,e,n={}){return t.find(r=>r.type===e&&Kl(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function Hm(t,e,n={}){return!!Mv(t,e,n)}function oh(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(u=>u.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(u=>u.type===e))return;if(!n){const u=r.node.marks.find(c=>c.type===e);u&&(n=u.attrs)}if(!Mv([...r.node.marks],e,n))return;let s=r.index,o=t.start()+r.offset,l=s+1,a=o+r.node.nodeSize;for(;s>0&&Hm([...t.parent.child(s-1).marks],e,n);)s-=1,o-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&Hm([...t.parent.child(l).marks],e,n);)a+=t.parent.child(l).nodeSize,l+=1;return{from:o,to:a}}function gn(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var GN=(t,e)=>({tr:n,state:r,dispatch:i})=>{const s=gn(t,r.schema),{doc:o,selection:l}=n,{$from:a,from:u,to:c}=l;if(i){const d=oh(a,s,e);if(d&&d.from<=u&&d.to>=c){const f=j.create(o,d.from,d.to);n.setSelection(f)}}return!0},QN=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function Nv(t){return t instanceof j}function hr(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Tv(t,e=null){if(!e)return null;const n=F.atStart(t),r=F.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,s=r.to;return e==="all"?j.create(t,hr(0,i,s),hr(t.content.size,i,s)):j.create(t,hr(e,i,s),hr(e,i,s))}function Um(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Jl(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function YN(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var XN=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(Jl()||Um())&&r.dom.focus(),YN()&&!Jl()&&!Um()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(s&&t===null&&!Nv(n.state.selection))return o(),!0;const l=Tv(i.doc,t)||n.state.selection,a=n.state.selection.eq(l);return s&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},ZN=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),eT=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),Av=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&Av(r)}return t};function zo(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return Av(n)}function Qs(t,e,n){if(t instanceof Lt||t instanceof T)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,i=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return T.fromArray(t.map(l=>e.nodeFromJSON(l)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),Qs("",e,n)}if(i){if(n.errorOnInvalidContent){let o=!1,l="";const a=new v1({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Vn.fromSchema(a).parseSlice(zo(t),n.parseOptions):Vn.fromSchema(a).parse(zo(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const s=Vn.fromSchema(e);return n.slice?s.parseSlice(zo(t),n.parseOptions).content:s.parse(zo(t),n.parseOptions)}return Qs("",e,n)}function tT(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof ye||i instanceof Ne))return;const s=t.mapping.maps[r];let o=0;s.forEach((l,a,u,c)=>{o===0&&(o=c)}),t.setSelection(F.near(t.doc.resolve(o),n))}var nT=t=>!("type"in t),rT=(t,e,n)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const a=y=>{s.emit("contentError",{editor:s,error:y,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Qs(e,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(y){a(y)}try{l=Qs(e,s.schema,{parseOptions:u,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(y){return a(y),!1}let{from:c,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},f=!0,h=!0;if((nT(l)?l:[l]).forEach(y=>{y.check(),f=f?y.isText&&y.marks.length===0:!1,h=h?y.isBlock:!1}),c===d&&h){const{parent:y}=r.doc.resolve(c);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(c-=1,d+=1)}let g;if(f){if(Array.isArray(e))g=e.map(y=>y.text||"").join("");else if(e instanceof T){let y="";e.forEach(m=>{m.text&&(y+=m.text)}),g=y}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,c,d)}else{g=l;const y=r.doc.resolve(c),m=y.node(),v=y.parentOffset===0,k=m.isText||m.isTextblock,w=m.content.size>0;v&&k&&w&&h&&(c=Math.max(0,c-1)),r.replaceWith(c,d,g)}n.updateSelection&&tT(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:g})}return!0},iT=()=>({state:t,dispatch:e})=>Nb(t,e),sT=()=>({state:t,dispatch:e})=>Tb(t,e),oT=()=>({state:t,dispatch:e})=>wb(t,e),lT=()=>({state:t,dispatch:e})=>bb(t,e),aT=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Wa(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},uT=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Wa(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},cT=()=>({state:t,dispatch:e})=>Sb(t,e),dT=()=>({state:t,dispatch:e})=>Cb(t,e);function Ov(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function fT(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,s,o;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))Jl()||Ov()?o=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}var hT=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const s=fT(t).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a==null||a.steps.forEach(u=>{const c=u.map(r.mapping);c&&i&&r.maybeStep(c)}),!0};function Gn(t,e,n={}){const{from:r,to:i,empty:s}=t.selection,o=e?ke(e,t.schema):null,l=[];t.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);l.push({node:d,from:h,to:p})});const a=i-r,u=l.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>Kl(d.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=a}var pT=(t,e={})=>({state:n,dispatch:r})=>{const i=ke(t,n.schema);return Gn(n,i,e)?Ab(n,r):!1},mT=()=>({state:t,dispatch:e})=>Db(t,e),gT=t=>({state:e,dispatch:n})=>{const r=ke(t,e.schema);return Vb(r)(e,n)},yT=()=>({state:t,dispatch:e})=>Ob(t,e);function Za(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Wm(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}var vT=(t,e)=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const l=Za(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(s=ke(t,r.schema)),l==="mark"&&(o=gn(t,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{s&&s===c.type&&(a=!0,i&&n.setNodeMarkup(d,void 0,Wm(c.attrs,e))),o&&c.marks.length&&c.marks.forEach(f=>{o===f.type&&(a=!0,i&&n.addMark(d,d+c.nodeSize,o.create(Wm(f.attrs,e))))})})}),a},xT=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),kT=()=>({tr:t,dispatch:e})=>{if(e){const n=new xt(t.doc);t.setSelection(n)}return!0},wT=()=>({state:t,dispatch:e})=>Eb(t,e),ST=()=>({state:t,dispatch:e})=>Mb(t,e),CT=()=>({state:t,dispatch:e})=>Lb(t,e),ET=()=>({state:t,dispatch:e})=>jb(t,e),bT=()=>({state:t,dispatch:e})=>zb(t,e);function bd(t,e,n={},r={}){return Qs(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var MT=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:l})=>{const{doc:a}=s;if(r.preserveWhitespace!=="full"){const u=bd(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return o&&s.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!n),!0}return o&&s.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:a.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function Rv(t,e){const n=gn(e,t.schema),{from:r,to:i,empty:s}=t.selection,o=[];s?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,a=>{o.push(...a.marks)});const l=o.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function Iv(t,e){const n=new L1(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function NT(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function TT(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function AT(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function eu(t){return e=>AT(e.$from,t)}function P(t,e,n){return t.config[e]===void 0&&t.parent?P(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?P(t.parent,e,n):null}):t.config[e]}function lh(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=P(e,"addExtensions",n);return r?[e,...lh(r())]:e}).flat(10)}function ah(t,e){const n=zr.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Dv(t){return typeof t=="function"}function W(t,e=void 0,...n){return Dv(t)?e?t.bind(e)(...n):t(...n):t}function OT(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Mi(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Lv(t){const e=[],{nodeExtensions:n,markExtensions:r}=Mi(t),i=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(u=>u.name!=="text").map(u=>u.name),l=r.map(u=>u.name),a=[...o,...l];return t.forEach(u=>{const c={name:u.name,options:u.options,storage:u.storage,extensions:i},d=P(u,"addGlobalAttributes",c);if(!d)return;d().forEach(h=>{let p;Array.isArray(h.types)?p=h.types:h.types==="*"?p=a:h.types==="nodes"?p=o:h.types==="marks"?p=l:p=[],p.forEach(g=>{Object.entries(h.attributes).forEach(([y,m])=>{e.push({type:g,name:y,attribute:{...s,...m}})})})})}
394),i.forEach(u=>{const c={name:u.name,options:u.options,storage:u.storage},d=P(u,"addAttributes",c);if(!d)return;const f=d();Object.entries(f).forEach(([h,p])=>{const g={...s,...p};typeof(g==null?void 0:g.default)=="function"&&(g.default=g.default()),g!=null&&g.isRequired&&(g==null?void 0:g.default)===void 0&&delete g.default,e.push({type:u.name,name:h,attribute:g})})}),e}function RT(t){const e=[];let n="",r=!1,i=!1,s=0;const o=t.length;for(let l=0;l<o;l+=1){const a=t[l];if(a==="'"&&!i){r=!r,n+=a;continue}if(a==='"'&&!r){i=!i,n+=a;continue}if(!r&&!i){if(a==="("){s+=1,n+=a;continue}if(a===")"&&s>0){s-=1,n+=a;continue}if(a===";"&&s===0){e.push(n),n="";continue}}n+=a}return n&&e.push(n),e}function qm(t){const e=[],n=RT(t||""),r=n.length;for(let i=0;i<r;i+=1){const s=n[i],o=s.indexOf(":");if(o===-1)continue;const l=s.slice(0,o).trim(),a=s.slice(o+1).trim();l&&a&&e.push([l,a])}return e}function me(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const l=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],u=l.filter(c=>!a.includes(c));r[i]=[...a,...u].join(" ")}else if(i==="style"){const l=new Map([...qm(r[i]),...qm(s)]);r[i]=Array.from(l.entries()).map(([a,u])=>`${a}: ${u}`).join("; ")}else r[i]=s}),r},{})}function Ys(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>me(n,r),{})}function IT(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function Km(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((s,o)=>{const l=o.attribute.parseHTML?o.attribute.parseHTML(n):IT(n.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...r,...i}}}}function Jm(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&OT(n)?!1:n!=null))}function Gm(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function DT(t,e){var n;const r=Lv(t),{nodeExtensions:i,markExtensions:s}=Mi(t),o=(n=i.find(u=>P(u,"topNode")))==null?void 0:n.name,l=Object.fromEntries(i.map(u=>{const c=r.filter(m=>m.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},f=t.reduce((m,v)=>{const k=P(v,"extendNodeSchema",d);return{...m,...k?k(u):{}}},{}),h=Jm({...f,content:W(P(u,"content",d)),marks:W(P(u,"marks",d)),group:W(P(u,"group",d)),inline:W(P(u,"inline",d)),atom:W(P(u,"atom",d)),selectable:W(P(u,"selectable",d)),draggable:W(P(u,"draggable",d)),code:W(P(u,"code",d)),whitespace:W(P(u,"whitespace",d)),linebreakReplacement:W(P(u,"linebreakReplacement",d)),defining:W(P(u,"defining",d)),isolating:W(P(u,"isolating",d)),attrs:Object.fromEntries(c.map(Gm))}),p=W(P(u,"parseHTML",d));p&&(h.parseDOM=p.map(m=>Km(m,c)));const g=P(u,"renderHTML",d);g&&(h.toDOM=m=>g({node:m,HTMLAttributes:Ys(m,c)}));const y=P(u,"renderText",d);return y&&(h.toText=y),[u.name,h]})),a=Object.fromEntries(s.map(u=>{const c=r.filter(y=>y.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},f=t.reduce((y,m)=>{const v=P(m,"extendMarkSchema",d);return{...y,...v?v(u):{}}},{}),h=Jm({...f,inclusive:W(P(u,"inclusive",d)),excludes:W(P(u,"excludes",d)),group:W(P(u,"group",d)),spanning:W(P(u,"spanning",d)),code:W(P(u,"code",d)),attrs:Object.fromEntries(c.map(Gm))}),p=W(P(u,"parseHTML",d));p&&(h.parseDOM=p.map(y=>Km(y,c)));const g=P(u,"renderHTML",d);return g&&(h.toDOM=y=>g({mark:y,HTMLAttributes:Ys(y,c)})),[u.name,h]}));return new v1({topNode:o,nodes:l,marks:a})}function LT(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function vs(t){return t.sort((n,r)=>{const i=P(n,"priority")||100,s=P(r,"priority")||100;return i>s?-1:i<s?1:0})}function Pv(t){const e=vs(lh(t)),n=LT(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function zv(t,e,n){const{from:r,to:i}=e,{blockSeparator:s=`
395
396`,textSerializers:o={}}=n||{};let l="";return t.nodesBetween(r,i,(a,u,c,d)=>{var f;a.isBlock&&u>r&&(l+=s);const h=o==null?void 0:o[a.type.name];if(h)return c&&(l+=h({node:a,pos:u,parent:c,index:d,range:e})),!1;a.isText&&(l+=(f=a==null?void 0:a.text)==null?void 0:f.slice(Math.max(r,u)-u,i-u))}),l}function PT(t,e){const n={from:0,to:t.content.size};return zv(t,n,e)}function jv(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function zT(t,e){const n=ke(e,t.schema),{from:r,to:i}=t.selection,s=[];t.doc.nodesBetween(r,i,l=>{s.push(l)});const o=s.reverse().find(l=>l.type.name===n.name);return o?{...o.attrs}:{}}function _v(t,e){const n=Za(typeof e=="string"?e:e.name,t.schema);return n==="node"?zT(t,e):n==="mark"?Rv(t,e):{}}function jT(t,e=JSON.stringify){const n={};return t.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function _T(t){const e=jT(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,o)=>o!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function Bv(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((l,a)=>{o.push({from:l,to:a})});else{const{from:l,to:a}=n[s];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{const u=e.slice(s).map(l,-1),c=e.slice(s).map(a),d=e.invert().map(u,-1),f=e.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),_T(r)}function uh(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const s=n.resolve(t),o=oh(s,i.type);o&&r.push({mark:i,...o})}):n.nodesBetween(t,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var BT=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let s=r,o=null;for(;s>0&&o===null;){const l=i.node(s);(l==null?void 0:l.type.name)===e?o=l:s-=1}return[o,s]};function Wi(t,e){return e.nodes[t]||e.marks[t]||null}function al(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var $T=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,l)=>{var a,u;const c=((u=(a=i.type.spec).toText)==null?void 0:u.call(a,{node:i,pos:s,parent:o,index:l}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,r-s))}),n};function Md(t,e,n={}){const{empty:r,ranges:i}=t.selection,s=e?gn(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>Kl(d.attrs,n,{strict:!1}));let o=0;const l=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;t.doc.nodesBetween(h,p,(g,y)=>{if(s&&g.inlineContent&&!g.type.allowsMarkType(s))return!1;if(!g.isText&&!g.marks.length)return;const m=Math.max(h,y),v=Math.min(p,y+g.nodeSize),k=v-m;o+=k,l.push(...g.marks.map(w=>({mark:w,from:m,to:v})))})}),o===0)return!1;const a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>Kl(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+u:a)>=o}function FT(t,e,n={}){if(!e)return Gn(t,null,n)||Md(t,null,n);const r=Za(e,t.schema);return r==="node"?Gn(t,e,n):r==="mark"?Md(t,e,n):!1}var VT=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const s=eu(l=>l.type.name===e)(t.selection);if(!s)return!1;const o=t.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},HT=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Qm(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Zu(t,e){const{nodeExtensions:n}=Mi(e),r=n.find(o=>o.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=W(P(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function tu(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;
vendor: 30,448 bytes, lines 396-437
396if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(s=>{i!==!1&&(tu(s,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function $v(t){return t instanceof z}var Fv=class Vv{constructor(e){this.position=e}static fromJSON(e){return new Vv(e.position)}toJSON(){return{position:this.position}}};function UT(t,e){const n=e.mapping.mapResult(t.position);return{position:new Fv(n.pos),mapResult:n}}function WT(t){return new Fv(t)}function qT(t,e,n){var r;const{selection:i}=e;let s=null;if(Nv(i)&&(s=i.$cursor),s){const l=(r=t.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(u=>u.type.excludes(n)))}const{ranges:o}=i;return o.some(({$from:l,$to:a})=>{let u=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,a.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){const h=!f||f.type.allowsMarkType(n),p=!!n.isInSet(c.marks)||!c.marks.some(g=>g.type.excludes(n));u=h&&p}return!u}),u})}var KT=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:o,ranges:l}=s,a=gn(t,r.schema);if(i)if(o){const u=Rv(r,a);n.addStoredMark(a.create({...u,...e}))}else l.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,h)=>{const p=Math.max(h,c),g=Math.min(h+f.nodeSize,d);f.marks.find(m=>m.type===a)?f.marks.forEach(m=>{a===m.type&&n.addMark(p,g,a.create({...m.attrs,...e}))}):n.addMark(p,g,a.create(e))})});return qT(r,n,a)},JT=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),GT=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const s=ke(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:l})=>um(s,{...o,...e})(n)?!0:l.clearNodes()).command(({state:l})=>um(s,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},QT=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=hr(t,0,r.content.size),s=z.create(r,i);e.setSelection(s)}return!0},YT=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;let o,l;return typeof e=="number"?(o=e,l=e):e&&"from"in e&&"to"in e?(o=e.from,l=e.to):(o=s.from,l=s.to),i&&n.doc.nodesBetween(o,l,(a,u)=>{a.isText||n.setNodeMarkup(u,void 0,{...a.attrs,dir:t})}),!0},XT=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,o=j.atStart(r).from,l=j.atEnd(r).to,a=hr(i,o,l),u=hr(s,o,l),c=j.create(r,a,u);e.setSelection(c)}return!0},ZT=t=>({state:e,dispatch:n})=>{const r=ke(t,e.schema);return Wb(r)(e,n)};function Ym(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}var e2=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:o}=e,{$from:l,$to:a}=s,u=i.extensionManager.attributes,c=al(u,l.node().type.name,l.node().attrs);if(s instanceof z&&s.node.isBlock)return!l.parentOffset||!di(o,l.pos)?!1:(r&&(t&&Ym(n,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:NT(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=d&&f?[{type:f,attrs:c}]:void 0,p=di(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&di(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:c}]:void 0),r){if(p&&(s instanceof j&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){const g=e.mapping.map(l.before()),y=e.doc.resolve(g);l.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}t&&Ym(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},t2=(t,e={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var o;const l=ke(t,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;const d=a.node(-1);if(d.type!==l)return!1;const f=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let m=T.empty;const v=a.index(-1)?1:a.index(-2)?2:3;for(let N=a.depth-v;N>=a.depth-3;N-=1)m=T.from(a.node(N).copy(m));const k=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,w={...al(f,a.node().type.name,a.node().attrs),...e},S=((o=l.contentMatch.defaultType)==null?void 0:o.createAndFill(w))||void 0;m=m.append(T.from(l.createAndFill(null,S)||void 0));const b=a.before(a.depth-(v-1));n.replace(b,a.after(-k),new I(m,4-v,0));let E=-1;n.doc.nodesBetween(b,n.doc.content.size,(N,M)=>{if(E>-1)return!1;N.isTextblock&&N.content.size===0&&(E=M+1)}),E>-1&&n.setSelection(j.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}const h=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,p={...al(f,d.type.name,d.attrs),...e},g={...al(f,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,u.pos);const y=h?[{type:l,attrs:p},{type:h,attrs:g}]:[{type:l,attrs:p}];if(!di(n.doc,a.pos,2))return!1;if(i){const{selection:m,storedMarks:v}=r,{splittableMarks:k}=s.extensionManager,w=v||m.$to.parentOffset&&m.$from.marks();if(n.split(a.pos,2,y).scrollIntoView(),!w||!i)return!0;const S=w.filter(b=>k.includes(b.type.name));n.ensureMarks(S)}return!0},ec=(t,e)=>{const n=eu(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Zn(t.doc,n.pos)&&t.join(n.pos),!0},tc=(t,e)=>{const n=eu(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Zn(t.doc,r)&&t.join(r),!0};function n2(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),i=e.resolve(n.nodeSize-1);return j.between(r,i)}var r2=(t,e,n,r={})=>({editor:i,tr:s,state:o,dispatch:l,chain:a,commands:u,can:c})=>{const{extensions:d,splittableMarks:f}=i.extensionManager,h=ke(t,o.schema),p=ke(e,o.schema),{selection:g,storedMarks:y}=o,{$from:m,$to:v}=g,k=m.blockRange(v),w=y||g.$to.parentOffset&&g.$from.marks();if(!k)return!1;const S=eu(G=>Zu(G.type.name,d))(g),b=g.from===0&&g.to===o.doc.content.size,E=o.doc.content.content,N=E.length===1?E[0]:null,M=b&&N&&Zu(N.type.name,d)?{node:N,pos:0,depth:0}:null,R=S??M,_=!!S&&k.depth>=1&&k.depth-S.depth<=1,Z=!!M;if((_||Z)&&R){if(R.node.type===h)return b&&Z?a().command(({tr:G,dispatch:ue})=>{const ee=n2(G);return ee?(G.setSelection(ee),ue&&ue(G),!0):!1}).liftListItem(p).run():u.liftListItem(p);if(Zu(R.node.type.name,d)&&h.validContent(R.node.content))return a().command(()=>(s.setNodeMarkup(R.pos,h),!0)).command(()=>ec(s,h)).command(()=>tc(s,h)).run()}return!n||!w||!l?a().command(()=>c().wrapInList(h,r)?!0:u.clearNodes()).wrapInList(h,r).command(()=>ec(s,h)).command(()=>tc(s,h)).run():a().command(()=>{const G=c().wrapInList(h,r),ue=w.filter(ee=>f.includes(ee.type.name));return s.ensureMarks(ue),G?!0:u.clearNodes()}).wrapInList(h,r).command(()=>ec(s,h)).command(()=>tc(s,h)).run()},i2=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,o=gn(t,r.schema);return Md(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},s2=(t,e,n={})=>({state:r,commands:i})=>{const s=ke(t,r.schema),o=ke(e,r.schema),l=Gn(r,s,n);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?i.setNode(o,a):i.setNode(s,{...a,...n})},o2=(t,e={})=>({state:n,commands:r})=>{const i=ke(t,n.schema);return Gn(n,i,e)?r.lift(i):r.wrapIn(i,e)},l2=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(t))){if(e){const o=t.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,t.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},a2=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},u2=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:l}=n,a=gn(t,r.schema),{$from:u,empty:c,ranges:d}=l;if(!i)return!0;if(c&&o){let{from:f,to:h}=l;const p=(s=u.marks().find(y=>y.type===a))==null?void 0:s.attrs,g=oh(u,a,p);g&&(f=g.from,h=g.to),n.removeMark(f,h,a)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},c2=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let s,o;return typeof t=="number"?(s=t,o=t):t&&"from"in t&&"to"in t?(s=t.from,o=t.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(l,a)=>{if(l.isText)return;const u={...l.attrs};delete u.dir,e.setNodeMarkup(a,void 0,u)}),!0},d2=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const l=Za(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(s=ke(t,r.schema)),l==="mark"&&(o=gn(t,r.schema));let a=!1;return n.selection.ranges.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;let f,h,p,g;n.selection.empty?r.doc.nodesBetween(c,d,(y,m)=>{s&&s===y.type&&(a=!0,p=Math.max(m,c),g=Math.min(m+y.nodeSize,d),f=m,h=y)}):r.doc.nodesBetween(c,d,(y,m)=>{m<c&&s&&s===y.type&&(a=!0,p=Math.max(m,c),g=Math.min(m+y.nodeSize,d),f=m,h=y),m>=c&&m<=d&&(s&&s===y.type&&(a=!0,i&&n.setNodeMarkup(m,void 0,{...y.attrs,...e})),o&&y.marks.length&&y.marks.forEach(v=>{if(o===v.type&&(a=!0,i)){const k=Math.max(m,c),w=Math.min(m+y.nodeSize,d);n.addMark(k,w,o.create({...v.attrs,...e}))}}))}),h&&(f!==void 0&&i&&n.setNodeMarkup(f,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(y=>{o===y.type&&i&&n.addMark(p,g,o.create({...y.attrs,...e}))}))}),a},f2=(t,e={})=>({state:n,dispatch:r})=>{const i=ke(t,n.schema);return _b(i,e)(n,r)},h2=(t,e={})=>({state:n,dispatch:r})=>{const i=ke(t,n.schema);return Bb(i,e)(n,r)},p2=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},nu=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},m2=(t,e)=>{if(sh(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function jo(t){var e;const{editor:n,from:r,to:i,text:s,rules:o,plugin:l}=t,{view:a}=n;if(a.composing)return!1;const u=a.state.doc.resolve(r);if(u.parent.type.spec.code||(e=u.nodeBefore||u.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let c=!1;const d=$T(u)+s;return o.forEach(f=>{if(c)return;const h=m2(d,f.find);if(!h)return;const p=a.state.tr,g=Ya({state:a.state,transaction:p}),y={from:r-(h[0].length-s.length),to:i},{commands:m,chain:v,can:k}=new Xa({editor:n,state:g});f.handler({state:g,range:y,match:h,commands:m,chain:v,can:k})===null||!p.steps.length||(f.undoable&&p.setMeta(l,{transform:p,from:r,to:i,text:s}),a.dispatch(p),c=!0)}),c}function g2(t){const{editor:e,rules:n}=t,r=new ae({state:{init(){return null},apply(i,s,o){const l=i.getMeta(r);if(l)return l;const a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=ah(T.from(c),o.schema);const{from:d}=a,f=d+c.length;jo({editor:e,from:d,to:f,text:c,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,l){return jo({editor:e,from:s,to:o,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&jo({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?jo({editor:e,from:o.pos,to:o.pos,text:`
397`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function y2(t){return Object.prototype.toString.call(t).slice(8,-1)}function _o(t){return y2(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Hv(t,e){const n={...t};return _o(t)&&_o(e)&&Object.keys(e).forEach(r=>{_o(e[r])&&_o(t[r])?n[r]=Hv(t[r],e[r]):n[r]=e[r]}),n}var ch=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...W(P(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...W(P(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Hv(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},jr=class Uv extends ch{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new Uv(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const a=o.find(u=>(u==null?void 0:u.type.name)===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function v2(t){return typeof t=="number"}var x2=class{constructor(t){this.find=t.find,this.handler=t.handler}},k2=(t,e,n)=>{if(sh(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function w2(t){const{editor:e,state:n,from:r,to:i,rule:s,pasteEvent:o,dropEvent:l}=t,{commands:a,chain:u,can:c}=new Xa({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,i,(h,p)=>{var g,y,m,v,k;if((y=(g=h.type)==null?void 0:g.spec)!=null&&y.code||!(h.isText||h.isTextblock||h.isInline))return;const w=(k=(v=(m=h.content)==null?void 0:m.size)!=null?v:h.nodeSize)!=null?k:0,S=Math.max(r,p),b=Math.min(i,p+w);if(S>=b)return;const E=h.isText?h.text||"":h.textBetween(S-p,b-p,void 0,"");k2(E,s.find,o).forEach(M=>{if(M.index===void 0)return;const R=S+M.index+1,_=R+M[0].length,Z={from:n.tr.mapping.map(R),to:n.tr.mapping.map(_)},G=s.handler({state:n,range:Z,match:M,commands:a,chain:u,can:c,pasteEvent:o,dropEvent:l});d.push(G)})}),d.every(h=>h!==null)}var Bo=null,S2=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function C2(t){const{editor:e,rules:n}=t;let r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const a=({state:c,from:d,to:f,rule:h,pasteEvt:p})=>{const g=c.tr,y=Ya({state:c,transaction:g});if(!(!w2({editor:e,state:y,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!g.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(c=>new ae({view(d){const f=p=>{var g;r=(g=d.dom.parentElement)!=null&&g.contains(p.target)?d.dom.parentElement:null,r&&(Bo=e)},h=()=>{Bo&&(Bo=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=r===d.dom.parentElement,l=f,!s){const h=Bo;h!=null&&h.isEditable&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,f)=>{var h;const p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return o=f,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const p=d[0],g=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,m=p.getMeta("applyPasteRules"),v=!!m;if(!g&&!y&&!v)return;if(v){let{text:S}=m;typeof S=="string"?S=S:S=ah(T.from(S),h.schema);const{from:b}=m,E=b+S.length,N=S2(S);return a({rule:c,state:h,from:b,to:{b:E},pasteEvt:N})}const k=f.doc.content.findDiffStart(h.doc.content),w=f.doc.content.findDiffEnd(h.doc.content);if(!(!v2(k)||!w||k===w.b))return a({rule:c,state:h,from:k,to:w,pasteEvt:o})}}))}var ru=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Pv(t),this.schema=DT(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Wi(e.name,this.schema)},r=P(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return vs([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:Wi(r.name,this.schema)},s=[],o=P(r,"addKeyboardShortcuts",i);let l={};if(r.type==="mark"&&P(r,"exitable",i)&&(l.ArrowRight=()=>jr.handleExit({editor:t,mark:r})),o){const f=Object.fromEntries(Object.entries(o()).map(([h,p])=>[h,()=>p({editor:t})]));l={...l,...f}}const a=PN(l);s.push(a);const u=P(r,"addInputRules",i);if(Qm(r,t.options.enableInputRules)&&u){const f=u();if(f&&f.length){const h=g2({editor:t,rules:f}),p=Array.isArray(h)?h:[h];s.push(...p)}}const c=P(r,"addPasteRules",i);if(Qm(r,t.options.enablePasteRules)&&c){const f=c();if(f&&f.length){const h=C2({editor:t,rules:f});s.push(...h)}}const d=P(r,"addProseMirrorPlugins",i);if(d){const f=d();s.push(...f)}return s})}get attributes(){return Lv(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Mi(this.extensions);return Object.fromEntries(e.filter(n=>!!P(n,"addNodeView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ke(n.name,this.schema)},s=P(n,"addNodeView",i);if(!s)return[];const o=s();if(!o)return[];const l=(a,u,c,d,f)=>{const h=Ys(a,r);return o({node:a,view:u,getPos:c,decorations:d,innerDecorations:f,editor:t,extension:n,HTMLAttributes:h})};return[n.name,l]}))}dispatchTransaction(t){const{editor:e}=this;return vs([...this.extensions].reverse()).reduceRight((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:Wi(i.name,this.schema)},o=P(i,"dispatchTransaction",s);return o?l=>{o.call(s,{transaction:l,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return vs([...this.extensions]).reduce((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:Wi(i.name,this.schema)},o=P(i,"transformPastedHTML",s);return o?(l,a)=>{const u=r(l,a);return o.call(s,u)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Mi(this.extensions);return Object.fromEntries(e.filter(n=>!!P(n,"addMarkView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:gn(n.name,this.schema)},s=P(n,"addMarkView",i);if(!s)return[];const o=(l,a,u)=>{const c=Ys(l,r);return s()({mark:l,view:a,inline:u,editor:t,extension:n,HTMLAttributes:c,updateAttributes:d=>{_2(l,t,d)}})};return[n.name,o]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Wi(e.name,this.schema)};e.type==="mark"&&((n=W(P(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const i=P(e,"onBeforeCreate",r),s=P(e,"onCreate",r),o=P(e,"onUpdate",r),l=P(e,"onSelectionUpdate",r),a=P(e,"onTransaction",r),u=P(e,"onFocus",r),c=P(e,"onBlur",r),d=P(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};ru.resolve=Pv;ru.sort=vs;ru.flatten=lh;var E2={};ih(E2,{ClipboardTextSerializer:()=>qv,Commands:()=>Kv,Delete:()=>Jv,Drop:()=>Gv,Editable:()=>Qv,FocusEvents:()=>Xv,Keymap:()=>Zv,Paste:()=>ex,Tabindex:()=>tx,TextDirection:()=>nx,focusEventsPluginKey:()=>Yv});var ge=class Wv extends ch{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new Wv(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},qv=ge.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ae({key:new Ce("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),l=Math.max(...s.map(c=>c.$to.pos)),a=jv(n);return zv(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Kv=ge.create({name:"commands",addCommands(){return{...bv}}}),Jv=ge.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const s=()=>{var o,l,a,u;if((u=(a=(l=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,t))!=null?u:t.getMeta("y-sync$"))return;const c=Iv(t.before,[t,...e]);Bv(c).forEach(h=>{c.mapping.mapResult(h.oldRange.from).deletedAfter&&c.mapping.mapResult(h.oldRange.to).deletedBefore&&c.before.nodesBetween(h.oldRange.from,h.oldRange.to,(p,g)=>{const y=g+p.nodeSize-2,m=h.oldRange.from<=g&&y<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:g,to:y,newFrom:c.mapping.map(g),newTo:c.mapping.map(y),deletedRange:h.oldRange,newRange:h.newRange,partial:!m,editor:this.editor,transaction:t,combinedTransform:c})})});const f=c.mapping;c.steps.forEach((h,p)=>{var g,y;if(h instanceof Ot){const m=f.slice(p).map(h.from,-1),v=f.slice(p).map(h.to),k=f.invert().map(m,-1),w=f.invert().map(v),S=m>0?(g=c.doc.nodeAt(m-1))==null?void 0:g.marks.some(E=>E.eq(h.mark)):!1,b=(y=c.doc.nodeAt(v))==null?void 0:y.marks.some(E=>E.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:k,to:w},newRange:{from:m,to:v},partial:!!(b||S),editor:this.editor,transaction:t,combinedTransform:c})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),Gv=ge.create({name:"drop",addProseMirrorPlugins(){return[new ae({key:new Ce("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Qv=ge.create({name:"editable",addProseMirrorPlugins(){return[new ae({key:new Ce("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Yv=new Ce("focusEvents"),Xv=ge.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ae({key:Yv,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Zv=ge.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{const{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:f,parent:h}=d,p=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,g=p.parent.type.spec.isolating,y=d.pos-d.parentOffset,m=g&&p.parent.childCount===1?y===d.pos:F.atStart(u).from===f;return!c||!h.type.isTextblock||h.textContent.length||!m||m&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Jl()||Ov()?s:i},addProseMirrorPlugins(){return[new ae({key:new Ce("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(g=>g.getMeta("composition")))return;const r=t.some(g=>g.docChanged)&&!e.doc.eq(n.doc),i=t.some(g=>g.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:o,to:l}=e.selection,a=F.atStart(e.doc).from,u=F.atEnd(e.doc).to;if(s||!(o===a&&l===u)||!tu(n.doc))return;const f=n.tr,h=Ya({state:n,transaction:f}),{commands:p}=new Xa({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),ex=ge.create({name:"paste",addProseMirrorPlugins(){return[new ae({key:new Ce("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),tx=ge.create({name:"tabindex",addProseMirrorPlugins(){return[new ae({key:new Ce("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),nx=ge.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Mi(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ae({key:new Ce("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),b2=class ns{constructor(e,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ns(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ns(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ns(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,o=n.isInline,l=this.pos+r+(s?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(l);if(!i&&!o&&a.depth<=this.depth)return;const u=new ns(a,this.editor,i,i||o?n:null);i&&(u.actualDepth=this.depth+1),e.push(u)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(n).length>0){const s=i.node.attrs,o=Object.keys(n);for(let l=0;l<o.length;l+=1){const a=o[l];if(s[a]!==n[a])break}}else r=i;i=i.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const s=Object.keys(n);return this.children.forEach(o=>{r&&i.length>0||(o.node.type.name===e&&s.every(a=>n[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,n,r))))}),i}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},M2=`.ProseMirror {
398  position: relative;
399}
400
401.ProseMirror {
402  word-wrap: break-word;
403  white-space: pre-wrap;
404  white-space: break-spaces;
405  -webkit-font-variant-ligatures: none;
406  font-variant-ligatures: none;
407  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
408}
409
410.ProseMirror [contenteditable="false"] {
411  white-space: normal;
412}
413
414.ProseMirror [contenteditable="false"] [contenteditable="true"] {
415  white-space: pre-wrap;
416}
417
418.ProseMirror pre {
419  white-space: pre-wrap;
420}
421
422img.ProseMirror-separator {
423  display: inline !important;
424  border: none !important;
425  margin: 0 !important;
426  width: 0 !important;
427  height: 0 !important;
428}
429
430.ProseMirror-gapcursor {
431  display: none;
432  pointer-events: none;
433  position: absolute;
434  margin: 0;
435}
436
437.ProseMirror-gapcursor:after {
438  content: "";
439  display: block;
440  position: absolute;
441  top: -2px;
442  width: 20px;
443  border-top: 1px solid black;
444  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
445}
446
447@keyframes ProseMirror-cursor-blink {
448  to {
449    visibility: hidden;
450  }
451}
452
453.ProseMirror-hideselection *::selection {
454  background: transparent;
455}
456
457.ProseMirror-hideselection *::-moz-selection {
458  background: transparent;
459}
460
461.ProseMirror-hideselection * {
462  caret-color: transparent;
463}
464
465.ProseMirror-focused .ProseMirror-gapcursor {
466  display: block;
467}`;function N2(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}var T2=class extends p2{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:UT,createMappablePosition:WT},this.setOptions(t),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:r,slice:i,moved:s})=>this.options.onDrop(r,i,s)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=Tv(e,this.options.autofocus);this.editorState=ii.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=N2(M2,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}
vendor: 8,518 bytes, lines 467-469
467),e&&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:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=Dv(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;n=n.filter(o=>!o.key.startsWith(s))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[Qv,qv.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),Kv,Xv,Zv,tx,Gv,ex,Jv,nx.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new ru(r,this)}createCommandManager(){this.commandManager=new Xa({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=bd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=bd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,s=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(s);this.editorView=new Cv(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();const a=this.view.dom;a.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(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),i=n.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=o==null?void 0:o.getMeta("focus"),a=o==null?void 0:o.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:o}),a&&this.emit("blur",{editor:this,event:a.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return _v(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return FT(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ah(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
468
469`,textSerializers:n={}}=t||{};return PT(this.state.doc,{blockSeparator:e,textSerializers:{...jv(this.schema),...n}})}get isEmpty(){return tu(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new b2(e,this)}get $doc(){return this.$pos(0)}};function Ni(t){return new nu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=W(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=e,o=r[r.length-1],l=r[0];if(o){const a=l.search(/\S/),u=n.from+l.indexOf(o),c=u+o.length;if(uh(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===t.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;c<n.to&&s.delete(c,n.to),u>n.from&&s.delete(n.from+a,u);const f=n.from+a+o.length;s.addMark(n.from+a,f,t.type.create(i||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function rx(t){return new nu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=W(t.getAttributes,void 0,r)||{},{tr:s}=e,o=n.from;let l=n.to;const a=t.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let c=o+u;c>l?c=l:l=c+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(c,l,a)}else if(r[0]){const u=t.type.isInline?o:o-1;s.insert(u,t.type.create(i)).delete(s.mapping.map(o),s.mapping.map(l))}s.scrollIntoView()},undoable:t.undoable})}function Nd(t){return new nu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),s=W(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)},undoable:t.undoable})}function Ti(t){return new nu({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const s=W(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),a=o.doc.resolve(n.from).blockRange(),u=a&&Wf(a,t.type,s);if(!u)return null;if(o.wrap(a,u),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const g=p.filter(y=>h.includes(y.type.name));o.ensureMarks(g)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}const c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&Zn(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&o.join(n.from-1)},undoable:t.undoable})}var A2=t=>"touches"in t,O2=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;const a=l.clientX-this.startX,u=l.clientY-this.startY;this.handleResize(a,u)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;const a=l.touches[0];if(!a)return;const u=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(u,c)},this.handleMouseUp=()=>
469{if(!this.isResizing)return;const l=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(l,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,i,s,o;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(i=t.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(s=t.options)!=null&&s.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(o=t.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),s=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),i&&(t.style.left="0"),s&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}
469removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,A2(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,t,e),s=this.applyConstraints(r,i,n);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,i=this.startHeight;const s=t.includes("right"),o=t.includes("left"),l=t.includes("bottom"),a=t.includes("top");return s?r=this.startWidth+e:o&&(r=this.startWidth-e),l?i=this.startHeight+n:a&&(i=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(s?e:-e)),(t==="top"||t==="bottom")&&(i=this.startHeight+(l?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,t):{width:r,height:i}}applyConstraints(t,e,n){var r,i,s,o;if(!n){let u=Math.max(this.minSize.width,t),c=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(u=Math.min(this.maxSize.width,u)),(i=this.maxSize)!=null&&i.height&&(c=Math.min(this.maxSize.height,c)),{width:u,height:c}}let l=t,a=e;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),(s=this.maxSize)!=null&&s.width&&l>this.maxSize.width&&(l=this.maxSize.width,a=l/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&a>this.maxSize.height&&(a=this.maxSize.height,l=a*this.aspectRatio),{width:l,height:a}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",i=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:i?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function R2(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof z){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}var I2={};ih(I2,{createAtomBlockMarkdownSpec:()=>D2,createBlockMarkdownSpec:()=>L2,createInlineMarkdownSpec:()=>j2,parseAttributes:()=>dh,parseIndentedBlocks:()=>Td,renderNestedMarkdownContent:()=>hh,serializeAttributes:()=>fh});function dh(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const u=i.map(c=>c.trim().slice(1));e.class=u.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,u,c])=>{var d;const f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=n[f];h&&(e[u]=h.slice(1,-1))});const a=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();
vendor: 4,362 bytes, lines 469-475
469return a&&a.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(e[c]=!0)}),e}function fh(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function D2(t){const{nodeName:e,name:n,parseAttributes:r=dh,serializeAttributes:i=fh,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:l}=t,a=n||e,u=c=>{if(!l)return c;const d={};return l.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{const f={...s,...c.attributes};return d.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(c){var d;const f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),h=(d=c.match(f))==null?void 0:d.index;return h!==void 0?h:-1},tokenize(c,d,f){const h=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),p=c.match(h);if(!p)return;const g=p[1]||"",y=r(g);if(!o.find(v=>!(v in y)))return{type:e,raw:p[0],attributes:y}}},renderMarkdown:c=>{const d=u(c.attrs||{}),f=i(d),h=f?` {${f}}`:"";return`:::${a}${h} :::`}}}function L2(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=dh,serializeAttributes:s=fh,defaultAttributes:o={},content:l="block",allowedAttributes:a}=t,u=n||e,c=d=>{if(!a)return d;const f={};return a.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{let h;if(r){const g=r(d);h=typeof g=="string"?[{type:"text",text:g}]:g}else l==="block"?h=f.parseChildren(d.tokens||[]):h=f.parseInline(d.tokens||[]);const p={...o,...d.attributes};return f.createNode(e,p,h)},markdownTokenizer:{name:e,level:"block",start(d){var f;const h=new RegExp(`^:::${u}`,"m"),p=(f=d.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(d,f,h){var p;const g=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),y=d.match(g);if(!y)return;const[m,v=""]=y,k=i(v);let w=1;const S=m.length;let b="";const E=/^:::([\w-]*)(\s.*)?/gm,N=d.slice(S);for(E.lastIndex=0;;){const M=E.exec(N);if(M===null)break;const R=M.index,_=M[1];if(!((p=M[2])!=null&&p.endsWith(":::"))){if(_)w+=1;else if(w-=1,w===0){const Z=N.slice(0,R);b=Z.trim();const G=d.slice(0,S+R+M[0].length);let ue=[];if(b)if(l==="block")for(ue=h.blockTokens(Z),ue.forEach(ee=>{ee.text&&(!ee.tokens||ee.tokens.length===0)&&(ee.tokens=h.inlineTokens(ee.text))});ue.length>0;){const ee=ue[ue.length-1];if(ee.type==="paragraph"&&(!ee.text||ee.text.trim()===""))ue.pop();else break}else ue=h.inlineTokens(b);return{type:e,raw:G,attributes:k,content:b,tokens:ue}}}}}},renderMarkdown:(d,f)=>{const h=c(d.attrs||{}),p=s(h),g=p?` {${p}}`:"",y=f.renderChildren(d.content||[],`
470
471`);return`:::${u}${g}
472
473${y}
474
475:::`}}}function P2(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,s,o]=r;e[i]=s||o,r=n.exec(t)}return e}function z2(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function j2(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=P2,serializeAttributes:s=z2,defaultAttributes:o={},selfClosing:l=!1,allowedAttributes:a}=t,u=n||e,c=f=>{if(!a)return f;const h={};return a.forEach(p=>{const g=typeof p=="string"?p:p.name,y=typeof p=="string"?void 0:p.skipIfDefault;if(g in f){const m=f[g];if(y!==void 0&&m===y)return;h[g]=m}}),h},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{const p={...o,...f.attributes};if(l)return h.createNode(e,p);const g=r?r(f):f.content||"";return g?h.createNode(e,p,[h.createTextNode(g)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){const h=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),p=f.match(h),g=p==null?void 0:p.index;return g!==void 0?g:-1},tokenize(f,h,p){const g=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),y=f.match(g);if(!y)return;let m="",v="";if(l){const[,w]=y;v=w}else{const[,w,S]=y;v=w,m=S||""}const k=i(v.trim());return{type:e,raw:y[0],content:m.trim(),attributes:k}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(m=>m.type==="text").map(m=>m.text).join(""));const p=c(f.attrs||{}),g=s(p),y=g?` ${g}`:"";return l?`[${u}${y}]`:`[${u}${y}]${h}[/${u}]`}}
475}function Td(t,e,n){var r,i,s,o;const l=t.split(`
476`),a=[];let u="",c=0;const d=e.baseIndentSize||2;for(;c<l.length;){const f=l[c],h=f.match(e.itemPattern);if(!h){if(a.length>0)break;if(f.trim()===""){c+=1,u=`${u}${f}
477`;continue}else return}const p=e.extractItemData(h),{indentLevel:g,mainContent:y}=p;u=`${u}${f}
478`;const m=[y];for(c+=1;c<l.length;){const S=l[c];if(S.trim()===""){const E=l.slice(c+1).findIndex(R=>R.trim()!=="");if(E===-1)break;if((((i=(r=l[c+1+E].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>g){m.push(S),u=`${u}${S}
479`,c+=1;continue}else break}if((((o=(s=S.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:o.length)||0)>g)m.push(S),u=`${u}${S}
480`,c+=1;else break}let v;const k=m.slice(1);if(k.length>0){const S=k.map(b=>b.slice(g+d)).join(`
481`);S.trim()&&(e.customNestedParser?v=e.customNestedParser(S):v=n.blockTokens(S))}const w=e.createToken(p,v);a.push(w)}if(a.length!==0)return{items:a,raw:u}}function hh(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[s,...o]=t.content,l=e.renderChildren([s]);let a=`${i}${l}`;return o&&o.length>0&&o.forEach((u,c)=>{var d,f;const h=(f=(d=e.renderChild)==null?void 0:d.call(e,u,c+1))!=null?f:e.renderChildren([u]);if(h!=null){const p=h.split(`
482`).map(g=>g?e.indent(g):e.indent("")).join(`
483`);a+=u.type==="paragraph"?`
484
485${p}`:`
486${p}`}}),a}function _2(t,e,n={}){const{state:r}=e,{doc:i,tr:s}=r,o=t;i.descendants((l,a)=>{const u=s.mapping.map(a),c=s.mapping.map(a)+l.nodeSize;let d=null;if(l.marks.forEach(h=>{if(h!==o)return!1;d=h}),!d)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==d.attrs[h]&&(f=!0)}),f){const h=t.type.create({...t.attrs,...n});s.removeMark(u,c,t.type),s.addMark(u,c,h)}}),s.docChanged&&e.view.dispatch(s)}var rt=class ix extends ch{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new ix(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Ir(t){return new x2({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const s=W(t.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:o}=e,l=r[r.length-1],a=r[0];let u=n.to;if(l){const c=a.search(/\S/),d=n.from+a.indexOf(l),f=d+l.length;if(uh(n.from,n.to,e.doc).filter(g=>g.mark.type.excluded.find(m=>m===t.type&&m!==g.mark.type)).filter(g=>g.to>d).length)return null;f<n.to&&o.delete(f,n.to),d>n.from&&o.delete(n.from+c,d),u=n.from+c+l.length,o.addMark(n.from+c,u,t.type.create(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:B2,getOwnPropertySymbols:$2}=Object,{hasOwnProperty:F2}=Object.prototype;function nc(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function $o(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,o=s.get(n),l=s.get(r);if(o&&l)return o===r&&l===n;s.set(n,r),s.set(r,n);const a=t(n,r,i);return s.delete(n),s.delete(r),a}}function V2(t){return t!=null?t[Symbol.toStringTag]:void 0}function Xm(t){return B2(t).concat($2(t))}const H2=Object.hasOwn||((t,e)=>F2.call(t,e));function _r(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const U2="__v",W2="__o",q2="_owner",{getOwnPropertyDescriptor:Zm,keys:eg}=Object;function K2(t,e){return t.byteLength===e.byteLength&&Gl(new Uint8Array(t),new Uint8Array(e))}function J2(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function G2(t,e){return t.byteLength===e.byteLength&&Gl(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Q2(t,e){return _r(t.getTime(),e.getTime())}function Y2(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function X2(t,e){return t===e}function tg(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,l,a=0;for(;(o=s.next())&&!o.done;){const u=e.entries();let c=!1,d=0;for(;(l=u.next())&&!l.done;){if(i[d]){d++;continue}const f=o.value,h=l.value;if(n.equals(f[0],h[0],a,d,t,e,n)&&n.equals(f[1],h[1],f[0],h[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;a++}return!0}const Z2=_r;function eA(t,e,n){const r=eg(t);let i=r.length;if(eg(e).length!==i)return!1;for(;i-- >0;)if(!sx(t,e,n,r[i]))return!1;return!0}function qi(t,e,n){const r=Xm(t);let i=r.length;if(Xm(e).length!==i)return!1;let s,o,l;for(;i-- >0;)if(s=r[i],!sx(t,e,n,s)||(o=Zm(t,s),l=Zm(e,s),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function tA(t,e){return _r(t.valueOf(),e.valueOf())}function nA(t,e){return t.source===e.source&&t.flags===e.flags}function ng(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,l;for(;(o=s.next())&&!o.done;){const a=e.values();
486let u=!1,c=0;for(;(l=a.next())&&!l.done;){if(!i[c]&&n.equals(o.value,l.value,o.value,l.value,t,e,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function Gl(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function rA(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function sx(t,e,n,r){return(r===q2||r===W2||r===U2)&&(t.$$typeof||e.$$typeof)?!0:H2(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const iA="[object ArrayBuffer]",sA="[object Arguments]",oA="[object Boolean]",lA="[object DataView]",aA="[object Date]",uA="[object Error]",cA="[object Map]",dA="[object Number]",fA="[object Object]",hA="[object RegExp]",pA="[object Set]",mA="[object String]",gA={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},yA="[object URL]",vA=Object.prototype.toString;function xA({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:p}){return function(y,m,v){if(y===m)return!0;if(y==null||m==null)return!1;const k=typeof y;if(k!==typeof m)return!1;if(k!=="object")return k==="number"?l(y,m,v):k==="function"?s(y,m,v):!1;const w=y.constructor;if(w!==m.constructor)return!1;if(w===Object)return a(y,m,v);if(Array.isArray(y))return e(y,m,v);if(w===Date)return r(y,m,v);if(w===RegExp)return c(y,m,v);if(w===Map)return o(y,m,v);if(w===Set)return d(y,m,v);const S=vA.call(y);if(S===aA)return r(y,m,v);if(S===hA)return c(y,m,v);if(S===cA)return o(y,m,v);if(S===pA)return d(y,m,v);if(S===fA)return typeof y.then!="function"&&typeof m.then!="function"&&a(y,m,v);if(S===yA)return h(y,m,v);if(S===uA)return i(y,m,v);if(S===sA)return a(y,m,v);if(gA[S])return f(y,m,v);if(S===iA)return t(y,m,v);if(S===lA)return n(y,m,v);if(S===oA||S===dA||S===mA)return u(y,m,v);if(p){let b=p[S];if(!b){const E=V2(y);E&&(b=p[E])}if(b)return b(y,m,v)}return!1}}function kA({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:K2,areArraysEqual:n?qi:J2,areDataViewsEqual:G2,areDatesEqual:Q2,areErrorsEqual:Y2,areFunctionsEqual:X2,areMapsEqual:n?nc(tg,qi):tg,areNumbersEqual:Z2,areObjectsEqual:n?qi:eA,arePrimitiveWrappersEqual:tA,areRegExpsEqual:nA,areSetsEqual:n?nc(ng,qi):ng,areTypedArraysEqual:n?nc(Gl,qi):Gl,areUrlsEqual:rA,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=$o(r.areArraysEqual),s=$o(r.areMapsEqual),o=$o(r.areObjectsEqual),l=$o(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:l})}return r}function wA(t){return function(e,n,r,i,s,o,l){return t(e,n,l)}}function SA({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(l,a){const{cache:u=t?new WeakMap:void 0,meta:c}=n();return e(l,a,{cache:u,equals:r,meta:c,strict:i})};if(t)return function(l,a){return e(l,a,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(l,a){return e(l,a,s)}}const CA=tr();tr({strict:!0});tr({circular:!0});tr({circular:!0,strict:!0});tr({createInternalComparator:()=>_r});tr({strict:!0,createInternalComparator:()=>_r});tr({circular:!0,createInternalComparator:()=>_r});tr({circular:!0,createInternalComparator:()=>_r,strict:!0});function tr(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=kA(t),o=xA(s),l=n?n(o):wA(o);return SA({circular:e,comparator:o,createState:r,equals:l,strict:i})}var ox={exports:{}},lx={};/**
487 * @license React
488 * use-sync-external-store-shim/with-selector.production.js
489 *
490 * Copyright (c) Meta Platforms, Inc. and affiliates.
491 *
492 * This source code is licensed under the MIT license found in the
493 * LICENSE file in the root directory of this source tree.
494 */var iu=C,EA=Vf;function bA(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var MA=typeof Object.is=="function"?Object.is:bA,NA=EA.useSyncExternalStore,TA=iu.useRef,AA=iu.useEffect,OA=iu.useMemo,RA=iu.useDebugValue;lx.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=TA(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=OA(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return d=p}return d=h}if(p=d,MA(c,h))return p;var g=r(h);return i!==void 0&&i(p,g)?(c=h,p):(c=h,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(e())},f===null?void 0:function(){return a(f())}]},[e,n,r,i]);var l=NA(t,s[0],s[1]);return AA(function(){o.hasValue=!0,o.value=l},[l]),RA(l),l};ox.exports=lx;var IA=ox.exports,DA=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},LA=({contentComponent:t})=>{const e=Vf.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return x.jsx(x.Fragment,{children:Object.values(e)})};function PA(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:uS.createPortal(r.reactElement,r.element,n)},t.forEach(i=>
494i())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(i=>i())}}}var zA=class extends Sr.Component{constructor(t){super(t),this.editorContentRef=Sr.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=PA(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:DA(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&x.jsx(LA,{contentComponent:t.contentComponent})]})}},jA=C.forwardRef((t,e)=>{const n=Sr.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Sr.createElement(zA,{key:n,innerRef:e,...t})}),ax=Sr.memo(jA),_A=typeof window<"u"?C.useLayoutEffect:C.useEffect,BA=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,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.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function $A(t){var e;const[n]=C.useState(()=>new BA(t.editor)),r=IA.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:CA);return _A(()=>n.watch(t.editor),[t.editor,n]),C.useDebugValue(r),r}var FA=!1,Ad=typeof window>"u",VA=Ad||!!(typeof window<"u"&&window.next),HA=class ux{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(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return Ad||VA?null:this.createEditor();if(this.options.current.immediatelyRender&&Ad&&FA)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)==null?void 0:s.call(i,...r)},onBlur:(...r)=>{var i,s;return(s=(i=this.options.current).onBlur)==null?void 0:s.call(i,...r)},onCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onCreate)==null?void 0:s.call(i,...r)},onDestroy:(...r)=>{var i,s;return(s=(i=this.options.current).onDestroy)==null?void 0:s.call(i,...r)},onFocus:(...r)=>{var i,s;return(s=(i=this.options.current).onFocus)==null?void 0:s.call(i,...r)},onSelectionUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)==null?void 0:s.call(i,...r)},onTransaction:(...r)=>{var i,s;return(s=(i=this.options.current).onTransaction)==null?void 0:s.call(i,...r)}
494,onUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onUpdate)==null?void 0:s.call(i,...r)},onContentError:(...r)=>{var i,s;return(s=(i=this.options.current).onContentError)==null?void 0:s.call(i,...r)},onDrop:(...r)=>{var i,s;return(s=(i=this.options.current).onDrop)==null?void 0:s.call(i,...r)},onPaste:(...r)=>{var i,s;return(s=(i=this.options.current).onPaste)==null?void 0:s.call(i,...r)},onDelete:(...r)=>{var i,s;return(s=(i=this.options.current).onDelete)==null?void 0:s.call(i,...r)}};return new T2(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((i,s)=>{var o;return i===((o=n.extensions)==null?void 0:o[s])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?ux.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function UA(t={},e=[]){const n=C.useRef(t);n.current=t;const[r]=C.useState(()=>new HA(n)),i=Vf.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return C.useDebugValue(i),C.useEffect(r.onRender(e)),$A({editor:i,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),i}var cx=C.createContext({editor:null});cx.Consumer;var WA=C.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),qA=()=>C.useContext(WA);Sr.forwardRef((t,e)=>{const{onDragStart:n}=qA(),r=t.as||"div";return x.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});Sr.createContext({markViewContentRef:()=>{}});var ph=C.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});ph.displayName="TiptapContext";var KA=()=>C.useContext(ph);function dx({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=C.useMemo(()=>({editor:r}),[r]),s=C.useMemo(()=>({editor:r}),[r]);return x.jsx(cx.Provider,{value:s,children:x.jsx(ph.Provider,{value:i,children:n})})}dx.displayName="Tiptap";function fx({...t}){const{editor:e}=KA();return x.jsx(ax,{editor:e,...t})}fx.displayName="Tiptap.Content";Object.assign(dx,{Content:fx});var Ql=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},JA=/^\s*>\s$/,GA=rt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Ql("blockquote",{...me(this.options.HTMLAttributes,t),children:Ql("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((i,s)=>{var o,l;const c=((l=(o=e.renderChild)==null?void 0:o.call(e,i,s))!=null?l:e.renderChildren([i])).split(`
495`).map(d=>d.trim()===""?n:`${n} ${d}`);r.push(c.join(`
496`))}),r.join(`
497${n}
498`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}}
vendor: 10,301 bytes, lines 498-519
498,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ti({find:JA,type:this.type})]}}),QA=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,YA=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,XA=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,ZA=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,eO=jr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Ql("strong",{...me(this.options.HTMLAttributes,t),children:Ql("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ni({find:QA,type:this.type}),Ni({find:XA,type:this.type})]},addPasteRules(){return[Ir({find:YA,type:this.type}),Ir({find:ZA,type:this.type})]}}),tO=/(^|[^`])`([^`]+)`(?!`)$/,nO=/(^|[^`])`([^`]+)`(?!`)/g,rO=jr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",me(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ni({find:tO,type:this.type})]},addPasteRules(){return[Ir({find:nO,type:this.type})]}}),rc=4,iO=/^```([a-z]+)?[\s\n]$/,sO=/^~~~([a-z]+)?[\s\n]$/,oO=rt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:rc,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const s=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",me(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const i=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${i}`,e.renderChildren(t.content),"```"].join(`
499`):r=`\`\`\`${i}
500
501\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:rc,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;const l=" ".repeat(n);return o?t.commands.insertContent(l):t.commands.command(({tr:a})=>{const{from:u,to:c}=i,h=r.doc.textBetween(u,c,`
502`,`
503`).split(`
504`).map(p=>l+p).join(`
505`);return a.replaceWith(u,c,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:rc,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type!==this.type?!1:o?t.commands.command(({tr:l})=>{var a;const{pos:u}=s,c=s.start(),d=s.end(),h=r.doc.textBetween(c,d,`
506`,`
507`).split(`
508`);let p=0,g=0;const y=u-c;for(let b=0;b<h.length;b+=1){if(g+h[b].length>=y){p=b;break}g+=h[b].length+1}const v=((a=h[p].match(/^ */))==null?void 0:a[0])||"",k=Math.min(v.length,n);if(k===0)return!0;let w=c;for(let b=0;b<p;b+=1)w+=h[b].length+1;return l.delete(w,w+k),u-w<=k&&l.setSelection(j.create(l.doc,w)),!0}):t.commands.command(({tr:l})=>{const{from:a,to:u}=i,f=r.doc.textBetween(a,u,`
509`,`
510`).split(`
511`).map(h=>{var p;const g=((p=h.match(/^ */))==null?void 0:p[0])||"",y=Math.min(g.length,n);return h.slice(y)}).join(`
512`);return l.replaceWith(a,u,r.schema.text(f)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
513
514`);return!s||!o?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const l=i.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:u})=>(u.setSelection(F.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[Nd({find:iO,type:this.type,getAttributes:t=>({language:t[1]})}),Nd({find:sO,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ae({key:new Ce("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:o,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,`
515`));return o.replaceSelectionWith(this.type.create({language:s},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(j.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),lO=rt.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
516
517`):""}),aO=rt.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",me(this.options.HTMLAttributes,t)]},renderText(){return`
518`},renderMarkdown:()=>`  
519`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&o){const d=a.filter(f=>l.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),uO=rt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,me(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Nd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),cO=rt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",me(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!R2(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return $v(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:o,dispatch:l})=>{if(l){const{$to:a}=o.selection,u=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(j.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(z.create(o.doc,a.pos)):o.setSelection(j.create(o.doc,a.pos));else{const c=s.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=c==null?void 0:c.create();d&&(o.insert(u,d),o.setSelection(j.create(o.doc,u+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[rx({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
vendor: 4,510 bytes, line 519
519ype})]}}),dO=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,fO=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,hO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,pO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,mO=jr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",me(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ni({find:dO,type:this.type}),Ni({find:hO,type:this.type})]},addPasteRules(){return[Ir({find:fO,type:this.type}),Ir({find:pO,type:this.type})]}});const gO="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
519ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",yO="ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
519ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2",Od="numeric",Rd="ascii",Id="alpha",xs="asciinumeric",rs="alphanumeric",Dd="domain",hx="emoji",vO="scheme",xO="slashscheme",ic="whitespace";function kO(t,e){return t in e||(e[t]=[]),e[t]}function pr(t,e,n){e[Od]&&(e[xs]=!0,e[rs]=!0),e[Rd]&&(e[xs]=!0,e[Id]=!0),e[xs]&&(e[rs]=!0),e[Id]&&(e[rs]=!0),e[rs]&&(e[Dd]=!0),e[hx]&&(e[Dd]=!0);for(const r in e){const i=kO(r,n);i.indexOf(t)<0&&i.push(t)}}function wO(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Ye(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Ye.groups={};Ye.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],s=e.jr[r][1];if(s&&i.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||Ye.groups;let i;return e&&e.j?i=e:(i=new Ye(e),n&&r&&pr(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let o=0;o<s-1;o++)i=i.tt(t[o]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||Ye.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const s=e;let o,l=i.go(t);if(l?(o=new Ye,Object.assign(o.j,l.j),o.jr.push.apply(o.jr,l.jr),o.jd=l.jd,o.t=l.t):o=new Ye,s){if(r)if(o.t&&typeof o.t=="string"){const a=Object.assign(wO(o.t,r),n);pr(s,a,r)}else n&&pr(s,n,r);o.t=s}return i.j[t]=o,o}};const $=(t,e,n,r,i)=>t.ta(e,n,r,i),ce=(t,e,n,r,i)=>t.tr(e,n,r,i),rg=(t,e,n,r,i)=>t.ts(e,n,r,i),A=(t,e,n,r,i)=>t.tt(e,n,r,i),Zt="WORD",Ld="UWORD",px="ASCIINUMERICAL",mx="ALPHANUMERICAL",Xs="LOCALHOST",Pd="TLD",zd="UTLD",ul="SCHEME",Ur="SLASH_SCHEME",mh="NUM",jd="WS",gh="NL",ks="OPENBRACE",ws="CLOSEBRACE",Yl="OPENBRACKET",Xl="CLOSEBRACKET",Zl="OPENPAREN",ea="CLOSEPAREN",ta="OPENANGLEBRACKET",na="CLOSEANGLEBRACKET",ra="FULLWIDTHLEFTPAREN",ia="FULLWIDTHRIGHTPAREN",sa="LEFTCORNERBRACKET",oa="RIGHTCORNERBRACKET",la="LEFTWHITECORNERBRACKET",aa="RIGHTWHITECORNERBRACKET",ua="FULLWIDTHLESSTHAN",ca="FULLWIDTHGREATERTHAN",da="AMPERSAND",fa="APOSTROPHE",ha="ASTERISK",Cn="AT",pa="BACKSLASH",ma="BACKTICK",ga="CARET",Tn="COLON",yh="COMMA",ya="DOLLAR",Bt="DOT",va="EQUALS",vh="EXCLAMATION",ft="HYPHEN",Ss="PERCENT",xa="PIPE",ka="PLUS",wa="POUND",Cs="QUERY",xh="QUOTE",gx="FULLWIDTHMIDDLEDOT",kh="SEMI",$t="SLASH",Es="TILDE",Sa="UNDERSCORE",yx="EMOJI",Ca="SYM";var vx=Object.freeze({__proto__:null,ALPHANUMERICAL:mx,AMPERSAND:da,APOSTROPHE:fa,ASCIINUMERICAL:px,ASTERISK:ha,AT:Cn,BACKSLASH:pa,BACKTICK:ma,CARET:ga,CLOSEANGLEBRACKET:na,CLOSEBRACE:ws,CLOSEBRACKET:Xl,CLOSEPAREN:ea,COLON:Tn,COMMA:yh,DOLLAR:ya,DOT:Bt,EMOJI:yx,EQUALS:va,EXCLAMATION:vh,FULLWIDTHGREATERTHAN:ca,FULLWIDTHLEFTPAREN:ra,FULLWIDTHLESSTHAN:ua,FULLWIDTHMIDDLEDOT:gx,FULLWIDTHRIGHTPAREN:ia,HYPHEN:ft,LEFTCORNERBRACKET:sa,LEFTWHITECORNERBRACKET:la,LOCALHOST:Xs,NL:gh,NUM:mh,OPENANGLEBRACKET:ta,OPENBRACE:ks,OPENBRACKET:Yl,OPENPAREN:Zl,PE
vendor: 9,792 bytes, lines 519-523
519RCENT:Ss,PIPE:xa,PLUS:ka,POUND:wa,QUERY:Cs,QUOTE:xh,RIGHTCORNERBRACKET:oa,RIGHTWHITECORNERBRACKET:aa,SCHEME:ul,SEMI:kh,SLASH:$t,SLASH_SCHEME:Ur,SYM:Ca,TILDE:Es,TLD:Pd,UNDERSCORE:Sa,UTLD:zd,UWORD:Ld,WORD:Zt,WS:jd});const Yt=/[a-z]/,Ki=new RegExp("\\p{L}","u"),sc=new RegExp("\\p{Emoji}","u"),Xt=/\d/,oc=/\s/,ig="\r",lc=`
520`,SO="️",CO="‍",ac="";let Fo=null,Vo=null;function EO(t=[]){const e={};Ye.groups=e;const n=new Ye;Fo==null&&(Fo=sg(gO)),Vo==null&&(Vo=sg(yO)),A(n,"'",fa),A(n,"{",ks),A(n,"}",ws),A(n,"[",Yl),A(n,"]",Xl),A(n,"(",Zl),A(n,")",ea),A(n,"<",ta),A(n,">",na),A(n,"(",ra),A(n,")",ia),A(n,"「",sa),A(n,"」",oa),A(n,"『",la),A(n,"』",aa),A(n,"<",ua),A(n,">",ca),A(n,"&",da),A(n,"*",ha),A(n,"@",Cn),A(n,"`",ma),A(n,"^",ga),A(n,":",Tn),A(n,",",yh),A(n,"$",ya),A(n,".",Bt),A(n,"=",va),A(n,"!",vh),A(n,"-",ft),A(n,"%",Ss),A(n,"|",xa),A(n,"+",ka),A(n,"#",wa),A(n,"?",Cs),A(n,'"',xh),A(n,"/",$t),A(n,";",kh),A(n,"~",Es),A(n,"_",Sa),A(n,"\\",pa),A(n,"・",gx);const r=ce(n,Xt,mh,{[Od]:!0});ce(r,Xt,r);const i=ce(r,Yt,px,{[xs]:!0}),s=ce(r,Ki,mx,{[rs]:!0}),o=ce(n,Yt,Zt,{[Rd]:!0});ce(o,Xt,i),ce(o,Yt,o),ce(i,Xt,i),ce(i,Yt,i);const l=ce(n,Ki,Ld,{[Id]:!0});ce(l,Yt),ce(l,Xt,s),ce(l,Ki,l),ce(s,Xt,s),ce(s,Yt),ce(s,Ki,s);const a=A(n,lc,gh,{[ic]:!0}),u=A(n,ig,jd,{[ic]:!0}),c=ce(n,oc,jd,{[ic]:!0});A(n,ac,c),A(u,lc,a),A(u,ac,c),ce(u,oc,c),A(c,ig),A(c,lc),ce(c,oc,c),A(c,ac,c);const d=ce(n,sc,yx,{[hx]:!0});A(d,"#"),ce(d,sc,d),A(d,SO,d);const f=A(d,CO);A(f,"#"),ce(f,sc,d);const h=[[Yt,o],[Xt,i]],p=[[Yt,null],[Ki,l],[Xt,s]];for(let g=0;g<Fo.length;g++)vn(n,Fo[g],Pd,Zt,h);for(let g=0;g<Vo.length;g++)vn(n,Vo[g],zd,Ld,p);pr(Pd,{tld:!0,ascii:!0},e),pr(zd,{utld:!0,alpha:!0},e),vn(n,"file",ul,Zt,h),vn(n,"mailto",ul,Zt,h),vn(n,"http",Ur,Zt,h),vn(n,"https",Ur,Zt,h),vn(n,"ftp",Ur,Zt,h),vn(n,"ftps",Ur,Zt,h),pr(ul,{scheme:!0,ascii:!0},e),pr(Ur,{slashscheme:!0,ascii:!0},e),t=t.sort((g,y)=>g[0]>y[0]?1:-1);for(let g=0;g<t.length;g++){const y=t[g][0],v=t[g][1]?{[vO]:!0}:{[xO]:!0};y.indexOf("-")>=0?v[Dd]=!0:Yt.test(y)?Xt.test(y)?v[xs]=!0:v[Rd]=!0:v[Od]=!0,rg(n,y,y,v)}return rg(n,"localhost",Xs,{ascii:!0}),n.jd=new Ye(Ca),{start:n,tokens:Object.assign({groups:e},vx)}}function xx(t,e){const n=bO(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,i=[];let s=0,o=0;for(;o<r;){let l=t,a=null,u=0,c=null,d=-1,f=-1;for(;o<r&&(a=l.go(n[o]));)l=a,l.accepts()?(d=0,f=0,c=l):d>=0&&(d+=n[o].length,f++),u+=n[o].length,s+=n[o].length,o++;s-=d,o-=f,u-=d,i.push({t:c.t,v:e.slice(s-u,s),s:s-u,e:s})}return i}function bO(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),s,o=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function vn(t,e,n,r,i){let s;const o=e.length;for(let l=0;l<o-1;l++){const a=e[l];t.j[a]?s=t.j[a]:(s=new Ye(r),s.jr=i.slice(),t.j[a]=s),t=s}return s=new Ye(n),s.jr=i.slice(),t.j[e[o-1]]=s,s}function sg(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let s=0;for(;i.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+s),10);o>0;o--)n.pop();r+=s}else n.push(t[r]),r++}return e}const Zs={defaultProtocol:"http",events:null,format:og,formatHref:og,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function wh(t,e=null){let n=Object.assign({},Zs);t&&(n=Object.assign(n,t instanceof wh?t.o:t));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}wh.prototype={o:Zs,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Zs[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function og(t){return t}function kx(t,e){this.t="token",this.v=t,this.tk=e}kx.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Zs.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),s=this.toFormattedString(t),o={},l=t.get("className",n,e),a=t.get("target",n,e),u=t.get("rel",n,e),c=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return o.href=r,l&&(o.class=l),a&&(o.target=a),u&&(o.rel=u),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:d}}};function su(t,e){class n extends kx{constructor(i,s){super(i,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const lg=su("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ag=su("text"),MO=su("nl"),Ho=su("url",{isLink:!0,toHref(t=Zs.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Xs&&t[1].t===Tn}}),dt=t=>new Ye(t);function NO({groups:t}){const e=t.domain.concat([da,ha,Cn,pa,ma,ga,ya,va,ft,mh,Ss,xa,ka,wa,$t,Ca,Es,Sa]),n=[fa,Tn,yh,Bt,vh,Ss,Cs,xh,kh,ta,na,ks,ws,Xl,Yl,Zl,ea,ra,ia,sa,oa,la,aa,ua,ca],r=[da,fa,ha,pa,ma,ga,ya,va,ft,ks,ws,Ss,xa,ka,wa,Cs,$t,Ca,Es,Sa],i=dt(),s=A(i,Es);$(s,r,s),$(s,t.domain,s);const o=dt(),l=dt(),a=dt();$(i,t.domain,o),$(i,t.scheme,l),$(i,t.slashscheme,a),$(o,r,s),$(o,t.domain,o);const u=A(o,Cn);A(s,Cn,u),A(l,Cn,u),A(a,Cn,u);const c=A(s,Bt);$(c,r,s),$(c,t.domain,s);const d=dt();$(u,t.domain,d),$(d,t.domain,d);const f=A(d,Bt);$(f,t.domain,d);const h=dt(lg);$(f,t.tld,h),$(f,t.utld,h),A(u,Xs,h);const p=A(d,ft);A(p,ft,p),$(p,t.domain,d),$(h,t.domain,d),A(h,Bt,f),A(h,ft,p);const g=A(h,Tn);$(g,t.numeric,lg);const y=A(o,ft),m=A(o,Bt);A(y,ft,y),$(y,t.domain,o),$(m,r,s),$(m,t.domain,o);const v=dt(Ho);$(m,t.tld,v),$(m,t.utld,v),$(v,t.domain,o),$(v,r,s),A(v,Bt,m),A(v,ft,y),A(v,Cn,u);const k=A(v,Tn),w=dt(Ho);$(k,t.numeric,w);const S=dt(Ho),b=dt();$(S,e,S),$(S,n,b),$(b,e,S),$(b,n,b),A(v,$t,S),A(w,$t,S);const E=A(l,Tn),N=A(a,Tn),M=A(N,$t),R=A(M,$t);$(l,t.domain,o),A(l,Bt,m),A(l,ft,y),$(a,t.domain,o),A(a,Bt,m),A(a,ft,y),$(E,t.domain,S),A(E,$t,S),A(E,Cs,S),$(R,t.domain,S),$(R,e,S),A(R,$t,S);const _=[[ks,ws],[Yl,Xl],[Zl,ea],[ta,na],[ra,ia],[sa,oa],[la,aa],[ua,ca]];for(let Z=0;Z<_.length;Z++){const[G,ue]=_[Z],ee=A(S,G);A(b,G,ee),A(ee,ue,S);const zt=dt(Ho);$(ee,e,zt);const Gt=dt();$(ee,n),$(zt,e,zt),$(zt,n,Gt),$(Gt,e,zt),$(Gt,n,Gt),A(zt,ue,S),A(Gt,ue,S)}return A(i,Xs,v),A(i,gh,MO),{start:i,tokens:vx}}function TO(t,e,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let l=t,a=null,u=null,c=0,d=null,f=-1;for(;i<r&&!(a=l.go(n[i].t));)o.push(n[i++]);for(;i<r&&(u=a||l.go(n[i].t));)a=null,l=u,l.accepts()?(f=0,d=l):f>=0&&f++,i++,c++;if(f<0)i-=c,i<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(uc(ag,e,o)),o=[]),i-=f,c-=f;const h=d.t,p=n.slice(i-c,i);s.push(uc(h,e,p))}}return o.length>0&&s.push(uc(ag,e,o)),s}function uc(t,e,n){const r=n[0].s,i=n[n.length-1].e,s=e.slice(r,i);return new t(s,n)}const AO=typeof console<"u"&&console&&console.warn||(()=>{}),OO="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Y={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function RO(){return Ye.groups={},Y.scanner=null,Y.parser=null,Y.tokenQueue=[],Y.pluginQueue=[],Y.customSchemes=[],Y.initialized=!1,Y}function ug(t,e=!1){if(Y.initialized&&AO(`linkifyjs: already initialized - will not register custom scheme "${t}" ${OO}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
5211. Must only contain digits, lowercase ASCII letters or "-"
5222. Cannot start or end with "-"
5233. "-" cannot repeat`);Y.customSchemes.push([t,e])}function IO(){Y.scanner=EO(Y.customSchemes);for(let t=0;t<Y.tokenQueue.length;t++)Y.tokenQueue[t][1]({scanner:Y.scanner});Y.parser=NO(Y.scanner.tokens);for(let t=0;t<Y.pluginQueue.length;t++)Y.pluginQueue[t][1]({scanner:Y.scanner,parser:Y.parser});return Y.initialized=!0,Y}function Sh(t){return Y.initialized||IO(),TO(Y.parser.start,t,xx(Y.scanner.start,t))}Sh.scan=xx;function wx(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new wh(n),i=Sh(t),s=[];for(let o=0;o<i.length;o++){const l=i[o];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}var Ch="[\0-   ᠎ -\u2029  ]",DO=new RegExp(Ch),LO=new RegExp(`${Ch}$`),PO=new RegExp(Ch,"g");function zO(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function jO(t){return new ae({key:new Ce("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,l=Iv(n.doc,[...e]);if(Bv(l).forEach(({newRange:u})=>{const c=TT(r.doc,u,h=>h.isTextblock);let d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){const h=r.doc.textBetween(u.from,u.to," "," ");
523if(!LO.test(h))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){const h=f.split(DO).filter(Boolean);if(h.length<=0)return!1;const p=h[h.length-1],g=d.pos+f.lastIndexOf(p);if(!p)return!1;const y=Sh(p).map(m=>m.toObject(t.defaultProtocol));if(!zO(y))return!1;y.filter(m=>m.isLink).map(m=>({...m,from:g+m.start+1,to:g+m.end+1})).filter(m=>r.schema.marks.code?!r.doc.rangeHasMark(m.from,m.to,r.schema.marks.code):!0).filter(m=>t.validate(m.value)).filter(m=>t.shouldAutoLink(m.value)).forEach(m=>{uh(m.from,m.to,r.doc).some(v=>v.mark.type===t.type)||o.addMark(m.from,m.to,t.type.create({href:m.href}))})}}),!!o.steps.length)return o}})}function _O(t){return new ae({key:new Ce("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const a=r.target;if(!a)return!1;const u=t.editor.view.dom;o=a.closest("a"),o&&!u.contains(o)&&(o=null)}if(!o)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const a=_v(e.state,t.type.name),u=(i=o.href)!=null?i:a.href,c=(s=o.target)!=null?s:a.target;u&&(window.open(u,c),l=!0)}return l}}})}function BO(t){return new ae({key:new Ce("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:s}=e,{selection:o}=s,{empty:l}=o;if(l)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});const u=wx(a,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!u||i!==void 0&&!i(u.value)?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}function ir(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(PO,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Sx=jr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){ug(t);return}ug(t.scheme,t.optionalSlashes)})},onDestroy(){RO()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ir(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const i=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!ir(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!ir(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",me(this.options.HTMLAttributes,t),0]:["a",me(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,i,s;const o=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",l=(s=(i=t.attrs)==null?void 0:i.title)!=null?s:"",a=e.renderChildren(t);return l?`[${a}](${o} "${l}")`:`[${a}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ir(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!ir(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ir({find:t=>{const e=[];
vendor: 15,791 bytes, lines 523-533
523if(t){const{protocols:n,defaultProtocol:r}=this.options,i=wx(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!ir(o,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(jO({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!ir(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(_O({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(BO({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),$O=Sx,FO=Object.defineProperty,VO=(t,e)=>{for(var n in e)FO(t,n,{get:e[n],enumerable:!0})},HO="listItem",cg="textStyle",dg=/^\s*([-+*])\s$/,Cx=rt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",me(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
524`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(HO,this.editor.getAttributes(cg)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Ti({find:dg,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ti({find:dg,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(cg),editor:this.editor})),[t]}}),Ex=rt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",me(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let i=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(o=>o.type==="paragraph"))i=r(t.tokens);else{const o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){const a=t.tokens.slice(1),u=r(a);i.push(...u)}}else i=r(t.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(t,e,n)=>hh(t,e,r=>{var i,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),UO={};VO(UO,{findListItemPos:()=>fo,getNextListDepth:()=>Eh,handleBackspace:()=>_d,handleDelete:()=>Bd,hasListBefore:()=>bx,hasListItemAfter:()=>WO,hasListItemBefore:()=>Mx,listItemHasSubList:()=>Nx,nextListIsDeeper:()=>Tx,nextListIsHigher:()=>Ax});var fo=(t,e)=>{const{$from:n}=e.selection,r=ke(t,e.schema);let i=null,s=n.depth,o=n.pos,l=null;for(;s>0&&l===null;)i=n.node(s),i.type===r?l=s:(s-=1,o-=1);return l===null?null:{$pos:e.doc.resolve(o),depth:l}},Eh=(t,e)=>{const n=fo(t,e);if(!n)return!1;const[,r]=BT(e,t,n.$pos.pos+4);return r},bx=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),s=t.doc.resolve(i).node();return!(!s||!n.includes(s.type.name))},Mx=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==t)},Nx=(t,e,n)=>{if(!n)return!1;const r=ke(t,e.schema);let i=!1;return n.descendants(s=>{s.type===r&&(i=!0)}),i},_d=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Gn(t.state,e)&&bx(t.state,e,n)){const{$anchor:l}=t.state.selection,a=t.state.doc.resolve(l.before()-1),u=[];a.node().descendants((f,h)=>{f.type.name===e&&u.push({node:f,pos:h})});const c=u.at(-1);if(!c)return!1;const d=t.state.doc.resolve(a.start()+c.pos+1);return t.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Gn(t.state,e)||!HT(t.state))return!1;const r=fo(e,t.state);if(!r)return!1;const s=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=Nx(e,t.state,s);return Mx(e,t.state)&&!o?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},Tx=(t,e)=>{const n=Eh(t,e),r=fo(t,e);return!r||!n?!1:n>r.depth},Ax=(t,e)=>{const n=Eh(t,e),r=fo(t,e);return!r||!n?!1:n<r.depth},Bd=(t,e)=>{if(!Gn(t.state,e)||!VT(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:Tx(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Ax(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},WO=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==t)},Ox=ge.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Bd(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Bd(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&_d(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&_d(t,n,r)&&(e=!0)}),e}}}}),fg=/^(\s*)(\d+)\.\s+(.*)$/,qO=/^\s/;function KO(t){const e=t.trimStart();return/^[-+*]\s+/.test(e)||/^\d+\.\s+/.test(e)||/^>\s?/.test(e)||/^```/.test(e)||/^~~~/.test(e)}function JO(t){const e=[],n=[];let r=!1;return t.forEach(i=>{if(r){n.push(i);return}if(i.trim()===""){r=!0,n.push(i);return}if(e.length>0&&KO(i)){r=!0,n.push(i);return}e.push(i)}),{paragraphLines:e,blockLines:n}}function GO(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],s=i.match(fg);if(!s)break;const[,o,l,a]=s,u=o.length,c=[a];let d=n+1;const f=[i];let h=!1;for(;d<t.length;){const p=t[d];if(p.match(fg))break;if(p.trim()==="")f.push(p),c.push(""),h=!0,d+=1;else if(p.match(qO))f.push(p),c.push(p.slice(u+2)),d+=1;else{if(h)break;f.push(p),c.push(p),d+=1}}e.push({indent:u,number:parseInt(l,10),content:c.join(`
525`).trim(),contentLines:c,raw:f.join(`
526`)}),r=d,n=d}return[e,r]}function Rx(t,e,n){const r=[];let i=0;for(;i<t.length;){const s=t[i];if(s.indent===e){const{paragraphLines:o,blockLines:l}=JO(s.contentLines),a=o.join(`
527`).trim(),u=[];a&&u.push({type:"paragraph",raw:a,tokens:n.inlineTokens(a)});const c=l.join(`
528`).trim();if(c){const h=n.blockTokens(c);u.push(...h)}let d=i+1;const f=[];for(;d<t.length&&t[d].indent>e;)f.push(t[d]),d+=1;if(f.length>0){const h=Math.min(...f.map(g=>g.indent)),p=Rx(f,h,n);u.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(g=>g.raw).join(`
529`)})}r.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return r}function QO(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var YO="listItem",hg="textStyle",pg=/^(\d+)\.\s$/,Ix=rt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",me(this.options.HTMLAttributes,n),0]:["ol",me(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?QO(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
530`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const i=t.split(`
531`),[s,o]=GO(i);if(s.length===0)return;const l=Rx(s,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:l,raw:i.slice(0,o).join(`
532`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YO,this.editor.getAttributes(hg)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Ti({find:pg,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ti({find:pg,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(hg)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),XO=/^\s*(\[([( |x])?\])\s$/,ZO=rt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",me(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const i=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return hh(t,e,i)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),u=d=>{var f,h;l.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};u(t),s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:f}=d.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const p=n();if(typeof p!="number")return!1;const g=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...g==null?void 0:g.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{i.setAttribute(d,f)}),i.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,s.append(l,o),i.append(s,a),Object.entries(e).forEach(([d,f])=>{i.setAttribute(d,f)});let c=new Set(Object.keys(e));return{dom:i,contentDOM:a,update:d=>{if(d.type!==this.type)return!1;i.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,u(d);const f=r.extensionManager.attributes,h=Ys(d,f),p=new Set(Object.keys(h)),g=this.options.HTMLAttributes;return c.forEach(y=>{p.has(y)||(y in g?i.setAttribute(y,g[y]):i.removeAttribute(y))}),Object.entries(h).forEach(([y,m])=>{m==null?y in g?i.setAttribute(y,g[y]):i.removeAttribute(y):i.setAttribute(y,m)}),c=p,!0}}}},addInputRules(){return[Ti({find:XO,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),eR=rt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",me(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
533`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=s=>{const o=Td(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(s)},i=Td(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}}
533,addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});ge.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(Cx.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(Ex.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Ox.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Ix.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(ZO.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(eR.configure(this.options.taskList)),t}});var Uo="&nbsp;",cc=" ",tR=rt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",me(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Uo||n[0].text===Uo||n[0].raw===cc||n[0].text===cc)&&r.length===1&&r[0].type==="text"&&(r[0].text===Uo||r[0].text===cc)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,i;if(!t)return"";const s=Array.isArray(t.content)?t.content:[];if(s.length===0){const o=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((i=n==null?void 0:n.previousNode)==null?void 0:i.type)==="paragraph"&&o.length===0?Uo:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),nR=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,rR=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,iR=jr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",me(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
vendor: 5,015 bytes, line 533
533,addInputRules(){return[Ni({find:nR,type:this.type})]},addPasteRules(){return[Ir({find:rR,type:this.type})]}}),sR=rt.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),oR=jr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",me(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!i)return;const s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:n.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function lR(t={}){return new ae({view(e){return new aR(e,t)}})}class aR{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,l=s.height/i.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let h=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(h){let p=h.getBoundingClientRect(),g=d?p.bottom:p.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*l;r={left:p.left,right:p.right,top:g-y,bottom:g+y}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!a||a==document.body&&getComputedStyle(a).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,h=d.height/a.offsetHeight;u=d.left-a.scrollLeft*f,c=d.top-a.scrollTop*h}this.element.style.left=(r.left-u)/o+"px",this.element.style.top=(r.top-c)/l+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=A1(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class fe extends F{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return fe.valid(r)?new fe(r):F.near(r)}content(){return I.empty}eq(e){return e instanceof fe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new fe(e.resolve(n.pos))}getBookmark(){return new bh(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!uR(e)||!cR(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&fe.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let l=e.node(o);if(n>
vendor: 15,232 bytes, line 533
5330?e.indexAfter(o)<l.childCount:e.index(o)>0){s=l.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=n;let a=e.doc.resolve(i);if(fe.valid(a))return a}for(;;){let o=n>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!z.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=o,i+=n;let l=e.doc.resolve(i);if(fe.valid(l))return l}return null}}}fe.prototype.visible=!1;fe.findFrom=fe.findGapCursorFrom;F.jsonID("gapcursor",fe);class bh{constructor(e){this.pos=e}map(e){return new bh(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return fe.valid(n)?new fe(n):F.near(n)}}function Dx(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function uR(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||Dx(i.type))return!0;if(i.inlineContent)return!1}}return!0}function cR(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||Dx(i.type))return!0;if(i.inlineContent)return!1}}return!0}function dR(){return new ae({props:{decorations:mR,createSelectionBetween(t,e,n){return e.pos==n.pos&&fe.valid(n)?new fe(n):null},handleClick:hR,handleKeyDown:fR,handleDOMEvents:{beforeinput:pR}}})}const fR=Ev({ArrowLeft:Wo("horiz",-1),ArrowRight:Wo("horiz",1),ArrowUp:Wo("vert",-1),ArrowDown:Wo("vert",1)});function Wo(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof j){if(!s.endOfTextblock(n)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let u=fe.findGapCursorFrom(l,e,a);return u?(i&&i(r.tr.setSelection(new fe(u))),!0):!1}}function hR(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!fe.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&z.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new fe(r))),!0)}function pR(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof fe))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=T.empty;for(let o=r.length-1;o>=0;o--)i=T.from(r[o].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new I(i,0,0));return s.setSelection(j.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function mR(t){if(!(t.selection instanceof fe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",re.create(t.doc,[Ue.widget(t.selection.head,e,{key:"gapcursor"})])}var Ea=200,Te=function(){};Te.prototype.append=function(e){return e.length?(e=Te.from(e),!this.length&&e||e.length<Ea&&this.leafAppend(e)||this.length<Ea&&e.leafPrepend(this)||this.appendInner(e)):this};Te.prototype.prepend=function(e){return e.length?Te.from(e).append(this):this};Te.prototype.appendInner=function(e){return new gR(this,e)};Te.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Te.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Te.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Te.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Te.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},n,r),i};Te.from=function(e){return e instanceof Te?e:e&&e.length?new Lx(e):Te.empty};var Lx=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,l){for(var a=s;a<o;a++)if(i(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,l){for(var a=s-1;a>=o;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Ea)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Ea)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Te);Te.empty=new Lx([]);var gR=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,o){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(s,l),o)===!1||s>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,s)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(s,l)-l,o+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(i,l),s,o)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Te);const yR=500;class At{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,c.push(d);return}if(i){c.push(new Ft(d.map));let h=d.step.map(i.slice(s)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new Ft(p,void 0,void 0,u.length+c.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return l=i?d.selection.map(i.slice(s)):d.selection,a=new At(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,n,r,i){let s=[],o=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),f=new Ft(e.mapping.maps[c],d,n),h;(h=a&&a.merge(f))&&(f=h,c?s.pop():l=l.slice(0,l.length-1)),s.push(f),n&&(o++,n=void 0),i||(a=f)}let u=o-r.depth;return u>xR&&(l=vR(l,u),o-=u),new At(l.append(s),o)}remapping(e,n){let r=new Ws;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new At(this.items.append(e.map(n=>new Ft(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},i);let a=n;this.items.forEach(f=>{let h=s.getMirror(--a);if(h==null)return;o=Math.min(o,h);let p=s.maps[h];if(f.step){let g=e.steps[h].invert(e.docs[h]),y=f.selection&&f.selection.map(s.slice(a+1,h));y&&l++,r.push(new Ft(p,g,y))}else r.push(new Ft(p))},i);let u=[];for(let f=n;f<o;f++)u.push(new Ft(s.maps[f]));let c=this.items.slice(0,i).append(u).append(r),d=new At(c,l);return d.emptyItemCount()>yR&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((o,l)=>{if(l>=e)i.push(o),o.selection&&s++;else if(o.step){let a=o.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=o.selection&&o.selection.map(n.slice(r));c&&s++;let d=new Ft(u.invert(),a,c),f,h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else o.map&&r--},this.items.length,0),new At(Te.from(i.reverse()),s)}}At.empty=new At(Te.empty,0);function vR(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Ft{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ft(n.getMap().invert(),n,this.selection)}}}class En{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const xR=20;function kR(t,e,n,r){let i=n.getMeta(wr),s;if(i)return i.historyState;n.getMeta(CR)&&(t=new En(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(wr))return o.getMeta(wr).redo?new En(t.done.addTransform(n,void 0,r,cl(e)),t.undone,mg(n.mapping.maps),t.prevTime,t.prevComposition):new En(t.done,t.undone.addTransform(n,void 0,r,cl(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=t.prevTime==0||!o&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!wR(n,t.prevRanges)),u=o?dc(t.prevRanges,n.mapping):mg(n.mapping.maps);return new En(t.done.addTransform(n,a?e.selection.getBookmark():void 0,r,cl(e)),At.empty,u,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new En(t.done.rebased(n,s),t.undone.rebased(n,s),dc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new En(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),dc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function wR(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function mg(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,o)=>e.push(s,o));return e}function dc(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function SR(t,e,n){let r=cl(e),i=wr.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),l=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),a=new En(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(o).setMeta(wr,{redo:n,historyState:a})}let fc=!1,gg=null;function cl(t){let e=t.plugins;if(gg!=e){fc=!1,gg=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){fc=!0;break}}return fc}const wr=new Ce("history"),CR=new Ce("closeHistory");function ER(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ae({key:wr,state:{init(){return new En(At.empty,At.empty,null,0,-1)},apply(e,n,r){return kR(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?zx:r=="historyRedo"?jx:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function Px(t,e){return(n,r)=>{let i=wr.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=SR(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const zx=Px(!1,!0),jx=Px(!0,!0);ge.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ae({key:new Ce("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const o=s-i,l=0,a=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const u=r.tr.deleteRange(l,a);return t=!0,u}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,a=s-r,u=l-a,c=l;return e.deleteRange(u,c),!(this.storage.characters({node:e.doc})>r)}})]}});var bR=ge.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[lR(this.options)]}});ge.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ae({key:new Ce("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return re.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((a,u)=>{if(a.isText)return;if(!(i>=u&&i<=u+a.nodeSize-1))return!1;o+=1});let l=0;return t.descendants((a,u)=>{if(a.isText||!(i>=u&&i<=u+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&o-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(Ue.node(u,u+a.nodeSize,{class:this.options.className}))}),re.create(t,s)}}})]}});var MR=ge.create({name:"gapCursor",addProseMirrorPlugins(){return[dR()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=W(P(t,"allowGapCursor",n)))!=null?e:null}}}),yg="placeholder";function NR(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}ge.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:yg,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${NR(this.options.dataAttribute)}`:`data-${yg}`;return[new ae({key:new Ce("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,s=[];if(!r)return null;const o=this.editor.isEmpty;return e.descendants((l,a)=>{const u=i>=a&&i<=a+l.nodeSize,c=!l.isLeaf&&tu(l);
533if(!l.type.isTextblock)return this.options.includeChildren;if((u||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);const f=Ue.node(a,a+l.nodeSize,{class:d.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:u}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),re.create(e,s)}}})]}});ge.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ae({key:new Ce("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||$v(n.selection)||t.view.dragging?null:re.create(n.doc,[Ue.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});var TR="skipTrailingNode";function vg({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var AR=ge.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Ce(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new ae({key:e,appendTransaction:(i,s,o)=>{const{doc:l,tr:a,schema:u}=o,c=e.getState(o),d=l.content.size,f=u.nodes[n];if(!i.some(h=>h.getMeta(TR))&&c)return a.insert(d,f.create())},state:{init:(i,s)=>{const o=s.tr.doc.lastChild;return!vg({node:o,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const o=i.doc.lastChild;return!vg({node:o,types:r})}}})]}}),OR=ge.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>zx(t,e),redo:()=>({state:t,dispatch:e})=>jx(t,e)}},addProseMirrorPlugins(){return[ER(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),RR=ge.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(eO.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(GA.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(Cx.configure(this.options.bulletList)),this.options.code!==!1&&i.push(rO.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(oO.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(lO.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(bR.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(MR.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(aO.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(uO.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(OR.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(cO.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(mO.configure(this.options.italic)),this.options.listItem!==!1&&i.push(Ex.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(Ox.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(Sx.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(Ix.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(tR.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(iR.configure(this.options.strike)),this.options.text!==!1&&i.push(sR.configure(this.options.text)),this.options.underline!==!1&&i.push(oR.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(AR.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),IR=RR,DR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,LR=rt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",me(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,i,s,o;const l=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",a=(i=(r=t.attrs)==null?void 0:r.alt)!=null?i:"",u=(o=(s=t.attrs)==null?void 0:s.title)!=null?o:"";return u?`![${a}](${l} "${u}")`:`![${a}](${l})`}
533,addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:s,HTMLAttributes:o,editor:l})=>{const a=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:a.setAttribute(d,f);break}}),a.src=o.src;const u=new O2({element:a,editor:l,node:i,getPos:s,onResize:(d,f)=>{a.style.width=`${d}px`,a.style.height=`${f}px`},onCommit:(d,f)=>{const h=s();h!==void 0&&this.editor.chain().setNodeSelection(h).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,h)=>d.type===i.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),c=u.dom;return c.style.visibility="hidden",c.style.pointerEvents="none",a.onload=()=>{c.style.visibility="",c.style.pointerEvents=""},u}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[rx({find:DR,type:this.t
533ype,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),PR=LR;function zR({content:t,onChange:e}){const[n,r]=C.useState(!1),[i,s]=C.useState(""),[o,l]=C.useState(!0),[a,u]=C.useState(!1),[c,d]=C.useState(""),f=UA({extensions:[IR,$O.configure({openOnClick:!1,HTMLAttributes:{target:"_blank"}}),PR.configure({HTMLAttributes:{class:"max-w-full rounded-lg my-4 mx-auto block"}})],content:t,onUpdate:({editor:m})=>e(m.getHTML()),editorProps:{attributes:{class:"rich-content outline-none min-h-[220px]"}}}),h=C.useCallback(()=>{let m=i.trim();if(!f||!m)return;/^[a-z][a-z\d+\-.]*:/i.test(m)||(m="https://"+m);const v=o?"noopener":"noopener nofollow noreferrer";f.chain().focus().extendMarkRange("link").setLink({href:m,rel:v}).run(),r(!1),s("")},[f,i,o]),p=C.useCallback(()=>{if(!f)return;const m=f.getAttributes("link").href||"";s(m),r(!0)},[f]),g=C.useCallback(()=>{!f||!c.trim()||(f.chain().focus().setImage({src:c.trim()}).run(),u(!1),d(""))},[f,c]);if(!f)return null;const y=m=>`p-1.5 rounded transition-colors ${m?"bg-[#1e90ff] text-white":"text-gray-400 hover:text-white hover:bg-white/10"}`;return x.jsxs("div",{className:"border border-gray-600 rounded-lg overflow-hidden focus-within:border-[#1e90ff] transition-colors",children:[x.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 p-2 bg-[#0d0d0d] border-b border-gray-700",children:[x.jsx("button",{type:"button",title:"Gras",onClick:()=>f.chain().focus().toggleBold().run(),className:y(f.isActive("bold")),children:x.jsx(KC,{size:14})}),x.jsx("button",{type:"button",title:"Italique",onClick:()=>f.chain().focus().toggleItalic().run(),className:y(f.isActive("italic")),children:x.jsx(ZC,{size:14})}),x.jsx("button",{type:"button",title:"Barré",onClick:()=>f.chain().focus().toggleStrike().run(),className:y(f.isActive("strike")),children:x.jsx(lE,{size:14})}),x.jsx("span",{className:"w-px h-4 bg-gray-700 mx-1"}),x.jsx("button",{type:"button",title:"Titre H2",onClick:()=>f.chain().focus().toggleHeading({level:2}).run(),className:y(f.isActive("heading",{level:2})),children:x.jsx(QC,{size:14})}),x.jsx("button",{type:"button",title:"Titre H3",onClick:()=>f.chain().focus().toggleHeading({level:3}).run(),className:y(f.isActive("heading",{level:3})),children:x.jsx(YC,{size:14})}),x.jsx("span",{className:"w-px h-4 bg-gray-700 mx-1"}),x.jsx("button",{type:"button",title:"Liste à puces",onClick:()=>f.chain().focus().toggleBulletList().run(),className:y(f.isActive("bulletList")),children:x.jsx(nE,{size:14})}),x.jsx("button",{type:"button",title:"Liste numérotée",onClick:()=>f.chain().focus().toggleOrderedList().run(),className:y(f.isActive("orderedList")),children:x.jsx(tE,{size:14})}),x.jsx("span",{className:"w-px h-4 bg-gray-700 mx-1"}),x.jsx("button",{type:"button",title:f.isActive("link")?"Modifier le lien":"Insérer un lien",onClick:p,className:y(f.isActive("link")),children:x.jsx(eE,{size:14})}),x.jsx("button",{type:"button",title:"Supprimer le lien",disabled:!f.isActive("link"),onClick:()=>f.chain().focus().extendMarkRange("link").unsetLink().run(),className:`p-1.5 rounded transition-colors ${f.isActive("link")?"text-red-400 hover:text-red-300 hover:bg-white/10":"text-gray-700 cursor-not-allowed"}`,children:x.jsx(uE,{size:14})}),x.jsx("button",{type:"button",title:"Insérer une image",onClick:()=>u(!0),className:y(!1),children:x.jsx(XC,{size:14})})]}),n&&x.jsxs("div",{className:"p-3 bg-[#0d0d0d] border-b border-gray-700 space-y-2",children:[x.jsxs("div",{className:"flex gap-2",children:[x.jsx("input",{autoFocus:!0,value:i,onChange:m=>s(m.target.value),onKeyDown:m=>m.key==="Enter"&&h(),placeholder:"https://...",className:"flex-1 px-2 py-1 text-sm bg-black border border-gray-600 rounded focus:outline-none focus:border-[#1e90ff]"}),x.jsx("button",{type:"button",onClick:h,className:"px-3 py-1 text-sm bg-[#1e90ff] rounded hover:bg-[#1e90ff]/80 transition-colors",children:"OK"}),x.jsx("button",{type:"button",onClick:()=>r(!1),className:"p-1 text-gray-400 hover:text-white",children:x.jsx(ud,{size:14})})]}),x.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400 cursor-pointer select-none",children:[x.jsx("input",{type:"checkbox",checked:o,onChange:m=>l(m.target.checked),className:"accent-[#1e90ff]"}),x.jsxs("span",{children:["Lien ",x.jsx("strong",{className:"text-white",children:"dofollow"})]}),x.jsx("span",{className:"text-gray-600",children:"(décocher = nofollow)"})]})]}),a&&x.jsxs("div",{className:"p-3 bg-[#0d0d0d] border-b border-gray-700 flex gap-2",children:[x.jsx("input",{autoFocus:!0,value:c,onChange:m=>d(m.target.value),onKeyDown:m=>m.key==="Enter"&&g(),placeholder:"URL de l'image (https://...)",className:"flex-1 px-2 py-1 text-sm bg-black border border-gray-600 rounded focus:outline-none focus:border-[#1e90ff]"}),x.jsx("button",{type:"button",onClick:g,className:"px-3 py-1 text-sm bg-[#1e90ff] rounded hover:bg-[#1e90ff]/80 transition-colors",children:"OK"}),x.jsx("button",{type:"button",onClick:()=>u(!1),className:"p-1 text-gray-400 hover:text-white",children:x.jsx(ud,{size:14})})]}),x.jsx("div",{className:"p-4 bg-black/20",children:x.jsx(ax,{editor:f})})]})}const jR="385729",hc="vodi_admin_auth";function _R(t){return t.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim()}function BR(t){return t.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim()}const pc=()=>({title:"",content:"",featuredImage:"",metaTitle:"",metaDesc:""});function $R(){const[t,e]=C.useState(()=>sessionStorage.getItem(hc)==="true"),[n,r]=C.useState(""),[i,s]=C.useState(""),[o,l]=C.useState([]),[a,u]=C.useState(null),[c,d]=C.useState(pc()),[f,h]=C.useState(null),[p,g]=C.useState("url"),y=C.useRef(null),m=C.useRef(null);C.useEffect(()=>{t&&l(ri())},[t]);function v(M){M.preventDefault(),n===jR?(sessionStorage.setItem(hc,"true"),e(!0)):s("Mot de passe incorrect")}function k(){u(null),d(pc()),h(null)}function w(M){var R;u(M.id),d({title:M.title,content:M.content,featuredImage:M.featuredImage||"",metaTitle:M.metaTitle||"",metaDesc:M.metaDesc||""}),h(null),(R=y.current)==null||R.scrollIntoView({behavior:"smooth",block:"start"})}function S(M){if(M.preventDefault(),!c.title.trim())return;const R=a||_R(c.title)||`article-${Date.now()}`,_=ri().find(G=>
533G.id===R),Z={id:R,title:c.title.trim(),competitor:(_==null?void 0:_.competitor)||"",shortDescription:BR(c.content).slice(0,160),content:c.content,pros:(_==null?void 0:_.pros)||[],cons:(_==null?void 0:_.cons)||[],featuredImage:c.featuredImage||void 0,publishedAt:(_==null?void 0:_.publishedAt)||new Date().toISOString(),metaTitle:c.metaTitle.trim()||void 0,metaDesc:c.metaDesc.trim()||void 0};HC(Z),l(ri()),h("ok"),a||d(pc()),setTimeout(()=>h(null),3e3)}function b(M){const _=Fp(M)?"Réinitialiser ? Vos modifications seront perdues et la version originale sera restaurée.":"Supprimer cet article définitivement ?";confirm(_)&&(UC(M),l(ri()),a===M&&k())}function E(M){return Ha().some(R=>R.id===M)}function N(M){var Z;const R=(Z=M.target.files)==null?void 0:Z[0];if(!R)return;const _=new FileReader;_.onload=G=>d(ue=>{var ee;return{...ue,featuredImage:(ee=G.target)==null?void 0:ee.result}}),_.readAsDataURL(R)}return t?x.jsx("div",{className:"min-h-screen bg-black text-white py-12 px-4",children:x.jsxs("div",{className:"max-w-4xl mx-auto space-y-10",children:[x.jsxs("div",{className:"flex items-start justify-between",children:[x.jsxs("div",{children:[x.jsxs(Dt,{to:"/blog",className:"text-[#1e90ff] text-sm hover:underline inline-flex items-center gap-1 mb-2",children:[x.jsx(Ff,{size:14})," Blog"]}),x.jsx("h1",{className:"text-3xl font-bold",children:"Admin Blog"})]}),x.jsx("button",{onClick:()=>{sessionStorage.removeItem(hc),e(!1)},className:"text-gray-400 hover:text-white text-sm mt-1 transition-colors",children:"Déconnexion"})]}),x.jsxs("div",{ref:y,className:"bg-[#0a0a0a] border border-[#1e90ff]/20 rounded-xl p-6 space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h2",{className:"text-xl font-bold",children:a?"Modifier l'article":"Nouvel article"}),a&&x.jsxs("button",{type:"button",onClick:k,className:"inline-flex items-center gap-1.5 text-sm text-gray-400 hover:text-white transition-colors",children:[x.jsx(iE,{size:13})," Nouvel article"]})]}),x.jsxs("form",{onSubmit:S,className:"space-y-5",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"Titre (H1) *"}),x.jsx("input",{value:c.title,onChange:M=>d(R=>({...R,title:M.target.value})),required:!0,placeholder:"Titre de l'article",className:"w-full px-3 py-2.5 bg-transparent border border-gray-600 rounded-lg text-lg font-semibold focus:outline-none focus:border-[#1e90ff] transition-colors placeholder-gray-700"})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm text-gray-400 mb-2",children:"Image de mise en avant"}),x.jsxs("div",{className:"flex gap-3 mb-3",children:[x.jsx("button",{type:"button",onClick:()=>g("url"),className:`text-sm px-3 py-1 rounded-full border transition-colors ${p==="url"?"border-[#1e90ff] text-[#1e90ff]":"border-gray-700 text-gray-400 hover:text-white"}`,children:"URL"}),x.jsx("button",{type:"button",onClick:()=>g("upload"),className:`text-sm px-3 py-1 rounded-full border transition-colors ${p==="upload"?"border-[#1e90ff] text-[#1e90ff]":"border-gray-700 text-gray-400 hover:text-white"}`,children:"Fichier"})]}),p==="url"?x.jsx("input",{value:c.featuredImage,onChange:M=>d(R=>({...R,featuredImage:M.target.value})),placeholder:"https://...",className:"w-full px-3 py-2 bg-transparent border border-gray-600 rounded-lg focus:outline-none focus:border-[#1e90ff] transition-colors"}):x.jsxs(x.Fragment,{children:[x.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:N,className:"hidden"}),x.jsxs("button",{type:"button",onClick:()=>{var M;return(M=m.current)==null?void 0:M.click()},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-600 rounded-lg text-sm text-gray-300 hover:text-white hover:border-[#1e90ff] transition-colors",children:[x.jsx(cE,{size:14})," Choisir un fichier"]})]}),c.featuredImage&&x.jsxs("div",{className:"mt-3 relative inline-block",children:[x.jsx("img",{src:c.featuredImage,alt:"Aperçu",className:"h-28 w-auto rounded-lg border border-gray-700 object-cover"}),x.jsx("button",{type:"button",onClick:()=>d(M=>({...M,featuredImage:""})),className:"absolute -top-2 -right-2 bg-red-600 rounded-full p-0.5 text-white hover:bg-red-500",children:x.jsx(ud,{size:12})})]})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm text-gray-400 mb-2",children:"Contenu"}),x.jsx(zR,{content:c.content,onChange:M=>d(R=>({...R,content:M}))},a??"new")]}),x.jsxs("details",{className:"group",children:[x.jsxs("summary",{className:"cursor-pointer text-sm text-gray-500 hover:text-gray-300 transition-colors list-none flex items-center gap-1.5 select-none",children:[x.jsx("span",{className:"group-open:rotate-90 transition-transform inline-block",children:"▶"}),"SEO ",x.jsx("span",{className:"text-gray-700",children:"(optionnel)"})]}),x.jsxs("div",{className:"mt-3 space-y-3 pl-4 border-l border-gray-800",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"Meta title"}),x.jsx("input",{value:c.metaTitle,onChange:M=>d(R=>({...R,metaTitle:M.target.value})),placeholder:"Titre pour les moteurs de recherche",maxLength:60,className:"w-full px-3 py-2 bg-transparent border border-gray-700 rounded-lg focus:outline-none focus:border-[#1e90ff] transition-colors text-sm"}),x.jsxs("p",{className:"text-gray-700 text-xs mt-1",children:[c.metaTitle.length,"/60"]})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"Meta description"}),x.jsx("textarea",{value:c.metaDesc,onChange:M=>d(R=>({...R,metaDesc:M.target.value})),placeholder:"Description pour les moteurs de recherche",maxLength:160,rows:2,className:"w-full px-3 py-2 bg-transparent border border-gray-700 rounded-lg focus:outline-none focus:border-[#1e90ff] transition-colors text-sm resize-none"}),x.jsxs("p",{className:"text-gray-700 text-xs mt-1",children:[c.metaDesc.length,"/160"]})]})]})]}),x.jsxs("div",{className:"flex items-center gap-4 pt-1",children:[x.jsxs("button",{type:"submit",className:"inline-flex items-center gap-2 px-6 py-2.5 bg-[#1e90ff] rounded-lg text-white font-medium hover:bg-[#1e90ff]/90 transition-colors",children:[x.jsx(oE,{size:15}),a?"Sauvegarder":"Publier"]}),f==="ok"&&x.jsx("span",{className:"text-green-400 text-sm",children:a?"Sauvegardé !":"Publié !"}),a&&x.jsx("button",{type:"button",onClick:k,className:"text-gray-500 hover:text-white text-sm transition-colors",children:"Annuler"})]})]})]}),o.length>0&&x.jsxs("div",{className:"space-y-3",children:[x.jsxs("h2",{className:"text-xl font-bold",children:["Tous les articles (",o.length,")"]}),o.map(M=>{const R=Fp(M.id),_=R&&E(M.id),Z=!R;return x.jsxs("div",{className:`flex items-center justify-between bg-[#0a0a0a] border rounded-xl p-4 transition-colors ${a===M.id?"border-[#1e90ff]/60":"border-[#1e90ff]/15 hover:border-[#1e90ff]/30"}`,children:[x.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[M.featuredImage&&x.jsx("img",{src:M.featuredImage,alt:"",className:"w-12 h-12 rounded-lg object-cover shrink-0"}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[x.jsx("p",{className:"font-semibold truncate",children:M.title}),R&&!_&&x.jsx("span",{className:"text-xs text-gray-600 border border-gray-800 rounded px-1.5 py-0.5 shrink-0",children:"original"}),_&&x.jsx("span",{className:"text-xs text-[#1e90ff]/60 border border-[#1e90ff]/20 rounded px-1.5 py-0.5 shrink-0",children:"modifié"})]}),x.jsxs("p",{className:"text-gray-600 text-sm truncate",children:["/blog/",M.id]})]})]}),x.jsxs("div",{className:"flex items-center gap-1 ml-4 shrink-0",children:[x.jsx(Dt,{to:`/blog/${M.id}`,className:"p-2 text-gray-500 hover:text-[#1e90ff] transition-colors",title:"Voir",children:x.jsx(GC,{size:16})}),x.jsx("button",{onClick:()=>w(M),className:"p-2 text-gray-500 hover:text-white transition-colors",title:"Modifier",children:x.jsx(rE,{size:16})}),Z&&x.jsx("button",{onClick:()=>b(M.id),className:"p-2 text-gray-500 hover:text-red-400 transition-colors",title:"Supprimer",children:x.jsx(aE,{size:16})}),_&&x.jsx("button",{onClick:()=>b(M.id),className:"p-2 text-gray-500 hover:text-yellow-400 transition-colors",title:"Réinitialiser",children:x.jsx(sE,{size:16})})]})]},M.id)})]})]})}):x.jsx("div",{className:"min-h-screen bg-black text-white flex items-center justify-center px-4",children:x.jsxs("div",{className:"w-full max-w-sm space-y-6 bg-black/80 p-8 rounded-lg border border-[#1e90ff]/30",children:[x.jsx("h1",{className:"text-2xl font-bold text-center",children:"Admin Blog"}),x.jsxs("form",{onSubmit:v,className:"space-y-4",children:[x.jsx("input",{type:"password",value:n,onChange:M=>r(M.target.value),placeholder:"Mot de passe",autoFocus:!0,className:"block w-full px-3 py-2 bg-transparent border border-gray-600 rounded placeholder-gray-400 focus:outline-none focus:border-[#1e90ff]"}),i&&x.jsx("p",{className:"text-red-400 text-sm",children:i}),x.jsx("button",{type:"submit",className:"w-full py-2 px-4 bg-[#1e90ff] rounded text-white font-medium hover:bg-[#1e90ff]/90 transition-colors",children:"Connexion"})]})]})})}function FR(){return x.jsx(IC,{children:x.jsxs(aC,{children:[x.jsx(Xi,{path:"/",element:x.jsx(VC,{})}),x.jsx(Xi,{path:"/blog",element:x.jsx(fE,{})}),x.jsx(Xi,{path:"/blog/:id",element:x.jsx(mE,{})}),x.jsx(Xi,{path:"/blog-admin",element:x.jsx($R,{})})]})})}D0(document.getElementById("root")).render(x.jsx(C.StrictMode,{children:x.jsx(FR,{})}));

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.