936 lines
685 KiB
JavaScript
936 lines
685 KiB
JavaScript
function xS(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function xu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bv={exports:{}},ku={},Hv={exports:{}},Q={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var xa=Symbol.for("react.element"),kS=Symbol.for("react.portal"),wS=Symbol.for("react.fragment"),SS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),CS=Symbol.for("react.provider"),ES=Symbol.for("react.context"),TS=Symbol.for("react.forward_ref"),NS=Symbol.for("react.suspense"),MS=Symbol.for("react.memo"),PS=Symbol.for("react.lazy"),ty=Symbol.iterator;function AS(t){return t===null||typeof t!="object"?null:(t=ty&&t[ty]||t["@@iterator"],typeof t=="function"?t:null)}var Uv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vv=Object.assign,Wv={};function _o(t,e,n){this.props=t,this.context=e,this.refs=Wv,this.updater=n||Uv}_o.prototype.isReactComponent={};_o.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")};_o.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Kv(){}Kv.prototype=_o.prototype;function sm(t,e,n){this.props=t,this.context=e,this.refs=Wv,this.updater=n||Uv}var am=sm.prototype=new Kv;am.constructor=sm;Vv(am,_o.prototype);am.isPureReactComponent=!0;var ny=Array.isArray,Jv=Object.prototype.hasOwnProperty,lm={current:null},qv={key:!0,ref:!0,__self:!0,__source:!0};function Gv(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)Jv.call(e,r)&&!qv.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xa,type:t,key:o,ref:s,props:i,_owner:lm.current}}function RS(t,e){return{$$typeof:xa,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function cm(t){return typeof t=="object"&&t!==null&&t.$$typeof===xa}function jS(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var ry=/\/+/g;function vf(t,e){return typeof t=="object"&&t!==null&&t.key!=null?jS(""+t.key):e.toString(36)}function xl(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case xa:case kS:s=!0}}if(s)return s=t,i=i(s),t=r===""?"."+vf(s,0):r,ny(i)?(n="",t!=null&&(n=t.replace(ry,"$&/")+"/"),xl(i,e,n,"",function(c){return c})):i!=null&&(cm(i)&&(i=RS(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(ry,"$&/")+"/")+t)),e.push(i)),1;if(s=0,r=r===""?".":r+":",ny(t))for(var a=0;a<t.length;a++){o=t[a];var l=r+vf(o,a);s+=xl(o,e,n,l,i)}else if(l=AS(t),typeof l=="function")for(t=l.call(t),a=0;!(o=t.next()).done;)o=o.value,l=r+vf(o,a++),s+=xl(o,e,n,l,i);else if(o==="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 s}function za(t,e,n){if(t==null)return t;var r=[],i=0;return xl(t,r,"","",function(o){return e.call(n,o,i++)}),r}function IS(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 at={current:null},kl={transition:null},DS={ReactCurrentDispatcher:at,ReactCurrentBatchConfig:kl,ReactCurrentOwner:lm};Q.Children={map:za,forEach:function(t,e,n){za(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return za(t,function(){e++}),e},toArray:function(t){return za(t,function(e){return e})||[]},only:function(t){if(!cm(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Q.Component=_o;Q.Fragment=wS;Q.Profiler=OS;Q.PureComponent=sm;Q.StrictMode=SS;Q.Suspense=NS;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DS;Q.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=Vv({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=lm.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Jv.call(e,l)&&!qv.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:xa,type:t.type,key:i,ref:o,props:r,_owner:s}};Q.createContext=function(t){return t={$$typeof:ES,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:CS,_context:t},t.Consumer=t};Q.createElement=Gv;Q.createFactory=function(t){var e=Gv.bind(null,t);return e.type=t,e};Q.createRef=function(){return{current:null}};Q.forwardRef=function(t){return{$$typeof:TS,render:t}};Q.isValidElement=cm;Q.lazy=function(t){return{$$typeof:PS,_payload:{_status:-1,_result:t},_init:IS}};Q.memo=function(t,e){return{$$typeof:MS,type:t,compare:e===void 0?null:e}};Q.startTransition=function(t){var e=kl.transition;kl.transition={};try{t()}finally{kl.transition=e}};Q.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Q.useCallback=function(t,e){return at.current.useCallback(t,e)};Q.useContext=function(t){return at.current.useContext(t)};Q.useDebugValue=function(){};Q.useDeferredValue=function(t){return at.current.useDeferredValue(t)};Q.useEffect=function(t,e){return at.current.useEffect(t,e)};Q.useId=function(){return at.current.useId()};Q.useImperativeHandle=function(t,e,n){return at.current.useImperativeHandle(t,e,n)};Q.useInsertionEffect=function(t,e){return at.current.useInsertionEffect(t,e)};Q.useLayoutEffect=function(t,e){return at.current.useLayoutEffect(t,e)};Q.useMemo=function(t,e){return at.current.useMemo(t,e)};Q.useReducer=function(t,e,n){return at.current.useReducer(t,e,n)};Q.useRef=function(t){return at.current.useRef(t)};Q.useState=function(t){return at.current.useState(t)};Q.useSyncExternalStore=function(t,e,n){return at.current.useSyncExternalStore(t,e,n)};Q.useTransition=function(){return at.current.useTransition()};Q.version="18.2.0";Hv.exports=Q;var S=Hv.exports;const M=xu(S),LS=xS({__proto__:null,default:M},[S]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var _S=S,zS=Symbol.for("react.element"),$S=Symbol.for("react.fragment"),FS=Object.prototype.hasOwnProperty,BS=_S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,HS={key:!0,ref:!0,__self:!0,__source:!0};function Yv(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)FS.call(e,r)&&!HS.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:zS,type:t,key:o,ref:s,props:i,_owner:BS.current}}ku.Fragment=$S;ku.jsx=Yv;ku.jsxs=Yv;Bv.exports=ku;var b=Bv.exports,Pd={},Qv={exports:{}},Et={},Xv={exports:{}},Zv={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(t){function e(D,W){var G=D.length;D.push(W);e:for(;0<G;){var we=G-1>>>1,je=D[we];if(0<i(je,W))D[we]=W,D[G]=je,G=we;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var W=D[0],G=D.pop();if(G!==W){D[0]=G;e:for(var we=0,je=D.length,La=je>>>1;we<La;){var Br=2*(we+1)-1,yf=D[Br],Hr=Br+1,_a=D[Hr];if(0>i(yf,G))Hr<je&&0>i(_a,yf)?(D[we]=_a,D[Hr]=G,we=Hr):(D[we]=yf,D[Br]=G,we=Br);else if(Hr<je&&0>i(_a,G))D[we]=_a,D[Hr]=G,we=Hr;else break e}}return W}function i(D,W){var G=D.sortIndex-W.sortIndex;return G!==0?G:D.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,d=3,h=!1,p=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=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(D){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=D)r(c),W.sortIndex=W.expirationTime,e(l,W);else break;W=n(c)}}function w(D){if(m=!1,k(D),!p)if(n(l)!==null)p=!0,Fn(O);else{var W=n(c);W!==null&&nn(w,W.startTime-D)}}function O(D,W){p=!1,m&&(m=!1,g(j),j=-1),h=!0;var G=d;try{for(k(W),f=n(l);f!==null&&(!(f.expirationTime>W)||D&&!pe());){var we=f.callback;if(typeof we=="function"){f.callback=null,d=f.priorityLevel;var je=we(f.expirationTime<=W);W=t.unstable_now(),typeof je=="function"?f.callback=je:f===n(l)&&r(l),k(W)}else r(l);f=n(l)}if(f!==null)var La=!0;else{var Br=n(c);Br!==null&&nn(w,Br.startTime-W),La=!1}return La}finally{f=null,d=G,h=!1}}var C=!1,T=null,j=-1,L=5,H=-1;function pe(){return!(t.unstable_now()-H<L)}function Je(){if(T!==null){var D=t.unstable_now();H=D;var W=!0;try{W=T(!0,D)}finally{W?Te():(C=!1,T=null)}}else C=!1}var Te;if(typeof y=="function")Te=function(){y(Je)};else if(typeof MessageChannel<"u"){var Vo=new MessageChannel,Wo=Vo.port2;Vo.port1.onmessage=Je,Te=function(){Wo.postMessage(null)}}else Te=function(){v(Je,0)};function Fn(D){T=D,C||(C=!0,Te())}function nn(D,W){j=v(function(){D(t.unstable_now())},W)}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(D){D.callback=null},t.unstable_continueExecution=function(){p||h||(p=!0,Fn(O))},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(D){switch(d){case 1:case 2:case 3:var W=3;break;default:W=d}var G=d;d=W;try{return D()}finally{d=G}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var G=d;d=D;try{return W()}finally{d=G}},t.unstable_scheduleCallback=function(D,W,G){var we=t.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?we+G:we):G=we,D){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=G+je,D={id:u++,callback:W,priorityLevel:D,startTime:G,expirationTime:je,sortIndex:-1},G>we?(D.sortIndex=G,e(c,D),n(l)===null&&D===n(c)&&(m?(g(j),j=-1):m=!0,nn(w,G-we))):(D.sortIndex=je,e(l,D),p||h||(p=!0,Fn(O))),D},t.unstable_shouldYield=pe,t.unstable_wrapCallback=function(D){var W=d;return function(){var G=d;d=W;try{return D.apply(this,arguments)}finally{d=G}}}})(Zv);Xv.exports=Zv;var US=Xv.exports;/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var eb=S,Ct=US;function P(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 tb=new Set,Ds={};function Si(t,e){bo(t,e),bo(t+"Capture",e)}function bo(t,e){for(Ds[t]=e,t=0;t<e.length;t++)tb.add(e[t])}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ad=Object.prototype.hasOwnProperty,VS=/^[: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]*$/,iy={},oy={};function WS(t){return Ad.call(oy,t)?!0:Ad.call(iy,t)?!1:VS.test(t)?oy[t]=!0:(iy[t]=!0,!1)}function KS(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 JS(t,e,n,r){if(e===null||typeof e>"u"||KS(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 lt(t,e,n,r,i,o,s){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=o,this.removeEmptyString=s}var Ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ke[t]=new lt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ke[e]=new lt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ke[t]=new lt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ke[t]=new lt(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){Ke[t]=new lt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ke[t]=new lt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ke[t]=new lt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ke[t]=new lt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ke[t]=new lt(t,5,!1,t.toLowerCase(),null,!1,!1)});var um=/[\-:]([a-z])/g;function fm(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(um,fm);Ke[e]=new lt(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(um,fm);Ke[e]=new lt(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(um,fm);Ke[e]=new lt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ke[t]=new lt(t,1,!1,t.toLowerCase(),null,!1,!1)});Ke.xlinkHref=new lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ke[t]=new lt(t,1,!1,t.toLowerCase(),null,!0,!0)});function dm(t,e,n,r){var i=Ke.hasOwnProperty(e)?Ke[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(JS(e,n,i,r)&&(n=null),r||i===null?WS(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 zn=eb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$a=Symbol.for("react.element"),Hi=Symbol.for("react.portal"),Ui=Symbol.for("react.fragment"),hm=Symbol.for("react.strict_mode"),Rd=Symbol.for("react.profiler"),nb=Symbol.for("react.provider"),rb=Symbol.for("react.context"),pm=Symbol.for("react.forward_ref"),jd=Symbol.for("react.suspense"),Id=Symbol.for("react.suspense_list"),mm=Symbol.for("react.memo"),qn=Symbol.for("react.lazy"),ib=Symbol.for("react.offscreen"),sy=Symbol.iterator;function Ko(t){return t===null||typeof t!="object"?null:(t=sy&&t[sy]||t["@@iterator"],typeof t=="function"?t:null)}var ve=Object.assign,bf;function rs(t){if(bf===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);bf=e&&e[1]||""}return`
|
||
`+bf+t}var xf=!1;function kf(t,e){if(!t||xf)return"";xf=!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(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
||
`),o=r.stack.split(`
|
||
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
|
||
`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{xf=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?rs(t):""}function qS(t){switch(t.tag){case 5:return rs(t.type);case 16:return rs("Lazy");case 13:return rs("Suspense");case 19:return rs("SuspenseList");case 0:case 2:case 15:return t=kf(t.type,!1),t;case 11:return t=kf(t.type.render,!1),t;case 1:return t=kf(t.type,!0),t;default:return""}}function Dd(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 Ui:return"Fragment";case Hi:return"Portal";case Rd:return"Profiler";case hm:return"StrictMode";case jd:return"Suspense";case Id:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case rb:return(t.displayName||"Context")+".Consumer";case nb:return(t._context.displayName||"Context")+".Provider";case pm:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case mm:return e=t.displayName||null,e!==null?e:Dd(t.type)||"Memo";case qn:e=t._payload,t=t._init;try{return Dd(t(e))}catch{}}return null}function GS(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 Dd(e);case 8:return e===hm?"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 Cr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ob(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function YS(t){var e=ob(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,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Fa(t){t._valueTracker||(t._valueTracker=YS(t))}function sb(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=ob(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Hl(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 Ld(t,e){var n=e.checked;return ve({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function ay(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Cr(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 ab(t,e){e=e.checked,e!=null&&dm(t,"checked",e,!1)}function _d(t,e){ab(t,e);var n=Cr(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")?zd(t,e.type,n):e.hasOwnProperty("defaultValue")&&zd(t,e.type,Cr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ly(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 zd(t,e,n){(e!=="number"||Hl(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var is=Array.isArray;function ao(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=""+Cr(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 $d(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(P(91));return ve({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function cy(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(P(92));if(is(n)){if(1<n.length)throw Error(P(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Cr(n)}}function lb(t,e){var n=Cr(e.value),r=Cr(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 uy(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function cb(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 Fd(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?cb(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ba,ub=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(Ba=Ba||document.createElement("div"),Ba.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ba.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ls(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ps={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},QS=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(t){QS.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ps[e]=ps[t]})});function fb(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ps.hasOwnProperty(t)&&ps[t]?(""+e).trim():e+"px"}function db(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fb(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var XS=ve({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 Bd(t,e){if(e){if(XS[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(P(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(P(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(P(61))}if(e.style!=null&&typeof e.style!="object")throw Error(P(62))}}function Hd(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 Ud=null;function gm(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Vd=null,lo=null,co=null;function fy(t){if(t=Sa(t)){if(typeof Vd!="function")throw Error(P(280));var e=t.stateNode;e&&(e=Eu(e),Vd(t.stateNode,t.type,e))}}function hb(t){lo?co?co.push(t):co=[t]:lo=t}function pb(){if(lo){var t=lo,e=co;if(co=lo=null,fy(t),e)for(t=0;t<e.length;t++)fy(e[t])}}function mb(t,e){return t(e)}function gb(){}var wf=!1;function yb(t,e,n){if(wf)return t(e,n);wf=!0;try{return mb(t,e,n)}finally{wf=!1,(lo!==null||co!==null)&&(gb(),pb())}}function _s(t,e){var n=t.stateNode;if(n===null)return null;var r=Eu(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(P(231,e,typeof n));return n}var Wd=!1;if(An)try{var Jo={};Object.defineProperty(Jo,"passive",{get:function(){Wd=!0}}),window.addEventListener("test",Jo,Jo),window.removeEventListener("test",Jo,Jo)}catch{Wd=!1}function ZS(t,e,n,r,i,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var ms=!1,Ul=null,Vl=!1,Kd=null,eO={onError:function(t){ms=!0,Ul=t}};function tO(t,e,n,r,i,o,s,a,l){ms=!1,Ul=null,ZS.apply(eO,arguments)}function nO(t,e,n,r,i,o,s,a,l){if(tO.apply(this,arguments),ms){if(ms){var c=Ul;ms=!1,Ul=null}else throw Error(P(198));Vl||(Vl=!0,Kd=c)}}function Oi(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 vb(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 dy(t){if(Oi(t)!==t)throw Error(P(188))}function rO(t){var e=t.alternate;if(!e){if(e=Oi(t),e===null)throw Error(P(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return dy(i),t;if(o===r)return dy(i),e;o=o.sibling}throw Error(P(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?t:e}function bb(t){return t=rO(t),t!==null?xb(t):null}function xb(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=xb(t);if(e!==null)return e;t=t.sibling}return null}var kb=Ct.unstable_scheduleCallback,hy=Ct.unstable_cancelCallback,iO=Ct.unstable_shouldYield,oO=Ct.unstable_requestPaint,Se=Ct.unstable_now,sO=Ct.unstable_getCurrentPriorityLevel,ym=Ct.unstable_ImmediatePriority,wb=Ct.unstable_UserBlockingPriority,Wl=Ct.unstable_NormalPriority,aO=Ct.unstable_LowPriority,Sb=Ct.unstable_IdlePriority,wu=null,gn=null;function lO(t){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(wu,t,void 0,(t.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:fO,cO=Math.log,uO=Math.LN2;function fO(t){return t>>>=0,t===0?32:31-(cO(t)/uO|0)|0}var Ha=64,Ua=4194304;function ss(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 Kl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=ss(a):(o&=s,o!==0&&(r=ss(o)))}else s=n&~i,s!==0?r=ss(s):o!==0&&(r=ss(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&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-Yt(e),i=1<<n,r|=t[n],e&=~i;return r}function dO(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 hO(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-Yt(o),a=1<<s,l=i[s];l===-1?(!(a&n)||a&r)&&(i[s]=dO(a,e)):l<=e&&(t.expiredLanes|=a),o&=~a}}function Jd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ob(){var t=Ha;return Ha<<=1,!(Ha&4194240)&&(Ha=64),t}function Sf(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ka(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Yt(e),t[e]=n}function pO(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-Yt(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}function vm(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Yt(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ne=0;function Cb(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Eb,bm,Tb,Nb,Mb,qd=!1,Va=[],ur=null,fr=null,dr=null,zs=new Map,$s=new Map,Zn=[],mO="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 py(t,e){switch(t){case"focusin":case"focusout":ur=null;break;case"dragenter":case"dragleave":fr=null;break;case"mouseover":case"mouseout":dr=null;break;case"pointerover":case"pointerout":zs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(e.pointerId)}}function qo(t,e,n,r,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Sa(e),e!==null&&bm(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function gO(t,e,n,r,i){switch(e){case"focusin":return ur=qo(ur,t,e,n,r,i),!0;case"dragenter":return fr=qo(fr,t,e,n,r,i),!0;case"mouseover":return dr=qo(dr,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return zs.set(o,qo(zs.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,$s.set(o,qo($s.get(o)||null,t,e,n,r,i)),!0}return!1}function Pb(t){var e=Gr(t.target);if(e!==null){var n=Oi(e);if(n!==null){if(e=n.tag,e===13){if(e=vb(n),e!==null){t.blockedOn=e,Mb(t.priority,function(){Tb(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 wl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Gd(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Ud=r,n.target.dispatchEvent(r),Ud=null}else return e=Sa(n),e!==null&&bm(e),t.blockedOn=n,!1;e.shift()}return!0}function my(t,e,n){wl(t)&&n.delete(e)}function yO(){qd=!1,ur!==null&&wl(ur)&&(ur=null),fr!==null&&wl(fr)&&(fr=null),dr!==null&&wl(dr)&&(dr=null),zs.forEach(my),$s.forEach(my)}function Go(t,e){t.blockedOn===e&&(t.blockedOn=null,qd||(qd=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,yO)))}function Fs(t){function e(i){return Go(i,t)}if(0<Va.length){Go(Va[0],t);for(var n=1;n<Va.length;n++){var r=Va[n];r.blockedOn===t&&(r.blockedOn=null)}}for(ur!==null&&Go(ur,t),fr!==null&&Go(fr,t),dr!==null&&Go(dr,t),zs.forEach(e),$s.forEach(e),n=0;n<Zn.length;n++)r=Zn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Zn.length&&(n=Zn[0],n.blockedOn===null);)Pb(n),n.blockedOn===null&&Zn.shift()}var uo=zn.ReactCurrentBatchConfig,Jl=!0;function vO(t,e,n,r){var i=ne,o=uo.transition;uo.transition=null;try{ne=1,xm(t,e,n,r)}finally{ne=i,uo.transition=o}}function bO(t,e,n,r){var i=ne,o=uo.transition;uo.transition=null;try{ne=4,xm(t,e,n,r)}finally{ne=i,uo.transition=o}}function xm(t,e,n,r){if(Jl){var i=Gd(t,e,n,r);if(i===null)jf(t,e,r,ql,n),py(t,r);else if(gO(i,t,e,n,r))r.stopPropagation();else if(py(t,r),e&4&&-1<mO.indexOf(t)){for(;i!==null;){var o=Sa(i);if(o!==null&&Eb(o),o=Gd(t,e,n,r),o===null&&jf(t,e,r,ql,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else jf(t,e,r,null,n)}}var ql=null;function Gd(t,e,n,r){if(ql=null,t=gm(r),t=Gr(t),t!==null)if(e=Oi(t),e===null)t=null;else if(n=e.tag,n===13){if(t=vb(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 ql=t,null}function Ab(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(sO()){case ym:return 1;case wb:return 4;case Wl:case aO:return 16;case Sb:return 536870912;default:return 16}default:return 16}}var rr=null,km=null,Sl=null;function Rb(){if(Sl)return Sl;var t,e=km,n=e.length,r,i="value"in rr?rr.value:rr.textContent,o=i.length;for(t=0;t<n&&e[t]===i[t];t++);var s=n-t;for(r=1;r<=s&&e[n-r]===i[o-r];r++);return Sl=i.slice(t,1<r?1-r:void 0)}function Ol(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 Wa(){return!0}function gy(){return!1}function Tt(t){function e(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Wa:gy,this.isPropagationStopped=gy,this}return ve(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=Wa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wa)},persist:function(){},isPersistent:Wa}),e}var zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wm=Tt(zo),wa=ve({},zo,{view:0,detail:0}),xO=Tt(wa),Of,Cf,Yo,Su=ve({},wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sm,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!==Yo&&(Yo&&t.type==="mousemove"?(Of=t.screenX-Yo.screenX,Cf=t.screenY-Yo.screenY):Cf=Of=0,Yo=t),Of)},movementY:function(t){return"movementY"in t?t.movementY:Cf}}),yy=Tt(Su),kO=ve({},Su,{dataTransfer:0}),wO=Tt(kO),SO=ve({},wa,{relatedTarget:0}),Ef=Tt(SO),OO=ve({},zo,{animationName:0,elapsedTime:0,pseudoElement:0}),CO=Tt(OO),EO=ve({},zo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),TO=Tt(EO),NO=ve({},zo,{data:0}),vy=Tt(NO),MO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PO={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"},AO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RO(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=AO[t])?!!e[t]:!1}function Sm(){return RO}var jO=ve({},wa,{key:function(t){if(t.key){var e=MO[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ol(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PO[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sm,charCode:function(t){return t.type==="keypress"?Ol(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ol(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),IO=Tt(jO),DO=ve({},Su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),by=Tt(DO),LO=ve({},wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sm}),_O=Tt(LO),zO=ve({},zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),$O=Tt(zO),FO=ve({},Su,{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}),BO=Tt(FO),HO=[9,13,27,32],Om=An&&"CompositionEvent"in window,gs=null;An&&"documentMode"in document&&(gs=document.documentMode);var UO=An&&"TextEvent"in window&&!gs,jb=An&&(!Om||gs&&8<gs&&11>=gs),xy=" ",ky=!1;function Ib(t,e){switch(t){case"keyup":return HO.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Db(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Vi=!1;function VO(t,e){switch(t){case"compositionend":return Db(e);case"keypress":return e.which!==32?null:(ky=!0,xy);case"textInput":return t=e.data,t===xy&&ky?null:t;default:return null}}function WO(t,e){if(Vi)return t==="compositionend"||!Om&&Ib(t,e)?(t=Rb(),Sl=km=rr=null,Vi=!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 jb&&e.locale!=="ko"?null:e.data;default:return null}}var KO={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 wy(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!KO[t.type]:e==="textarea"}function Lb(t,e,n,r){hb(r),e=Gl(e,"onChange"),0<e.length&&(n=new wm("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var ys=null,Bs=null;function JO(t){Jb(t,0)}function Ou(t){var e=Ji(t);if(sb(e))return t}function qO(t,e){if(t==="change")return e}var _b=!1;if(An){var Tf;if(An){var Nf="oninput"in document;if(!Nf){var Sy=document.createElement("div");Sy.setAttribute("oninput","return;"),Nf=typeof Sy.oninput=="function"}Tf=Nf}else Tf=!1;_b=Tf&&(!document.documentMode||9<document.documentMode)}function Oy(){ys&&(ys.detachEvent("onpropertychange",zb),Bs=ys=null)}function zb(t){if(t.propertyName==="value"&&Ou(Bs)){var e=[];Lb(e,Bs,t,gm(t)),yb(JO,e)}}function GO(t,e,n){t==="focusin"?(Oy(),ys=e,Bs=n,ys.attachEvent("onpropertychange",zb)):t==="focusout"&&Oy()}function YO(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ou(Bs)}function QO(t,e){if(t==="click")return Ou(e)}function XO(t,e){if(t==="input"||t==="change")return Ou(e)}function ZO(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Zt=typeof Object.is=="function"?Object.is:ZO;function Hs(t,e){if(Zt(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(!Ad.call(e,i)||!Zt(t[i],e[i]))return!1}return!0}function Cy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ey(t,e){var n=Cy(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=Cy(n)}}function $b(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?$b(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Fb(){for(var t=window,e=Hl();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Hl(t.document)}return e}function Cm(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 eC(t){var e=Fb(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&$b(n.ownerDocument.documentElement,n)){if(r!==null&&Cm(n)){if(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=Ey(n,o);var s=Ey(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.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 tC=An&&"documentMode"in document&&11>=document.documentMode,Wi=null,Yd=null,vs=null,Qd=!1;function Ty(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qd||Wi==null||Wi!==Hl(r)||(r=Wi,"selectionStart"in r&&Cm(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}),vs&&Hs(vs,r)||(vs=r,r=Gl(Yd,"onSelect"),0<r.length&&(e=new wm("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Wi)))}function Ka(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ki={animationend:Ka("Animation","AnimationEnd"),animationiteration:Ka("Animation","AnimationIteration"),animationstart:Ka("Animation","AnimationStart"),transitionend:Ka("Transition","TransitionEnd")},Mf={},Bb={};An&&(Bb=document.createElement("div").style,"AnimationEvent"in window||(delete Ki.animationend.animation,delete Ki.animationiteration.animation,delete Ki.animationstart.animation),"TransitionEvent"in window||delete Ki.transitionend.transition);function Cu(t){if(Mf[t])return Mf[t];if(!Ki[t])return t;var e=Ki[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Bb)return Mf[t]=e[n];return t}var Hb=Cu("animationend"),Ub=Cu("animationiteration"),Vb=Cu("animationstart"),Wb=Cu("transitionend"),Kb=new Map,Ny="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 Rr(t,e){Kb.set(t,e),Si(e,[t])}for(var Pf=0;Pf<Ny.length;Pf++){var Af=Ny[Pf],nC=Af.toLowerCase(),rC=Af[0].toUpperCase()+Af.slice(1);Rr(nC,"on"+rC)}Rr(Hb,"onAnimationEnd");Rr(Ub,"onAnimationIteration");Rr(Vb,"onAnimationStart");Rr("dblclick","onDoubleClick");Rr("focusin","onFocus");Rr("focusout","onBlur");Rr(Wb,"onTransitionEnd");bo("onMouseEnter",["mouseout","mouseover"]);bo("onMouseLeave",["mouseout","mouseover"]);bo("onPointerEnter",["pointerout","pointerover"]);bo("onPointerLeave",["pointerout","pointerover"]);Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Si("onBeforeInput",["compositionend","keypress","textInput","paste"]);Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="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(" "),iC=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function My(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,nO(r,e,void 0,t),t.currentTarget=null}function Jb(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 o=void 0;if(e)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;My(i,a,c),o=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;My(i,a,c),o=l}}}if(Vl)throw t=Kd,Vl=!1,Kd=null,t}function se(t,e){var n=e[nh];n===void 0&&(n=e[nh]=new Set);var r=t+"__bubble";n.has(r)||(qb(e,t,2,!1),n.add(r))}function Rf(t,e,n){var r=0;e&&(r|=4),qb(n,t,r,e)}var Ja="_reactListening"+Math.random().toString(36).slice(2);function Us(t){if(!t[Ja]){t[Ja]=!0,tb.forEach(function(n){n!=="selectionchange"&&(iC.has(n)||Rf(n,!1,t),Rf(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ja]||(e[Ja]=!0,Rf("selectionchange",!1,e))}}function qb(t,e,n,r){switch(Ab(e)){case 1:var i=vO;break;case 4:i=bO;break;default:i=xm}n=i.bind(null,e,n,t),i=void 0,!Wd||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 jf(t,e,n,r,i){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Gr(a),s===null)return;if(l=s.tag,l===5||l===6){r=o=s;continue e}a=a.parentNode}}r=r.return}yb(function(){var c=o,u=gm(n),f=[];e:{var d=Kb.get(t);if(d!==void 0){var h=wm,p=t;switch(t){case"keypress":if(Ol(n)===0)break e;case"keydown":case"keyup":h=IO;break;case"focusin":p="focus",h=Ef;break;case"focusout":p="blur",h=Ef;break;case"beforeblur":case"afterblur":h=Ef;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=yy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=wO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=_O;break;case Hb:case Ub:case Vb:h=CO;break;case Wb:h=$O;break;case"scroll":h=xO;break;case"wheel":h=BO;break;case"copy":case"cut":case"paste":h=TO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=by}var m=(e&4)!==0,v=!m&&t==="scroll",g=m?d!==null?d+"Capture":null:d;m=[];for(var y=c,k;y!==null;){k=y;var w=k.stateNode;if(k.tag===5&&w!==null&&(k=w,g!==null&&(w=_s(y,g),w!=null&&m.push(Vs(y,w,k)))),v)break;y=y.return}0<m.length&&(d=new h(d,p,null,n,u),f.push({event:d,listeners:m}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",d&&n!==Ud&&(p=n.relatedTarget||n.fromElement)&&(Gr(p)||p[Rn]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?Gr(p):null,p!==null&&(v=Oi(p),p!==v||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(m=yy,w="onMouseLeave",g="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(m=by,w="onPointerLeave",g="onPointerEnter",y="pointer"),v=h==null?d:Ji(h),k=p==null?d:Ji(p),d=new m(w,y+"leave",h,n,u),d.target=v,d.relatedTarget=k,w=null,Gr(u)===c&&(m=new m(g,y+"enter",p,n,u),m.target=k,m.relatedTarget=v,w=m),v=w,h&&p)t:{for(m=h,g=p,y=0,k=m;k;k=Ei(k))y++;for(k=0,w=g;w;w=Ei(w))k++;for(;0<y-k;)m=Ei(m),y--;for(;0<k-y;)g=Ei(g),k--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=Ei(m),g=Ei(g)}m=null}else m=null;h!==null&&Py(f,d,h,m,!1),p!==null&&v!==null&&Py(f,v,p,m,!0)}}e:{if(d=c?Ji(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var O=qO;else if(wy(d))if(_b)O=XO;else{O=YO;var C=GO}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(O=QO);if(O&&(O=O(t,c))){Lb(f,O,n,u);break e}C&&C(t,d,c),t==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&zd(d,"number",d.value)}switch(C=c?Ji(c):window,t){case"focusin":(wy(C)||C.contentEditable==="true")&&(Wi=C,Yd=c,vs=null);break;case"focusout":vs=Yd=Wi=null;break;case"mousedown":Qd=!0;break;case"contextmenu":case"mouseup":case"dragend":Qd=!1,Ty(f,n,u);break;case"selectionchange":if(tC)break;case"keydown":case"keyup":Ty(f,n,u)}var T;if(Om)e:{switch(t){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Vi?Ib(t,n)&&(j="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(jb&&n.locale!=="ko"&&(Vi||j!=="onCompositionStart"?j==="onCompositionEnd"&&Vi&&(T=Rb()):(rr=u,km="value"in rr?rr.value:rr.textContent,Vi=!0)),C=Gl(c,j),0<C.length&&(j=new vy(j,t,null,n,u),f.push({event:j,listeners:C}),T?j.data=T:(T=Db(n),T!==null&&(j.data=T)))),(T=UO?VO(t,n):WO(t,n))&&(c=Gl(c,"onBeforeInput"),0<c.length&&(u=new vy("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=T))}Jb(f,e)})}function Vs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Gl(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=_s(t,n),o!=null&&r.unshift(Vs(t,o,i)),o=_s(t,e),o!=null&&r.push(Vs(t,o,i))),t=t.return}return r}function Ei(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Py(t,e,n,r,i){for(var o=e._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=_s(n,o),l!=null&&s.unshift(Vs(n,l,a))):i||(l=_s(n,o),l!=null&&s.push(Vs(n,l,a)))),n=n.return}s.length!==0&&t.push({event:e,listeners:s})}var oC=/\r\n?/g,sC=/\u0000|\uFFFD/g;function Ay(t){return(typeof t=="string"?t:""+t).replace(oC,`
|
||
`).replace(sC,"")}function qa(t,e,n){if(e=Ay(e),Ay(t)!==e&&n)throw Error(P(425))}function Yl(){}var Xd=null,Zd=null;function eh(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 th=typeof setTimeout=="function"?setTimeout:void 0,aC=typeof clearTimeout=="function"?clearTimeout:void 0,Ry=typeof Promise=="function"?Promise:void 0,lC=typeof queueMicrotask=="function"?queueMicrotask:typeof Ry<"u"?function(t){return Ry.resolve(null).then(t).catch(cC)}:th;function cC(t){setTimeout(function(){throw t})}function If(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),Fs(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Fs(e)}function hr(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 jy(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 $o=Math.random().toString(36).slice(2),un="__reactFiber$"+$o,Ws="__reactProps$"+$o,Rn="__reactContainer$"+$o,nh="__reactEvents$"+$o,uC="__reactListeners$"+$o,fC="__reactHandles$"+$o;function Gr(t){var e=t[un];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Rn]||n[un]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=jy(t);t!==null;){if(n=t[un])return n;t=jy(t)}return e}t=n,n=t.parentNode}return null}function Sa(t){return t=t[un]||t[Rn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ji(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(P(33))}function Eu(t){return t[Ws]||null}var rh=[],qi=-1;function jr(t){return{current:t}}function ce(t){0>qi||(t.current=rh[qi],rh[qi]=null,qi--)}function oe(t,e){qi++,rh[qi]=t.current,t.current=e}var Er={},Xe=jr(Er),pt=jr(!1),di=Er;function xo(t,e){var n=t.type.contextTypes;if(!n)return Er;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function mt(t){return t=t.childContextTypes,t!=null}function Ql(){ce(pt),ce(Xe)}function Iy(t,e,n){if(Xe.current!==Er)throw Error(P(168));oe(Xe,e),oe(pt,n)}function Gb(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(P(108,GS(t)||"Unknown",i));return ve({},n,r)}function Xl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Er,di=Xe.current,oe(Xe,t),oe(pt,pt.current),!0}function Dy(t,e,n){var r=t.stateNode;if(!r)throw Error(P(169));n?(t=Gb(t,e,di),r.__reactInternalMemoizedMergedChildContext=t,ce(pt),ce(Xe),oe(Xe,t)):ce(pt),oe(pt,n)}var Cn=null,Tu=!1,Df=!1;function Yb(t){Cn===null?Cn=[t]:Cn.push(t)}function dC(t){Tu=!0,Yb(t)}function Ir(){if(!Df&&Cn!==null){Df=!0;var t=0,e=ne;try{var n=Cn;for(ne=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Cn=null,Tu=!1}catch(i){throw Cn!==null&&(Cn=Cn.slice(t+1)),kb(ym,Ir),i}finally{ne=e,Df=!1}}return null}var Gi=[],Yi=0,Zl=null,ec=0,jt=[],It=0,hi=null,En=1,Tn="";function Ur(t,e){Gi[Yi++]=ec,Gi[Yi++]=Zl,Zl=t,ec=e}function Qb(t,e,n){jt[It++]=En,jt[It++]=Tn,jt[It++]=hi,hi=t;var r=En;t=Tn;var i=32-Yt(r)-1;r&=~(1<<i),n+=1;var o=32-Yt(e)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,En=1<<32-Yt(e)+i|n<<i|r,Tn=o+t}else En=1<<o|n<<i|r,Tn=t}function Em(t){t.return!==null&&(Ur(t,1),Qb(t,1,0))}function Tm(t){for(;t===Zl;)Zl=Gi[--Yi],Gi[Yi]=null,ec=Gi[--Yi],Gi[Yi]=null;for(;t===hi;)hi=jt[--It],jt[It]=null,Tn=jt[--It],jt[It]=null,En=jt[--It],jt[It]=null}var Ot=null,St=null,de=!1,Wt=null;function Xb(t,e){var n=Dt(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 Ly(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,Ot=t,St=hr(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Ot=t,St=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=hi!==null?{id:En,overflow:Tn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Ot=t,St=null,!0):!1;default:return!1}}function ih(t){return(t.mode&1)!==0&&(t.flags&128)===0}function oh(t){if(de){var e=St;if(e){var n=e;if(!Ly(t,e)){if(ih(t))throw Error(P(418));e=hr(n.nextSibling);var r=Ot;e&&Ly(t,e)?Xb(r,n):(t.flags=t.flags&-4097|2,de=!1,Ot=t)}}else{if(ih(t))throw Error(P(418));t.flags=t.flags&-4097|2,de=!1,Ot=t}}}function _y(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ot=t}function Ga(t){if(t!==Ot)return!1;if(!de)return _y(t),de=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!eh(t.type,t.memoizedProps)),e&&(e=St)){if(ih(t))throw Zb(),Error(P(418));for(;e;)Xb(t,e),e=hr(e.nextSibling)}if(_y(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(P(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){St=hr(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}St=null}}else St=Ot?hr(t.stateNode.nextSibling):null;return!0}function Zb(){for(var t=St;t;)t=hr(t.nextSibling)}function ko(){St=Ot=null,de=!1}function Nm(t){Wt===null?Wt=[t]:Wt.push(t)}var hC=zn.ReactCurrentBatchConfig;function Ut(t,e){if(t&&t.defaultProps){e=ve({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var tc=jr(null),nc=null,Qi=null,Mm=null;function Pm(){Mm=Qi=nc=null}function Am(t){var e=tc.current;ce(tc),t._currentValue=e}function sh(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 fo(t,e){nc=t,Mm=Qi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(dt=!0),t.firstContext=null)}function Ft(t){var e=t._currentValue;if(Mm!==t)if(t={context:t,memoizedValue:e,next:null},Qi===null){if(nc===null)throw Error(P(308));Qi=t,nc.dependencies={lanes:0,firstContext:t}}else Qi=Qi.next=t;return e}var Yr=null;function Rm(t){Yr===null?Yr=[t]:Yr.push(t)}function ex(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Rm(e)):(n.next=i.next,i.next=n),e.interleaved=n,jn(t,r)}function jn(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 Gn=!1;function jm(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tx(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 Nn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function pr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,jn(t,n)}return i=r.interleaved,i===null?(e.next=e,Rm(r)):(e.next=i.next,i.next=e),r.interleaved=e,jn(t,n)}function Cl(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,vm(t,n)}}function zy(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 rc(t,e,n,r){var i=t.updateQueue;Gn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,u=c=l=null,a=o;do{var d=a.lane,h=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,m=a;switch(d=e,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(h,f,d):p,d==null)break e;f=ve({},f,d);break e;case 2:Gn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=f):u=u.next=h,s|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);mi|=s,t.lanes=s,t.memoizedState=f}}function $y(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(P(191,i));i.call(r)}}}var nx=new eb.Component().refs;function ah(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ve({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Nu={isMounted:function(t){return(t=t._reactInternals)?Oi(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=nt(),i=gr(t),o=Nn(r,i);o.payload=e,n!=null&&(o.callback=n),e=pr(t,o,i),e!==null&&(Qt(e,t,i,r),Cl(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=nt(),i=gr(t),o=Nn(r,i);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=pr(t,o,i),e!==null&&(Qt(e,t,i,r),Cl(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=nt(),r=gr(t),i=Nn(n,r);i.tag=2,e!=null&&(i.callback=e),e=pr(t,i,r),e!==null&&(Qt(e,t,r,n),Cl(e,t,r))}};function Fy(t,e,n,r,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,s):e.prototype&&e.prototype.isPureReactComponent?!Hs(n,r)||!Hs(i,o):!0}function rx(t,e,n){var r=!1,i=Er,o=e.contextType;return typeof o=="object"&&o!==null?o=Ft(o):(i=mt(e)?di:Xe.current,r=e.contextTypes,o=(r=r!=null)?xo(t,i):Er),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Nu,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function By(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&&Nu.enqueueReplaceState(e,e.state,null)}function lh(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=nx,jm(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Ft(o):(o=mt(e)?di:Xe.current,i.context=xo(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(ah(t,e,o,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&&Nu.enqueueReplaceState(i,i.state,null),rc(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Qo(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(P(309));var r=n.stateNode}if(!r)throw Error(P(147,t));var i=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var a=i.refs;a===nx&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,t))}return t}function Ya(t,e){throw t=Object.prototype.toString.call(e),Error(P(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Hy(t){var e=t._init;return e(t._payload)}function ix(t){function e(g,y){if(t){var k=g.deletions;k===null?(g.deletions=[y],g.flags|=16):k.push(y)}}function n(g,y){if(!t)return null;for(;y!==null;)e(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=yr(g,y),g.index=0,g.sibling=null,g}function o(g,y,k){return g.index=k,t?(k=g.alternate,k!==null?(k=k.index,k<y?(g.flags|=2,y):k):(g.flags|=2,y)):(g.flags|=1048576,y)}function s(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,y,k,w){return y===null||y.tag!==6?(y=Hf(k,g.mode,w),y.return=g,y):(y=i(y,k),y.return=g,y)}function l(g,y,k,w){var O=k.type;return O===Ui?u(g,y,k.props.children,w,k.key):y!==null&&(y.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===qn&&Hy(O)===y.type)?(w=i(y,k.props),w.ref=Qo(g,y,k),w.return=g,w):(w=Al(k.type,k.key,k.props,null,g.mode,w),w.ref=Qo(g,y,k),w.return=g,w)}function c(g,y,k,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==k.containerInfo||y.stateNode.implementation!==k.implementation?(y=Uf(k,g.mode,w),y.return=g,y):(y=i(y,k.children||[]),y.return=g,y)}function u(g,y,k,w,O){return y===null||y.tag!==7?(y=oi(k,g.mode,w,O),y.return=g,y):(y=i(y,k),y.return=g,y)}function f(g,y,k){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Hf(""+y,g.mode,k),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $a:return k=Al(y.type,y.key,y.props,null,g.mode,k),k.ref=Qo(g,null,y),k.return=g,k;case Hi:return y=Uf(y,g.mode,k),y.return=g,y;case qn:var w=y._init;return f(g,w(y._payload),k)}if(is(y)||Ko(y))return y=oi(y,g.mode,k,null),y.return=g,y;Ya(g,y)}return null}function d(g,y,k,w){var O=y!==null?y.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return O!==null?null:a(g,y,""+k,w);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case $a:return k.key===O?l(g,y,k,w):null;case Hi:return k.key===O?c(g,y,k,w):null;case qn:return O=k._init,d(g,y,O(k._payload),w)}if(is(k)||Ko(k))return O!==null?null:u(g,y,k,w,null);Ya(g,k)}return null}function h(g,y,k,w,O){if(typeof w=="string"&&w!==""||typeof w=="number")return g=g.get(k)||null,a(y,g,""+w,O);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $a:return g=g.get(w.key===null?k:w.key)||null,l(y,g,w,O);case Hi:return g=g.get(w.key===null?k:w.key)||null,c(y,g,w,O);case qn:var C=w._init;return h(g,y,k,C(w._payload),O)}if(is(w)||Ko(w))return g=g.get(k)||null,u(y,g,w,O,null);Ya(y,w)}return null}function p(g,y,k,w){for(var O=null,C=null,T=y,j=y=0,L=null;T!==null&&j<k.length;j++){T.index>j?(L=T,T=null):L=T.sibling;var H=d(g,T,k[j],w);if(H===null){T===null&&(T=L);break}t&&T&&H.alternate===null&&e(g,T),y=o(H,y,j),C===null?O=H:C.sibling=H,C=H,T=L}if(j===k.length)return n(g,T),de&&Ur(g,j),O;if(T===null){for(;j<k.length;j++)T=f(g,k[j],w),T!==null&&(y=o(T,y,j),C===null?O=T:C.sibling=T,C=T);return de&&Ur(g,j),O}for(T=r(g,T);j<k.length;j++)L=h(T,g,j,k[j],w),L!==null&&(t&&L.alternate!==null&&T.delete(L.key===null?j:L.key),y=o(L,y,j),C===null?O=L:C.sibling=L,C=L);return t&&T.forEach(function(pe){return e(g,pe)}),de&&Ur(g,j),O}function m(g,y,k,w){var O=Ko(k);if(typeof O!="function")throw Error(P(150));if(k=O.call(k),k==null)throw Error(P(151));for(var C=O=null,T=y,j=y=0,L=null,H=k.next();T!==null&&!H.done;j++,H=k.next()){T.index>j?(L=T,T=null):L=T.sibling;var pe=d(g,T,H.value,w);if(pe===null){T===null&&(T=L);break}t&&T&&pe.alternate===null&&e(g,T),y=o(pe,y,j),C===null?O=pe:C.sibling=pe,C=pe,T=L}if(H.done)return n(g,T),de&&Ur(g,j),O;if(T===null){for(;!H.done;j++,H=k.next())H=f(g,H.value,w),H!==null&&(y=o(H,y,j),C===null?O=H:C.sibling=H,C=H);return de&&Ur(g,j),O}for(T=r(g,T);!H.done;j++,H=k.next())H=h(T,g,j,H.value,w),H!==null&&(t&&H.alternate!==null&&T.delete(H.key===null?j:H.key),y=o(H,y,j),C===null?O=H:C.sibling=H,C=H);return t&&T.forEach(function(Je){return e(g,Je)}),de&&Ur(g,j),O}function v(g,y,k,w){if(typeof k=="object"&&k!==null&&k.type===Ui&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case $a:e:{for(var O=k.key,C=y;C!==null;){if(C.key===O){if(O=k.type,O===Ui){if(C.tag===7){n(g,C.sibling),y=i(C,k.props.children),y.return=g,g=y;break e}}else if(C.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===qn&&Hy(O)===C.type){n(g,C.sibling),y=i(C,k.props),y.ref=Qo(g,C,k),y.return=g,g=y;break e}n(g,C);break}else e(g,C);C=C.sibling}k.type===Ui?(y=oi(k.props.children,g.mode,w,k.key),y.return=g,g=y):(w=Al(k.type,k.key,k.props,null,g.mode,w),w.ref=Qo(g,y,k),w.return=g,g=w)}return s(g);case Hi:e:{for(C=k.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===k.containerInfo&&y.stateNode.implementation===k.implementation){n(g,y.sibling),y=i(y,k.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else e(g,y);y=y.sibling}y=Uf(k,g.mode,w),y.return=g,g=y}return s(g);case qn:return C=k._init,v(g,y,C(k._payload),w)}if(is(k))return p(g,y,k,w);if(Ko(k))return m(g,y,k,w);Ya(g,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,k),y.return=g,g=y):(n(g,y),y=Hf(k,g.mode,w),y.return=g,g=y),s(g)):n(g,y)}return v}var wo=ix(!0),ox=ix(!1),Oa={},yn=jr(Oa),Ks=jr(Oa),Js=jr(Oa);function Qr(t){if(t===Oa)throw Error(P(174));return t}function Im(t,e){switch(oe(Js,e),oe(Ks,t),oe(yn,Oa),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Fd(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Fd(e,t)}ce(yn),oe(yn,e)}function So(){ce(yn),ce(Ks),ce(Js)}function sx(t){Qr(Js.current);var e=Qr(yn.current),n=Fd(e,t.type);e!==n&&(oe(Ks,t),oe(yn,n))}function Dm(t){Ks.current===t&&(ce(yn),ce(Ks))}var ge=jr(0);function ic(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 Lf=[];function Lm(){for(var t=0;t<Lf.length;t++)Lf[t]._workInProgressVersionPrimary=null;Lf.length=0}var El=zn.ReactCurrentDispatcher,_f=zn.ReactCurrentBatchConfig,pi=0,ye=null,Ne=null,Ie=null,oc=!1,bs=!1,qs=0,pC=0;function qe(){throw Error(P(321))}function _m(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Zt(t[n],e[n]))return!1;return!0}function zm(t,e,n,r,i,o){if(pi=o,ye=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,El.current=t===null||t.memoizedState===null?vC:bC,t=n(r,i),bs){o=0;do{if(bs=!1,qs=0,25<=o)throw Error(P(301));o+=1,Ie=Ne=null,e.updateQueue=null,El.current=xC,t=n(r,i)}while(bs)}if(El.current=sc,e=Ne!==null&&Ne.next!==null,pi=0,Ie=Ne=ye=null,oc=!1,e)throw Error(P(300));return t}function $m(){var t=qs!==0;return qs=0,t}function on(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ye.memoizedState=Ie=t:Ie=Ie.next=t,Ie}function Bt(){if(Ne===null){var t=ye.alternate;t=t!==null?t.memoizedState:null}else t=Ne.next;var e=Ie===null?ye.memoizedState:Ie.next;if(e!==null)Ie=e,Ne=t;else{if(t===null)throw Error(P(310));Ne=t,t={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Ie===null?ye.memoizedState=Ie=t:Ie=Ie.next=t}return Ie}function Gs(t,e){return typeof e=="function"?e(t):e}function zf(t){var e=Bt(),n=e.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=t;var r=Ne,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,l=null,c=o;do{var u=c.lane;if((pi&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,s=r):l=l.next=f,ye.lanes|=u,mi|=u}c=c.next}while(c!==null&&c!==o);l===null?s=r:l.next=a,Zt(r,e.memoizedState)||(dt=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do o=i.lane,ye.lanes|=o,mi|=o,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function $f(t){var e=Bt(),n=e.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);Zt(o,e.memoizedState)||(dt=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function ax(){}function lx(t,e){var n=ye,r=Bt(),i=e(),o=!Zt(r.memoizedState,i);if(o&&(r.memoizedState=i,dt=!0),r=r.queue,Fm(fx.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,Ys(9,ux.bind(null,n,r,i,e),void 0,null),Le===null)throw Error(P(349));pi&30||cx(n,e,i)}return i}function cx(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ye.updateQueue,e===null?(e={lastEffect:null,stores:null},ye.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function ux(t,e,n,r){e.value=n,e.getSnapshot=r,dx(e)&&hx(t)}function fx(t,e,n){return n(function(){dx(e)&&hx(t)})}function dx(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Zt(t,n)}catch{return!0}}function hx(t){var e=jn(t,1);e!==null&&Qt(e,t,1,-1)}function Uy(t){var e=on();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gs,lastRenderedState:t},e.queue=t,t=t.dispatch=yC.bind(null,ye,t),[e.memoizedState,t]}function Ys(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ye.updateQueue,e===null?(e={lastEffect:null,stores:null},ye.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 px(){return Bt().memoizedState}function Tl(t,e,n,r){var i=on();ye.flags|=t,i.memoizedState=Ys(1|e,n,void 0,r===void 0?null:r)}function Mu(t,e,n,r){var i=Bt();r=r===void 0?null:r;var o=void 0;if(Ne!==null){var s=Ne.memoizedState;if(o=s.destroy,r!==null&&_m(r,s.deps)){i.memoizedState=Ys(e,n,o,r);return}}ye.flags|=t,i.memoizedState=Ys(1|e,n,o,r)}function Vy(t,e){return Tl(8390656,8,t,e)}function Fm(t,e){return Mu(2048,8,t,e)}function mx(t,e){return Mu(4,2,t,e)}function gx(t,e){return Mu(4,4,t,e)}function yx(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 vx(t,e,n){return n=n!=null?n.concat([t]):null,Mu(4,4,yx.bind(null,e,t),n)}function Bm(){}function bx(t,e){var n=Bt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&_m(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function xx(t,e){var n=Bt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&_m(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function kx(t,e,n){return pi&21?(Zt(n,e)||(n=Ob(),ye.lanes|=n,mi|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,dt=!0),t.memoizedState=n)}function mC(t,e){var n=ne;ne=n!==0&&4>n?n:4,t(!0);var r=_f.transition;_f.transition={};try{t(!1),e()}finally{ne=n,_f.transition=r}}function wx(){return Bt().memoizedState}function gC(t,e,n){var r=gr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Sx(t))Ox(e,n);else if(n=ex(t,e,n,r),n!==null){var i=nt();Qt(n,t,r,i),Cx(n,e,r)}}function yC(t,e,n){var r=gr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Sx(t))Ox(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Zt(a,s)){var l=e.interleaved;l===null?(i.next=i,Rm(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=ex(t,e,i,r),n!==null&&(i=nt(),Qt(n,t,r,i),Cx(n,e,r))}}function Sx(t){var e=t.alternate;return t===ye||e!==null&&e===ye}function Ox(t,e){bs=oc=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Cx(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,vm(t,n)}}var sc={readContext:Ft,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},vC={readContext:Ft,useCallback:function(t,e){return on().memoizedState=[t,e===void 0?null:e],t},useContext:Ft,useEffect:Vy,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Tl(4194308,4,yx.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Tl(4194308,4,t,e)},useInsertionEffect:function(t,e){return Tl(4,2,t,e)},useMemo:function(t,e){var n=on();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=on();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=gC.bind(null,ye,t),[r.memoizedState,t]},useRef:function(t){var e=on();return t={current:t},e.memoizedState=t},useState:Uy,useDebugValue:Bm,useDeferredValue:function(t){return on().memoizedState=t},useTransition:function(){var t=Uy(!1),e=t[0];return t=mC.bind(null,t[1]),on().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ye,i=on();if(de){if(n===void 0)throw Error(P(407));n=n()}else{if(n=e(),Le===null)throw Error(P(349));pi&30||cx(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,Vy(fx.bind(null,r,o,t),[t]),r.flags|=2048,Ys(9,ux.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=on(),e=Le.identifierPrefix;if(de){var n=Tn,r=En;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=qs++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=pC++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},bC={readContext:Ft,useCallback:bx,useContext:Ft,useEffect:Fm,useImperativeHandle:vx,useInsertionEffect:mx,useLayoutEffect:gx,useMemo:xx,useReducer:zf,useRef:px,useState:function(){return zf(Gs)},useDebugValue:Bm,useDeferredValue:function(t){var e=Bt();return kx(e,Ne.memoizedState,t)},useTransition:function(){var t=zf(Gs)[0],e=Bt().memoizedState;return[t,e]},useMutableSource:ax,useSyncExternalStore:lx,useId:wx,unstable_isNewReconciler:!1},xC={readContext:Ft,useCallback:bx,useContext:Ft,useEffect:Fm,useImperativeHandle:vx,useInsertionEffect:mx,useLayoutEffect:gx,useMemo:xx,useReducer:$f,useRef:px,useState:function(){return $f(Gs)},useDebugValue:Bm,useDeferredValue:function(t){var e=Bt();return Ne===null?e.memoizedState=t:kx(e,Ne.memoizedState,t)},useTransition:function(){var t=$f(Gs)[0],e=Bt().memoizedState;return[t,e]},useMutableSource:ax,useSyncExternalStore:lx,useId:wx,unstable_isNewReconciler:!1};function Oo(t,e){try{var n="",r=e;do n+=qS(r),r=r.return;while(r);var i=n}catch(o){i=`
|
||
Error generating stack: `+o.message+`
|
||
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function Ff(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function ch(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var kC=typeof WeakMap=="function"?WeakMap:Map;function Ex(t,e,n){n=Nn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){lc||(lc=!0,bh=r),ch(t,e)},n}function Tx(t,e,n){n=Nn(-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(){ch(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ch(t,e),typeof r!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function Wy(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new kC;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=DC.bind(null,t,e,n),e.then(t,t))}function Ky(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 Jy(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=Nn(-1,1),e.tag=2,pr(n,e,1))),n.lanes|=1),t)}var wC=zn.ReactCurrentOwner,dt=!1;function et(t,e,n,r){e.child=t===null?ox(e,null,n,r):wo(e,t.child,n,r)}function qy(t,e,n,r,i){n=n.render;var o=e.ref;return fo(e,i),r=zm(t,e,n,r,o,i),n=$m(),t!==null&&!dt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,In(t,e,i)):(de&&n&&Em(e),e.flags|=1,et(t,e,r,i),e.child)}function Gy(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!Gm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,Nx(t,e,o,r,i)):(t=Al(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Hs,n(s,r)&&t.ref===e.ref)return In(t,e,i)}return e.flags|=1,t=yr(o,r),t.ref=e.ref,t.return=e,e.child=t}function Nx(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(Hs(o,r)&&t.ref===e.ref)if(dt=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(dt=!0);else return e.lanes=t.lanes,In(t,e,i)}return uh(t,e,n,r,i)}function Mx(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(Zi,kt),kt|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,oe(Zi,kt),kt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,oe(Zi,kt),kt|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,oe(Zi,kt),kt|=r;return et(t,e,i,n),e.child}function Px(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function uh(t,e,n,r,i){var o=mt(n)?di:Xe.current;return o=xo(e,o),fo(e,i),n=zm(t,e,n,r,o,i),r=$m(),t!==null&&!dt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,In(t,e,i)):(de&&r&&Em(e),e.flags|=1,et(t,e,n,i),e.child)}function Yy(t,e,n,r,i){if(mt(n)){var o=!0;Xl(e)}else o=!1;if(fo(e,i),e.stateNode===null)Nl(t,e),rx(e,n,r),lh(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ft(c):(c=mt(n)?di:Xe.current,c=xo(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&By(e,s,r,c),Gn=!1;var d=e.memoizedState;s.state=d,rc(e,r,s,i),l=e.memoizedState,a!==r||d!==l||pt.current||Gn?(typeof u=="function"&&(ah(e,n,u,r),l=e.memoizedState),(a=Gn||Fy(e,n,a,r,d,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,tx(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Ut(e.type,a),s.props=c,f=e.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ft(l):(l=mt(n)?di:Xe.current,l=xo(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&By(e,s,r,l),Gn=!1,d=e.memoizedState,s.state=d,rc(e,r,s,i);var p=e.memoizedState;a!==f||d!==p||pt.current||Gn?(typeof h=="function"&&(ah(e,n,h,r),p=e.memoizedState),(c=Gn||Fy(e,n,c,r,d,p,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),s.props=r,s.state=p,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return fh(t,e,n,r,o,i)}function fh(t,e,n,r,i,o){Px(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&Dy(e,n,!1),In(t,e,o);r=e.stateNode,wC.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=wo(e,t.child,null,o),e.child=wo(e,null,a,o)):et(t,e,a,o),e.memoizedState=r.state,i&&Dy(e,n,!0),e.child}function Ax(t){var e=t.stateNode;e.pendingContext?Iy(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Iy(t,e.context,!1),Im(t,e.containerInfo)}function Qy(t,e,n,r,i){return ko(),Nm(i),e.flags|=256,et(t,e,n,r),e.child}var dh={dehydrated:null,treeContext:null,retryLane:0};function hh(t){return{baseLanes:t,cachePool:null,transitions:null}}function Rx(t,e,n){var r=e.pendingProps,i=ge.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),oe(ge,i&1),t===null)return oh(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):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ru(s,r,0,null),t=oi(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=hh(n),e.memoizedState=dh,t):Hm(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return SC(t,e,s,r,a,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=yr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=yr(a,o):(o=oi(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?hh(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=dh,r}return o=t.child,t=o.sibling,r=yr(o,{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 Hm(t,e){return e=Ru({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Qa(t,e,n,r){return r!==null&&Nm(r),wo(e,t.child,null,n),t=Hm(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function SC(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=Ff(Error(P(422))),Qa(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Ru({mode:"visible",children:r.children},i,0,null),o=oi(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&wo(e,t.child,null,s),e.child.memoizedState=hh(s),e.memoizedState=dh,o);if(!(e.mode&1))return Qa(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(P(419)),r=Ff(o,r,void 0),Qa(t,e,s,r)}if(a=(s&t.childLanes)!==0,dt||a){if(r=Le,r!==null){switch(s&-s){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|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,jn(t,i),Qt(r,t,i,-1))}return qm(),r=Ff(Error(P(421))),Qa(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=LC.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,St=hr(i.nextSibling),Ot=e,de=!0,Wt=null,t!==null&&(jt[It++]=En,jt[It++]=Tn,jt[It++]=hi,En=t.id,Tn=t.overflow,hi=e),e=Hm(e,r.children),e.flags|=4096,e)}function Xy(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),sh(t.return,e,n)}function Bf(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function jx(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(et(t,e,r.children,n),r=ge.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&&Xy(t,n,e);else if(t.tag===19)Xy(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(oe(ge,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&&ic(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Bf(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&ic(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Bf(e,!0,n,null,o);break;case"together":Bf(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Nl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function In(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),mi|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(P(153));if(e.child!==null){for(t=e.child,n=yr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=yr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function OC(t,e,n){switch(e.tag){case 3:Ax(e),ko();break;case 5:sx(e);break;case 1:mt(e.type)&&Xl(e);break;case 4:Im(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;oe(tc,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(oe(ge,ge.current&1),e.flags|=128,null):n&e.child.childLanes?Rx(t,e,n):(oe(ge,ge.current&1),t=In(t,e,n),t!==null?t.sibling:null);oe(ge,ge.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return jx(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(ge,ge.current),r)break;return null;case 22:case 23:return e.lanes=0,Mx(t,e,n)}return In(t,e,n)}var Ix,ph,Dx,Lx;Ix=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}};ph=function(){};Dx=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Qr(yn.current);var o=null;switch(n){case"input":i=Ld(t,i),r=Ld(t,r),o=[];break;case"select":i=ve({},i,{value:void 0}),r=ve({},r,{value:void 0}),o=[];break;case"textarea":i=$d(t,i),r=$d(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Yl)}Bd(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ds.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ds.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&se("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};Lx=function(t,e,n,r){n!==r&&(e.flags|=4)};function Xo(t,e){if(!de)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 Ge(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 CC(t,e,n){var r=e.pendingProps;switch(Tm(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(e),null;case 1:return mt(e.type)&&Ql(),Ge(e),null;case 3:return r=e.stateNode,So(),ce(pt),ce(Xe),Lm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Ga(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Wt!==null&&(wh(Wt),Wt=null))),ph(t,e),Ge(e),null;case 5:Dm(e);var i=Qr(Js.current);if(n=e.type,t!==null&&e.stateNode!=null)Dx(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(P(166));return Ge(e),null}if(t=Qr(yn.current),Ga(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[un]=e,r[Ws]=o,t=(e.mode&1)!==0,n){case"dialog":se("cancel",r),se("close",r);break;case"iframe":case"object":case"embed":se("load",r);break;case"video":case"audio":for(i=0;i<as.length;i++)se(as[i],r);break;case"source":se("error",r);break;case"img":case"image":case"link":se("error",r),se("load",r);break;case"details":se("toggle",r);break;case"input":ay(r,o),se("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},se("invalid",r);break;case"textarea":cy(r,o),se("invalid",r)}Bd(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&qa(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&qa(r.textContent,a,t),i=["children",""+a]):Ds.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&se("scroll",r)}switch(n){case"input":Fa(r),ly(r,o,!0);break;case"textarea":Fa(r),uy(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Yl)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=cb(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[un]=e,t[Ws]=r,Ix(t,e,!1,!1),e.stateNode=t;e:{switch(s=Hd(n,r),n){case"dialog":se("cancel",t),se("close",t),i=r;break;case"iframe":case"object":case"embed":se("load",t),i=r;break;case"video":case"audio":for(i=0;i<as.length;i++)se(as[i],t);i=r;break;case"source":se("error",t),i=r;break;case"img":case"image":case"link":se("error",t),se("load",t),i=r;break;case"details":se("toggle",t),i=r;break;case"input":ay(t,r),i=Ld(t,r),se("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=ve({},r,{value:void 0}),se("invalid",t);break;case"textarea":cy(t,r),i=$d(t,r),se("invalid",t);break;default:i=r}Bd(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?db(t,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ub(t,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ls(t,l):typeof l=="number"&&Ls(t,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ds.hasOwnProperty(o)?l!=null&&o==="onScroll"&&se("scroll",t):l!=null&&dm(t,o,l,s))}switch(n){case"input":Fa(t),ly(t,r,!1);break;case"textarea":Fa(t),uy(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Cr(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?ao(t,!!r.multiple,o,!1):r.defaultValue!=null&&ao(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Yl)}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 Ge(e),null;case 6:if(t&&e.stateNode!=null)Lx(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(P(166));if(n=Qr(Js.current),Qr(yn.current),Ga(e)){if(r=e.stateNode,n=e.memoizedProps,r[un]=e,(o=r.nodeValue!==n)&&(t=Ot,t!==null))switch(t.tag){case 3:qa(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&qa(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[un]=e,e.stateNode=r}return Ge(e),null;case 13:if(ce(ge),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(de&&St!==null&&e.mode&1&&!(e.flags&128))Zb(),ko(),e.flags|=98560,o=!1;else if(o=Ga(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(P(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(P(317));o[un]=e}else ko(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ge(e),o=!1}else Wt!==null&&(wh(Wt),Wt=null),o=!0;if(!o)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||ge.current&1?Pe===0&&(Pe=3):qm())),e.updateQueue!==null&&(e.flags|=4),Ge(e),null);case 4:return So(),ph(t,e),t===null&&Us(e.stateNode.containerInfo),Ge(e),null;case 10:return Am(e.type._context),Ge(e),null;case 17:return mt(e.type)&&Ql(),Ge(e),null;case 19:if(ce(ge),o=e.memoizedState,o===null)return Ge(e),null;if(r=(e.flags&128)!==0,s=o.rendering,s===null)if(r)Xo(o,!1);else{if(Pe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=ic(t),s!==null){for(e.flags|=128,Xo(o,!1),r=s.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return oe(ge,ge.current&1|2),e.child}t=t.sibling}o.tail!==null&&Se()>Co&&(e.flags|=128,r=!0,Xo(o,!1),e.lanes=4194304)}else{if(!r)if(t=ic(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Xo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!de)return Ge(e),null}else 2*Se()-o.renderingStartTime>Co&&n!==1073741824&&(e.flags|=128,r=!0,Xo(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Se(),e.sibling=null,n=ge.current,oe(ge,r?n&1|2:n&1),e):(Ge(e),null);case 22:case 23:return Jm(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?kt&1073741824&&(Ge(e),e.subtreeFlags&6&&(e.flags|=8192)):Ge(e),null;case 24:return null;case 25:return null}throw Error(P(156,e.tag))}function EC(t,e){switch(Tm(e),e.tag){case 1:return mt(e.type)&&Ql(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return So(),ce(pt),ce(Xe),Lm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Dm(e),null;case 13:if(ce(ge),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(P(340));ko()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ce(ge),null;case 4:return So(),null;case 10:return Am(e.type._context),null;case 22:case 23:return Jm(),null;case 24:return null;default:return null}}var Xa=!1,Qe=!1,TC=typeof WeakSet=="function"?WeakSet:Set,z=null;function Xi(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){be(t,e,r)}else n.current=null}function mh(t,e,n){try{n()}catch(r){be(t,e,r)}}var Zy=!1;function NC(t,e){if(Xd=Jl,t=Fb(),Cm(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&&++c===i&&(a=s),d===o&&++u===r&&(l=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zd={focusedElem:t,selectionRange:n},Jl=!1,z=e;z!==null;)if(e=z,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,z=t;else for(;z!==null;){e=z;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 m=p.memoizedProps,v=p.memoizedState,g=e.stateNode,y=g.getSnapshotBeforeUpdate(e.elementType===e.type?m:Ut(e.type,m),v);g.__reactInternalSnapshotBeforeUpdate=y}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(P(163))}}catch(w){be(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,z=t;break}z=e.return}return p=Zy,Zy=!1,p}function xs(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 o=i.destroy;i.destroy=void 0,o!==void 0&&mh(e,n,o)}i=i.next}while(i!==r)}}function Pu(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 gh(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 _x(t){var e=t.alternate;e!==null&&(t.alternate=null,_x(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[un],delete e[Ws],delete e[nh],delete e[uC],delete e[fC])),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 zx(t){return t.tag===5||t.tag===3||t.tag===4}function e0(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||zx(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 yh(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=Yl));else if(r!==4&&(t=t.child,t!==null))for(yh(t,e,n),t=t.sibling;t!==null;)yh(t,e,n),t=t.sibling}function vh(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(vh(t,e,n),t=t.sibling;t!==null;)vh(t,e,n),t=t.sibling}var Fe=null,Vt=!1;function Bn(t,e,n){for(n=n.child;n!==null;)$x(t,e,n),n=n.sibling}function $x(t,e,n){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(wu,n)}catch{}switch(n.tag){case 5:Qe||Xi(n,e);case 6:var r=Fe,i=Vt;Fe=null,Bn(t,e,n),Fe=r,Vt=i,Fe!==null&&(Vt?(t=Fe,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Vt?(t=Fe,n=n.stateNode,t.nodeType===8?If(t.parentNode,n):t.nodeType===1&&If(t,n),Fs(t)):If(Fe,n.stateNode));break;case 4:r=Fe,i=Vt,Fe=n.stateNode.containerInfo,Vt=!0,Bn(t,e,n),Fe=r,Vt=i;break;case 0:case 11:case 14:case 15:if(!Qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&mh(n,e,s),i=i.next}while(i!==r)}Bn(t,e,n);break;case 1:if(!Qe&&(Xi(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){be(n,e,a)}Bn(t,e,n);break;case 21:Bn(t,e,n);break;case 22:n.mode&1?(Qe=(r=Qe)||n.memoizedState!==null,Bn(t,e,n),Qe=r):Bn(t,e,n);break;default:Bn(t,e,n)}}function t0(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new TC),e.forEach(function(r){var i=_C.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ht(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,s=e,a=s;e:for(;a!==null;){switch(a.tag){case 5:Fe=a.stateNode,Vt=!1;break e;case 3:Fe=a.stateNode.containerInfo,Vt=!0;break e;case 4:Fe=a.stateNode.containerInfo,Vt=!0;break e}a=a.return}if(Fe===null)throw Error(P(160));$x(o,s,i),Fe=null,Vt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){be(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Fx(e,t),e=e.sibling}function Fx(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ht(e,t),rn(t),r&4){try{xs(3,t,t.return),Pu(3,t)}catch(m){be(t,t.return,m)}try{xs(5,t,t.return)}catch(m){be(t,t.return,m)}}break;case 1:Ht(e,t),rn(t),r&512&&n!==null&&Xi(n,n.return);break;case 5:if(Ht(e,t),rn(t),r&512&&n!==null&&Xi(n,n.return),t.flags&32){var i=t.stateNode;try{Ls(i,"")}catch(m){be(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=n!==null?n.memoizedProps:o,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&ab(i,o),Hd(a,s);var c=Hd(a,o);for(s=0;s<l.length;s+=2){var u=l[s],f=l[s+1];u==="style"?db(i,f):u==="dangerouslySetInnerHTML"?ub(i,f):u==="children"?Ls(i,f):dm(i,u,f,c)}switch(a){case"input":_d(i,o);break;case"textarea":lb(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?ao(i,!!o.multiple,h,!1):d!==!!o.multiple&&(o.defaultValue!=null?ao(i,!!o.multiple,o.defaultValue,!0):ao(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ws]=o}catch(m){be(t,t.return,m)}}break;case 6:if(Ht(e,t),rn(t),r&4){if(t.stateNode===null)throw Error(P(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(m){be(t,t.return,m)}}break;case 3:if(Ht(e,t),rn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fs(e.containerInfo)}catch(m){be(t,t.return,m)}break;case 4:Ht(e,t),rn(t);break;case 13:Ht(e,t),rn(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Wm=Se())),r&4&&t0(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Qe=(c=Qe)||u,Ht(e,t),Qe=c):Ht(e,t),rn(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(z=t,u=t.child;u!==null;){for(f=z=u;z!==null;){switch(d=z,h=d.child,d.tag){case 0:case 11:case 14:case 15:xs(4,d,d.return);break;case 1:Xi(d,d.return);var p=d.stateNode;if(typeof p.componentWillUnmount=="function"){r=d,n=d.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(m){be(r,n,m)}}break;case 5:Xi(d,d.return);break;case 22:if(d.memoizedState!==null){r0(f);continue}}h!==null?(h.return=d,z=h):r0(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=fb("display",s))}catch(m){be(t,t.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){be(t,t.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ht(e,t),rn(t),r&4&&t0(t);break;case 21:break;default:Ht(e,t),rn(t)}}function rn(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(zx(n)){var r=n;break e}n=n.return}throw Error(P(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ls(i,""),r.flags&=-33);var o=e0(t);vh(t,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=e0(t);yh(t,a,s);break;default:throw Error(P(161))}}catch(l){be(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function MC(t,e,n){z=t,Bx(t)}function Bx(t,e,n){for(var r=(t.mode&1)!==0;z!==null;){var i=z,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Xa;if(!s){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Qe;a=Xa;var c=Qe;if(Xa=s,(Qe=l)&&!c)for(z=i;z!==null;)s=z,l=s.child,s.tag===22&&s.memoizedState!==null?i0(i):l!==null?(l.return=s,z=l):i0(i);for(;o!==null;)z=o,Bx(o),o=o.sibling;z=i,Xa=a,Qe=c}n0(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,z=o):n0(t)}}function n0(t){for(;z!==null;){var e=z;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Qe||Pu(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Qe)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Ut(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&$y(e,o,r);break;case 3:var s=e.updateQueue;if(s!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}$y(e,s,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Fs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}Qe||e.flags&512&&gh(e)}catch(d){be(e,e.return,d)}}if(e===t){z=null;break}if(n=e.sibling,n!==null){n.return=e.return,z=n;break}z=e.return}}function r0(t){for(;z!==null;){var e=z;if(e===t){z=null;break}var n=e.sibling;if(n!==null){n.return=e.return,z=n;break}z=e.return}}function i0(t){for(;z!==null;){var e=z;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Pu(4,e)}catch(l){be(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){be(e,i,l)}}var o=e.return;try{gh(e)}catch(l){be(e,o,l)}break;case 5:var s=e.return;try{gh(e)}catch(l){be(e,s,l)}}}catch(l){be(e,e.return,l)}if(e===t){z=null;break}var a=e.sibling;if(a!==null){a.return=e.return,z=a;break}z=e.return}}var PC=Math.ceil,ac=zn.ReactCurrentDispatcher,Um=zn.ReactCurrentOwner,_t=zn.ReactCurrentBatchConfig,ee=0,Le=null,Oe=null,We=0,kt=0,Zi=jr(0),Pe=0,Qs=null,mi=0,Au=0,Vm=0,ks=null,ut=null,Wm=0,Co=1/0,Sn=null,lc=!1,bh=null,mr=null,Za=!1,ir=null,cc=0,ws=0,xh=null,Ml=-1,Pl=0;function nt(){return ee&6?Se():Ml!==-1?Ml:Ml=Se()}function gr(t){return t.mode&1?ee&2&&We!==0?We&-We:hC.transition!==null?(Pl===0&&(Pl=Ob()),Pl):(t=ne,t!==0||(t=window.event,t=t===void 0?16:Ab(t.type)),t):1}function Qt(t,e,n,r){if(50<ws)throw ws=0,xh=null,Error(P(185));ka(t,n,r),(!(ee&2)||t!==Le)&&(t===Le&&(!(ee&2)&&(Au|=n),Pe===4&&er(t,We)),gt(t,r),n===1&&ee===0&&!(e.mode&1)&&(Co=Se()+500,Tu&&Ir()))}function gt(t,e){var n=t.callbackNode;hO(t,e);var r=Kl(t,t===Le?We:0);if(r===0)n!==null&&hy(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&hy(n),e===1)t.tag===0?dC(o0.bind(null,t)):Yb(o0.bind(null,t)),lC(function(){!(ee&6)&&Ir()}),n=null;else{switch(Cb(r)){case 1:n=ym;break;case 4:n=wb;break;case 16:n=Wl;break;case 536870912:n=Sb;break;default:n=Wl}n=Gx(n,Hx.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Hx(t,e){if(Ml=-1,Pl=0,ee&6)throw Error(P(327));var n=t.callbackNode;if(ho()&&t.callbackNode!==n)return null;var r=Kl(t,t===Le?We:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=uc(t,r);else{e=r;var i=ee;ee|=2;var o=Vx();(Le!==t||We!==e)&&(Sn=null,Co=Se()+500,ii(t,e));do try{jC();break}catch(a){Ux(t,a)}while(!0);Pm(),ac.current=o,ee=i,Oe!==null?e=0:(Le=null,We=0,e=Pe)}if(e!==0){if(e===2&&(i=Jd(t),i!==0&&(r=i,e=kh(t,i))),e===1)throw n=Qs,ii(t,0),er(t,r),gt(t,Se()),n;if(e===6)er(t,r);else{if(i=t.current.alternate,!(r&30)&&!AC(i)&&(e=uc(t,r),e===2&&(o=Jd(t),o!==0&&(r=o,e=kh(t,o))),e===1))throw n=Qs,ii(t,0),er(t,r),gt(t,Se()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(P(345));case 2:Vr(t,ut,Sn);break;case 3:if(er(t,r),(r&130023424)===r&&(e=Wm+500-Se(),10<e)){if(Kl(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){nt(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=th(Vr.bind(null,t,ut,Sn),e);break}Vr(t,ut,Sn);break;case 4:if(er(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-Yt(r);o=1<<s,s=e[s],s>i&&(i=s),r&=~o}if(r=i,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*PC(r/1960))-r,10<r){t.timeoutHandle=th(Vr.bind(null,t,ut,Sn),r);break}Vr(t,ut,Sn);break;case 5:Vr(t,ut,Sn);break;default:throw Error(P(329))}}}return gt(t,Se()),t.callbackNode===n?Hx.bind(null,t):null}function kh(t,e){var n=ks;return t.current.memoizedState.isDehydrated&&(ii(t,e).flags|=256),t=uc(t,e),t!==2&&(e=ut,ut=n,e!==null&&wh(e)),t}function wh(t){ut===null?ut=t:ut.push.apply(ut,t)}function AC(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],o=i.getSnapshot;i=i.value;try{if(!Zt(o(),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 er(t,e){for(e&=~Vm,e&=~Au,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Yt(e),r=1<<n;t[n]=-1,e&=~r}}function o0(t){if(ee&6)throw Error(P(327));ho();var e=Kl(t,0);if(!(e&1))return gt(t,Se()),null;var n=uc(t,e);if(t.tag!==0&&n===2){var r=Jd(t);r!==0&&(e=r,n=kh(t,r))}if(n===1)throw n=Qs,ii(t,0),er(t,e),gt(t,Se()),n;if(n===6)throw Error(P(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Vr(t,ut,Sn),gt(t,Se()),null}function Km(t,e){var n=ee;ee|=1;try{return t(e)}finally{ee=n,ee===0&&(Co=Se()+500,Tu&&Ir())}}function gi(t){ir!==null&&ir.tag===0&&!(ee&6)&&ho();var e=ee;ee|=1;var n=_t.transition,r=ne;try{if(_t.transition=null,ne=1,t)return t()}finally{ne=r,_t.transition=n,ee=e,!(ee&6)&&Ir()}}function Jm(){kt=Zi.current,ce(Zi)}function ii(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,aC(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(Tm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ql();break;case 3:So(),ce(pt),ce(Xe),Lm();break;case 5:Dm(r);break;case 4:So();break;case 13:ce(ge);break;case 19:ce(ge);break;case 10:Am(r.type._context);break;case 22:case 23:Jm()}n=n.return}if(Le=t,Oe=t=yr(t.current,null),We=kt=e,Pe=0,Qs=null,Vm=Au=mi=0,ut=ks=null,Yr!==null){for(e=0;e<Yr.length;e++)if(n=Yr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Yr=null}return t}function Ux(t,e){do{var n=Oe;try{if(Pm(),El.current=sc,oc){for(var r=ye.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}oc=!1}if(pi=0,Ie=Ne=ye=null,bs=!1,qs=0,Um.current=null,n===null||n.return===null){Pe=1,Qs=e,Oe=null;break}e:{var o=t,s=n.return,a=n,l=e;if(e=We,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=Ky(s);if(h!==null){h.flags&=-257,Jy(h,s,a,o,e),h.mode&1&&Wy(o,c,e),e=h,l=c;var p=e.updateQueue;if(p===null){var m=new Set;m.add(l),e.updateQueue=m}else p.add(l);break e}else{if(!(e&1)){Wy(o,c,e),qm();break e}l=Error(P(426))}}else if(de&&a.mode&1){var v=Ky(s);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Jy(v,s,a,o,e),Nm(Oo(l,a));break e}}o=l=Oo(l,a),Pe!==4&&(Pe=2),ks===null?ks=[o]:ks.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var g=Ex(o,l,e);zy(o,g);break e;case 1:a=l;var y=o.type,k=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(mr===null||!mr.has(k)))){o.flags|=65536,e&=-e,o.lanes|=e;var w=Tx(o,a,e);zy(o,w);break e}}o=o.return}while(o!==null)}Kx(n)}catch(O){e=O,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Vx(){var t=ac.current;return ac.current=sc,t===null?sc:t}function qm(){(Pe===0||Pe===3||Pe===2)&&(Pe=4),Le===null||!(mi&268435455)&&!(Au&268435455)||er(Le,We)}function uc(t,e){var n=ee;ee|=2;var r=Vx();(Le!==t||We!==e)&&(Sn=null,ii(t,e));do try{RC();break}catch(i){Ux(t,i)}while(!0);if(Pm(),ee=n,ac.current=r,Oe!==null)throw Error(P(261));return Le=null,We=0,Pe}function RC(){for(;Oe!==null;)Wx(Oe)}function jC(){for(;Oe!==null&&!iO();)Wx(Oe)}function Wx(t){var e=qx(t.alternate,t,kt);t.memoizedProps=t.pendingProps,e===null?Kx(t):Oe=e,Um.current=null}function Kx(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=EC(n,e),n!==null){n.flags&=32767,Oe=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Pe=6,Oe=null;return}}else if(n=CC(n,e,kt),n!==null){Oe=n;return}if(e=e.sibling,e!==null){Oe=e;return}Oe=e=t}while(e!==null);Pe===0&&(Pe=5)}function Vr(t,e,n){var r=ne,i=_t.transition;try{_t.transition=null,ne=1,IC(t,e,n,r)}finally{_t.transition=i,ne=r}return null}function IC(t,e,n,r){do ho();while(ir!==null);if(ee&6)throw Error(P(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(P(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(pO(t,o),t===Le&&(Oe=Le=null,We=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Za||(Za=!0,Gx(Wl,function(){return ho(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=_t.transition,_t.transition=null;var s=ne;ne=1;var a=ee;ee|=4,Um.current=null,NC(t,n),Fx(n,t),eC(Zd),Jl=!!Xd,Zd=Xd=null,t.current=n,MC(n),oO(),ee=a,ne=s,_t.transition=o}else t.current=n;if(Za&&(Za=!1,ir=t,cc=i),o=t.pendingLanes,o===0&&(mr=null),lO(n.stateNode),gt(t,Se()),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(lc)throw lc=!1,t=bh,bh=null,t;return cc&1&&t.tag!==0&&ho(),o=t.pendingLanes,o&1?t===xh?ws++:(ws=0,xh=t):ws=0,Ir(),null}function ho(){if(ir!==null){var t=Cb(cc),e=_t.transition,n=ne;try{if(_t.transition=null,ne=16>t?16:t,ir===null)var r=!1;else{if(t=ir,ir=null,cc=0,ee&6)throw Error(P(331));var i=ee;for(ee|=4,z=t.current;z!==null;){var o=z,s=o.child;if(z.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(z=c;z!==null;){var u=z;switch(u.tag){case 0:case 11:case 15:xs(8,u,o)}var f=u.child;if(f!==null)f.return=u,z=f;else for(;z!==null;){u=z;var d=u.sibling,h=u.return;if(_x(u),u===c){z=null;break}if(d!==null){d.return=h,z=d;break}z=h}}}var p=o.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}z=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,z=s;else e:for(;z!==null;){if(o=z,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xs(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,z=g;break e}z=o.return}}var y=t.current;for(z=y;z!==null;){s=z;var k=s.child;if(s.subtreeFlags&2064&&k!==null)k.return=s,z=k;else e:for(s=y;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Pu(9,a)}}catch(O){be(a,a.return,O)}if(a===s){z=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,z=w;break e}z=a.return}}if(ee=i,Ir(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(wu,t)}catch{}r=!0}return r}finally{ne=n,_t.transition=e}}return!1}function s0(t,e,n){e=Oo(n,e),e=Ex(t,e,1),t=pr(t,e,1),e=nt(),t!==null&&(ka(t,1,e),gt(t,e))}function be(t,e,n){if(t.tag===3)s0(t,t,n);else for(;e!==null;){if(e.tag===3){s0(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(mr===null||!mr.has(r))){t=Oo(n,t),t=Tx(e,t,1),e=pr(e,t,1),t=nt(),e!==null&&(ka(e,1,t),gt(e,t));break}}e=e.return}}function DC(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=nt(),t.pingedLanes|=t.suspendedLanes&n,Le===t&&(We&n)===n&&(Pe===4||Pe===3&&(We&130023424)===We&&500>Se()-Wm?ii(t,0):Vm|=n),gt(t,e)}function Jx(t,e){e===0&&(t.mode&1?(e=Ua,Ua<<=1,!(Ua&130023424)&&(Ua=4194304)):e=1);var n=nt();t=jn(t,e),t!==null&&(ka(t,e,n),gt(t,n))}function LC(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Jx(t,n)}function _C(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(P(314))}r!==null&&r.delete(e),Jx(t,n)}var qx;qx=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||pt.current)dt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return dt=!1,OC(t,e,n);dt=!!(t.flags&131072)}else dt=!1,de&&e.flags&1048576&&Qb(e,ec,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Nl(t,e),t=e.pendingProps;var i=xo(e,Xe.current);fo(e,n),i=zm(null,e,r,t,i,n);var o=$m();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,mt(r)?(o=!0,Xl(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jm(e),i.updater=Nu,e.stateNode=i,i._reactInternals=e,lh(e,r,t,n),e=fh(null,e,r,!0,o,n)):(e.tag=0,de&&o&&Em(e),et(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Nl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=$C(r),t=Ut(r,t),i){case 0:e=uh(null,e,r,t,n);break e;case 1:e=Yy(null,e,r,t,n);break e;case 11:e=qy(null,e,r,t,n);break e;case 14:e=Gy(null,e,r,Ut(r.type,t),n);break e}throw Error(P(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ut(r,i),uh(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ut(r,i),Yy(t,e,r,i,n);case 3:e:{if(Ax(e),t===null)throw Error(P(387));r=e.pendingProps,o=e.memoizedState,i=o.element,tx(t,e),rc(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Oo(Error(P(423)),e),e=Qy(t,e,r,n,i);break e}else if(r!==i){i=Oo(Error(P(424)),e),e=Qy(t,e,r,n,i);break e}else for(St=hr(e.stateNode.containerInfo.firstChild),Ot=e,de=!0,Wt=null,n=ox(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ko(),r===i){e=In(t,e,n);break e}et(t,e,r,n)}e=e.child}return e;case 5:return sx(e),t===null&&oh(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,eh(r,i)?s=null:o!==null&&eh(r,o)&&(e.flags|=32),Px(t,e),et(t,e,s,n),e.child;case 6:return t===null&&oh(e),null;case 13:return Rx(t,e,n);case 4:return Im(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=wo(e,null,r,n):et(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ut(r,i),qy(t,e,r,i,n);case 7:return et(t,e,e.pendingProps,n),e.child;case 8:return et(t,e,e.pendingProps.children,n),e.child;case 12:return et(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,oe(tc,r._currentValue),r._currentValue=s,o!==null)if(Zt(o.value,s)){if(o.children===i.children&&!pt.current){e=In(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Nn(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),sh(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(P(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),sh(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}et(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,fo(e,n),i=Ft(i),r=r(i),e.flags|=1,et(t,e,r,n),e.child;case 14:return r=e.type,i=Ut(r,e.pendingProps),i=Ut(r.type,i),Gy(t,e,r,i,n);case 15:return Nx(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ut(r,i),Nl(t,e),e.tag=1,mt(r)?(t=!0,Xl(e)):t=!1,fo(e,n),rx(e,r,i),lh(e,r,i,n),fh(null,e,r,!0,t,n);case 19:return jx(t,e,n);case 22:return Mx(t,e,n)}throw Error(P(156,e.tag))};function Gx(t,e){return kb(t,e)}function zC(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 Dt(t,e,n,r){return new zC(t,e,n,r)}function Gm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function $C(t){if(typeof t=="function")return Gm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===pm)return 11;if(t===mm)return 14}return 2}function yr(t,e){var n=t.alternate;return n===null?(n=Dt(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 Al(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")Gm(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Ui:return oi(n.children,i,o,e);case hm:s=8,i|=8;break;case Rd:return t=Dt(12,n,e,i|2),t.elementType=Rd,t.lanes=o,t;case jd:return t=Dt(13,n,e,i),t.elementType=jd,t.lanes=o,t;case Id:return t=Dt(19,n,e,i),t.elementType=Id,t.lanes=o,t;case ib:return Ru(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case nb:s=10;break e;case rb:s=9;break e;case pm:s=11;break e;case mm:s=14;break e;case qn:s=16,r=null;break e}throw Error(P(130,t==null?t:typeof t,""))}return e=Dt(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function oi(t,e,n,r){return t=Dt(7,t,r,e),t.lanes=n,t}function Ru(t,e,n,r){return t=Dt(22,t,r,e),t.elementType=ib,t.lanes=n,t.stateNode={isHidden:!1},t}function Hf(t,e,n){return t=Dt(6,t,null,e),t.lanes=n,t}function Uf(t,e,n){return e=Dt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function FC(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=Sf(0),this.expirationTimes=Sf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ym(t,e,n,r,i,o,s,a,l){return t=new FC(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Dt(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jm(o),t}function BC(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hi,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function Yx(t){if(!t)return Er;t=t._reactInternals;e:{if(Oi(t)!==t||t.tag!==1)throw Error(P(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(mt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(P(171))}if(t.tag===1){var n=t.type;if(mt(n))return Gb(t,n,e)}return e}function Qx(t,e,n,r,i,o,s,a,l){return t=Ym(n,r,!0,t,i,o,s,a,l),t.context=Yx(null),n=t.current,r=nt(),i=gr(n),o=Nn(r,i),o.callback=e??null,pr(n,o,i),t.current.lanes=i,ka(t,i,r),gt(t,r),t}function ju(t,e,n,r){var i=e.current,o=nt(),s=gr(i);return n=Yx(n),e.context===null?e.context=n:e.pendingContext=n,e=Nn(o,s),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=pr(i,e,s),t!==null&&(Qt(t,i,s,o),Cl(t,i,s)),s}function fc(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 a0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Qm(t,e){a0(t,e),(t=t.alternate)&&a0(t,e)}function HC(){return null}var Xx=typeof reportError=="function"?reportError:function(t){console.error(t)};function Xm(t){this._internalRoot=t}Iu.prototype.render=Xm.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(P(409));ju(t,e,null,null)};Iu.prototype.unmount=Xm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;gi(function(){ju(null,t,null,null)}),e[Rn]=null}};function Iu(t){this._internalRoot=t}Iu.prototype.unstable_scheduleHydration=function(t){if(t){var e=Nb();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Zn.length&&e!==0&&e<Zn[n].priority;n++);Zn.splice(n,0,t),n===0&&Pb(t)}};function Zm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Du(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function l0(){}function UC(t,e,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=fc(s);o.call(c)}}var s=Qx(e,r,t,0,null,!1,!1,"",l0);return t._reactRootContainer=s,t[Rn]=s.current,Us(t.nodeType===8?t.parentNode:t),gi(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=fc(l);a.call(c)}}var l=Ym(t,0,!1,null,null,!1,!1,"",l0);return t._reactRootContainer=l,t[Rn]=l.current,Us(t.nodeType===8?t.parentNode:t),gi(function(){ju(e,l,n,r)}),l}function Lu(t,e,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var l=fc(s);a.call(l)}}ju(e,s,t,i)}else s=UC(n,e,t,i,r);return fc(s)}Eb=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ss(e.pendingLanes);n!==0&&(vm(e,n|1),gt(e,Se()),!(ee&6)&&(Co=Se()+500,Ir()))}break;case 13:gi(function(){var r=jn(t,1);if(r!==null){var i=nt();Qt(r,t,1,i)}}),Qm(t,1)}};bm=function(t){if(t.tag===13){var e=jn(t,134217728);if(e!==null){var n=nt();Qt(e,t,134217728,n)}Qm(t,134217728)}};Tb=function(t){if(t.tag===13){var e=gr(t),n=jn(t,e);if(n!==null){var r=nt();Qt(n,t,e,r)}Qm(t,e)}};Nb=function(){return ne};Mb=function(t,e){var n=ne;try{return ne=t,e()}finally{ne=n}};Vd=function(t,e,n){switch(e){case"input":if(_d(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=Eu(r);if(!i)throw Error(P(90));sb(r),_d(r,i)}}}break;case"textarea":lb(t,n);break;case"select":e=n.value,e!=null&&ao(t,!!n.multiple,e,!1)}};mb=Km;gb=gi;var VC={usingClientEntryPoint:!1,Events:[Sa,Ji,Eu,hb,pb,Km]},Zo={findFiberByHostInstance:Gr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},WC={bundleType:Zo.bundleType,version:Zo.version,rendererPackageName:Zo.rendererPackageName,rendererConfig:Zo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=bb(t),t===null?null:t.stateNode},findFiberByHostInstance:Zo.findFiberByHostInstance||HC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{wu=el.inject(WC),gn=el}catch{}}Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VC;Et.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zm(e))throw Error(P(200));return BC(t,e,null,n)};Et.createRoot=function(t,e){if(!Zm(t))throw Error(P(299));var n=!1,r="",i=Xx;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Ym(t,1,!1,null,null,n,!1,r,i),t[Rn]=e.current,Us(t.nodeType===8?t.parentNode:t),new Xm(e)};Et.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(P(188)):(t=Object.keys(t).join(","),Error(P(268,t)));return t=bb(e),t=t===null?null:t.stateNode,t};Et.flushSync=function(t){return gi(t)};Et.hydrate=function(t,e,n){if(!Du(e))throw Error(P(200));return Lu(null,t,e,!0,n)};Et.hydrateRoot=function(t,e,n){if(!Zm(t))throw Error(P(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=Xx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),e=Qx(e,null,t,1,n??null,i,!1,o,s),t[Rn]=e.current,Us(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 Iu(e)};Et.render=function(t,e,n){if(!Du(e))throw Error(P(200));return Lu(null,t,e,!1,n)};Et.unmountComponentAtNode=function(t){if(!Du(t))throw Error(P(40));return t._reactRootContainer?(gi(function(){Lu(null,null,t,!1,function(){t._reactRootContainer=null,t[Rn]=null})}),!0):!1};Et.unstable_batchedUpdates=Km;Et.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Du(n))throw Error(P(200));if(t==null||t._reactInternals===void 0)throw Error(P(38));return Lu(t,e,n,!1,r)};Et.version="18.2.0-next-9e3b772b8-20220608";function Zx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zx)}catch(t){console.error(t)}}Zx(),Qv.exports=Et;var eg=Qv.exports;const eo=xu(eg);var c0=eg;Pd.createRoot=c0.createRoot,Pd.hydrateRoot=c0.hydrateRoot;/**
|
||
* @remix-run/router v1.15.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Xs(){return Xs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xs.apply(this,arguments)}var or;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(or||(or={}));const u0="popstate";function KC(t){t===void 0&&(t={});function e(r,i){let{pathname:o,search:s,hash:a}=r.location;return Sh("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:dc(i)}return qC(e,n,null,t)}function Ee(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ek(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function JC(){return Math.random().toString(36).substr(2,8)}function f0(t,e){return{usr:t.state,key:t.key,idx:e}}function Sh(t,e,n,r){return n===void 0&&(n=null),Xs({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Fo(e):e,{state:n,key:e&&e.key||r||JC()})}function dc(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Fo(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function qC(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=or.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(Xs({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function f(){a=or.Pop;let v=u(),g=v==null?null:v-c;c=v,l&&l({action:a,location:m.location,delta:g})}function d(v,g){a=or.Push;let y=Sh(m.location,v,g);n&&n(y,v),c=u()+1;let k=f0(y,c),w=m.createHref(y);try{s.pushState(k,"",w)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(w)}o&&l&&l({action:a,location:m.location,delta:1})}function h(v,g){a=or.Replace;let y=Sh(m.location,v,g);n&&n(y,v),c=u();let k=f0(y,c),w=m.createHref(y);s.replaceState(k,"",w),o&&l&&l({action:a,location:m.location,delta:0})}function p(v){let g=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof v=="string"?v:dc(v);return y=y.replace(/ $/,"%20"),Ee(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let m={get action(){return a},get location(){return t(i,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(u0,f),l=v,()=>{i.removeEventListener(u0,f),l=null}},createHref(v){return e(i,v)},createURL:p,encodeLocation(v){let g=p(v);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:h,go(v){return s.go(v)}};return m}var d0;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(d0||(d0={}));function GC(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?Fo(e):e,i=tg(r.pathname||"/",n);if(i==null)return null;let o=tk(t);YC(o);let s=null;for(let a=0;s==null&&a<o.length;++a){let l=lE(i);s=oE(o[a],l)}return s}function tk(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Ee(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=vr([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Ee(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),tk(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:rE(c,o.index),routesMeta:u})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of nk(o.path))i(o,s,l)}),e}function nk(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=nk(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function YC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:iE(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const QC=/^:[\w-]+$/,XC=3,ZC=2,eE=1,tE=10,nE=-2,h0=t=>t==="*";function rE(t,e){let n=t.split("/"),r=n.length;return n.some(h0)&&(r+=nE),e&&(r+=ZC),n.filter(i=>!h0(i)).reduce((i,o)=>i+(QC.test(o)?XC:o===""?eE:tE),r)}function iE(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 oE(t,e){let{routesMeta:n}=t,r={},i="/",o=[];for(let s=0;s<n.length;++s){let a=n[s],l=s===n.length-1,c=i==="/"?e:e.slice(i.length)||"/",u=sE({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!u)return null;Object.assign(r,u.params);let f=a.route;o.push({params:r,pathname:vr([i,u.pathname]),pathnameBase:dE(vr([i,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(i=vr([i,u.pathnameBase]))}return o}function sE(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=aE(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,u,f)=>{let{paramName:d,isOptional:h}=u;if(d==="*"){let m=a[f]||"";s=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function aE(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),ek(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,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function lE(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ek(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function tg(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)||"/"}function cE(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Fo(t):t;return{pathname:n?n.startsWith("/")?n:uE(n,e):e,search:hE(r),hash:pE(i)}}function uE(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 Vf(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 fE(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function rk(t,e){let n=fE(t);return e?n.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ik(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Fo(t):(i=Xs({},t),Ee(!i.pathname||!i.pathname.includes("?"),Vf("?","pathname","search",i)),Ee(!i.pathname||!i.pathname.includes("#"),Vf("#","pathname","hash",i)),Ee(!i.search||!i.search.includes("#"),Vf("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let d=s.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?e[f]:"/"}let l=cE(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const vr=t=>t.join("/").replace(/\/\/+/g,"/"),dE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),hE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,pE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function mE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ok=["post","put","patch","delete"];new Set(ok);const gE=["get",...ok];new Set(gE);/**
|
||
* React Router v6.22.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Zs(){return Zs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Zs.apply(this,arguments)}const ng=S.createContext(null),yE=S.createContext(null),Ci=S.createContext(null),_u=S.createContext(null),Dr=S.createContext({outlet:null,matches:[],isDataRoute:!1}),sk=S.createContext(null);function vE(t,e){let{relative:n}=e===void 0?{}:e;Ca()||Ee(!1);let{basename:r,navigator:i}=S.useContext(Ci),{hash:o,pathname:s,search:a}=ck(t,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:vr([r,s])),i.createHref({pathname:l,search:a,hash:o})}function Ca(){return S.useContext(_u)!=null}function zu(){return Ca()||Ee(!1),S.useContext(_u).location}function ak(t){S.useContext(Ci).static||S.useLayoutEffect(t)}function $u(){let{isDataRoute:t}=S.useContext(Dr);return t?AE():bE()}function bE(){Ca()||Ee(!1);let t=S.useContext(ng),{basename:e,future:n,navigator:r}=S.useContext(Ci),{matches:i}=S.useContext(Dr),{pathname:o}=zu(),s=JSON.stringify(rk(i,n.v7_relativeSplatPath)),a=S.useRef(!1);return ak(()=>{a.current=!0}),S.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=ik(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:vr([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,s,o,t])}function lk(){let{matches:t}=S.useContext(Dr),e=t[t.length-1];return e?e.params:{}}function ck(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=S.useContext(Ci),{matches:i}=S.useContext(Dr),{pathname:o}=zu(),s=JSON.stringify(rk(i,r.v7_relativeSplatPath));return S.useMemo(()=>ik(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function xE(t,e){return kE(t,e)}function kE(t,e,n,r){Ca()||Ee(!1);let{navigator:i}=S.useContext(Ci),{matches:o}=S.useContext(Dr),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=zu(),u;if(e){var f;let v=typeof e=="string"?Fo(e):e;l==="/"||(f=v.pathname)!=null&&f.startsWith(l)||Ee(!1),u=v}else u=c;let d=u.pathname||"/",h=d;if(l!=="/"){let v=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=GC(t,{pathname:h}),m=EE(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:vr([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:vr([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r);return e&&m?S.createElement(_u.Provider,{value:{location:Zs({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:or.Pop}},m):m}function wE(){let t=PE(),e=mE(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},e),n?S.createElement("pre",{style:i},n):null,null)}const SE=S.createElement(wE,null);class OE extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?S.createElement(Dr.Provider,{value:this.props.routeContext},S.createElement(sk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function CE(t){let{routeContext:e,match:n,children:r}=t,i=S.useContext(ng);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Dr.Provider,{value:e},r)}function EE(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if((o=n)!=null&&o.errors)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id]));u>=0||Ee(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<s.length;u++){let f=s[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=u),f.route.id){let{loaderData:d,errors:h}=n,p=f.route.loader&&d[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||p){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,f,d)=>{let h,p=!1,m=null,v=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||SE,l&&(c<0&&d===0?(RE("route-fallback",!1),p=!0,v=null):c===d&&(p=!0,v=f.route.hydrateFallbackElement||null)));let g=e.concat(s.slice(0,d+1)),y=()=>{let k;return h?k=m:p?k=v:f.route.Component?k=S.createElement(f.route.Component,null):f.route.element?k=f.route.element:k=u,S.createElement(CE,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:k})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?S.createElement(OE,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var uk=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(uk||{}),hc=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(hc||{});function TE(t){let e=S.useContext(ng);return e||Ee(!1),e}function NE(t){let e=S.useContext(yE);return e||Ee(!1),e}function ME(t){let e=S.useContext(Dr);return e||Ee(!1),e}function fk(t){let e=ME(),n=e.matches[e.matches.length-1];return n.route.id||Ee(!1),n.route.id}function PE(){var t;let e=S.useContext(sk),n=NE(hc.UseRouteError),r=fk(hc.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function AE(){let{router:t}=TE(uk.UseNavigateStable),e=fk(hc.UseNavigateStable),n=S.useRef(!1);return ak(()=>{n.current=!0}),S.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Zs({fromRouteId:e},o)))},[t,e])}const p0={};function RE(t,e,n){!e&&!p0[t]&&(p0[t]=!0)}function ls(t){Ee(!1)}function jE(t){let{basename:e="/",children:n=null,location:r,navigationType:i=or.Pop,navigator:o,static:s=!1,future:a}=t;Ca()&&Ee(!1);let l=e.replace(/^\/*/,"/"),c=S.useMemo(()=>({basename:l,navigator:o,static:s,future:Zs({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Fo(r));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:p="default"}=r,m=S.useMemo(()=>{let v=tg(u,l);return v==null?null:{location:{pathname:v,search:f,hash:d,state:h,key:p},navigationType:i}},[l,u,f,d,h,p,i]);return m==null?null:S.createElement(Ci.Provider,{value:c},S.createElement(_u.Provider,{children:n,value:m}))}function IE(t){let{children:e,location:n}=t;return xE(Oh(e),n)}new Promise(()=>{});function Oh(t,e){e===void 0&&(e=[]);let n=[];return S.Children.forEach(t,(r,i)=>{if(!S.isValidElement(r))return;let o=[...e,i];if(r.type===S.Fragment){n.push.apply(n,Oh(r.props.children,o));return}r.type!==ls&&Ee(!1),!r.props.index||!r.props.children||Ee(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Oh(r.props.children,o)),n.push(s)}),n}/**
|
||
* React Router DOM v6.22.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Ch(){return Ch=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ch.apply(this,arguments)}function DE(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function LE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _E(t,e){return t.button===0&&(!e||e==="_self")&&!LE(t)}const zE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],$E="6";try{window.__reactRouterVersion=$E}catch{}const FE="startTransition",m0=LS[FE];function BE(t){let{basename:e,children:n,future:r,window:i}=t,o=S.useRef();o.current==null&&(o.current=KC({window:i,v5Compat:!0}));let s=o.current,[a,l]=S.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=S.useCallback(f=>{c&&m0?m0(()=>l(f)):l(f)},[l,c]);return S.useLayoutEffect(()=>s.listen(u),[s,u]),S.createElement(jE,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const HE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",UE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ea=S.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:f}=e,d=DE(e,zE),{basename:h}=S.useContext(Ci),p,m=!1;if(typeof c=="string"&&UE.test(c)&&(p=c,HE))try{let k=new URL(window.location.href),w=c.startsWith("//")?new URL(k.protocol+c):new URL(c),O=tg(w.pathname,h);w.origin===k.origin&&O!=null?c=O+w.search+w.hash:m=!0}catch{}let v=vE(c,{relative:i}),g=VE(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:f});function y(k){r&&r(k),k.defaultPrevented||g(k)}return S.createElement("a",Ch({},d,{href:p||v,onClick:m||o?r:y,ref:n,target:l}))});var g0;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(g0||(g0={}));var y0;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(y0||(y0={}));function VE(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=e===void 0?{}:e,l=$u(),c=zu(),u=ck(t,{relative:s});return S.useCallback(f=>{if(_E(f,n)){f.preventDefault();let d=r!==void 0?r:dc(c)===dc(u);l(t,{replace:d,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[c,l,u,r,i,n,t,o,s,a])}var dk={exports:{}},WE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",KE=WE,JE=KE;function hk(){}function pk(){}pk.resetWarningCache=hk;var qE=function(){function t(r,i,o,s,a,l){if(l!==JE){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:pk,resetWarningCache:hk};return n.PropTypes=n,n};dk.exports=qE();var GE=dk.exports;const x=xu(GE);var mk={exports:{}};/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(mk);var YE=mk.exports;const Y=xu(YE);function ta(t){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ta(t)}function QE(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}function gk(t){document.body.style.paddingRight=t>0?"".concat(t,"px"):null}function XE(){return document.body.clientWidth<window.innerWidth}function ZE(){var t=window.getComputedStyle(document.body,null);return parseInt(t&&t.getPropertyValue("padding-right")||0,10)}function eT(){var t=QE(),e=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],n=e?parseInt(e.style.paddingRight||0,10):0;XE()&&gk(n+t)}var tT;function V(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tT;return e?t.split(" ").map(function(n){return e[n]||n}).join(" "):t}function Fu(t,e){var n={};return Object.keys(t).forEach(function(r){e.indexOf(r)===-1&&(n[r]=t[r])}),n}function yk(t,e){for(var n=Array.isArray(e)?e:[e],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=t[i];return o}var v0={};function Eh(t){v0[t]||(typeof console<"u"&&console.error(t),v0[t]=!0)}function nT(t,e){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&Eh('"'.concat(i,'" property of "').concat(o,`" has been deprecated.
|
||
`).concat(e));for(var s=arguments.length,a=new Array(s>3?s-3:0),l=3;l<s;l++)a[l-3]=arguments[l];return t.apply(void 0,[r,i,o].concat(a))}}var rT=(typeof window>"u"?"undefined":ta(window))==="object"&&window.Element||function(){};function iT(t,e,n){if(!(t[e]instanceof rT))return new Error("Invalid prop `"+e+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var oT=x.oneOfType([x.string,x.func,iT,x.shape({current:x.any})]),ie=x.oneOfType([x.func,x.string,x.shape({$$typeof:x.symbol,render:x.func}),x.arrayOf(x.oneOfType([x.func,x.string,x.shape({$$typeof:x.symbol,render:x.func})]))]),pc={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},mc=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],tl={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},te={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},rg=!!(typeof window<"u"&&window.document&&window.document.createElement);function sT(t){return t&&ta(t)==="object"?"current"in t:!1}function aT(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function ig(t){var e=ta(t);return t!=null&&(e==="object"||e==="function")}function lT(t){if(!ig(t))return!1;var e=aT(t);return e==="[object Function]"||e==="[object AsyncFunction]"||e==="[object GeneratorFunction]"||e==="[object Proxy]"}function cT(t){if(sT(t))return t.current;if(lT(t))return t();if(typeof t=="string"&&rg){var e=document.querySelectorAll(t);if(e.length||(e=document.querySelectorAll("#".concat(t))),!e.length)throw new Error("The target '".concat(t,"' could not be identified in the dom, tip: check spelling"));return e}return t}function b0(t){return t===null?!1:Array.isArray(t)||rg&&typeof t.length=="number"}function uT(t,e){var n=cT(t);return e?b0(n)?n:n===null?[]:[n]:b0(n)?n[0]:n}var fT=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],dT=["className","cssModule","fluid","tag"];function Th(){return Th=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Th.apply(this,arguments)}function hT(t,e){if(t==null)return{};var n=pT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function pT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var mT={tag:ie,fluid:x.oneOfType([x.bool,x.string]),className:x.string,cssModule:x.object};function Lr(t){var e=t.className,n=t.cssModule,r=t.fluid,i=t.tag,o=i===void 0?"div":i,s=hT(t,dT),a="container";r===!0?a="container-fluid":r&&(a="container-".concat(r));var l=V(Y(e,a),n);return M.createElement(o,Th({},s,{className:l}))}Lr.propTypes=mT;var gT=["className","cssModule","noGutters","tag","widths"];function Nh(){return Nh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nh.apply(this,arguments)}function yT(t,e){if(t==null)return{};var n=vT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var bT=["xs","sm","md","lg","xl","xxl"],Ti=x.oneOfType([x.number,x.string]),xT={tag:ie,noGutters:nT(x.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:x.string,cssModule:x.object,xs:Ti,sm:Ti,md:Ti,lg:Ti,xl:Ti,xxl:Ti,widths:x.array};function ht(t){var e=t.className,n=t.cssModule,r=t.noGutters,i=t.tag,o=i===void 0?"div":i,s=t.widths,a=s===void 0?bT:s,l=yT(t,gT),c=[];a.forEach(function(f,d){var h=t[f];if(delete l[f],!!h){var p=!d;c.push(p?"row-cols-".concat(h):"row-cols-".concat(f,"-").concat(h))}});var u=V(Y(e,r?"gx-0":null,"row",c),n);return M.createElement(o,Nh({},l,{className:u}))}ht.propTypes=xT;var kT=["className","cssModule","widths","tag"];function Mh(){return Mh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mh.apply(this,arguments)}function wT(t,e){if(t==null)return{};var n=ST(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ST(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Wf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vk=["xs","sm","md","lg","xl","xxl"],x0=x.oneOfType([x.number,x.string]),Ni=x.oneOfType([x.bool,x.number,x.string,x.shape({size:x.oneOfType([x.bool,x.number,x.string]),order:x0,offset:x0})]),OT={tag:ie,xs:Ni,sm:Ni,md:Ni,lg:Ni,xl:Ni,xxl:Ni,className:x.string,cssModule:x.object,widths:x.array},k0=function(e,n,r){return r===!0||r===""?e?"col":"col-".concat(n):r==="auto"?e?"col-auto":"col-".concat(n,"-auto"):e?"col-".concat(r):"col-".concat(n,"-").concat(r)},CT=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vk,i=e,o=[];return r.forEach(function(s,a){var l=i[s];if(delete i[s],!(!l&&l!=="")){var c=!a;if(ig(l)){var u,f=c?"-":"-".concat(s,"-"),d=k0(c,s,l.size);o.push(V(Y((u={},Wf(u,d,l.size||l.size===""),Wf(u,"order".concat(f).concat(l.order),l.order||l.order===0),Wf(u,"offset".concat(f).concat(l.offset),l.offset||l.offset===0),u)),n))}else{var h=k0(c,s,l);o.push(h)}}}),{colClasses:o,modifiedAttributes:i}};function ae(t){var e=t.className,n=t.cssModule,r=t.widths,i=r===void 0?vk:r,o=t.tag,s=o===void 0?"div":o,a=wT(t,kT),l=CT(a,n,i),c=l.modifiedAttributes,u=l.colClasses;u.length||u.push("col");var f=V(Y(e,u),n);return M.createElement(s,Mh({},c,{className:f}))}ae.propTypes=OT;var ET=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function Ph(){return Ph=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ph.apply(this,arguments)}function Kf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TT(t,e){if(t==null)return{};var n=NT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function NT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var MT={children:x.node,className:x.string,color:x.string,container:x.oneOfType([x.bool,x.string]),cssModule:x.object,dark:x.bool,expand:x.oneOfType([x.bool,x.string]),fixed:x.string,light:x.bool,role:x.string,sticky:x.string,tag:ie},PT=function(e){return e===!1?!1:e===!0||e==="xs"?"navbar-expand":"navbar-expand-".concat(e)};function bk(t){var e,n=t.expand,r=n===void 0?!1:n,i=t.className,o=t.cssModule,s=t.light,a=t.dark,l=t.fixed,c=t.sticky,u=t.color,f=t.container,d=f===void 0?"fluid":f,h=t.tag,p=h===void 0?"nav":h,m=t.children,v=TT(t,ET),g=V(Y(i,"navbar",PT(r),(e={"navbar-light":s,"navbar-dark":a},Kf(e,"bg-".concat(u),u),Kf(e,"fixed-".concat(l),l),Kf(e,"sticky-".concat(c),c),e)),o),y=d&&d===!0?"container":"container-".concat(d);return M.createElement(p,Ph({},v,{className:g}),d?M.createElement("div",{className:y},m):m)}bk.propTypes=MT;var AT=["className","cssModule","tag"];function Ah(){return Ah=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ah.apply(this,arguments)}function RT(t,e){if(t==null)return{};var n=jT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var IT={className:x.string,cssModule:x.object,tag:ie};function xk(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"a":r,o=RT(t,AT),s=V(Y(e,"navbar-brand"),n);return M.createElement(i,Ah({},o,{className:s}))}xk.propTypes=IT;var DT=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function Rh(){return Rh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rh.apply(this,arguments)}function LT(t,e){if(t==null)return{};var n=_T(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function _T(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var zT={card:x.bool,className:x.string,cssModule:x.object,fill:x.bool,horizontal:x.oneOf(["center","end"]),justified:x.bool,navbar:x.bool,pills:x.bool,tabs:x.bool,tag:ie,vertical:x.oneOfType([x.bool,x.string])},$T=function(e){return e===!1?!1:e===!0||e==="xs"?"flex-column":"flex-".concat(e,"-column")};function kk(t){var e=t.className,n=t.cssModule,r=t.tabs,i=t.pills,o=t.vertical,s=o===void 0?!1:o,a=t.horizontal,l=t.justified,c=t.fill,u=t.navbar,f=t.card,d=t.tag,h=d===void 0?"ul":d,p=LT(t,DT),m=V(Y(e,u?"navbar-nav":"nav",a?"justify-content-".concat(a):!1,$T(s),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":l,"nav-fill":c}),n);return M.createElement(h,Rh({},p,{className:m}))}kk.propTypes=zT;var FT=["className","cssModule","active","tag"];function jh(){return jh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jh.apply(this,arguments)}function BT(t,e){if(t==null)return{};var n=HT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function HT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var UT={active:x.bool,className:x.string,cssModule:x.object,tag:ie};function wk(t){var e=t.className,n=t.cssModule,r=t.active,i=t.tag,o=i===void 0?"li":i,s=BT(t,FT),a=V(Y(e,"nav-item",r?"active":!1),n);return M.createElement(o,jh({},s,{className:a}))}wk.propTypes=UT;var VT=["className","cssModule","variant","innerRef"];function Ih(){return Ih=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ih.apply(this,arguments)}function w0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function WT(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?w0(Object(n),!0).forEach(function(r){KT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function KT(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JT(t,e){if(t==null)return{};var n=qT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function qT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var GT={active:x.bool,"aria-label":x.string,onClick:x.func,variant:x.oneOf(["white"]),className:x.string,cssModule:x.object,innerRef:x.oneOfType([x.object,x.string,x.func])};function Sk(t){var e=t.className;t.cssModule;var n=t.variant,r=t.innerRef,i=JT(t,VT),o=V(Y(e,"btn-close",n&&"btn-close-".concat(n)));return M.createElement("button",Ih({ref:r,type:"button",className:o},WT({"aria-label":"close"},i)))}Sk.propTypes=GT;var YT=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Dh(){return Dh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Dh.apply(this,arguments)}function QT(t,e){if(t==null)return{};var n=XT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function XT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var ZT={active:x.bool,"aria-label":x.string,block:x.bool,children:x.node,className:x.string,cssModule:x.object,close:x.bool,color:x.string,disabled:x.bool,innerRef:x.oneOfType([x.object,x.func,x.string]),onClick:x.func,outline:x.bool,size:x.string,tag:ie};function A(t){var e=S.useCallback(function(y){if(t.disabled){y.preventDefault();return}if(t.onClick)return t.onClick(y)},[t.onClick,t.disabled]),n=t.active,r=t["aria-label"],i=t.block,o=t.className,s=t.close,a=t.cssModule,l=t.color,c=l===void 0?"secondary":l,u=t.outline,f=t.size,d=t.tag,h=d===void 0?"button":d,p=t.innerRef,m=QT(t,YT);if(s)return M.createElement(Sk,m);var v="btn".concat(u?"-outline":"","-").concat(c),g=V(Y(o,"btn",v,f?"btn-".concat(f):!1,i?"d-block w-100":!1,{active:n,disabled:t.disabled}),a);return m.href&&h==="button"&&(h="a"),M.createElement(h,Dh({type:h==="button"&&m.onClick?"button":void 0},m,{className:g,ref:p,onClick:e,"aria-label":r}))}A.propTypes=ZT;var e3=S.createContext(),t3=S.createContext();function S0(t){var e=t.children,n=S.useState(null),r=n[0],i=n[1],o=S.useRef(!1);S.useEffect(function(){return function(){o.current=!0}},[]);var s=S.useCallback(function(a){o.current||i(a)},[]);return S.createElement(e3.Provider,{value:r},S.createElement(t3.Provider,{value:s},e))}var O0=M.createContext({}),Ok=M.createContext({});function Lh(t){"@babel/helpers - typeof";return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lh(t)}var n3=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"];function _h(){return _h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_h.apply(this,arguments)}function Hn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r3(t,e){if(t==null)return{};var n=i3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function i3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function o3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s3(t,e,n){return e&&C0(t.prototype,e),n&&C0(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a3(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zh(t,e)}function zh(t,e){return zh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zh(t,e)}function l3(t){var e=u3();return function(){var r=gc(t),i;if(e){var o=gc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return c3(this,i)}}function c3(t,e){if(e&&(Lh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kn(t)}function Kn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gc(t){return gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gc(t)}var f3={a11y:x.bool,disabled:x.bool,direction:x.oneOf(["up","down","start","end","left","right"]),group:x.bool,isOpen:x.bool,nav:x.bool,active:x.bool,size:x.string,tag:ie,toggle:x.func,children:x.node,className:x.string,cssModule:x.object,dropup:x.bool,inNavbar:x.bool,setActiveFromChild:x.bool,menuRole:x.oneOf(["listbox","menu"])},d3={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},h3=[te.space,te.enter,te.up,te.down,te.end,te.home],Bu=function(t){a3(n,t);var e=l3(n);function n(r){var i;return o3(this,n),i=e.call(this,r),i.addEvents=i.addEvents.bind(Kn(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Kn(i)),i.handleKeyDown=i.handleKeyDown.bind(Kn(i)),i.removeEvents=i.removeEvents.bind(Kn(i)),i.toggle=i.toggle.bind(Kn(i)),i.handleMenuRef=i.handleMenuRef.bind(Kn(i)),i.handleToggleRef=i.handleToggleRef.bind(Kn(i)),i.containerRef=M.createRef(),i.menuRef=M.createRef(),i.toggleRef=M.createRef(),i}return s3(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==te.tab))){var o=this.getContainer(),s=this.getMenu(),a=this.getToggle();if(a){var l=a.contains(i.target),c=s&&s.contains(i.target)&&s!==i.target,u=!1;o&&(u=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!u||c)&&(i.type!=="keyup"||i.which===te.tab))&&this.toggle(i)}}}},{key:"handleKeyDown",value:function(i){var o=this,s=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",a=this.getMenuCtrl()===i.target,l=te.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(s||a))&&((h3.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(a)if([te.space,te.enter,te.up,te.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var y;return(y=o.getMenuItems()[0])===null||y===void 0?void 0:y.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===te.esc&&this.toggle(i);if(this.props.isOpen&&s){if([te.tab,te.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([te.space,te.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([te.down,te.up].indexOf(i.which)>-1||[te.n,te.p].indexOf(i.which)>-1&&i.ctrlKey){var u=this.getMenuItems(),f=u.indexOf(i.target);te.up===i.which||te.p===i.which&&i.ctrlKey?f=f!==0?f-1:u.length-1:(te.down===i.which||te.n===i.which&&i.ctrlKey)&&(f=f===u.length-1?0:f+1),u[f].focus()}else if(te.end===i.which){var d=this.getMenuItems();d[d.length-1].focus()}else if(te.home===i.which){var h=this.getMenuItems();h[0].focus()}else if(i.which>=48&&i.which<=90)for(var p=this.getMenuItems(),m=String.fromCharCode(i.which).toLowerCase(),v=0;v<p.length;v+=1){var g=p[v].textContent&&p[v].textContent[0].toLowerCase();if(g===m){p[v].focus();break}}}}}},{key:"handleProps",value:function(){this.props.isOpen?this.addEvents():this.removeEvents()}},{key:"getContextValue",value:function(){return{toggle:this.toggle,isOpen:this.props.isOpen,direction:this.props.direction==="down"&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar,disabled:this.props.disabled,onMenuRef:this.handleMenuRef,onToggleRef:this.handleToggleRef,menuRole:this.props.menuRole}}},{key:"getContainer",value:function(){return this.containerRef.current}},{key:"getMenu",value:function(){return this.menuRef.current}},{key:"getToggle",value:function(){return this.toggleRef.current}},{key:"getMenuCtrl",value:function(){return this._$menuCtrl?this._$menuCtrl:(this._$menuCtrl=this.getToggle(),this._$menuCtrl)}},{key:"getItemType",value:function(){return this.props.menuRole==="listbox"?"option":"menuitem"}},{key:"getMenuItems",value:function(){var i=this.getMenu()||this.getContainer();return[].slice.call(i.querySelectorAll('[role="'.concat(this.getItemType(),'"]')))}},{key:"addEvents",value:function(){var i=this;["click","touchstart","keyup"].forEach(function(o){return document.addEventListener(o,i.handleDocumentClick,!0)})}},{key:"removeEvents",value:function(){var i=this;["click","touchstart","keyup"].forEach(function(o){return document.removeEventListener(o,i.handleDocumentClick,!0)})}},{key:"toggle",value:function(i){return this.props.disabled?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i,o=this,s=Fu(this.props,["toggle","disabled","inNavbar","a11y"]),a=s.className,l=s.cssModule,c=s.direction,u=s.isOpen,f=s.group,d=s.size,h=s.nav,p=s.setActiveFromChild,m=s.active,v=s.tag;s.menuRole;var g=r3(s,n3),y=v||(h?"li":"div"),k=!1;p&&M.Children.map(this.props.children[1].props.children,function(O){O&&O.props.active&&(k=!0)});var w=V(Y(a,h&&m?"active":!1,p&&k?"active":!1,(i={"btn-group":f},Hn(i,"btn-group-".concat(d),!!d),Hn(i,"dropdown",!f),Hn(i,"dropup",c==="up"),Hn(i,"dropstart",c==="start"||c==="left"),Hn(i,"dropend",c==="end"||c==="right"),Hn(i,"show",u),Hn(i,"nav-item",h),i)),l);return this.context.insideInputGroup?M.createElement(O0.Provider,{value:this.getContextValue()},M.createElement(S0,null,M.Children.map(this.props.children,function(O){return M.cloneElement(O,{onKeyDown:o.handleKeyDown})}))):M.createElement(O0.Provider,{value:this.getContextValue()},M.createElement(S0,null,M.createElement(y,_h({},g,Hn({},typeof y=="string"?"ref":"innerRef",this.containerRef),{onKeyDown:this.handleKeyDown,className:w}))))}}]),n}(M.Component);Bu.propTypes=f3;Bu.defaultProps=d3;Bu.contextType=Ok;const p3=Bu;var m3=["className","cssModule","size","vertical","tag"];function $h(){return $h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$h.apply(this,arguments)}function E0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function g3(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?E0(Object(n),!0).forEach(function(r){y3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function y3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v3(t,e){if(t==null)return{};var n=b3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function b3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var x3={"aria-label":x.string,className:x.string,cssModule:x.object,role:x.string,size:x.string,tag:ie,vertical:x.bool};function Ve(t){var e=t.className,n=t.cssModule,r=t.size,i=t.vertical,o=t.tag,s=o===void 0?"div":o,a=v3(t,m3),l=V(Y(e,r?"btn-group-"+r:!1,i?"btn-group-vertical":"btn-group"),n);return M.createElement(s,$h({},g3({role:"group"},a),{className:l}))}Ve.propTypes=x3;function k3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Fh(t,e){return Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fh(t,e)}function w3(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Fh(t,e)}const T0={disabled:!1},Ck=M.createContext(null);var S3=function(e){return e.scrollTop},cs="unmounted",Wr="exited",Kr="entering",Li="entered",Bh="exiting",bt=function(t){w3(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=Wr,o.appearStatus=Kr):l=Li:r.unmountOnExit||r.mountOnEnter?l=cs:l=Wr,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===cs?{status:Wr}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Kr&&s!==Li&&(o=Kr):(s===Kr||s===Li)&&(o=Bh)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Kr){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:eo.findDOMNode(this);s&&S3(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Wr&&this.setState({status:cs})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[eo.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),d=a?f.appear:f.enter;if(!i&&!s||T0.disabled){this.safeSetState({status:Li},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Kr},function(){o.props.onEntering(c,u),o.onTransitionEnd(d,function(){o.safeSetState({status:Li},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:eo.findDOMNode(this);if(!o||T0.disabled){this.safeSetState({status:Wr},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Bh},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Wr},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:eo.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===cs)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=k3(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return M.createElement(Ck.Provider,{value:null},typeof s=="function"?s(i,a):M.cloneElement(M.Children.only(s),a))},e}(M.Component);bt.contextType=Ck;bt.propTypes={};function Mi(){}bt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Mi,onEntering:Mi,onEntered:Mi,onExit:Mi,onExiting:Mi,onExited:Mi};bt.UNMOUNTED=cs;bt.EXITED=Wr;bt.ENTERING=Kr;bt.ENTERED=Li;bt.EXITING=Bh;var O3=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function yc(){return yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yc.apply(this,arguments)}function C3(t,e){if(t==null)return{};var n=E3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function E3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function N0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function na(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?N0(Object(n),!0).forEach(function(r){T3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function T3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var N3=na(na({},bt.propTypes),{},{children:x.oneOfType([x.arrayOf(x.node),x.node]),tag:ie,baseClass:x.string,baseClassActive:x.string,className:x.string,cssModule:x.object,innerRef:x.oneOfType([x.object,x.string,x.func])}),Ek=na(na({},bt.defaultProps),{},{timeout:pc.Fade,appear:!0,enter:!0,exit:!0,in:!0});function qt(t){var e=S.useRef(null),n=t.tag,r=n===void 0?"div":n,i=t.baseClass,o=i===void 0?"fade":i,s=t.baseClassActive,a=s===void 0?"show":s,l=t.className,c=t.cssModule,u=t.children,f=t.innerRef,d=f===void 0?e:f,h=C3(t,O3),p=yk(na({defaultProps:Ek},h),mc),m=Fu(h,mc);return M.createElement(bt,yc({nodeRef:d},p),function(v){var g=v==="entered",y=V(Y(l,o,g&&a),c);return M.createElement(r,yc({className:y},m,{ref:d}),u)})}qt.propTypes=N3;qt.defaultProps=Ek;function Hh(t){"@babel/helpers - typeof";return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hh(t)}var M3=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],Pi;function vc(){return vc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vc.apply(this,arguments)}function P3(t,e){if(t==null)return{};var n=A3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function A3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function R3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j3(t,e,n){return e&&M0(t.prototype,e),n&&M0(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function I3(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uh(t,e)}function Uh(t,e){return Uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uh(t,e)}function D3(t){var e=_3();return function(){var r=bc(t),i;if(e){var o=bc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return L3(this,i)}}function L3(t,e){if(e&&(Hh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tk(t)}function Tk(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bc(t){return bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bc(t)}function P0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Eo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?P0(Object(n),!0).forEach(function(r){to(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function to(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z3=Eo(Eo({},bt.propTypes),{},{horizontal:x.bool,isOpen:x.bool,children:x.oneOfType([x.arrayOf(x.node),x.node]),tag:ie,className:x.node,navbar:x.bool,cssModule:x.object,innerRef:x.shape({current:x.object})}),$3=Eo(Eo({},bt.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:pc.Collapse}),F3=(Pi={},to(Pi,tl.ENTERING,"collapsing"),to(Pi,tl.ENTERED,"collapse show"),to(Pi,tl.EXITING,"collapsing"),to(Pi,tl.EXITED,"collapse"),Pi);function B3(t){return F3[t]||"collapse"}var og=function(t){I3(n,t);var e=D3(n);function n(r){var i;return R3(this,n),i=e.call(this,r),i.state={dimension:null},i.nodeRef=r.innerRef||M.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(function(o){i[o]=i[o].bind(Tk(i))}),i}return j3(n,[{key:"onEntering",value:function(i,o){var s=this.getNode();this.setState({dimension:this.getDimension(s)}),this.props.onEntering(s,o)}},{key:"onEntered",value:function(i,o){var s=this.getNode();this.setState({dimension:null}),this.props.onEntered(s,o)}},{key:"onExit",value:function(){var i=this.getNode();this.setState({dimension:this.getDimension(i)}),this.props.onExit(i)}},{key:"onExiting",value:function(){var i=this.getNode();this.getDimension(i),this.setState({dimension:0}),this.props.onExiting(i)}},{key:"onExited",value:function(){var i=this.getNode();this.setState({dimension:null}),this.props.onExited(i)}},{key:"getNode",value:function(){return this.nodeRef.current}},{key:"getDimension",value:function(i){return this.props.horizontal?i.scrollWidth:i.scrollHeight}},{key:"render",value:function(){var i=this,o=this.props,s=o.tag,a=o.horizontal,l=o.isOpen,c=o.className,u=o.navbar,f=o.cssModule,d=o.children;o.innerRef;var h=P3(o,M3),p=this.state.dimension,m=yk(h,mc),v=Fu(h,mc);return M.createElement(bt,vc({},m,{in:l,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),function(g){var y=B3(g),k=V(Y(c,a&&"collapse-horizontal",y,u&&"navbar-collapse"),f),w=p===null?null:to({},a?"width":"height",p);return M.createElement(s,vc({},v,{style:Eo(Eo({},v.style),w),className:k,ref:i.nodeRef}),d)})}}]),n}(S.Component);og.propTypes=z3;og.defaultProps=$3;const H3=og;var U3=["className","cssModule","color","body","inverse","outline","tag","innerRef"];function Vh(){return Vh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vh.apply(this,arguments)}function V3(t,e){if(t==null)return{};var n=W3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function W3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var K3={body:x.bool,className:x.string,color:x.string,cssModule:x.object,innerRef:x.oneOfType([x.object,x.string,x.func]),inverse:x.bool,outline:x.bool,tag:ie};function To(t){var e=t.className,n=t.cssModule,r=t.color,i=t.body,o=t.inverse,s=t.outline,a=t.tag,l=a===void 0?"div":a,c=t.innerRef,u=V3(t,U3),f=V(Y(e,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(s?"border":"bg","-").concat(r):!1),n);return M.createElement(l,Vh({},u,{className:f,ref:c}))}To.propTypes=K3;var J3=["className","cssModule","innerRef","tag"];function Wh(){return Wh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wh.apply(this,arguments)}function q3(t,e){if(t==null)return{};var n=G3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function G3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Y3={className:x.string,cssModule:x.object,innerRef:x.oneOfType([x.object,x.string,x.func]),tag:ie};function No(t){var e=t.className,n=t.cssModule,r=t.innerRef,i=t.tag,o=i===void 0?"div":i,s=q3(t,J3),a=V(Y(e,"card-body"),n);return M.createElement(o,Wh({},s,{className:a,ref:r}))}No.propTypes=Y3;var Q3=["className","cssModule","top","bottom","tag"];function Kh(){return Kh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kh.apply(this,arguments)}function X3(t,e){if(t==null)return{};var n=Z3(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Z3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var eN={bottom:x.bool,className:x.string,cssModule:x.object,tag:ie,top:x.bool};function Nk(t){var e=t.className,n=t.cssModule,r=t.top,i=t.bottom,o=t.tag,s=o===void 0?"img":o,a=X3(t,Q3),l="card-img";r&&(l="card-img-top"),i&&(l="card-img-bottom");var c=V(Y(e,l),n);return M.createElement(s,Kh({},a,{className:c}))}Nk.propTypes=eN;var tN=["className","cssModule","tag"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jh.apply(this,arguments)}function nN(t,e){if(t==null)return{};var n=rN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var iN={className:x.string,cssModule:x.object,tag:ie};function _i(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"p":r,o=nN(t,tN),s=V(Y(e,"card-text"),n);return M.createElement(i,Jh({},o,{className:s}))}_i.propTypes=iN;var oN=["className","cssModule","tag"];function qh(){return qh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qh.apply(this,arguments)}function sN(t,e){if(t==null)return{};var n=aN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function aN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var lN={className:x.string,cssModule:x.object,tag:ie};function ra(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=sN(t,oN),s=V(Y(e,"card-title"),n);return M.createElement(i,qh({},o,{className:s}))}ra.propTypes=lN;function Gh(t){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gh(t)}function cN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uN(t,e,n){return e&&A0(t.prototype,e),n&&A0(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function fN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yh(t,e)}function Yh(t,e){return Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yh(t,e)}function dN(t){var e=mN();return function(){var r=xc(t),i;if(e){var o=xc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return hN(this,i)}}function hN(t,e){if(e&&(Gh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pN(t)}function pN(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xc(t){return xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xc(t)}var gN={children:x.node.isRequired,node:x.any},Mk=function(t){fN(n,t);var e=dN(n);function n(){return cN(this,n),e.apply(this,arguments)}return uN(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return rg?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),eo.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(M.Component);Mk.propTypes=gN;const yN=Mk;function Qh(t){"@babel/helpers - typeof";return Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qh(t)}function R0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ai(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?R0(Object(n),!0).forEach(function(r){zi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ss(){return Ss=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ss.apply(this,arguments)}function zi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bN(t,e,n){return e&&j0(t.prototype,e),n&&j0(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function xN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xh(t,e)}function Xh(t,e){return Xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xh(t,e)}function kN(t){var e=SN();return function(){var r=kc(t),i;if(e){var o=kc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return wN(this,i)}}function wN(t,e){if(e&&(Qh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return At(t)}function At(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function SN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kc(t){return kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kc(t)}function wc(){}var I0=x.shape(qt.propTypes),Pk={autoFocus:x.bool,backdrop:x.oneOfType([x.bool,x.oneOf(["static"])]),backdropClassName:x.string,backdropTransition:I0,centered:x.bool,children:x.node,contentClassName:x.string,className:x.string,container:oT,cssModule:x.object,external:x.node,fade:x.bool,fullscreen:x.oneOfType([x.bool,x.oneOf(["sm","md","lg","xl"])]),innerRef:x.oneOfType([x.object,x.string,x.func]),isOpen:x.bool,keyboard:x.bool,labelledBy:x.string,modalClassName:x.string,modalTransition:I0,onClosed:x.func,onEnter:x.func,onExit:x.func,onOpened:x.func,returnFocusAfterClose:x.bool,role:x.string,scrollable:x.bool,size:x.string,toggle:x.func,trapFocus:x.bool,unmountOnClose:x.bool,wrapClassName:x.string,zIndex:x.oneOfType([x.number,x.string])},ON=Object.keys(Pk),CN={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:wc,onClosed:wc,modalTransition:{timeout:pc.Modal},backdropTransition:{mountOnEnter:!0,timeout:pc.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Ea=function(t){xN(n,t);var e=kN(n);function n(r){var i;return vN(this,n),i=e.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(At(i)),i.handleBackdropClick=i.handleBackdropClick.bind(At(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(At(i)),i.handleEscape=i.handleEscape.bind(At(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(At(i)),i.handleTab=i.handleTab.bind(At(i)),i.onOpened=i.onOpened.bind(At(i)),i.onClosed=i.onClosed.bind(At(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(At(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(At(i)),i.trapFocus=i.trapFocus.bind(At(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return bN(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,s=i.autoFocus,a=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),s&&this.setFocus()),a&&a(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex<n.openCount-1)){var o=this.getFocusableChildren(),s=o.length;if(s!==0){for(var a=this.getFocusedChild(),l=0,c=0;c<s;c+=1)if(o[c]===a){l=c;break}i.shiftKey&&l===0?(i.preventDefault(),o[s-1].focus()):!i.shiftKey&&l===s-1&&(i.preventDefault(),o[0].focus())}}}},{key:"handleBackdropMouseDown",value:function(i){this._mouseDownElement=i.target}},{key:"handleEscape",value:function(i){this.props.isOpen&&i.keyCode===te.esc&&this.props.toggle&&(this.props.keyboard?(i.preventDefault(),i.stopPropagation(),this.props.toggle(i)):this.props.backdrop==="static"&&(i.preventDefault(),i.stopPropagation(),this.handleStaticBackdropAnimation()))}},{key:"handleStaticBackdropAnimation",value:function(){var i=this;this.clearBackdropAnimationTimeout(),this.setState({showStaticBackdropAnimation:!0}),this._backdropAnimationTimeout=setTimeout(function(){i.setState({showStaticBackdropAnimation:!1})},100)}},{key:"onOpened",value:function(i,o){this.props.onOpened(),(this.props.modalTransition.onEntered||wc)(i,o)}},{key:"onClosed",value:function(i){var o=this.props.unmountOnClose;this.props.onClosed(),(this.props.modalTransition.onExited||wc)(i),o&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}},{key:"setFocus",value:function(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}},{key:"getFocusableChildren",value:function(){return this._element.querySelectorAll(fT.join(", "))}},{key:"getFocusedChild",value:function(){var i,o=this.getFocusableChildren();try{i=document.activeElement}catch{i=o[0]}return i}},{key:"trapFocus",value:function(i){if(this.props.trapFocus&&this._element&&!(this._dialog&&this._dialog.parentNode===i.target)&&!(this.modalIndex<n.openCount-1)){for(var o=this.getFocusableChildren(),s=0;s<o.length;s+=1)if(o[s]===i.target)return;o.length>0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=uT(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=ZE(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),eT(),n.openCount===0&&(document.body.className=Y(document.body.className,V("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=V("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),gk(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,s=Fu(this.props,ON),a="modal-dialog";return M.createElement("div",Ss({},s,{className:V(Y(a,this.props.className,(i={},zi(i,"modal-".concat(this.props.size),this.props.size),zi(i,"".concat(a,"-centered"),this.props.centered),zi(i,"".concat(a,"-scrollable"),this.props.scrollable),zi(i,"modal-fullscreen",this.props.fullscreen===!0),zi(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),M.createElement("div",{className:V(Y("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var s=this.props,a=s.wrapClassName,l=s.modalClassName,c=s.backdropClassName,u=s.cssModule,f=s.isOpen,d=s.backdrop,h=s.role,p=s.labelledBy,m=s.external,v=s.innerRef,g={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":p,"aria-modal":!0,role:h,tabIndex:"-1"},y=this.props.fade,k=Ai(Ai(Ai({},qt.defaultProps),this.props.modalTransition),{},{baseClass:y?this.props.modalTransition.baseClass:"",timeout:y?this.props.modalTransition.timeout:0}),w=Ai(Ai(Ai({},qt.defaultProps),this.props.backdropTransition),{},{baseClass:y?this.props.backdropTransition.baseClass:"",timeout:y?this.props.backdropTransition.timeout:0}),O=d&&(y?M.createElement(qt,Ss({},w,{in:f&&!!d,cssModule:u,className:V(Y("modal-backdrop",c),u)})):M.createElement("div",{className:V(Y("modal-backdrop","show",c),u)}));return M.createElement(yN,{node:this._element},M.createElement("div",{className:V(a)},M.createElement(qt,Ss({},g,k,{in:f,onEntered:this.onOpened,onExited:this.onClosed,cssModule:u,className:V(Y("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),u),innerRef:v}),m,this.renderModalDialog()),O))}return null}}]),n}(M.Component);Ea.propTypes=Pk;Ea.defaultProps=CN;Ea.openCount=0;Ea.originalBodyOverflow=null;const sg=Ea;var EN=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function Zh(){return Zh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Zh.apply(this,arguments)}function TN(t,e){if(t==null)return{};var n=NN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function NN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var MN={children:x.node,className:x.string,close:x.object,closeAriaLabel:x.string,cssModule:x.object,tag:ie,toggle:x.func,wrapTag:ie};function Hu(t){var e,n=t.className,r=t.cssModule,i=t.children,o=t.toggle,s=t.tag,a=s===void 0?"h5":s,l=t.wrapTag,c=l===void 0?"div":l,u=t.closeAriaLabel,f=u===void 0?"Close":u,d=t.close,h=TN(t,EN),p=V(Y(n,"modal-header"),r);return!d&&o&&(e=M.createElement("button",{type:"button",onClick:o,className:V("btn-close",r),"aria-label":f})),M.createElement(c,Zh({},h,{className:p}),M.createElement(a,{className:V("modal-title",r)},i),d||e)}Hu.propTypes=MN;var PN=["className","cssModule","tag"];function ep(){return ep=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ep.apply(this,arguments)}function AN(t,e){if(t==null)return{};var n=RN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function RN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var jN={className:x.string,cssModule:x.object,tag:ie};function Uu(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=AN(t,PN),s=V(Y(e,"modal-body"),n);return M.createElement(i,ep({},o,{className:s}))}Uu.propTypes=jN;var IN=["className","cssModule","tag"];function tp(){return tp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tp.apply(this,arguments)}function DN(t,e){if(t==null)return{};var n=LN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function LN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var _N={className:x.string,cssModule:x.object,tag:ie};function Vu(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r,o=DN(t,IN),s=V(Y(e,"modal-footer"),n);return M.createElement(i,tp({},o,{className:s}))}Vu.propTypes=_N;var zN=["className","cssModule","valid","tooltip","tag"];function np(){return np=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},np.apply(this,arguments)}function $N(t,e){if(t==null)return{};var n=FN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function FN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var BN={children:x.node,tag:ie,className:x.string,cssModule:x.object,valid:x.bool,tooltip:x.bool};function Os(t){var e=t.className,n=t.cssModule,r=t.valid,i=r===void 0?void 0:r,o=t.tooltip,s=t.tag,a=s===void 0?"div":s,l=$N(t,zN),c=o?"tooltip":"feedback",u=V(Y(e,i?"valid-".concat(c):"invalid-".concat(c)),n);return M.createElement(a,np({},l,{className:u}))}Os.propTypes=BN;function rp(t){"@babel/helpers - typeof";return rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rp(t)}var HN=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function ip(){return ip=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ip.apply(this,arguments)}function UN(t,e){if(t==null)return{};var n=VN(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function VN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function WN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function KN(t,e,n){return e&&D0(t.prototype,e),n&&D0(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function JN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&op(t,e)}function op(t,e){return op=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},op(t,e)}function qN(t){var e=YN();return function(){var r=Sc(t),i;if(e){var o=Sc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return GN(this,i)}}function GN(t,e){if(e&&(rp(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sp(t)}function sp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function YN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sc(t){return Sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sc(t)}var QN={children:x.node,type:x.string,size:x.oneOfType([x.number,x.string]),bsSize:x.string,valid:x.bool,invalid:x.bool,tag:ie,innerRef:x.oneOfType([x.object,x.func,x.string]),plaintext:x.bool,addon:x.bool,className:x.string,cssModule:x.object},Ak=function(t){JN(n,t);var e=qN(n);function n(r){var i;return WN(this,n),i=e.call(this,r),i.getRef=i.getRef.bind(sp(i)),i.focus=i.focus.bind(sp(i)),i}return KN(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,s=i.cssModule,a=i.type,l=a===void 0?"text":a,c=i.bsSize,u=i.valid,f=i.invalid,d=i.tag,h=i.addon,p=i.plaintext,m=i.innerRef,v=UN(i,HN),g=["switch","radio","checkbox"].indexOf(l)>-1,y=/\D/g,k=l==="textarea",w=l==="select",O=l==="range",C=d||(w||k?l:"input"),T="form-control";p?(T="".concat(T,"-plaintext"),C=d||"input"):O?T="form-range":w?T="form-select":g&&(h?T=null:T="form-check-input"),v.size&&y.test(v.size)&&(Eh(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=v.size,delete v.size);var j=V(Y(o,f&&"is-invalid",u&&"is-valid",c?w?"form-select-".concat(c):"form-control-".concat(c):!1,T),s);return(C==="input"||d&&typeof d=="function")&&(v.type=l==="switch"?"checkbox":l),v.children&&!(p||l==="select"||typeof C!="string"||C==="select")&&(Eh('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete v.children),M.createElement(C,ip({},v,{ref:m,className:j,"aria-invalid":f}))}}]),n}(M.Component);Ak.propTypes=QN;const br=Ak;var XN=["className","cssModule","tag","type","size"];function Oc(){return Oc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Oc.apply(this,arguments)}function ZN(t,e){if(t==null)return{};var n=eM(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function eM(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var tM={className:x.string,cssModule:x.object,size:x.string,tag:ie,type:x.string};function xr(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"div":r;t.type;var o=t.size,s=ZN(t,XN),a=V(Y(e,"input-group",o?"input-group-".concat(o):null),n);return t.type==="dropdown"?M.createElement(p3,Oc({},s,{className:a})):M.createElement(Ok.Provider,{value:{insideInputGroup:!0}},M.createElement(i,Oc({},s,{className:a})))}xr.propTypes=tM;var nM=["className","cssModule","tag"];function ap(){return ap=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ap.apply(this,arguments)}function rM(t,e){if(t==null)return{};var n=iM(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function iM(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var oM={className:x.string,cssModule:x.object,tag:ie};function kr(t){var e=t.className,n=t.cssModule,r=t.tag,i=r===void 0?"span":r,o=rM(t,nM),s=V(Y(e,"input-group-text"),n);return M.createElement(i,ap({},o,{className:s}))}kr.propTypes=oM;var sM=["className","cssModule","hidden","widths","tag","check","size","for"];function lp(){return lp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lp.apply(this,arguments)}function Jf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function aM(t,e){if(t==null)return{};var n=lM(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function lM(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var cM=["xs","sm","md","lg","xl","xxl"],qf=x.oneOfType([x.number,x.string]),Ri=x.oneOfType([x.bool,x.string,x.number,x.shape({size:qf,order:qf,offset:qf})]),uM={children:x.node,hidden:x.bool,check:x.bool,size:x.string,for:x.string,tag:ie,className:x.string,cssModule:x.object,xs:Ri,sm:Ri,md:Ri,lg:Ri,xl:Ri,xxl:Ri,widths:x.array},L0=function(e,n,r){return r===!0||r===""?e?"col":"col-".concat(n):r==="auto"?e?"col-auto":"col-".concat(n,"-auto"):e?"col-".concat(r):"col-".concat(n,"-").concat(r)};function Rk(t){var e=t.className,n=t.cssModule,r=t.hidden,i=t.widths,o=i===void 0?cM:i,s=t.tag,a=s===void 0?"label":s,l=t.check,c=t.size,u=t.for,f=aM(t,sM),d=[];o.forEach(function(v,g){var y=t[v];if(delete f[v],!(!y&&y!=="")){var k=!g,w;if(ig(y)){var O,C=k?"-":"-".concat(v,"-");w=L0(k,v,y.size),d.push(V(Y((O={},Jf(O,w,y.size||y.size===""),Jf(O,"order".concat(C).concat(y.order),y.order||y.order===0),Jf(O,"offset".concat(C).concat(y.offset),y.offset||y.offset===0),O))),n)}else w=L0(k,v,y),d.push(w)}});var h=c||d.length,p=!(l||h),m=V(Y(e,r?"visually-hidden":!1,l?"form-check-label":!1,c?"col-form-label-".concat(c):!1,d,h?"col-form-label":!1,p?"form-label":!1),n);return M.createElement(a,lp({htmlFor:u},f,{className:m}))}Rk.propTypes=uM;var fM=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function cp(){return cp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cp.apply(this,arguments)}function _0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function es(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_0(Object(n),!0).forEach(function(r){dM(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hM(t,e){if(t==null)return{};var n=pM(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function pM(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var mM={children:x.node,className:x.string,closeClassName:x.string,closeAriaLabel:x.string,color:x.string,cssModule:x.object,fade:x.bool,innerRef:x.oneOfType([x.object,x.string,x.func]),isOpen:x.bool,tag:ie,toggle:x.func,transition:x.shape(qt.propTypes)};function jk(t){var e=t.className,n=t.closeClassName,r=t.closeAriaLabel,i=r===void 0?"Close":r,o=t.cssModule,s=t.tag,a=s===void 0?"div":s,l=t.color,c=l===void 0?"success":l,u=t.isOpen,f=u===void 0?!0:u,d=t.toggle,h=t.children,p=t.transition,m=p===void 0?es(es({},qt.defaultProps),{},{unmountOnExit:!0}):p,v=t.fade,g=v===void 0?!0:v,y=t.innerRef,k=hM(t,fM),w=V(Y(e,"alert","alert-".concat(c),{"alert-dismissible":d}),o),O=V(Y("btn-close",n),o),C=es(es(es({},qt.defaultProps),m),{},{baseClass:g?m.baseClass:"",timeout:g?m.timeout:0});return M.createElement(qt,cp({},k,C,{tag:a,className:w,in:f,role:"alert",innerRef:y}),d?M.createElement("button",{type:"button",className:O,"aria-label":i,onClick:d}):null,h)}jk.propTypes=mM;var gM=["className","cssModule","type","size","color","children","tag"];function up(){return up=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},up.apply(this,arguments)}function yM(t,e){if(t==null)return{};var n=vM(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vM(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var bM={tag:ie,type:x.oneOf(["border","grow"]),size:x.oneOf(["sm"]),color:x.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),className:x.string,cssModule:x.object,children:x.string};function _r(t){var e=t.className,n=t.cssModule,r=t.type,i=r===void 0?"border":r,o=t.size,s=t.color,a=t.children,l=a===void 0?"Loading...":a,c=t.tag,u=c===void 0?"div":c,f=yM(t,gM),d=V(Y(e,o?"spinner-".concat(i,"-").concat(o):!1,"spinner-".concat(i),s?"text-".concat(s):!1),n);return M.createElement(u,up({role:"status"},f,{className:d}),l&&M.createElement("span",{className:V("visually-hidden",n)},l))}_r.propTypes=bM;function Be(t){this.content=t}Be.prototype={constructor:Be,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),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Be(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Be(n)},addToStart:function(t,e){return new Be([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Be(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Be(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Be.from(t),t.size?new Be(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Be.from(t),t.size?new Be(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Be.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}};Be.from=function(t){if(t instanceof Be)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Be(e)};function Ik(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Ik(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Dk(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=Dk(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class N{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new N(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new N(r,i)}cutByIndex(e,n){return e==n?N.empty:e==0&&n==this.content.length?this:new N(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new N(i,o)}addToStart(e){return new N([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new N(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let 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 Ik(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Dk(this,e,n,r)}findIndex(e,n=-1){if(e==0)return nl(0,e);if(e==this.size)return nl(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||n>0?nl(r+1,s):nl(r,i);i=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 N.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new N(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return N.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new N(n||e,r)}static from(e){if(!e)return N.empty;if(e instanceof N)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new N([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}N.empty=new N([],0);const Gf={index:0,offset:0};function nl(t,e){return Gf.index=t,Gf.offset=e,Gf}function Cc(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(!Cc(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Cc(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let re=class fp{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Cc(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`);return r.create(n.attrs)}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 fp.none;if(e instanceof fp)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};re.none=[];class Ec 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=_k(this.content,e+this.openStart,n);return r&&new I(r,this.openStart,this.openEnd)}removeBetween(e,n){return new I(Lk(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(N.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new I(e,r,i)}}I.empty=new I(N.empty,0,0);function Lk(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Lk(o.content,e-i-1,n-i-1)))}function _k(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=_k(s.content,e-o-1,n);return a&&t.replaceChild(i,s.copy(a))}function xM(t,e,n){if(n.openStart>t.depth)throw new Ec("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ec("Inconsistent open depths");return zk(t,e,n,0)}function zk(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=zk(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return ai(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=kM(n,t);return ai(o,Fk(t,s,a,e,r))}else return ai(o,Tc(t,e,r))}function $k(t,e){if(!e.type.compatibleContent(t.type))throw new Ec("Cannot join "+e.type.name+" onto "+t.type.name)}function dp(t,e,n){let r=t.node(n);return $k(r,e.node(n)),r}function si(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 Cs(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(si(t.nodeAfter,r),o++));for(let a=o;a<s;a++)si(i.child(a),r);e&&e.depth==n&&e.textOffset&&si(e.nodeBefore,r)}function ai(t,e){return t.type.checkContent(e),t.copy(e)}function Fk(t,e,n,r,i){let o=t.depth>i&&dp(t,e,i+1),s=r.depth>i&&dp(n,r,i+1),a=[];return Cs(null,t,i,a),o&&s&&e.index(i)==n.index(i)?($k(o,s),si(ai(o,Fk(t,e,n,r,i+1)),a)):(o&&si(ai(o,Tc(t,e,i+1)),a),Cs(e,n,i,a),s&&si(ai(s,Tc(n,r,i+1)),a)),Cs(r,null,i,a),new N(a)}function Tc(t,e,n){let r=[];if(Cs(null,t,n,r),t.depth>n){let i=dp(t,e,n+1);si(ai(i,Tc(t,e,n+1)),r)}return Cs(e,null,n,r),new N(r)}function kM(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(N.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class ia{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return re.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Nc(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new ia(n,r,o)}static resolveCached(e,n){for(let i=0;i<Yf.length;i++){let o=Yf[i];if(o.pos==n&&o.doc==e)return o}let r=Yf[Qf]=ia.resolve(e,n);return Qf=(Qf+1)%wM,r}}let Yf=[],Qf=0,wM=12;class Nc{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 SM=Object.create(null);let li=class hp{constructor(e,n,r,i=re.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||N.empty}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&&Cc(this.attrs,n||e.defaultAttrs||SM)&&re.sameSet(this.marks,r||re.none)}copy(e=null){return e==this.content?this:new hp(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new hp(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),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new I(c,i.depth-s,o.depth-s)}replace(e,n,r){return xM(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 ia.resolveCached(this,e)}resolveNoCache(e){return ia.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Bk(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=N.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=re.none;for(let n=0;n<this.marks.length;n++)e=this.marks[n].addToSet(e);if(!re.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=null;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=N.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,i,r)}};li.prototype.text=void 0;class Mc extends li{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):Bk(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 Mc(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Mc(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 Bk(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class yi{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new OM(e,n);if(r.next==null)return yi.empty;let i=Hk(r);r.next&&r.err("Unexpected trailing text");let o=AM(PM(i));return RM(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return N.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:f}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let d=o(f,a.concat(u));if(d)return d}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.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 o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
||
`)}}yi.empty=new yi(!0);class OM{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 Hk(t){let e=[];do e.push(CM(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function CM(t){let e=[];do e.push(EM(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function EM(t){let e=MM(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=TM(t,e);else break;return e}function z0(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function TM(t,e){let n=z0(t),r=n;return t.eat(",")&&(t.next!="}"?r=z0(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function NM(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.groups.indexOf(e)>-1&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function MM(t){if(t.eat("(")){let e=Hk(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=NM(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 PM(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=n();i(o(s.expr,l),u),l=u}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=n();r(l,u),i(o(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Uk(t,e){return e-t}function $0(t,e){let n=[];return r(e),n.sort(Uk);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function AM(t){let e=Object.create(null);return n($0(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);$0(t,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new yi(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(Uk);o.next.push({type:i[s][0],next:e[a.join(",")]||n(a)})}return o}}function RM(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Vk(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 Wk(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Kk(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new jM(t[n]);return e}let F0=class Jk{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=Kk(r.attrs),this.defaultAttrs=Vk(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==yi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:Wk(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new li(this,this.computeAttrs(e),N.from(n),re.setFrom(r))}createChecked(e=null,n,r){return n=N.from(n),this.checkContent(n),new li(this,this.computeAttrs(e),n,re.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=N.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(N.empty,!0);return o?new li(this,e,n.append(o),re.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)}`)}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:re.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Jk(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class jM{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Wu{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=Kk(i.attrs),this.excluded=null;let o=Vk(this.attrs);this.instance=o?new re(this,o):null}create(e=null){return!e&&this.instance?this.instance:new re(this,Wk(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Wu(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}excludes(e){return this.excluded.indexOf(e)>-1}}class IM{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=Be.from(e.nodes),n.marks=Be.from(e.marks||{}),this.nodes=F0.compile(this.spec.nodes,this),this.marks=Wu.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=yi.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?B0(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:B0(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof F0){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 Mc(r,r.defaultAttrs,e,re.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return li.fromJSON(this,e)}markFromJSON(e){return re.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function B0(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function DM(t){return t.tag!=null}function LM(t){return t.style!=null}class Mo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{DM(r)?this.tags.push(r):LM(r)&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new U0(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new U0(this,n,!0);return r.addAll(e,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 o=this.tags[i];if($M(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=V0(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=V0(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Mo(e,Mo.schemaRules(e)))}}const qk={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},_M={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Gk={ol:!0,ul:!0},Pc=1,Ac=2,Es=4;function H0(t,e,n){return e!=null?(e?Pc:0)|(e==="full"?Ac:0):t&&t.whitespace=="pre"?Pc|Ac:n&~Es}class rl{constructor(e,n,r,i,o,s,a){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=a,this.content=[],this.activeMarks=re.none,this.stashMarks=[],this.match=s||(a&Es?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.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&Pc)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=N.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):BM(i.type,e))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!qk.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class U0{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,s=H0(null,n.preserveWhitespace,0)|(r?Es:0);i?o=new rl(i.type,i.attrs,re.none,re.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new rl(null,null,re.none,re.none,!0,null,s):o=new rl(e.schema.topNodeType,null,re.none,re.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,n){let r=e.getAttribute("style");if(!r)return n();let i=this.readStyles(FM(r));if(!i)return;let[o,s]=i,a=this.top;for(let l=0;l<s.length;l++)this.removePendingMark(s[l],a);for(let l=0;l<o.length;l++)this.addPendingMark(o[l]);n();for(let l=0;l<o.length;l++)this.removePendingMark(o[l],a);for(let l=0;l<s.length;l++)this.addPendingMark(s[l])}addTextNode(e){let n=e.nodeValue,r=this.top;if(r.options&Ac||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Pc)r.options&Ac?n=n.replace(/\r\n?/g,`
|
||
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=e.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(e)}else this.findInside(e)}addElement(e,n){let r=e.nodeName.toLowerCase(),i;Gk.hasOwnProperty(r)&&this.parser.normalizeLists&&zM(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,n));if(o?o.ignore:_M.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let s,a=this.top,l=this.needsBlock;if(qk.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),s=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}o&&o.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(e,()=>{this.addElementByRule(e,o,o.consuming===!1?i:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
||
`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=re.none,r=re.none;for(let i=0;i<e.length;i+=2)for(let o=void 0;;){let s=this.parser.matchStyle(e[i],e[i+1],this,o);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(a=>{s.clearMark(a)&&(r=a.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)o=s;else break}return[n,r]}addElementByRule(e,n,r){let i,o,s;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(e):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(e,n,r){let i=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=r==null?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o);this.findAtPoint(e,i)}findPlace(e){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],s=o.findWrapping(e);if(s&&(!n||n.length>s.length)&&(n=s,r=o,!s.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(e)){this.closeExtra();let n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));let r=n.activeMarks;for(let i=0;i<e.marks.length;i++)(!n.type||n.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}enter(e,n,r){let i=this.findPlace(e.create(n));return i&&this.enterInner(e,n,!0,r),i}enterInner(e,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let s=H0(e,i,o.options);o.options&Es&&o.content.length==0&&(s|=Es),this.nodes.push(new rl(e,n,o.activeMarks,o.pendingMarks,r,null,s)),this.open++}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;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let n=HM(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);let s=i.popFromStashMark(e);s&&i.type&&i.type.allowsMarkType(s.type)&&(i.activeMarks=s.addToSet(i.activeMarks))}if(i==n)break}}}function zM(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Gk.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function $M(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function FM(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}function V0(t){let e={};for(let n in t)e[n]=t[n];return e}function BM(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}function HM(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}class dn{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Xf(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=dn.renderSpec(Xf(n),this.nodes[e.type.name](e));if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&dn.renderSpec(Xf(r),i(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let s,a=r?e.createElementNS(r,i):e.createElement(i),l=n[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let f=u.indexOf(" ");f>0?a.setAttributeNS(u.slice(0,f),u.slice(f+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;u<n.length;u++){let f=n[u];if(f===0){if(u<n.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:d,contentDOM:h}=dn.renderSpec(e,f,r);if(a.appendChild(d),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:a,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new dn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=W0(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return W0(e.marks)}}function W0(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Xf(t){return t.document||window.document}const Yk=65535,Qk=Math.pow(2,16);function UM(t,e){return t+e*Qk}function K0(t){return t&Yk}function VM(t){return(t-(t&Yk))/Qk}const Xk=1,Zk=2,Rl=4,e2=8;class pp{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&e2)>0}get deletedBefore(){return(this.delInfo&(Xk|Rl))>0}get deletedAfter(){return(this.delInfo&(Zk|Rl))>0}get deletedAcross(){return(this.delInfo&Rl)>0}}class wt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&wt.empty)return wt.empty}recover(e){let n=0,r=K0(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+VM(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],f=l+c;if(e<=f){let d=c?e==l?-1:e==f?1:n:n,h=l+i+(d<0?0:u);if(r)return h;let p=e==(n<0?l:f)?null:UM(a/3,e-l),m=e==l?Zk:e==f?Xk:Rl;return(n<0?e!=l:e!=f)&&(m|=e2),new pp(h,m,p)}i+=u-c}return r?e+i:new pp(e+i,0,null)}touches(e,n){let r=0,i=K0(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new wt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?wt.empty:new wt(e<0?[0,-e,0]:[0,0,e])}}wt.empty=new wt([]);class po{constructor(e=[],n,r=0,i=e.length){this.maps=e,this.mirror=n,this.from=r,this.to=i}slice(e=0,n=this.maps.length){return new po(this.maps,this.mirror,e,n)}copy(){return new po(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){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 po;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this.maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new pp(e,i,null)}}const Zf=Object.create(null);class Ze{getMap(){return wt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Zf[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 Zf)throw new RangeError("Duplicate use of step JSON ID "+e);return Zf[e]=n,n.prototype.jsonID=e,n}}class Ce{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ce(e,null)}static fail(e){return new Ce(null,e)}static fromReplace(e,n,r,i){try{return Ce.ok(e.replace(n,r,i))}catch(o){if(o instanceof Ec)return Ce.fail(o.message);throw o}}}function ag(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(ag(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return N.fromArray(r)}class sr extends Ze{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new I(ag(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Ce.fromReplace(e,this.from,this.to,o)}invert(){return new hn(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 sr(n.pos,r.pos,this.mark)}merge(e){return e instanceof sr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new sr(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 sr(n.from,n.to,e.markFromJSON(n.mark))}}Ze.jsonID("addMark",sr);class hn extends Ze{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(ag(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Ce.fromReplace(e,this.from,this.to,r)}invert(){return new sr(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 hn(n.pos,r.pos,this.mark)}merge(e){return e instanceof hn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new hn(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 hn(n.from,n.to,e.markFromJSON(n.mark))}}Ze.jsonID("removeMark",hn);class ar extends Ze{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ce.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ce.fromReplace(e,this.pos,this.pos+1,new I(N.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 ar(this.pos,n.marks[i]);return new ar(this.pos,this.mark)}}return new Po(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:"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 ar(n.pos,e.markFromJSON(n.mark))}}Ze.jsonID("addNodeMark",ar);class Po extends Ze{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ce.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ce.fromReplace(e,this.pos,this.pos+1,new I(N.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ar(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Po(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 Po(n.pos,e.markFromJSON(n.mark))}}Ze.jsonID("removeNodeMark",Po);class De extends Ze{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&mp(e,this.from,this.to)?Ce.fail("Structure replace would overwrite content"):Ce.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new wt([this.from,this.to-this.from,this.slice.size])}invert(e){return new De(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new De(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof De)||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 De(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 De(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 De(n.from,n.to,I.fromJSON(e,n.slice),!!n.structure)}}Ze.jsonID("replace",De);class _e extends Ze{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(mp(e,this.from,this.gapFrom)||mp(e,this.gapTo,this.to)))return Ce.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ce.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ce.fromReplace(e,this.from,this.to,r):Ce.fail("Content does not fit in gap")}getMap(){return new wt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new _e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new _e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new _e(n.from,n.to,n.gapFrom,n.gapTo,I.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ze.jsonID("replaceAround",_e);function mp(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function WM(t,e,n,r){let i=[],o=[],s,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let d=Math.max(c,e),h=Math.min(c+l.nodeSize,n),p=r.addToSet(f);for(let m=0;m<f.length;m++)f[m].isInSet(p)||(s&&s.to==d&&s.mark.eq(f[m])?s.to=h:i.push(s=new hn(d,h,f[m])));a&&a.to==d?a.to=h:o.push(a=new sr(d,h,r))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function KM(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof Wu){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,n);for(let u=0;u<l.length;u++){let f=l[u],d;for(let h=0;h<i.length;h++){let p=i[h];p.step==o-1&&f.eq(i[h].style)&&(d=p)}d?(d.to=c,d.step=o):i.push({style:f,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>t.step(new hn(s.from,s.to,s.style)))}function t2(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,f=r.matchType(c.type);if(!f)s.push(new De(a,u,I.empty));else{r=f;for(let d=0;d<c.marks.length;d++)n.allowsMarkType(c.marks[d].type)||t.step(new hn(a,u,c.marks[d]));if(i&&c.isText&&n.whitespace!="pre"){let d,h=/\r?\n|\r/g,p;for(;d=h.exec(c.text);)p||(p=new I(N.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new De(a+d.index,a+d.index+d[0].length,p))}}a=u}if(!r.validEnd){let l=r.fillBefore(N.empty,!0);t.replace(a,a,new I(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function JM(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Bo(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let i=t.$from.node(r),o=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!JM(i,o,s))break}return null}function qM(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=N.empty,f=0;for(let p=o,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,u=N.from(r.node(p).copy(u)),f++):l--;let d=N.empty,h=0;for(let p=o,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,d=N.from(i.node(p).copy(d)),h++):c++;t.step(new _e(l,c,s,a,new I(u.append(d),f,h),u.size-f,!0))}function lg(t,e,n=null,r=t){let i=GM(t,e),o=i&&YM(r,e);return o?i.map(J0).concat({type:e,attrs:n}).concat(o.map(J0)):null}function J0(t){return{type:t,attrs:null}}function GM(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}function YM(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:s}function QM(t,e,n){let r=N.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=N.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new _e(i,o,i,o,new I(r,0,0),n.length,!0))}function XM(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(r,i)&&tP(t.doc,t.mapping.slice(o).map(a),r)){let l=null;if(r.schema.linebreakReplacement){let d=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);d&&!h?l=!1:!d&&h&&(l=!0)}l===!1&&eP(t,s,a,o),t2(t,t.mapping.slice(o).map(a,1),r,void 0,l===null);let c=t.mapping.slice(o),u=c.map(a,1),f=c.map(a+s.nodeSize,1);return t.step(new _e(u,f,u+1,f-1,new I(N.from(r.create(i,null,s.marks)),0,0),1,!0)),l===!0&&ZM(t,s,a,o),!1}})}function ZM(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function eP(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
|
||
`))}})}function tP(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function nP(t,e,n,r,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new _e(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new I(N.from(s),0,0),1,!0))}function mo(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let f=i.node(c),d=i.index(c);if(f.type.spec.isolating)return!1;let h=f.content.cutByIndex(d,f.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||f;if(!f.canReplace(d+1,f.childCount)||!m.type.validContent(h))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function rP(t,e,n=1,r){let i=t.doc.resolve(e),o=N.empty,s=N.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=N.from(i.node(a).copy(o));let u=r&&r[c];s=N.from(u?u.type.create(u.attrs,s):i.node(a).copy(s))}t.step(new De(e,e,new I(o.append(s),n,n),!0))}function zr(t,e){let n=t.resolve(e),r=n.index();return n2(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function n2(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function Ku(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&n2(o,s)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function iP(t,e,n){let r=new De(e-n,e+n,I.empty,!0);t.step(r)}function oP(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 o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function r2(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),c=r.node(s),u=!1;if(o==1)u=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=f&&c.canReplaceWith(l,l,f[0])}if(u)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Ju(t,e,n=e,r=I.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return i2(i,o,r)?new De(e,n,r):new sP(i,o,r).fit()}function i2(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class sP{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=N.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=N.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):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 o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new I(o,s,a);return e>-1?new _e(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new De(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=ed(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,f=null;if(n==1&&(s?c.matchType(s.type)||(f=c.fillBefore(N.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:f};if(n==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ed(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=ed(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new I(us(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new I(us(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,c=0,u=[],{match:f,type:d}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));f=f.matchFragment(i)}let h=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let m=a.child(c),v=f.matchType(m.type);if(!v)break;c++,(c>1||l==0||m.content.size)&&(f=v,u.push(o2(m.mark(d.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?h:-1)))}let p=c==a.childCount;p||(h=-1),this.placed=fs(this.placed,n,N.from(u)),this.frontier[n].match=f,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,v=a;m<h;m++){let g=v.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),v=g.content}this.unplaced=p?e==0?I.empty:new I(us(s.content,e-1,1),e-1,h<0?s.openEnd:e-1):new I(us(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!td(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],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=td(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=td(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:o?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=fs(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=fs(this.placed,this.depth,N.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(N.empty,!0);n.childCount&&(this.placed=fs(this.placed,this.frontier.length,n))}}function us(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(us(t.firstChild.content,e-1,n)))}function fs(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(fs(t.lastChild.content,e-1,n)))}function ed(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function o2(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,o2(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(N.empty,!0)))),t.copy(r)}function td(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!aP(n,o.content,s)?a:null}function aP(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function lP(t){return t.spec.defining||t.spec.definingForContent}function cP(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(i2(i,o,r))return t.step(new De(e,n,r));let s=a2(i,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let d=i.depth,h=i.pos-1;d>0;d--,h--){let p=i.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(d)>-1?a=d:i.before(d)==h&&s.splice(1,0,-d)}let l=s.indexOf(a),c=[],u=r.openStart;for(let d=r.content,h=0;;h++){let p=d.firstChild;if(c.push(p),h==r.openStart)break;d=p.content}for(let d=u-1;d>=0;d--){let h=c[d],p=lP(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(a)-1)))u=d;else if(p||!h.type.isTextblock)break}for(let d=r.openStart;d>=0;d--){let h=(d+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<s.length;m++){let v=s[(m+l)%s.length],g=!0;v<0&&(g=!1,v=-v);let y=i.node(v-1),k=i.index(v-1);if(y.canReplaceWith(k,k,p.type,p.marks))return t.replace(i.before(v),g?o.after(v):n,new I(s2(r.content,0,r.openStart,h),h,r.openEnd))}}let f=t.steps.length;for(let d=s.length-1;d>=0&&(t.replace(e,n,r),!(t.steps.length>f));d--){let h=s[d];h<0||(e=i.before(h),n=o.after(h))}}function s2(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(s2(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(N.empty,!0))}return t}function uP(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=oP(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new I(N.from(r),0,0))}function fP(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=a2(r,i);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return t.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}function a2(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let o=t.start(i);if(o<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;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&n.push(i)}return n}class go extends Ze{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 Ce.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Ce.fromReplace(e,this.pos,this.pos+1,new I(N.from(i),0,n.isLeaf?0:1))}getMap(){return wt.empty}invert(e){return new go(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 go(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 go(n.pos,n.attr,n.value)}}Ze.jsonID("attr",go);class oa extends Ze{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 Ce.ok(r)}getMap(){return wt.empty}invert(e){return new oa(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 oa(n.attr,n.value)}}Ze.jsonID("docAttr",oa);let Ao=class extends Error{};Ao=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Ao.prototype=Object.create(Error.prototype);Ao.prototype.constructor=Ao;Ao.prototype.name="TransformError";class l2{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new po}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ao(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}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=Ju(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new I(N.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 cP(this,e,n,r),this}replaceRangeWith(e,n,r){return uP(this,e,n,r),this}deleteRange(e,n){return fP(this,e,n),this}lift(e,n){return qM(this,e,n),this}join(e,n=1){return iP(this,e,n),this}wrap(e,n){return QM(this,e,n),this}setBlockType(e,n=e,r,i=null){return XM(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return nP(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new go(e,n,r)),this}setDocAttribute(e,n){return this.step(new oa(e,n)),this}addNodeMark(e,n){return this.step(new ar(e,n)),this}removeNodeMark(e,n){if(!(n instanceof re)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Po(e,n)),this}split(e,n=1,r){return rP(this,e,n,r),this}addMark(e,n,r){return WM(this,e,n,r),this}removeMark(e,n,r){return KM(this,e,n,r),this}clearIncompatible(e,n,r){return t2(this,e,n,r),this}}const nd=Object.create(null);class q{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new dP(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 a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?I.empty:n),a==0&&Y0(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),c=l.map(s.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),Y0(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new U(e):$i(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?$i(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):$i(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}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 $i(e,e,0,0,1)||new Xt(e)}static atEnd(e){return $i(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=nd[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 nd)throw new RangeError("Duplicate use of selection JSON ID "+e);return nd[e]=n,n.prototype.jsonID=e,n}getBookmark(){return U.between(this.$anchor,this.$head).getBookmark()}}q.prototype.visible=!0;class dP{constructor(e,n){this.$from=e,this.$to=n}}let q0=!1;function G0(t){!q0&&!t.parent.inlineContent&&(q0=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class U extends q{constructor(e,n=e){G0(e),G0(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 q.near(r);let i=e.resolve(n.map(this.anchor));return new U(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 U&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new qu(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 U(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 o=q.findFrom(n,r,!0)||q.findFrom(n,-r,!0);if(o)n=o.$head;else return q.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(q.findFrom(e,-r,!0)||q.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new U(e,n)}}q.jsonID("text",U);class qu{constructor(e,n){this.anchor=e,this.head=n}map(e){return new qu(e.map(this.anchor),e.map(this.head))}resolve(e){return U.between(e.resolve(this.anchor),e.resolve(this.head))}}class B extends q{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),o=e.resolve(i);return r?q.near(o):new B(o)}content(){return new I(N.from(this.node),0,0)}eq(e){return e instanceof B&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new cg(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new B(e.resolve(n.anchor))}static create(e,n){return new B(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}B.prototype.visible=!1;q.jsonID("node",B);class cg{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new qu(r,r):new cg(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&B.isSelectable(r)?new B(n):q.near(n)}}class Xt extends q{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=q.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 hP}}q.jsonID("all",Xt);const hP={map(){return this},resolve(t){return new Xt(t)}};function $i(t,e,n,r,i,o=!1){if(e.inlineContent)return U.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&B.isSelectable(a))return B.create(t,n-(i<0?a.nodeSize:0))}else{let l=$i(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function Y0(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof De||i instanceof _e))return;let o=t.mapping.maps[r],s;o.forEach((a,l,c,u)=>{s==null&&(s=u)}),t.setSelection(q.near(t.doc.resolve(s),n))}const Q0=1,il=2,X0=4;class pP extends l2{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|Q0)&~il,this.storedMarks=null,this}get selectionSet(){return(this.updated&Q0)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=il,this}ensureMarks(e){return re.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&il)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~il,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)||re.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),r=r??n,!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),this.selection.empty||this.setSelection(q.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|=X0,this}get scrolledIntoView(){return(this.updated&X0)>0}}function Z0(t,e){return!e||!t?t:t.bind(e)}class ds{constructor(e,n,r){this.name=e,this.init=Z0(n.init,r),this.apply=Z0(n.apply,r)}}const mP=[new ds("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ds("selection",{init(t,e){return t.selection||q.atStart(e.doc)},apply(t){return t.selection}}),new ds("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new ds("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class rd{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=mP.slice(),n&&n.forEach(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 ds(r.key,r.spec.state,r))})}}class no{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 o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,c=i?i[s].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new no(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new pP(this)}static create(e){let n=new rd(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new no(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 rd(this.schema,e.plugins),r=n.fields,i=new no(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].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],o=i.spec.state;o&&o.toJSON&&(n[r]=o.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 rd(e.schema,e.plugins),o=new no(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=li.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=q.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=c.fromJSON.call(l,e,n[a],o);return}}o[s.name]=s.init(e,o)}}),o}}function c2(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=c2(i,e,{})),n[r]=i}return n}class ct{constructor(e){this.spec=e,this.props={},e.props&&c2(e.props,this,this.props),this.key=e.key?e.key.key:u2("plugin")}getState(e){return e[this.key]}}const id=Object.create(null);function u2(t){return t in id?t+"$"+ ++id[t]:(id[t]=0,t+"$")}class tn{constructor(e="key"){this.key=u2(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const He=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},sa=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let gp=null;const On=function(t,e,n){let r=gp||(gp=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},gP=function(){gp=null},vi=function(t,e,n,r){return n&&(e1(t,e,n,r,-1)||e1(t,e,n,r,1))},yP=/^(img|br|input|textarea|hr)$/i;function e1(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:fn(t))){let o=t.parentNode;if(!o||o.nodeType!=1||Ta(t)||yP.test(t.nodeName)||t.contentEditable=="false")return!1;e=He(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?fn(t):0}else return!1}}function fn(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function vP(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=fn(t)}else if(t.parentNode&&!Ta(t))e=He(t),t=t.parentNode;else return null}}function bP(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&&!Ta(t))e=He(t)+1,t=t.parentNode;else return null}}function xP(t,e,n){for(let r=e==0,i=e==fn(t);r||i;){if(t==n)return!0;let o=He(t);if(t=t.parentNode,!t)return!1;r=r&&o==0,i=i&&o==fn(t)}}function Ta(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 Gu=function(t){return t.focusNode&&vi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Jr(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function kP(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function wP(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const vn=typeof navigator<"u"?navigator:null,t1=typeof document<"u"?document:null,$r=vn&&vn.userAgent||"",yp=/Edge\/(\d+)/.exec($r),f2=/MSIE \d/.exec($r),vp=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($r),yt=!!(f2||vp||yp),wr=f2?document.documentMode:vp?+vp[1]:yp?+yp[1]:0,en=!yt&&/gecko\/(\d+)/i.test($r);en&&+(/Firefox\/(\d+)/.exec($r)||[0,0])[1];const bp=!yt&&/Chrome\/(\d+)/.exec($r),tt=!!bp,SP=bp?+bp[1]:0,rt=!yt&&!!vn&&/Apple Computer/.test(vn.vendor),Ro=rt&&(/Mobile\/\w+/.test($r)||!!vn&&vn.maxTouchPoints>2),Rt=Ro||(vn?/Mac/.test(vn.platform):!1),OP=vn?/Win/.test(vn.platform):!1,Kt=/Android \d/.test($r),Na=!!t1&&"webkitFontSmoothing"in t1.documentElement.style,CP=Na?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function EP(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 kn(t,e){return typeof t=="number"?t:t[e]}function TP(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 n1(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;s=sa(s)){if(s.nodeType!=1)continue;let a=s,l=a==o.body,c=l?EP(o):TP(a),u=0,f=0;if(e.top<c.top+kn(r,"top")?f=-(c.top-e.top+kn(i,"top")):e.bottom>c.bottom-kn(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+kn(i,"top")-c.top:e.bottom-c.bottom+kn(i,"bottom")),e.left<c.left+kn(r,"left")?u=-(c.left-e.left+kn(i,"left")):e.right>c.right-kn(r,"right")&&(u=e.right-c.right+kn(i,"right")),u||f)if(l)o.defaultView.scrollBy(u,f);else{let d=a.scrollLeft,h=a.scrollTop;f&&(a.scrollTop+=f),u&&(a.scrollLeft+=u);let p=a.scrollLeft-d,m=a.scrollTop-h;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function NP(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(o,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:d2(t.dom)}}function d2(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=sa(r));return e}function MP({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;h2(n,r==0?0:r-e)}function h2(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let ji=null;function PP(t){if(t.setActive)return t.setActive();if(ji)return t.focus(ji);let e=d2(t);t.focus(ji==null?{get preventScroll(){return ji={preventScroll:!0},!0}}:void 0),ji||(ji=!1,h2(e,0))}function p2(t,e){let n,r=2e8,i,o=0,s=e.top,a=e.top,l,c;for(let u=t.firstChild,f=0;u;u=u.nextSibling,f++){let d;if(u.nodeType==1)d=u.getClientRects();else if(u.nodeType==3)d=On(u).getClientRects();else continue;for(let h=0;h<d.length;h++){let p=d[h];if(p.top<=s&&p.bottom>=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){n=u,r=m,i=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(o=f+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={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)&&(o=f+1)}}return!n&&l&&(n=l,i=c,r=0),n&&n.nodeType==3?AP(n,i):!n||r&&n.nodeType==1?{node:t,offset:o}:p2(n,i)}function AP(t,e){let n=t.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let o=Jn(r,1);if(o.top!=o.bottom&&ug(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function ug(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function RP(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function jP(t,e,n){let{node:r,offset:i}=p2(e,n),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}function IP(t,e,n,r){let i=-1;for(let o=e,s=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>r.left||l.top>r.top?i=a.posBefore:(l.right<r.left||l.bottom<r.top)&&(i=a.posAfter)),!a.contentDOM&&i<0&&!a.node.isText)return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter}o=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function m2(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(ug(e,c))return m2(s,e,c)}}if((o=(o+1)%r)==i)break}return t}function DP(t,e){let n=t.dom.ownerDocument,r,i=0,o=wP(n,e.left,e.top);o&&({node:r,offset:i}=o);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=t.dom.getBoundingClientRect();if(!ug(e,c)||(s=m2(t.dom,e,c),!s))return null}if(rt)for(let c=s;r&&c;c=sa(c))c.draggable&&(r=void 0);if(s=RP(s,e),r){if(en&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let u=r.childNodes[i],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let c;Na&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=IP(t,r,i,e))}a==null&&(a=jP(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function r1(t){return t.top<t.bottom||t.left<t.right}function Jn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(r1(r))return r}return Array.prototype.find.call(n,r1)||t.getBoundingClientRect()}const LP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function g2(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=Na||en;if(r.nodeType==3)if(s&&(LP.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let l=Jn(On(r,i,i),n);if(en&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=Jn(On(r,i-1,i-1),-1);if(c.top==l.top){let u=Jn(On(r,i,i+1),-1);if(u.top!=l.top)return ts(u,u.left<c.left)}}return l}else{let l=i,c=i,u=n<0?1:-1;return n<0&&!i?(c++,u=-1):n>=0&&i==r.nodeValue.length?(l--,u=1):n<0?l--:c++,ts(Jn(On(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==fn(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return od(l.getBoundingClientRect(),!1)}if(o==null&&i<fn(r)){let l=r.childNodes[i];if(l.nodeType==1)return od(l.getBoundingClientRect(),!0)}return od(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==fn(r))){let l=r.childNodes[i-1],c=l.nodeType==3?On(l,fn(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return ts(Jn(c,1),!1)}if(o==null&&i<fn(r)){let l=r.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?On(l,0,s?0:1):l.nodeType==1?l:null:null;if(c)return ts(Jn(c,-1),!0)}return ts(Jn(r.nodeType==3?On(r):r,-n),n>=0)}function ts(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 od(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 y2(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 _P(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return y2(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=g2(t,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=On(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const zP=/[\u0590-\u08ac]/;function $P(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=t.domSelection();return!zP.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:y2(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:f}=t.domSelectionRange(),d=a.caretBidiLevel;a.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),v=p&&!h.contains(p.nodeType==1?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,f),l&&(l!=u||c!=f)&&a.extend&&a.extend(l,c)}catch{}return d!=null&&(a.caretBidiLevel=d),v})}let i1=null,o1=null,s1=!1;function FP(t,e,n){return i1==e&&o1==n?s1:(i1=e,o1=n,s1=n=="up"||n=="down"?_P(t,e,n):$P(t,e,n))}const zt=0,a1=1,Xr=2,bn=3;class Ma{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=zt,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 o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>He(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 o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.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 o=this.getDesc(i),s;if(o&&(!n||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}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 o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof b2){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof v2&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?He(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?He(o.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,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&e<=c){let u=s+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=s;for(let f=a;f>0;f--){let d=this.children[f-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=He(d.dom)+1;break}e-=d.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=He(f.dom);break}n+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}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 o=Math.min(e,n),s=Math.max(e,n);for(let d=0,h=0;d<this.children.length;d++){let p=this.children[d],m=h+p.size;if(o>h&&s<m)return p.setSelection(e-h-p.border,n-h-p.border,r,i);h=m}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.getSelection(),u=!1;if((en||rt)&&e==n){let{node:d,offset:h}=a;if(d.nodeType==3){if(u=!!(h&&d.nodeValue[h-1]==`
|
||
`),u&&h==d.nodeValue.length)for(let p=d,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:He(m)+1});break}let v=p.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let p=d.childNodes[h-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(en&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let d=c.focusNode.childNodes[c.focusOffset];d&&d.contentEditable=="false"&&(i=!0)}if(!(i||u&&rt)&&vi(a.node,a.offset,c.anchorNode,c.anchorOffset)&&vi(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((c.extend||e==n)&&!u){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let h=a;a=l,l=h}let d=document.createRange();d.setEnd(l.node,l.offset),d.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(d)}}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 o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+o.border,l=s-o.border;if(e>=a&&n<=l){this.dirty=e==r||n==s?Xr:a1,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=bn:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Xr:bn}r=s}this.dirty=Xr}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Xr:a1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class v2 extends Ma{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==zt&&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 side(){return this.widget.type.side}}class BP extends Ma{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 bi extends Ma{constructor(e,n,r,i){super(e,[],r,i),this.mark=n}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=dn.renderSpec(document,n.type.spec.toDOM(n,r))),new bi(e,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&bn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=bn&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=zt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=zt}}slice(e,n,r){let i=bi.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=wp(o,n,s,r)),e>0&&(o=wp(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class Sr extends Ma{constructor(e,n,r,i,o,s,a,l,c){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,o,s){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,i),u=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=dn.renderSpec(document,n.type.spec.toDOM(n)));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let d=u;return u=w2(u,r,n),c?l=new HP(e,n,r,i,u,f||null,d,c,o,s+1):n.isText?new Yu(e,n,r,i,u,d,o):new Sr(e,n,r,i,u,f||null,d,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let 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=()=>N.empty)}return e}matchesNode(e,n,r){return this.dirty==zt&&e.eq(this.node)&&kp(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new VP(this,s&&s.node,e);JP(this.node,this.innerDeco,(c,u,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!f&&l.syncToMarks(u==this.node.childCount?re.none:this.node.child(u).marks,r,e),l.placeWidget(c,e,i)},(c,u,f,d)=>{l.syncToMarks(c.marks,r,e);let h;l.findNodeMatch(c,u,f,d)||a&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(h=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,f,h,e)||l.updateNextNode(c,u,f,e,d,i)||l.addNode(c,u,f,e,i),i+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Xr)&&(s&&this.protectLocalComposition(e,s),x2(this.contentDOM,this.children,e),Ro&&qP(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof U)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=GP(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new BP(this,o,n,i);e.input.compositionNodes.push(s),this.children=wp(this.children,r,r+i.length,e,s)}update(e,n,r,i){return this.dirty==bn||!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=zt}updateOuterDeco(e){if(kp(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=k2(this.dom,this.nodeDOM,xp(this.outerDeco,this.node,n),xp(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.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function l1(t,e,n,r,i){w2(r,e,t);let o=new Sr(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Yu extends Sr{constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,null,s,a,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==bn||this.dirty!=zt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=zt||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=zt,!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),o=document.createTextNode(i.text);return new Yu(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=bn)}get domAtom(){return!1}isText(e){return this.node.text==e}}class b2 extends Ma{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==zt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class HP extends Sr{constructor(e,n,r,i,o,s,a,l,c,u){super(e,n,r,i,o,s,a,c,u),this.spec=l}update(e,n,r,i){if(this.dirty==bn)return!1;if(this.spec.update){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}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):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 x2(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=c1(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof bi){let l=r?r.previousSibling:t.lastChild;x2(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=c1(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Ts=function(t){t&&(this.nodeName=t)};Ts.prototype=Object.create(null);const Zr=[new Ts];function xp(t,e,n){if(t.length==0)return Zr;let r=n?Zr[0]:new Ts,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Ts(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new Ts(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function k2(t,e,n,r){if(n==Zr&&r==Zr)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Zr[0]),i=l}UP(i,a||Zr[0],s)}return i}function UP(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 o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);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 w2(t,e,n){return k2(t,t,Zr,xp(e,n,t.nodeType!=1))}function kp(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 c1(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class VP{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=WP(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){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=zt,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;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[o])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=bi.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==bn&&s.dom==s.contentDOM&&(s.dirty=Xr),s.update(e,n,r,o)?(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,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Sr){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u=l.dom,f,d=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=bn&&kp(n,l.outerDeco));if(!d&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(f=this.recreateWrapper(l,e,n,r,i,s)))return this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Xr,f.updateChildren(i,s+1),f.dirty=zt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let a=Sr.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,o){let s=Sr.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),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 o=new v2(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof bi;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Yu)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((rt||tt)&&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 b2(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 WP(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof bi)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function KP(t,e){return t.type.side-e.type.side}function JP(t,e,n,r){let i=e.locals(t),o=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,i,e.forChild(o,u),c),o+=u.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let u,f;for(;s<i.length&&i[s].to==o;){let v=i[s++];v.widget&&(u?(f||(f=[u])).push(v):u=v)}if(u)if(f){f.sort(KP);for(let v=0;v<f.length;v++)n(f[v],c,!!l)}else n(u,c,!!l);let d,h;if(l)h=-1,d=l,l=null;else if(c<t.childCount)h=c,d=t.child(c++);else break;for(let v=0;v<a.length;v++)a[v].to<=o&&a.splice(v--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let p=o+d.nodeSize;if(d.isText){let v=p;s<i.length&&i[s].from<v&&(v=i[s].from);for(let g=0;g<a.length;g++)a[g].to<v&&(v=a[g].to);v<p&&(l=d.cut(v-o),d=d.cut(0,v-o),p=v,h=-1)}else for(;s<i.length&&i[s].to<p;)s++;let m=d.isInline&&!d.isLeaf?a.filter(v=>!v.inline):a.slice();r(d,m,e.forChild(o,d),h),o=p}}function qP(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 GP(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let c=t.child(i++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function wp(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,u=a+=l.size;c>=n||u<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function fg(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(Gu(n)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&B.isSelectable(u)&&i.parent&&!(u.isInline&&xP(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;c=new B(s==f?a:r.resolve(f))}}else{let u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=r.resolve(u)}if(!c){let u=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=dg(t,l,a,u)}return c}function S2(t){return t.editable?t.hasFocus():C2(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Mn(t,e=!1){let n=t.state.selection;if(O2(t,n),!!S2(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&tt){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&vi(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)QP(t);else{let{anchor:r,head:i}=n,o,s;u1&&!(n instanceof U)&&(n.$from.parent.inlineContent||(o=f1(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=f1(t,n.to))),t.docView.setSelection(r,i,t.root,e),u1&&(o&&d1(o),s&&d1(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&YP(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const u1=rt||tt&&SP<63;function f1(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(rt&&i&&i.contentEditable=="false")return sd(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return sd(i);if(o)return sd(o)}}function sd(t){return t.contentEditable="true",rt&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function d1(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function YP(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!S2(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function QP(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setEnd(r.parentNode,He(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&yt&&wr<=11&&(r.disabled=!0,r.disabled=!1)}function O2(t,e){if(e instanceof B){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(h1(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else h1(t)}function h1(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function dg(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||U.between(e,n,r)}function p1(t){return t.editable&&!t.hasFocus()?!1:C2(t)}function C2(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 XP(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return vi(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Sp(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&q.findFrom(o,e)}function Yn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function m1(t,e,n){let r=t.state.selection;if(r instanceof U)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Yn(t,new U(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Sp(t.state,e);return i&&i instanceof B?Yn(t,i):!1}else if(!(Rt&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=t.docView.descAt(a))&&!s.contentDOM?B.isSelectable(o)?Yn(t,new B(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):Na?Yn(t,new U(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof B&&r.node.isInline)return Yn(t,new U(e>0?r.$to:r.$from));{let i=Sp(t.state,e);return i?Yn(t,i):!1}}}function Rc(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ns(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Ii(t,e){return e<0?ZP(t):e4(t)}function ZP(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=!1;for(en&&n.nodeType==1&&r<Rc(n)&&Ns(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ns(a,-1))i=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(E2(n))break;{let a=n.previousSibling;for(;a&&Ns(a,-1);)i=n.parentNode,o=He(a),a=a.previousSibling;if(a)n=a,r=Rc(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Op(t,n,r):i&&Op(t,i,o)}function e4(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=Rc(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Ns(a,1))o=n,s=++r;else break}else{if(E2(n))break;{let a=n.nextSibling;for(;a&&Ns(a,1);)o=a.parentNode,s=He(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=Rc(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}o&&Op(t,o,s)}function E2(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function t4(t,e){for(;t&&e==t.childNodes.length&&!Ta(t);)e=He(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 n4(t,e){for(;t&&!e&&!Ta(t);)e=He(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 Op(t,e,n){if(e.nodeType!=3){let o,s;(s=t4(e,n))?(e=s,n=0):(o=n4(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(Gu(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Mn(t)},50)}function g1(t,e){let n=t.state.doc.resolve(e);if(!(tt||OP)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function y1(t,e,n){let r=t.state.selection;if(r instanceof U&&!r.empty||n.indexOf("s")>-1||Rt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Sp(t.state,e);if(s&&s instanceof B)return Yn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Xt?q.near(s,e):q.findFrom(s,e);return a?Yn(t,a):!1}return!1}function v1(t,e){if(!(t.state.selection instanceof U))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function b1(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function r4(t){if(!rt||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;b1(t,r,"true"),setTimeout(()=>b1(t,r,"false"),20)}return!1}function i4(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function o4(t,e){let n=e.keyCode,r=i4(e);if(n==8||Rt&&n==72&&r=="c")return v1(t,-1)||Ii(t,-1);if(n==46&&!e.shiftKey||Rt&&n==68&&r=="c")return v1(t,1)||Ii(t,1);if(n==13||n==27)return!0;if(n==37||Rt&&n==66&&r=="c"){let i=n==37?g1(t,t.state.selection.from)=="ltr"?-1:1:-1;return m1(t,i,r)||Ii(t,i)}else if(n==39||Rt&&n==70&&r=="c"){let i=n==39?g1(t,t.state.selection.from)=="ltr"?1:-1:1;return m1(t,i,r)||Ii(t,i)}else{if(n==38||Rt&&n==80&&r=="c")return y1(t,-1,r)||Ii(t,-1);if(n==40||Rt&&n==78&&r=="c")return r4(t)||y1(t,1,r)||Ii(t,1);if(r==(Rt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function T2(t,e){t.someProp("transformCopied",h=>{e=h(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let s=t.someProp("clipboardSerializer")||dn.fromSchema(t.state.schema),a=j2(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,u,f=0;for(;c&&c.nodeType==1&&(u=R2[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=a.createElement(u[h]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let d=t.someProp("clipboardTextSerializer",h=>h(e,t))||e.content.textBetween(0,e.content.size,`
|
||
|
||
`);return{dom:l,text:d,slice:e}}function N2(t,e,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!e)return null;let l=e&&(r||o||!n);if(l){if(t.someProp("transformPastedText",d=>{e=d(e,o||r,t)}),o)return e?new I(N.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
||
`))),0,0):I.empty;let f=t.someProp("clipboardTextParser",d=>d(e,i,r,t));if(f)a=f;else{let d=i.marks(),{schema:h}=t.state,p=dn.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let v=s.appendChild(document.createElement("p"));m&&v.appendChild(p.serializeNode(h.text(m,d)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=l4(n),Na&&c4(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let d=s.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;s=d}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Mo.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!s4.test(d.parentNode.nodeName)?{ignore:!0}:null}})),u)a=u4(x1(a,+u[1],+u[2]),u[4]);else if(a=I.maxOpen(a4(a.content,i),!0),a.openStart||a.openEnd){let f=0,d=0;for(let h=a.content.firstChild;f<a.openStart&&!h.type.spec.isolating;f++,h=h.firstChild);for(let h=a.content.lastChild;d<a.openEnd&&!h.type.spec.isolating;d++,h=h.lastChild);a=x1(a,f,d)}return t.someProp("transformPasted",f=>{a=f(a,t)}),a}const s4=/^(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 a4(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)),o,s=[];if(t.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&P2(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=A2(s[s.length-1],o.length));let u=M2(a,l);s.push(u),i=i.matchType(u.type),o=l}}),s)return N.from(s)}return t}function M2(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,N.from(t));return t}function P2(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=P2(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(N.from(M2(n,t,i+1))))}}function A2(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,A2(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(N.empty,!0);return t.copy(n.append(r))}function Cp(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),i<r-1&&(a=Cp(a,e,n,r,i+1,o)),i>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function x1(t,e,n){return e<t.openStart&&(t=new I(Cp(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new I(Cp(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const R2={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 k1=null;function j2(){return k1||(k1=document.implementation.createHTMLDocument("title"))}function l4(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=j2().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&R2[r[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=t,i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function c4(t){let e=t.querySelectorAll(tt?"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 u4(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:o,openEnd:s}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=N.from(l.create(r[a+1],i)),o++,s++}return new I(i,o,s)}const it={},ot={},f4={touchstart:!0,touchmove:!0};class d4{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function h4(t){for(let e in it){let n=it[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{m4(t,r)&&!hg(t,r)&&(t.editable||!(r.type in ot))&&n(t,r)},f4[e]?{passive:!0}:void 0)}rt&&t.dom.addEventListener("input",()=>null),Ep(t)}function lr(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function p4(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 Ep(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>hg(t,r))})}function hg(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function m4(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 g4(t,e){!hg(t,e)&&it[e.type]&&(t.editable||!(e.type in ot))&&it[e.type](t,e)}ot.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!D2(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Kt&&tt&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Ro&&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,Jr(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||o4(t,n)?n.preventDefault():lr(t,"key")};ot.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};ot.keypress=(t,e)=>{let n=e;if(D2(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Rt&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof U)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function Qu(t){return{left:t.clientX,top:t.clientY}}function y4(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function pg(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),i,!0):a(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function yo(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function v4(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&B.isSelectable(r)?(yo(t,new B(n),"pointer"),!0):!1}function b4(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof B&&(r=n.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(B.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(yo(t,B.create(t.state.doc,i),"pointer"),!0):!1}function x4(t,e,n,r,i){return pg(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?b4(t,n):v4(t,n))}function k4(t,e,n,r){return pg(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function w4(t,e,n,r){return pg(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||S4(t,n,r)}function S4(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(yo(t,U.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)yo(t,U.create(r,a+1,a+1+s.content.size),"pointer");else if(B.isSelectable(s))yo(t,B.create(r,a),"pointer");else continue;return!0}}function mg(t){return jc(t)}const I2=Rt?"metaKey":"ctrlKey";it.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=mg(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&y4(n,t.input.lastClick)&&!n[I2]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(Qu(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new O4(t,s,n,!!r)):(o=="doubleClick"?k4:w4)(t,s.pos,s.inside,n)?n.preventDefault():lr(t,"pointer"))};class O4{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[I2],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof B&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&en&&!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)),lr(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(()=>Mn(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(Qu(e))),this.updateAllowDefault(e),this.allowDefault||!n?lr(this.view,"pointer"):x4(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||rt&&this.mightDrag&&!this.mightDrag.node.isAtom||tt&&!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)?(yo(this.view,q.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):lr(this.view,"pointer")}move(e){this.updateAllowDefault(e),lr(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)}}it.touchstart=t=>{t.input.lastTouch=Date.now(),mg(t),lr(t,"pointer")};it.touchmove=t=>{t.input.lastTouch=Date.now(),lr(t,"pointer")};it.contextmenu=t=>mg(t);function D2(t,e){return t.composing?!0:rt&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const C4=Kt?5e3:-1;ot.compositionstart=ot.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),jc(t,!0),t.markCursor=null;else if(jc(t),en&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){t.domSelection().collapse(s,s.nodeValue.length);break}else i=s,o=-1}}t.input.composing=!0}L2(t,C4)};ot.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.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,L2(t,20))};function L2(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>jc(t),e))}function _2(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=T4());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function E4(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=vP(e.focusNode,e.focusOffset),r=bP(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc;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 T4(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function jc(t,e=!1){if(!(Kt&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),_2(t),e||t.docView&&t.docView.dirty){let n=fg(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}function N4(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 aa=yt&&wr<15||Ro&&CP<604;it.copy=ot.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=aa?null:n.clipboardData,s=r.content(),{dom:a,text:l}=T2(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):N4(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function M4(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function P4(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?la(t,r.value,null,i,e):la(t,r.textContent,r.innerHTML,i,e)},50)}function la(t,e,n,r,i){let o=N2(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||I.empty)))return!0;if(!o)return!1;let s=M4(o),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function z2(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," "):""}ot.paste=(t,e)=>{let n=e;if(t.composing&&!Kt)return;let r=aa?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&la(t,z2(r),r.getData("text/html"),i,n)?n.preventDefault():P4(t,n)};class $2{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const F2=Rt?"altKey":"ctrlKey";it.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(Qu(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof B?i.to-1:i.to))){if(r&&r.mightDrag)s=B.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=B.create(t.state.doc,f.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:c,slice:u}=T2(t,a);n.dataTransfer.clearData(),n.dataTransfer.setData(aa?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",aa||n.dataTransfer.setData("text/plain",c),t.dragging=new $2(u,!n[F2],s)};it.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};ot.dragover=ot.dragenter=(t,e)=>e.preventDefault();ot.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(Qu(n));if(!i)return;let o=t.state.doc.resolve(i.pos),s=r&&r.slice;s?t.someProp("transformPasted",p=>{s=p(s,t)}):s=N2(t,z2(n.dataTransfer),aa?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!n[F2]);if(t.someProp("handleDrop",p=>p(t,n,s||I.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?r2(t.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(a){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(l),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=c.doc;if(f?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(d))return;let h=c.doc.resolve(u);if(f&&B.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new B(h));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,v,g,y)=>p=y),c.setSelection(dg(t,h,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};it.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())&&Mn(t)},20))};it.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)};it.beforeinput=(t,e)=>{if(tt&&Kt&&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",o=>o(t,Jr(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 ot)it[t]=ot[t];function ca(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 Ic{constructor(e,n){this.toDOM=e,this.spec=n||ci,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Lt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ic&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ca(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Or{constructor(e,n){this.attrs=e,this.spec=n||ci}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Lt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Or&&ca(this.attrs,e.attrs)&&ca(this.spec,e.spec)}static is(e){return e.type instanceof Or}destroy(){}}class gg{constructor(e,n){this.attrs=e,this.spec=n||ci}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Lt(o.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(r)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof gg&&ca(this.attrs,e.attrs)&&ca(this.spec,e.spec)}destroy(){}}class Lt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Lt(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 Lt(e,e,new Ic(n,r))}static inline(e,n,r,i){return new Lt(e,n,new Or(r,i))}static node(e,n,r,i){return new Lt(e,n,new gg(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Or}get widget(){return this.type instanceof Ic}}const Fi=[],ci={};class Me{constructor(e,n){this.local=e.length?e:Fi,this.children=n.length?n:Fi}static create(e,n){return n.length?Dc(n,e,0,ci):Ye}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,i+a,o)}}map(e,n,r){return this==Ye||e.maps.length==0?this:this.mapInner(e,n,0,0,r||ci)}mapInner(e,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?A4(this.children,s||[],e,n,r,i,o):s?new Me(s.sort(ui),Fi):Ye}add(e,n){return n.length?this==Ye?Me.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((a,l)=>{let c=l+r,u;if(u=H2(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Dc(u,a,c+1,ci)),o+=3}});let s=B2(o?U2(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Me(s.length?this.local.concat(s).sort(ui):this.local,i||this.children)}remove(e){return e.length==0||this==Ye?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>a&&f.to<l&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=Ye?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Me(i,r):Ye}forChild(e,n){if(this==Ye)return this;if(n.isLeaf)return Me.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Or){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new Me(i.sort(ui),Fi);return r?new tr([a,r]):a}return r||Ye}eq(e){if(this==e)return!0;if(!(e instanceof Me)||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 yg(this.localsInner(e))}localsInner(e){if(this==Ye)return Fi;if(e.inlineContent||!this.local.some(Or.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Or||n.push(this.local[r]);return n}}Me.empty=new Me([],[]);Me.removeOverlap=yg;const Ye=Me.empty;class tr{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,ci));return tr.from(r)}forChild(e,n){if(n.isLeaf)return Me.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=Ye&&(o instanceof tr?r=r.concat(o.members):r.push(o))}return tr.from(r)}eq(e){if(!(e instanceof tr)||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 o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?yg(r?n:n.sort(ui)):Fi}static from(e){switch(e.length){case 0:return Ye;case 1:return e[0];default:return new tr(e.every(n=>n instanceof Me)?e:e.reduce((n,r)=>n.concat(r instanceof Me?r:r.members),[]))}}}function A4(t,e,n,r,i,o,s){let a=t.slice();for(let c=0,u=o;c<n.maps.length;c++){let f=0;n.maps[c].forEach((d,h,p,m)=>{let v=m-p-(h-d);for(let g=0;g<a.length;g+=3){let y=a[g+1];if(y<0||d>y+u-f)continue;let k=a[g]+u-f;h>=k?a[g+1]=d<=k?-2:-1:d>=u&&v&&(a[g]+=v,a[g+1]+=v)}f+=v}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+o),f=u-i;if(f<0||f>=r.content.size){l=!0;continue}let d=n.map(t[c+1]+o,-1),h=d-i,{index:p,offset:m}=r.content.findIndex(f),v=r.maybeChild(p);if(v&&m==f&&m+v.nodeSize==h){let g=a[c+2].mapInner(n,v,u+1,t[c]+o+1,s);g!=Ye?(a[c]=f,a[c+1]=h,a[c+2]=g):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=R4(a,t,e,n,i,o,s),u=Dc(c,r,0,s);e=u.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,d=0;f<u.children.length;f+=3){let h=u.children[f];for(;d<a.length&&a[d]<h;)d+=3;a.splice(d,0,u.children[f],u.children[f+1],u.children[f+2])}}return new Me(e.sort(ui),a)}function B2(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 Lt(i.from+e,i.to+e,i.type))}return n}function R4(t,e,n,r,i,o,s){function a(l,c){for(let u=0;u<l.local.length;u++){let f=l.local[u].map(r,i,c);f?n.push(f):s.onRemove&&s.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function H2(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),t[o]=null);return i}function U2(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Dc(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let c=H2(t,a,l+n);if(c){o=!0;let u=Dc(c,a,n+l+1,r);u!=Ye&&i.push(l,l+a.nodeSize,u)}});let s=B2(o?U2(t):t,-n).sort(ui);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Me(s,i):Ye}function ui(t,e){return t.from-e.from||t.to-e.to}function yg(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),w1(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),w1(e,i,r.copy(o.from,r.to)));break}}}return e}function w1(t,e,n){for(;e<t.length&&ui(n,t[e])>0;)e++;t.splice(e,0,n)}function ad(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Ye&&e.push(r)}),t.cursorWrapper&&e.push(Me.create(t.state.doc,[t.cursorWrapper.deco])),tr.from(e)}const j4={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},I4=yt&&wr<=11;class D4{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 L4{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new D4,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);yt&&wr<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),I4&&(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,j4)),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(p1(this.view)){if(this.suppressingSelectionUpdates)return Mn(this.view);if(yt&&wr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&vi(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 o=e.focusNode;o;o=sa(o))n.add(o);for(let o=e.anchorNode;o;o=sa(o))if(n.has(o)){r=o;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)&&p1(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],l);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(a=!0))}if(en&&l.length>1){let u=l.filter(f=>f.nodeName=="BR");if(u.length==2){let f=u[0],d=u[1];f.parentNode&&f.parentNode.parentNode==d.parentNode?d.remove():f.remove()}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Gu(r)&&(c=fg(e))&&c.eq(q.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Mn(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),_4(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Mn(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 u=0;u<e.addedNodes.length;u++)n.push(e.addedNodes[u]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(yt&&wr<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:d}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==e.target?He(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?He(o):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let S1=new WeakMap,O1=!1;function _4(t){if(!S1.has(t)&&(S1.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=en,O1)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."),O1=!0}}function C1(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return vi(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function z4(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return C1(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?C1(t,n):null}function $4(t,e,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Gu(l)||c.push({node:l.focusNode,offset:l.focusOffset})),tt&&t.input.lastKeyCode===8)for(let v=o;v>i;v--){let g=r.childNodes[v-1],y=g.pmViewDesc;if(g.nodeName=="BR"&&!y){o=v;break}if(!y||y.size)break}let f=t.state.doc,d=t.someProp("domParser")||Mo.fromSchema(t.state.schema),h=f.resolve(s),p=null,m=d.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:o,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:F4,context:h});if(c&&c[0].pos!=null){let v=c[0].pos,g=c[1]&&c[1].pos;g==null&&(g=v),p={anchor:v+s,head:g+s}}return{doc:m,sel:p,from:s,to:a}}function F4(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(rt&&/^(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||rt&&/^(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 B4=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function H4(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let L=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,H=fg(t,L);if(H&&!t.state.selection.eq(H)){if(tt&&Kt&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",Je=>Je(t,Jr(13,"Enter"))))return;let pe=t.state.tr.setSelection(H);L=="pointer"?pe.setMeta("pointer",!0):L=="key"&&pe.scrollIntoView(),o&&pe.setMeta("composition",o),t.dispatch(pe)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=$4(t,e,n),u=t.state.doc,f=u.slice(c.from,c.to),d,h;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(d=t.state.selection.to,h="end"):(d=t.state.selection.from,h="start"),t.input.lastKeyCode=null;let p=W4(f.content,c.doc.content,c.from,d,h);if((Ro&&t.input.lastIOSEnter>Date.now()-225||Kt)&&i.some(L=>L.nodeType==1&&!B4.test(L.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",L=>L(t,Jr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&l instanceof U&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let L=E1(t,t.state.doc,c.sel);if(L&&!L.eq(t.state.selection)){let H=t.state.tr.setSelection(L);o&&H.setMeta("composition",o),t.dispatch(H)}}return}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof U&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),yt&&wr<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),v=c.doc.resolveNoCache(p.endB-c.from),g=u.resolve(p.start),y=m.sameParent(v)&&m.parent.inlineContent&&g.end()>=p.endA,k;if((Ro&&t.input.lastIOSEnter>Date.now()-225&&(!y||i.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!y&&m.pos<c.doc.content.size&&!m.sameParent(v)&&(k=q.findFrom(c.doc.resolve(m.pos+1),1,!0))&&k.head==v.pos)&&t.someProp("handleKeyDown",L=>L(t,Jr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&V4(u,p.start,p.endA,m,v)&&t.someProp("handleKeyDown",L=>L(t,Jr(8,"Backspace")))){Kt&&tt&&t.domObserver.suppressSelectionUpdates();return}tt&&Kt&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Kt&&!y&&m.start()!=v.start()&&v.parentOffset==0&&m.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,v=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(L){return L(t,Jr(13,"Enter"))})},20));let w=p.start,O=p.endA,C,T,j;if(y){if(m.pos==v.pos)yt&&wr<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Mn(t),20)),C=t.state.tr.delete(w,O),T=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(j=U4(m.parent.content.cut(m.parentOffset,v.parentOffset),g.parent.content.cut(g.parentOffset,p.endA-g.start()))))C=t.state.tr,j.type=="add"?C.addMark(w,O,j.mark):C.removeMark(w,O,j.mark);else if(m.parent.child(m.index()).isText&&m.index()==v.index()-(v.textOffset?0:1)){let L=m.parent.textBetween(m.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",H=>H(t,w,O,L)))return;C=t.state.tr.insertText(L,w,O)}}if(C||(C=t.state.tr.replace(w,O,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let L=E1(t,C.doc,c.sel);L&&!(tt&&Kt&&t.composing&&L.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(L.head==w||L.head==C.mapping.map(O)-1)||yt&&L.empty&&L.head==w)&&C.setSelection(L)}T&&C.ensureMarks(T),o&&C.setMeta("composition",o),t.dispatch(C.scrollIntoView())}function E1(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:dg(t,e.resolve(n.anchor),e.resolve(n.head))}function U4(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,o=r,s,a,l;for(let u=0;u<r.length;u++)i=r[u].removeFromSet(i);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",l=u=>u.mark(a.addToSet(u.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(N.from(c).eq(t))return{mark:a,type:s}}function V4(t,e,n,r,i){if(n-e<=i.pos-r.pos||ld(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(ld(o,!0,!0));return!s.parent.isTextblock||s.pos>n||ld(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ld(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 o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function W4(t,e,n,r,i){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let l=Math.max(0,o-Math.min(s,a));r-=s+l-o}if(s<o&&t.size<e.size){let l=r<=o&&r>=s?o-r:0;o-=l,o&&o<e.size&&T1(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-s),s=o}else if(a<o){let l=r<=o&&r>=a?o-r:0;o-=l,o&&o<t.size&&T1(t.textBetween(o-1,o+1))&&(o+=l?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function T1(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 K4{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 d4,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(R1),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=P1(this),M1(this),this.nodeViews=A1(this),this.docView=l1(this.state.doc,N1(this),ad(this),this.dom,this),this.domObserver=new L4(this,(r,i,o,s)=>H4(this,r,i,o,s)),this.domObserver.start(),h4(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&&Ep(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(R1),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,o=!1,s=!1;e.storedMarks&&this.composing&&(_2(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=A1(this);q4(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ep(this),this.editable=P1(this),M1(this);let l=ad(this),c=N1(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(i.selection))&&(s=!0);let d=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&NP(this);if(s){this.domObserver.stop();let h=f&&(yt||tt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&J4(i.selection,e.selection);if(f){let p=tt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=E4(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=l1(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&XP(this))?Mn(this,h):(O2(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),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&MP(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof B){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&n1(this,n.getBoundingClientRect(),e)}else n1(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;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new $2(e.slice,e.move,i<0?void 0:B.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 s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(i=n?n(a):a))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(yt){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&&PP(this.dom),Mn(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 DP(this,e)}coordsAtPos(e,n=1){return g2(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 FP(this,n||this.state,e)}pasteHTML(e,n){return la(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return la(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(p4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ad(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,gP())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return g4(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return rt&&this.root.nodeType===11&&kP(this.dom.ownerDocument)==this.dom&&z4(this,e)||e}domSelection(){return this.root.getSelection()}}function N1(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"),[Lt.node(0,t.state.doc.content.size,e)]}function M1(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:Lt.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function P1(t){return!t.someProp("editable",e=>e(t.state)===!1)}function J4(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 A1(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 q4(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 R1(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 Tr={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:"'"},Lc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},G4=typeof navigator<"u"&&/Mac/.test(navigator.platform),Y4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ue=0;Ue<10;Ue++)Tr[48+Ue]=Tr[96+Ue]=String(Ue);for(var Ue=1;Ue<=24;Ue++)Tr[Ue+111]="F"+Ue;for(var Ue=65;Ue<=90;Ue++)Tr[Ue]=String.fromCharCode(Ue+32),Lc[Ue]=String.fromCharCode(Ue);for(var cd in Tr)Lc.hasOwnProperty(cd)||(Lc[cd]=Tr[cd]);function Q4(t){var e=G4&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Y4&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Lc:Tr)[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 X4=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Z4(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))X4?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function eA(t){let e=Object.create(null);for(let n in t)e[Z4(n)]=t[n];return e}function ud(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 tA(t){return new ct({props:{handleKeyDown:V2(t)}})}function V2(t){let e=eA(t);return function(n,r){let i=Q4(r),o,s=e[ud(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=e[ud(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=Tr[r.keyCode])&&o!=i){let a=e[ud(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const nA=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function W2(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const rA=(t,e,n)=>{let r=W2(t,n);if(!r)return!1;let i=vg(r);if(!i){let s=r.blockRange(),a=s&&Bo(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&G2(t,i,e))return!0;if(r.parent.content.size==0&&(jo(o,"end")||B.isSelectable(o))){let s=Ju(t.doc,r.before(),r.after(),I.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(jo(o,"end")?q.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):B.create(a.doc,i.pos-o.nodeSize)),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},iA=(t,e,n)=>{let r=W2(t,n);if(!r)return!1;let i=vg(r);return i?K2(t,i,e):!1},oA=(t,e,n)=>{let r=J2(t,n);if(!r)return!1;let i=bg(r);return i?K2(t,i,e):!1};function K2(t,e,n){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=Ju(t.doc,o,l,I.empty);if(!c||c.from!=o||c instanceof De&&c.slice.size>=l-o)return!1;if(n){let u=t.tr.step(c);u.setSelection(U.create(u.doc,o)),n(u.scrollIntoView())}return!0}function jo(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 sA=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=vg(r)}let s=o&&o.nodeBefore;return!s||!B.isSelectable(s)?!1:(e&&e(t.tr.setSelection(B.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function vg(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 J2(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const aA=(t,e,n)=>{let r=J2(t,n);if(!r)return!1;let i=bg(r);if(!i)return!1;let o=i.nodeAfter;if(G2(t,i,e))return!0;if(r.parent.content.size==0&&(jo(o,"start")||B.isSelectable(o))){let s=Ju(t.doc,r.before(),r.after(),I.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(jo(o,"start")?q.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):B.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},lA=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=bg(r)}let s=o&&o.nodeAfter;return!s||!B.isSelectable(s)?!1:(e&&e(t.tr.setSelection(B.create(t.doc,o.pos)).scrollIntoView()),!0)};function bg(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 cA=(t,e)=>{let n=t.selection,r=n instanceof B,i;if(r){if(n.node.isTextblock||!zr(t.doc,n.from))return!1;i=n.from}else if(i=Ku(t.doc,n.from,-1),i==null)return!1;if(e){let o=t.tr.join(i);r&&o.setSelection(B.create(o.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},uA=(t,e)=>{let n=t.selection,r;if(n instanceof B){if(n.node.isTextblock||!zr(t.doc,n.to))return!1;r=n.to}else if(r=Ku(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},fA=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&Bo(i);return o==null?!1:(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},dA=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
||
`).scrollIntoView()),!0)};function q2(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 hA=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=q2(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(q.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},pA=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Xt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=q2(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(U.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},mA=(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 o=n.before();if(mo(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Bo(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},gA=(t,e)=>{let{$from:n,to:r}=t.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),e&&e(t.tr.setSelection(B.create(t.doc,i))),!0)};function yA(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||zr(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function G2(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(yA(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(n){let f=e.pos+i.nodeSize,d=N.empty;for(let m=o.length-1;m>=0;m--)d=N.from(o[m].create(null,d));d=N.from(r.copy(d));let h=t.tr.step(new _e(e.pos-1,f,e.pos,f,new I(d,1,0),o.length,!0)),p=f+2*o.length;zr(h.doc,p)&&h.join(p),n(h.scrollIntoView())}return!0}let l=q.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),u=c&&Bo(c);if(u!=null&&u>=e.depth)return n&&n(t.tr.lift(c,u).scrollIntoView()),!0;if(a&&jo(i,"start",!0)&&jo(r,"end")){let f=r,d=[];for(;d.push(f),!f.isTextblock;)f=f.lastChild;let h=i,p=1;for(;!h.isTextblock;h=h.firstChild)p++;if(f.canReplace(f.childCount,f.childCount,h.content)){if(n){let m=N.empty;for(let g=d.length-1;g>=0;g--)m=N.from(d[g].copy(m));let v=t.tr.step(new _e(e.pos-d.length,e.pos+i.nodeSize,e.pos+p,e.pos+i.nodeSize-p,new I(m,d.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function Y2(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(U.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const vA=Y2(-1),bA=Y2(1);function xA(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&lg(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function j1(t,e=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let u=n.doc.resolve(c),f=u.index();i=u.parent.canReplaceWith(f,f+1,t)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,t,e)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function kA(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(t)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let u=n.doc.resolve(s.start-2);l=new Nc(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new Nc(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=lg(l,t,e,s);return c?(r&&r(wA(n.tr,s,c,a,t).scrollIntoView()),!0):!1}}function wA(t,e,n,r,i){let o=N.empty;for(let u=n.length-1;u>=0;u--)o=N.from(n[u].type.create(n[u].attrs,o));t.step(new _e(e.start-(r?2:0),e.end,e.start,e.end,new I(o,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==i&&(s=u+1);let a=n.length-s,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,f=e.endIndex,d=!0;u<f;u++,d=!1)!d&&mo(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function SA(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==t);return o?n?r.node(o.depth-1).type==t?OA(e,n,t,o):CA(e,n,o):!0:!1}}function OA(t,e,n,r){let i=t.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new _e(o-1,s,o,s,new I(N.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Nc(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Bo(r);if(a==null)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;return zr(i.doc,l)&&i.join(l),e(i.scrollIntoView()),!0}function CA(t,e,n){let r=t.tr,i=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?N.empty:N.from(i))))return!1;let f=o.pos,d=f+s.nodeSize;return r.step(new _e(f-(a?1:0),d+(l?1:0),f+1,d-1,new I((a?N.empty:N.from(i.copy(N.empty))).append(l?N.empty:N.from(i.copy(N.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function EA(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=N.from(c?t.create():null),f=new I(N.from(t.create(null,N.from(a.type.create(null,u)))),c?3:1,0),d=o.start,h=o.end;n(e.tr.step(new _e(d-(c?3:1),h,d,h,f,1,!0)).scrollIntoView())}return!0}}function Xu(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=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 o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}class Zu{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:i}=n,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const f=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],l=!!e,c=e||o.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(d=>d===!0)),f={...Object.fromEntries(Object.entries(r).map(([d,h])=>[d,(...m)=>{const v=this.buildProps(c,n),g=h(...m)(v);return a.push(g),f}])),run:u};return f}createCan(e){const{rawCommands:n,state:r}=this,i=!1,o=e||r.tr,s=this.buildProps(o,i);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,i)}}buildProps(e,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a={tr:e,editor:i,view:s,state:Xu({state:o,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class TA{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(i=>i!==n):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function $(t,e,n){return t.config[e]===void 0&&t.parent?$(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?$(t.parent,e,n):null}):t.config[e]}function ef(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 Q2(t){const e=[],{nodeExtensions:n,markExtensions:r}=ef(t),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=$(s,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(f=>{Object.entries(u.attributes).forEach(([d,h])=>{e.push({type:f,name:d,attribute:{...o,...h}})})})})}),i.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=$(s,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,f])=>{const d={...o,...f};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,e.push({type:s.name,name:u,attribute:d})})}),e}function $e(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}function fe(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const a=o?o.split(" "):[],l=r[i]?r[i].split(" "):[],c=a.filter(u=>!l.includes(u));r[i]=[...l,...c].join(" ")}else i==="style"?r[i]=[r[i],o].join("; "):r[i]=o}),r},{})}function Tp(t,e){return e.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>fe(n,r),{})}function X2(t){return typeof t=="function"}function J(t,e=void 0,...n){return X2(t)?e?t.bind(e)(...n):t(...n):t}function NA(t={}){return Object.keys(t).length===0&&t.constructor===Object}function MA(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function I1(t,e){return t.style?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):MA(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...r,...i}}}}function D1(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&NA(n)?!1:n!=null))}function PA(t,e){var n;const r=Q2(t),{nodeExtensions:i,markExtensions:o}=ef(t),s=(n=i.find(c=>$(c,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(i.map(c=>{const u=r.filter(g=>g.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},d=t.reduce((g,y)=>{const k=$(y,"extendNodeSchema",f);return{...g,...k?k(c):{}}},{}),h=D1({...d,content:J($(c,"content",f)),marks:J($(c,"marks",f)),group:J($(c,"group",f)),inline:J($(c,"inline",f)),atom:J($(c,"atom",f)),selectable:J($(c,"selectable",f)),draggable:J($(c,"draggable",f)),code:J($(c,"code",f)),defining:J($(c,"defining",f)),isolating:J($(c,"isolating",f)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))}),p=J($(c,"parseHTML",f));p&&(h.parseDOM=p.map(g=>I1(g,u)));const m=$(c,"renderHTML",f);m&&(h.toDOM=g=>m({node:g,HTMLAttributes:Tp(g,u)}));const v=$(c,"renderText",f);return v&&(h.toText=v),[c.name,h]})),l=Object.fromEntries(o.map(c=>{const u=r.filter(v=>v.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},d=t.reduce((v,g)=>{const y=$(g,"extendMarkSchema",f);return{...v,...y?y(c):{}}},{}),h=D1({...d,inclusive:J($(c,"inclusive",f)),excludes:J($(c,"excludes",f)),group:J($(c,"group",f)),spanning:J($(c,"spanning",f)),code:J($(c,"code",f)),attrs:Object.fromEntries(u.map(v=>{var g;return[v.name,{default:(g=v==null?void 0:v.attribute)===null||g===void 0?void 0:g.default}]}))}),p=J($(c,"parseHTML",f));p&&(h.parseDOM=p.map(v=>I1(v,u)));const m=$(c,"renderHTML",f);return m&&(h.toDOM=v=>m({mark:v,HTMLAttributes:Tp(v,u)})),[c.name,h]}));return new IM({topNode:s,nodes:a,marks:l})}function fd(t,e){return e.nodes[t]||e.marks[t]||null}function L1(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}const AA=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,o,s,a)=>{var l,c;const u=((c=(l=i.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:i,pos:o,parent:s,index:a}))||i.textContent||"%leaf%";n+=u.slice(0,Math.max(0,r-o))}),n};function xg(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class tf{constructor(e){this.find=e.find,this.handler=e.handler}}const RA=(t,e)=>{if(xg(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 ol(t){var e;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(d=>d.type.spec.code))return!1;let u=!1;const f=AA(c)+o;return s.forEach(d=>{if(u)return;const h=RA(f,d.find);if(!h)return;const p=l.state.tr,m=Xu({state:l.state,transaction:p}),v={from:r-(h[0].length-o.length),to:i},{commands:g,chain:y,can:k}=new Zu({editor:n,state:m});d.handler({state:m,range:v,match:h,commands:g,chain:y,can:k})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:r,to:i,text:o}),l.dispatch(p),u=!0)}),u}function jA(t){const{editor:e,rules:n}=t,r=new ct({state:{init(){return null},apply(i,o){const s=i.getMeta(r);if(s)return s;const a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:c,text:u}=a,f=c+u.length;ol({editor:e,from:c,to:f,text:u,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,s,a){return ol({editor:e,from:o,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&ol({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?ol({editor:e,from:s.pos,to:s.pos,text:`
|
||
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function IA(t){return typeof t=="number"}class DA{constructor(e){this.find=e.find,this.handler=e.handler}}const LA=(t,e,n)=>{if(xg(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=t,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function _A(t){const{editor:e,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:u}=new Zu({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,i,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),v=Math.min(i,p+h.content.size),g=h.textBetween(m-p,v-p,void 0,"");LA(g,o.find,s).forEach(k=>{if(k.index===void 0)return;const w=m+k.index+1,O=w+k[0].length,C={from:n.tr.mapping.map(w),to:n.tr.mapping.map(O)},T=o.handler({state:n,range:C,match:k,commands:l,chain:c,can:u,pasteEvent:s,dropEvent:a});f.push(T)})}),f.every(h=>h!==null)}const zA=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function $A(t){const{editor:e,rules:n}=t;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const l=({state:u,from:f,to:d,rule:h,pasteEvt:p})=>{const m=u.tr,v=Xu({state:u,transaction:m});if(!(!_A({editor:e,state:v,from:Math.max(f-1,0),to:d.b-1,rule:h,pasteEvent:p,dropEvent:a})||!m.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m};return n.map(u=>new ct({view(f){const d=h=>{var p;r=!((p=f.dom.parentElement)===null||p===void 0)&&p.contains(h.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(f,d)=>(o=r===f.dom.parentElement,a=d,!1),paste:(f,d)=>{var h;const p=(h=d.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return s=d,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(f,d,h)=>{const p=f[0],m=p.getMeta("uiEvent")==="paste"&&!i,v=p.getMeta("uiEvent")==="drop"&&!o,g=p.getMeta("applyPasteRules"),y=!!g;if(!m&&!v&&!y)return;if(y){const{from:O,text:C}=g,T=O+C.length,j=zA(C);return l({rule:u,state:h,from:O,to:{b:T},pasteEvt:j})}const k=d.doc.content.findDiffStart(h.doc.content),w=d.doc.content.findDiffEnd(h.doc.content);if(!(!IA(k)||!w||k===w.b))return l({rule:u,state:h,from:k,to:w,pasteEvt:s})}}))}function FA(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return[...new Set(e)]}class ro{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=ro.resolve(e),this.schema=PA(this.extensions,n),this.extensions.forEach(r=>{var i;this.editor.extensionStorage[r.name]=r.storage;const o={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:fd(r.name,this.schema)};r.type==="mark"&&(!((i=J($(r,"keepOnSplit",o)))!==null&&i!==void 0)||i)&&this.splittableMarks.push(r.name);const s=$(r,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const a=$(r,"onCreate",o);a&&this.editor.on("create",a);const l=$(r,"onUpdate",o);l&&this.editor.on("update",l);const c=$(r,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=$(r,"onTransaction",o);u&&this.editor.on("transaction",u);const f=$(r,"onFocus",o);f&&this.editor.on("focus",f);const d=$(r,"onBlur",o);d&&this.editor.on("blur",d);const h=$(r,"onDestroy",o);h&&this.editor.on("destroy",h)})}static resolve(e){const n=ro.sort(ro.flatten(e)),r=FA(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=$(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=$(r,"priority")||100,s=$(i,"priority")||100;return o>s?-1:o<s?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:fd(n.name,this.schema)},i=$(n,"addCommands",r);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,n=ro.sort([...this.extensions].reverse()),r=[],i=[],o=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:fd(s.name,this.schema)},l=[],c=$(s,"addKeyboardShortcuts",a);let u={};if(s.type==="mark"&&s.config.exitable&&(u.ArrowRight=()=>vt.handleExit({editor:e,mark:s})),c){const m=Object.fromEntries(Object.entries(c()).map(([v,g])=>[v,()=>g({editor:e})]));u={...u,...m}}const f=tA(u);l.push(f);const d=$(s,"addInputRules",a);L1(s,e.options.enableInputRules)&&d&&r.push(...d());const h=$(s,"addPasteRules",a);L1(s,e.options.enablePasteRules)&&h&&i.push(...h());const p=$(s,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[jA({editor:e,rules:r}),...$A({editor:e,rules:i}),...o]}get attributes(){return Q2(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=ef(this.extensions);return Object.fromEntries(n.filter(r=>!!$(r,"addNodeView")).map(r=>{const i=this.attributes.filter(l=>l.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:e,type:$e(r.name,this.schema)},s=$(r,"addNodeView",o);if(!s)return[];const a=(l,c,u,f)=>{const d=Tp(l,i);return s()({editor:e,node:l,getPos:u,decorations:f,HTMLAttributes:d,extension:r})};return[r.name,a]}))}}function BA(t){return Object.prototype.toString.call(t).slice(8,-1)}function dd(t){return BA(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function nf(t,e){const n={...t};return dd(t)&&dd(e)&&Object.keys(e).forEach(r=>{dd(e[r])?r in t?n[r]=nf(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}class st{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=J($(this,"addOptions",{name:this.name}))),this.storage=J($(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new st(e)}configure(e={}){const n=this.extend();return n.options=nf(this.options,e),n.storage=J($(n,"addStorage",{name:n.name,options:n.options})),n}extend(e={}){const n=new st({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=J($(n,"addOptions",{name:n.name})),n.storage=J($(n,"addStorage",{name:n.name,options:n.options})),n}}function Z2(t,e,n){const{from:r,to:i}=e,{blockSeparator:o=`
|
||
|
||
`,textSerializers:s={}}=n||{};let a="",l=!0;return t.nodesBetween(r,i,(c,u,f,d)=>{var h;const p=s==null?void 0:s[c.type.name];if(p)return c.isBlock&&!l&&(a+=o,l=!0),f&&(a+=p({node:c,pos:u,parent:f,index:d,range:e})),!1;c.isText?(a+=(h=c==null?void 0:c.text)===null||h===void 0?void 0:h.slice(Math.max(r,u)-u,i-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function ew(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const HA=st.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ct({key:new tn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:o}=i,s=Math.min(...o.map(u=>u.$from.pos)),a=Math.max(...o.map(u=>u.$to.pos)),l=ew(n);return Z2(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),UA=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),VA=(t=!1)=>({commands:e})=>e.setContent("",t),WA=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{t.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,f=c.resolve(u.map(l)),d=c.resolve(u.map(l+a.nodeSize)),h=f.blockRange(d);if(!h)return;const p=Bo(h);if(a.type.isTextblock){const{defaultType:m}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},KA=t=>e=>t(e),JA=()=>({state:t,dispatch:e})=>pA(t,e),qA=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,o.content),r.setSelection(new U(r.doc.resolve(s-1))),!0},GA=()=>({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 o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(e){const a=i.before(o),l=i.after(o);t.delete(a,l).scrollIntoView()}return!0}return!1},YA=t=>({tr:e,state:n,dispatch:r})=>{const i=$e(t,n.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1},QA=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},XA=()=>({state:t,dispatch:e})=>nA(t,e),ZA=()=>({commands:t})=>t.keyboardShortcut("Enter"),eR=()=>({state:t,dispatch:e})=>hA(t,e);function _c(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:xg(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function Np(t,e,n={}){return t.find(r=>r.type===e&&_c(r.attrs,n))}function tR(t,e,n={}){return!!Np(t,e,n)}function kg(t,e,n={}){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if(t.parentOffset===r.offset&&r.offset!==0&&(r=t.parent.childBefore(t.parentOffset)),!r.node)return;const i=Np([...r.node.marks],e,n);if(!i)return;let o=r.index,s=t.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(Np([...r.node.marks],e,n);o>0&&i.isInSet(t.parent.child(o-1).marks);)o-=1,s-=t.parent.child(o).nodeSize;for(;a<t.parent.childCount&&tR([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Fr(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}const nR=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const o=Fr(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const f=kg(l,o,e);if(f&&f.from<=c&&f.to>=u){const d=U.create(s,f.from,f.to);n.setSelection(d)}}return!0},rR=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 tw(t){return t instanceof U}function ei(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function nw(t,e=null){if(!e)return null;const n=q.atStart(t),r=q.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,o=r.to;return e==="all"?U.create(t,ei(0,i,o),ei(t.content.size,i,o)):U.create(t,ei(e,i,o),ei(e,i,o))}function rf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const iR=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{rf()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(o&&t===null&&!tw(n.state.selection))return s(),!0;const a=nw(i.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},oR=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),sR=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),rw=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&&rw(r)}return t};function _1(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return rw(n)}function zc(t,e,n){if(n={slice:!0,parseOptions:{},...n},typeof t=="object"&&t!==null)try{return Array.isArray(t)&&t.length>0?N.fromArray(t.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),zc("",e,n)}if(typeof t=="string"){const r=Mo.fromSchema(e);return n.slice?r.parseSlice(_1(t),n.parseOptions).content:r.parse(_1(t),n.parseOptions)}return zc("",e,n)}function aR(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof De||i instanceof _e))return;const o=t.mapping.maps[r];let s=0;o.forEach((a,l,c,u)=>{s===0&&(s=u)}),t.setSelection(q.near(t.doc.resolve(s),n))}const lR=t=>t.toString().startsWith("<"),cR=(t,e,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};const s=zc(e,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if(s.toString()==="<>")return!0;let{from:a,to:l}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},c=!0,u=!0;if((lR(s)?s:[s]).forEach(h=>{h.check(),c=c?h.isText&&h.marks.length===0:!1,u=u?h.isBlock:!1}),a===l&&u){const{parent:h}=r.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}let d;c?(Array.isArray(e)?d=e.map(h=>h.text||"").join(""):typeof e=="object"&&e&&e.text?d=e.text:d=e,r.insertText(d,a,l)):(d=s,r.replaceWith(a,l,d)),n.updateSelection&&aR(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:a,text:d}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:a,text:d})}return!0},uR=()=>({state:t,dispatch:e})=>cA(t,e),fR=()=>({state:t,dispatch:e})=>uA(t,e),dR=()=>({state:t,dispatch:e})=>rA(t,e),hR=()=>({state:t,dispatch:e})=>aA(t,e),pR=()=>({tr:t,state:e,dispatch:n})=>{try{const r=Ku(e.doc,e.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),n&&n(t),!0)}catch{return!1}},mR=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ku(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},gR=()=>({state:t,dispatch:e})=>iA(t,e),yR=()=>({state:t,dispatch:e})=>oA(t,e);function wg(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function vR(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))rf()||wg()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const bR=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const o=vR(t).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function ua(t,e,n={}){const{from:r,to:i,empty:o}=t.selection,s=e?$e(e,t.schema):null,a=[];t.doc.nodesBetween(r,i,(f,d)=>{if(f.isText)return;const h=Math.max(r,d),p=Math.min(i,d+f.nodeSize);a.push({node:f,from:h,to:p})});const l=i-r,c=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>_c(f.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((f,d)=>f+d.to-d.from,0)>=l}const xR=(t,e={})=>({state:n,dispatch:r})=>{const i=$e(t,n.schema);return ua(n,i,e)?fA(n,r):!1},kR=()=>({state:t,dispatch:e})=>mA(t,e),wR=t=>({state:e,dispatch:n})=>{const r=$e(t,e.schema);return SA(r)(e,n)},SR=()=>({state:t,dispatch:e})=>dA(t,e);function of(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function z1(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}const OR=(t,e)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=of(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(o=$e(t,r.schema)),a==="mark"&&(s=Fr(t,r.schema)),i&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&n.setNodeMarkup(u,void 0,z1(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&n.addMark(u,u+c.nodeSize,s.create(z1(f.attrs,e)))})})}),!0):!1},CR=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),ER=()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),TR=()=>({state:t,dispatch:e})=>sA(t,e),NR=()=>({state:t,dispatch:e})=>lA(t,e),MR=()=>({state:t,dispatch:e})=>gA(t,e),PR=()=>({state:t,dispatch:e})=>bA(t,e),AR=()=>({state:t,dispatch:e})=>vA(t,e);function iw(t,e,n={}){return zc(t,e,{slice:!1,parseOptions:n})}const RR=(t,e=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=iw(t,i.schema,n);return o&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!e),!0};function Pa(t,e){const n=Fr(e,t.schema),{from:r,to:i,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function jR(t,e){const n=new l2(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function IR(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 DR(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,o)=>{n(i)&&r.push({node:i,pos:o})}),r}function LR(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 Sg(t){return e=>LR(e.$from,t)}function _R(t,e){const n=dn.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function zR(t,e){const n={from:0,to:t.content.size};return Z2(t,n,e)}function $R(t,e){const n=$e(e,t.schema),{from:r,to:i}=t.selection,o=[];t.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function ow(t,e){const n=of(typeof e=="string"?e:e.name,t.schema);return n==="node"?$R(t,e):n==="mark"?Pa(t,e):{}}function FR(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 BR(t){const e=FR(t);return e.length===1?e:e.filter((n,r)=>!e.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function HR(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),u=e.slice(o).map(l),f=e.invert().map(c,-1),d=e.invert().map(u);r.push({oldRange:{from:f,to:d},newRange:{from:c,to:u}})})}),BR(r)}function Og(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const o=n.resolve(t-1),s=kg(o,i.type);s&&r.push({mark:i,...s})}):n.nodesBetween(t,e,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function jl(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(o=>o.type===e&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function Mp(t,e,n={}){const{empty:r,ranges:i}=t.selection,o=e?Fr(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>_c(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:d})=>{const h=f.pos,p=d.pos;t.doc.nodesBetween(h,p,(m,v)=>{if(!m.isText&&!m.marks.length)return;const g=Math.max(h,v),y=Math.min(p,v+m.nodeSize),k=y-g;s+=k,a.push(...m.marks.map(w=>({mark:w,from:g,to:y})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>_c(f.mark.attrs,n,{strict:!1})).reduce((f,d)=>f+d.to-d.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,d)=>f+d.to-d.from,0);return(l>0?l+c:l)>=s}function UR(t,e,n={}){if(!e)return ua(t,null,n)||Mp(t,null,n);const r=of(e,t.schema);return r==="node"?ua(t,e,n):r==="mark"?Mp(t,e,n):!1}function $1(t,e){const{nodeExtensions:n}=ef(e),r=n.find(s=>s.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=J($(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function VR(t){var e;const n=(e=t.type.createAndFill())===null||e===void 0?void 0:e.toJSON(),r=t.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function WR(t,e,n){var r;const{selection:i}=e;let o=null;if(tw(i)&&(o=i.$cursor),o){const a=(r=t.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,f,d)=>{if(c)return!1;if(u.isInline){const h=!d||d.type.allowsMarkType(n),p=!!n.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(n));c=h&&p}return!c}),c})}const KR=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Fr(t,r.schema);if(i)if(s){const c=Pa(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(d,h)=>{const p=Math.max(h,u),m=Math.min(h+d.nodeSize,f);d.marks.find(g=>g.type===l)?d.marks.forEach(g=>{l===g.type&&n.addMark(p,m,l.create({...g.attrs,...e}))}):n.addMark(p,m,l.create(e))})});return WR(r,n,l)},JR=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),qR=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const o=$e(t,n.schema);return o.isTextblock?i().command(({commands:s})=>j1(o,e)(n)?!0:s.clearNodes()).command(({state:s})=>j1(o,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},GR=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=ei(t,0,r.content.size),o=B.create(r,i);e.setSelection(o)}return!0},YR=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:o}=typeof t=="number"?{from:t,to:t}:t,s=U.atStart(r).from,a=U.atEnd(r).to,l=ei(i,s,a),c=ei(o,s,a),u=U.create(r,l,c);e.setSelection(u)}return!0},QR=t=>({state:e,dispatch:n})=>{const r=$e(t,e.schema);return EA(r)(e,n)};function F1(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)}}const XR=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,c=i.extensionManager.attributes,u=jl(c,a.node().type.name,a.node().attrs);if(o instanceof B&&o.node.isBlock)return!a.parentOffset||!mo(s,a.pos)?!1:(r&&(t&&F1(n,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const f=l.parentOffset===l.parent.content.size;o instanceof U&&e.deleteSelection();const d=a.depth===0?void 0:IR(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=f&&d?[{type:d,attrs:u}]:void 0,p=mo(e.doc,e.mapping.map(a.pos),1,h);if(!h&&!p&&mo(e.doc,e.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(p=!0,h=d?[{type:d,attrs:u}]:void 0),p&&(e.split(e.mapping.map(a.pos),1,h),d&&!f&&!a.parentOffset&&a.parent.type!==d)){const m=e.mapping.map(a.before()),v=e.doc.resolve(m);a.node(-1).canReplaceWith(v.index(),v.index()+1,d)&&e.setNodeMarkup(e.mapping.map(a.before()),d)}t&&F1(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},ZR=t=>({tr:e,state:n,dispatch:r,editor:i})=>{var o;const s=$e(t,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let v=N.empty;const g=a.index(-1)?1:a.index(-2)?2:3;for(let T=a.depth-g;T>=a.depth-3;T-=1)v=N.from(a.node(T).copy(v));const y=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,k=jl(f,a.node().type.name,a.node().attrs),w=((o=s.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(k))||void 0;v=v.append(N.from(s.createAndFill(null,w)||void 0));const O=a.before(a.depth-(g-1));e.replace(O,a.after(-y),new I(v,4-g,0));let C=-1;e.doc.nodesBetween(O,e.doc.content.size,(T,j)=>{if(C>-1)return!1;T.isTextblock&&T.content.size===0&&(C=j+1)}),C>-1&&e.setSelection(U.near(e.doc.resolve(C))),e.scrollIntoView()}return!0}const d=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=jl(f,u.type.name,u.attrs),p=jl(f,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const m=d?[{type:s,attrs:h},{type:d,attrs:p}]:[{type:s,attrs:h}];if(!mo(e.doc,a.pos,2))return!1;if(r){const{selection:v,storedMarks:g}=n,{splittableMarks:y}=i.extensionManager,k=g||v.$to.parentOffset&&v.$from.marks();if(e.split(a.pos,2,m).scrollIntoView(),!k||!r)return!0;const w=k.filter(O=>y.includes(O.type.name));e.ensureMarks(w)}return!0},hd=(t,e)=>{const n=Sg(s=>s.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)&&zr(t.doc,n.pos)&&t.join(n.pos),!0},pd=(t,e)=>{const n=Sg(s=>s.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)&&zr(t.doc,r)&&t.join(r),!0},ej=(t,e,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:f,splittableMarks:d}=i.extensionManager,h=$e(t,s.schema),p=$e(e,s.schema),{selection:m,storedMarks:v}=s,{$from:g,$to:y}=m,k=g.blockRange(y),w=v||m.$to.parentOffset&&m.$from.marks();if(!k)return!1;const O=Sg(C=>$1(C.type.name,f))(m);if(k.depth>=1&&O&&k.depth-O.depth<=1){if(O.node.type===h)return c.liftListItem(p);if($1(O.node.type.name,f)&&h.validContent(O.node.content)&&a)return l().command(()=>(o.setNodeMarkup(O.pos,h),!0)).command(()=>hd(o,h)).command(()=>pd(o,h)).run()}return!n||!w||!a?l().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>hd(o,h)).command(()=>pd(o,h)).run():l().command(()=>{const C=u().wrapInList(h,r),T=w.filter(j=>d.includes(j.type.name));return o.ensureMarks(T),C?!0:c.clearNodes()}).wrapInList(h,r).command(()=>hd(o,h)).command(()=>pd(o,h)).run()},tj=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Fr(t,r.schema);return Mp(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},nj=(t,e,n={})=>({state:r,commands:i})=>{const o=$e(t,r.schema),s=$e(e,r.schema);return ua(r,o,n)?i.setNode(s):i.setNode(o,n)},rj=(t,e={})=>({state:n,commands:r})=>{const i=$e(t,n.schema);return ua(n,i,e)?r.lift(i):r.wrapIn(i,e)},ij=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){const s=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},oj=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach(o=>{t.removeMark(o.$from.pos,o.$to.pos)}),!0},sj=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=Fr(t,r.schema),{$from:c,empty:u,ranges:f}=a;if(!i)return!0;if(u&&s){let{from:d,to:h}=a;const p=(o=c.marks().find(v=>v.type===l))===null||o===void 0?void 0:o.attrs,m=kg(c,l,p);m&&(d=m.from,h=m.to),n.removeMark(d,h,l)}else f.forEach(d=>{n.removeMark(d.$from.pos,d.$to.pos,l)});return n.removeStoredMark(l),!0},aj=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=of(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(o=$e(t,r.schema)),a==="mark"&&(s=Fr(t,r.schema)),i&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(f,d)=>{o&&o===f.type&&n.setNodeMarkup(d,void 0,{...f.attrs,...e}),s&&f.marks.length&&f.marks.forEach(h=>{if(s===h.type){const p=Math.max(d,c),m=Math.min(d+f.nodeSize,u);n.addMark(p,m,s.create({...h.attrs,...e}))}})})}),!0):!1},lj=(t,e={})=>({state:n,dispatch:r})=>{const i=$e(t,n.schema);return xA(i,e)(n,r)},cj=(t,e={})=>({state:n,dispatch:r})=>{const i=$e(t,n.schema);return kA(i,e)(n,r)};var uj=Object.freeze({__proto__:null,blur:UA,clearContent:VA,clearNodes:WA,command:KA,createParagraphNear:JA,cut:qA,deleteCurrentNode:GA,deleteNode:YA,deleteRange:QA,deleteSelection:XA,enter:ZA,exitCode:eR,extendMarkRange:nR,first:rR,focus:iR,forEach:oR,insertContent:sR,insertContentAt:cR,joinUp:uR,joinDown:fR,joinBackward:dR,joinForward:hR,joinItemBackward:pR,joinItemForward:mR,joinTextblockBackward:gR,joinTextblockForward:yR,keyboardShortcut:bR,lift:xR,liftEmptyBlock:kR,liftListItem:wR,newlineInCode:SR,resetAttributes:OR,scrollIntoView:CR,selectAll:ER,selectNodeBackward:TR,selectNodeForward:NR,selectParentNode:MR,selectTextblockEnd:PR,selectTextblockStart:AR,setContent:RR,setMark:KR,setMeta:JR,setNode:qR,setNodeSelection:GR,setTextSelection:YR,sinkListItem:QR,splitBlock:XR,splitListItem:ZR,toggleList:ej,toggleMark:tj,toggleNode:nj,toggleWrap:rj,undoInputRule:ij,unsetAllMarks:oj,unsetMark:sj,updateAttributes:aj,wrapIn:lj,wrapInList:cj});const fj=st.create({name:"commands",addCommands(){return{...uj}}}),dj=st.create({name:"editable",addProseMirrorPlugins(){return[new ct({key:new tn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),hj=st.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ct({key:new tn("focusEvents"),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}}}})]}}),pj=st.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:f}=l,{pos:d,parent:h}=f,p=f.parent.isTextblock&&d>0?a.doc.resolve(d-1):f,m=p.parent.type.spec.isolating,v=f.pos-f.parentOffset,g=m&&p.parent.childCount===1?v===f.pos:q.atStart(c).from===d;return!u||!g||!h.type.isTextblock||h.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.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},o={...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 rf()||wg()?o:i},addProseMirrorPlugins(){return[new ct({key:new tn("clearDocument"),appendTransaction:(t,e,n)=>{if(!(t.some(p=>p.docChanged)&&!e.doc.eq(n.doc)))return;const{empty:i,from:o,to:s}=e.selection,a=q.atStart(e.doc).from,l=q.atEnd(e.doc).to;if(i||!(o===a&&s===l)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const f=n.tr,d=Xu({state:n,transaction:f}),{commands:h}=new Zu({editor:this.editor,state:d});if(h.clearNodes(),!!f.steps.length)return f}})]}}),mj=st.create({name:"tabindex",addProseMirrorPlugins(){return[new ct({key:new tn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class qr{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!==void 0?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 qr(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 qr(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 qr(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,o=this.pos+r+1,s=this.resolvedPos.doc.resolve(o);if(!i&&s.depth<=this.depth)return;const a=new qr(s,this.editor,i,i?n:null);i&&(a.actualDepth=this.depth+1),e.push(new qr(s,this.editor,i,i?n:null))}),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 o=i.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(o[l]!==n[l])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 o=Object.keys(n);return this.children.forEach(s=>{r&&i.length>0||(s.node.type.name===e&&o.every(l=>n[l]===s.node.attrs[l])&&i.push(s),!(r&&i.length>0)&&(i=i.concat(s.querySelectorAll(e,n,r))))}),i}setAttribute(e){const n=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,e).setTextSelection(n.from).run()}}const gj=`.ProseMirror {
|
||
position: relative;
|
||
}
|
||
|
||
.ProseMirror {
|
||
word-wrap: break-word;
|
||
white-space: pre-wrap;
|
||
white-space: break-spaces;
|
||
-webkit-font-variant-ligatures: none;
|
||
font-variant-ligatures: none;
|
||
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
||
}
|
||
|
||
.ProseMirror [contenteditable="false"] {
|
||
white-space: normal;
|
||
}
|
||
|
||
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
.ProseMirror pre {
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
img.ProseMirror-separator {
|
||
display: inline !important;
|
||
border: none !important;
|
||
margin: 0 !important;
|
||
width: 1px !important;
|
||
height: 1px !important;
|
||
}
|
||
|
||
.ProseMirror-gapcursor {
|
||
display: none;
|
||
pointer-events: none;
|
||
position: absolute;
|
||
margin: 0;
|
||
}
|
||
|
||
.ProseMirror-gapcursor:after {
|
||
content: "";
|
||
display: block;
|
||
position: absolute;
|
||
top: -2px;
|
||
width: 20px;
|
||
border-top: 1px solid black;
|
||
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
||
}
|
||
|
||
@keyframes ProseMirror-cursor-blink {
|
||
to {
|
||
visibility: hidden;
|
||
}
|
||
}
|
||
|
||
.ProseMirror-hideselection *::selection {
|
||
background: transparent;
|
||
}
|
||
|
||
.ProseMirror-hideselection *::-moz-selection {
|
||
background: transparent;
|
||
}
|
||
|
||
.ProseMirror-hideselection * {
|
||
caret-color: transparent;
|
||
}
|
||
|
||
.ProseMirror-focused .ProseMirror-gapcursor {
|
||
display: block;
|
||
}
|
||
|
||
.tippy-box[data-animation=fade][data-state=hidden] {
|
||
opacity: 0
|
||
}`;function yj(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}let vj=class extends TA{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=yj(gj,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=X2(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const n=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){var e,n;const i=[...this.options.enableCoreExtensions?[dj,HA.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),fj,hj,pj,mj]:[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new ro(i,this)}createCommandManager(){this.commandManager=new Zu({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=iw(this.options.content,this.schema,this.options.parseOptions),n=nw(e,this.options.autofocus);this.view=new K4(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:no.create({doc:e,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return ow(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,i=typeof e=="string"?n:e;return UR(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return _R(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
||
|
||
`,textSerializers:r={}}=e||{};return zR(this.state.doc,{blockSeparator:n,textSerializers:{...ew(this.schema),...r}})}get isEmpty(){return VR(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new qr(n,this)}get $doc(){return this.$pos(0)}};function xi(t){return new tf({find:t.find,handler:({state:e,range:n,match:r})=>{const i=J(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Og(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+l,c);const d=n.from+l+s.length;o.addMark(n.from+l,d,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function sw(t){return new tf({find:t.find,handler:({state:e,range:n,match:r})=>{const i=J(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=s+c;u>a?u=a:a=u+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(u,a,l)}else r[0]&&o.insert(s-1,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a));o.scrollIntoView()}})}function Pp(t){return new tf({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=J(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,o)}})}function fa(t){return new tf({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=J(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&lg(l,t.type,o);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:d}=e,{splittableMarks:h}=t.editor.extensionManager,p=d||f.$to.parentOffset&&f.$from.marks();if(p){const m=p.filter(v=>h.includes(v.type.name));s.ensureMarks(m)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&zr(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)}})}class vt{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=J($(this,"addOptions",{name:this.name}))),this.storage=J($(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new vt(e)}configure(e={}){const n=this.extend();return n.options=nf(this.options,e),n.storage=J($(n,"addStorage",{name:n.name,options:n.options})),n}extend(e={}){const n=new vt({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=J($(n,"addOptions",{name:n.name})),n.storage=J($(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=s.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}}let xt=class Ap{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=J($(this,"addOptions",{name:this.name}))),this.storage=J($(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ap(e)}configure(e={}){const n=this.extend();return n.options=nf(this.options,e),n.storage=J($(n,"addStorage",{name:n.name,options:n.options})),n}extend(e={}){const n=new Ap({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=J($(n,"addOptions",{name:n.name})),n.storage=J($(n,"addStorage",{name:n.name,options:n.options})),n}};function bj(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class xj{constructor(e,n,r){this.isDragging=!1,this.component=e,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var n,r,i,o,s,a,l;const{view:c}=this.editor,u=e.target,f=u.nodeType===3?(n=u.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(u)||!f)return;let d=0,h=0;if(this.dom!==f){const v=this.dom.getBoundingClientRect(),g=f.getBoundingClientRect(),y=(i=e.offsetX)!==null&&i!==void 0?i:(o=e.nativeEvent)===null||o===void 0?void 0:o.offsetX,k=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;d=g.x-v.x+y,h=g.y-v.y+k}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,d,h);const p=B.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(p);c.dispatch(m)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const o=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!o)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,f=B.isSelectable(this.node),d=e.type==="copy",h=e.type==="paste",p=e.type==="cut",m=e.type==="mousedown";if(!u&&f&&o&&e.preventDefault(),u&&o&&!c)return e.preventDefault(),!1;if(u&&l&&!c&&m){const v=r.closest("[data-drag-handle]");v&&(this.dom===v||this.dom.contains(v))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||s||d||h||p||m&&f)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(rf()||bj())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0})}deleteNode(){const e=this.getPos(),n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function Nr(t){return new DA({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=J(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),f=n.from+l.indexOf(a),d=f+a.length;if(Og(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(v=>v===t.type&&v!==p.mark.type)).filter(p=>p.to>f).length)return null;d<n.to&&s.delete(d,n.to),f>n.from&&s.delete(n.from+u,f),c=n.from+u+a.length,s.addMark(n.from+u,c,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}const B1=vt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Pa(t,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),kj=st.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Rp=xt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",fe(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),wj=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Sj=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Oj=vt.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[xi({find:wj,type:this.type})]},addPasteRules(){return[Nr({find:Sj,type:this.type})]}}),Cj=st.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>t.style.textAlign||this.options.defaultAlignment,renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.every(n=>e.updateAttributes(n,{textAlign:t})):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Ej=vt.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",fe(this.options.HTMLAttributes,t),0]},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()}}}),Tj=/^\s*>\s$/,aw=xt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[fa({find:Tj,type:this.type})]}}),Nj="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Mj="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Io=(t,e)=>{for(const n in e)t[n]=e[n];return t},jp="numeric",Ip="ascii",Dp="alpha",Il="asciinumeric",sl="alphanumeric",Lp="domain",lw="emoji",Pj="scheme",Aj="slashscheme",H1="whitespace";function Rj(t,e){return t in e||(e[t]=[]),e[t]}function ti(t,e,n){e[jp]&&(e[Il]=!0,e[sl]=!0),e[Ip]&&(e[Il]=!0,e[Dp]=!0),e[Il]&&(e[sl]=!0),e[Dp]&&(e[sl]=!0),e[sl]&&(e[Lp]=!0),e[lw]&&(e[Lp]=!0);for(const r in e){const i=Rj(r,n);i.indexOf(t)<0&&i.push(t)}}function jj(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function ft(t){t===void 0&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}ft.groups={};ft.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],o=e.jr[r][1];if(o&&i.test(t))return o}return e.jd},has(t,e){return e===void 0&&(e=!1),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||ft.groups;let i;return e&&e.j?i=e:(i=new ft(e),n&&r&&ti(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(t[s]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||ft.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new ft,Io(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new ft,o){if(r)if(s.t&&typeof s.t=="string"){const l=Io(jj(s.t,r),n);ti(o,l,r)}else n&&ti(o,n,r);s.t=o}return i.j[t]=s,s}};const K=(t,e,n,r,i)=>t.ta(e,n,r,i),Mt=(t,e,n,r,i)=>t.tr(e,n,r,i),U1=(t,e,n,r,i)=>t.ts(e,n,r,i),R=(t,e,n,r,i)=>t.tt(e,n,r,i),wn="WORD",_p="UWORD",da="LOCALHOST",zp="TLD",$p="UTLD",Dl="SCHEME",Bi="SLASH_SCHEME",Cg="NUM",cw="WS",Eg="NL",Ms="OPENBRACE",Ps="CLOSEBRACE",$c="OPENBRACKET",Fc="CLOSEBRACKET",Bc="OPENPAREN",Hc="CLOSEPAREN",Uc="OPENANGLEBRACKET",Vc="CLOSEANGLEBRACKET",Wc="FULLWIDTHLEFTPAREN",Kc="FULLWIDTHRIGHTPAREN",Jc="LEFTCORNERBRACKET",qc="RIGHTCORNERBRACKET",Gc="LEFTWHITECORNERBRACKET",Yc="RIGHTWHITECORNERBRACKET",Qc="FULLWIDTHLESSTHAN",Xc="FULLWIDTHGREATERTHAN",Zc="AMPERSAND",eu="APOSTROPHE",tu="ASTERISK",Qn="AT",nu="BACKSLASH",ru="BACKTICK",iu="CARET",nr="COLON",Tg="COMMA",ou="DOLLAR",sn="DOT",su="EQUALS",Ng="EXCLAMATION",an="HYPHEN",au="PERCENT",lu="PIPE",cu="PLUS",uu="POUND",fu="QUERY",Mg="QUOTE",Pg="SEMI",ln="SLASH",As="TILDE",du="UNDERSCORE",uw="EMOJI",hu="SYM";var fw=Object.freeze({__proto__:null,WORD:wn,UWORD:_p,LOCALHOST:da,TLD:zp,UTLD:$p,SCHEME:Dl,SLASH_SCHEME:Bi,NUM:Cg,WS:cw,NL:Eg,OPENBRACE:Ms,CLOSEBRACE:Ps,OPENBRACKET:$c,CLOSEBRACKET:Fc,OPENPAREN:Bc,CLOSEPAREN:Hc,OPENANGLEBRACKET:Uc,CLOSEANGLEBRACKET:Vc,FULLWIDTHLEFTPAREN:Wc,FULLWIDTHRIGHTPAREN:Kc,LEFTCORNERBRACKET:Jc,RIGHTCORNERBRACKET:qc,LEFTWHITECORNERBRACKET:Gc,RIGHTWHITECORNERBRACKET:Yc,FULLWIDTHLESSTHAN:Qc,FULLWIDTHGREATERTHAN:Xc,AMPERSAND:Zc,APOSTROPHE:eu,ASTERISK:tu,AT:Qn,BACKSLASH:nu,BACKTICK:ru,CARET:iu,COLON:nr,COMMA:Tg,DOLLAR:ou,DOT:sn,EQUALS:su,EXCLAMATION:Ng,HYPHEN:an,PERCENT:au,PIPE:lu,PLUS:cu,POUND:uu,QUERY:fu,QUOTE:Mg,SEMI:Pg,SLASH:ln,TILDE:As,UNDERSCORE:du,EMOJI:uw,SYM:hu});const Di=/[a-z]/,md=new RegExp("\\p{L}","u"),gd=new RegExp("\\p{Emoji}","u"),yd=/\d/,V1=/\s/,W1=`
|
||
`,Ij="️",Dj="";let al=null,ll=null;function Lj(t){t===void 0&&(t=[]);const e={};ft.groups=e;const n=new ft;al==null&&(al=K1(Nj)),ll==null&&(ll=K1(Mj)),R(n,"'",eu),R(n,"{",Ms),R(n,"}",Ps),R(n,"[",$c),R(n,"]",Fc),R(n,"(",Bc),R(n,")",Hc),R(n,"<",Uc),R(n,">",Vc),R(n,"(",Wc),R(n,")",Kc),R(n,"「",Jc),R(n,"」",qc),R(n,"『",Gc),R(n,"』",Yc),R(n,"<",Qc),R(n,">",Xc),R(n,"&",Zc),R(n,"*",tu),R(n,"@",Qn),R(n,"`",ru),R(n,"^",iu),R(n,":",nr),R(n,",",Tg),R(n,"$",ou),R(n,".",sn),R(n,"=",su),R(n,"!",Ng),R(n,"-",an),R(n,"%",au),R(n,"|",lu),R(n,"+",cu),R(n,"#",uu),R(n,"?",fu),R(n,'"',Mg),R(n,"/",ln),R(n,";",Pg),R(n,"~",As),R(n,"_",du),R(n,"\\",nu);const r=Mt(n,yd,Cg,{[jp]:!0});Mt(r,yd,r);const i=Mt(n,Di,wn,{[Ip]:!0});Mt(i,Di,i);const o=Mt(n,md,_p,{[Dp]:!0});Mt(o,Di),Mt(o,md,o);const s=Mt(n,V1,cw,{[H1]:!0});R(n,W1,Eg,{[H1]:!0}),R(s,W1),Mt(s,V1,s);const a=Mt(n,gd,uw,{[lw]:!0});Mt(a,gd,a),R(a,Ij,a);const l=R(a,Dj);Mt(l,gd,a);const c=[[Di,i]],u=[[Di,null],[md,o]];for(let f=0;f<al.length;f++)Un(n,al[f],zp,wn,c);for(let f=0;f<ll.length;f++)Un(n,ll[f],$p,_p,u);ti(zp,{tld:!0,ascii:!0},e),ti($p,{utld:!0,alpha:!0},e),Un(n,"file",Dl,wn,c),Un(n,"mailto",Dl,wn,c),Un(n,"http",Bi,wn,c),Un(n,"https",Bi,wn,c),Un(n,"ftp",Bi,wn,c),Un(n,"ftps",Bi,wn,c),ti(Dl,{scheme:!0,ascii:!0},e),ti(Bi,{slashscheme:!0,ascii:!0},e),t=t.sort((f,d)=>f[0]>d[0]?1:-1);for(let f=0;f<t.length;f++){const d=t[f][0],p=t[f][1]?{[Pj]:!0}:{[Aj]:!0};d.indexOf("-")>=0?p[Lp]=!0:Di.test(d)?yd.test(d)?p[Il]=!0:p[Ip]=!0:p[jp]=!0,U1(n,d,d,p)}return U1(n,"localhost",da,{ascii:!0}),n.jd=new ft(hu),{start:n,tokens:Io({groups:e},fw)}}function _j(t,e){const n=zj(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=t,l=null,c=0,u=null,f=-1,d=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(f=0,d=0,u=a):f>=0&&(f+=n[s].length,d++),c+=n[s].length,o+=n[s].length,s++;o-=f,s-=d,c-=f,i.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}function zj(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Un(t,e,n,r,i){let o;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?o=t.j[l]:(o=new ft(r),o.jr=i.slice(),t.j[l]=o),t=o}return o=new ft(n),o.jr=i.slice(),t.j[e[s-1]]=o,o}function K1(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let o=0;for(;i.indexOf(t[r+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(t[r]),r++}return e}const ha={defaultProtocol:"http",events:null,format:J1,formatHref:J1,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ag(t,e){e===void 0&&(e=null);let n=Io({},ha);t&&(n=Io(n,t instanceof Ag?t.o:t));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}Ag.prototype={o:ha,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]:ha[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 J1(t){return t}function dw(t,e){this.t="token",this.v=t,this.tk=e}dw.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){return t===void 0&&(t=ha.defaultProtocol),{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),o=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),f=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Io(s,u),{tagName:i,attributes:s,content:o,eventListeners:f}}};function sf(t,e){class n extends dw{constructor(i,o){super(i,o),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const q1=sf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),G1=sf("text"),$j=sf("nl"),cl=sf("url",{isLink:!0,toHref(t){return t===void 0&&(t=ha.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==da&&t[1].t===nr}}),Pt=t=>new ft(t);function Fj(t){let{groups:e}=t;const n=e.domain.concat([Zc,tu,Qn,nu,ru,iu,ou,su,an,Cg,au,lu,cu,uu,ln,hu,As,du]),r=[eu,nr,Tg,sn,Ng,fu,Mg,Pg,Uc,Vc,Ms,Ps,Fc,$c,Bc,Hc,Wc,Kc,Jc,qc,Gc,Yc,Qc,Xc],i=[Zc,eu,tu,nu,ru,iu,ou,su,an,Ms,Ps,au,lu,cu,uu,fu,ln,hu,As,du],o=Pt(),s=R(o,As);K(s,i,s),K(s,e.domain,s);const a=Pt(),l=Pt(),c=Pt();K(o,e.domain,a),K(o,e.scheme,l),K(o,e.slashscheme,c),K(a,i,s),K(a,e.domain,a);const u=R(a,Qn);R(s,Qn,u),R(l,Qn,u),R(c,Qn,u);const f=R(s,sn);K(f,i,s),K(f,e.domain,s);const d=Pt();K(u,e.domain,d),K(d,e.domain,d);const h=R(d,sn);K(h,e.domain,d);const p=Pt(q1);K(h,e.tld,p),K(h,e.utld,p),R(u,da,p);const m=R(d,an);K(m,e.domain,d),K(p,e.domain,d),R(p,sn,h),R(p,an,m);const v=R(p,nr);K(v,e.numeric,q1);const g=R(a,an),y=R(a,sn);K(g,e.domain,a),K(y,i,s),K(y,e.domain,a);const k=Pt(cl);K(y,e.tld,k),K(y,e.utld,k),K(k,e.domain,a),K(k,i,s),R(k,sn,y),R(k,an,g),R(k,Qn,u);const w=R(k,nr),O=Pt(cl);K(w,e.numeric,O);const C=Pt(cl),T=Pt();K(C,n,C),K(C,r,T),K(T,n,C),K(T,r,T),R(k,ln,C),R(O,ln,C);const j=R(l,nr),L=R(c,nr),H=R(L,ln),pe=R(H,ln);K(l,e.domain,a),R(l,sn,y),R(l,an,g),K(c,e.domain,a),R(c,sn,y),R(c,an,g),K(j,e.domain,C),R(j,ln,C),K(pe,e.domain,C),K(pe,n,C),R(pe,ln,C);const Je=[[Ms,Ps],[$c,Fc],[Bc,Hc],[Uc,Vc],[Wc,Kc],[Jc,qc],[Gc,Yc],[Qc,Xc]];for(let Te=0;Te<Je.length;Te++){const[Vo,Wo]=Je[Te],Fn=R(C,Vo);R(T,Vo,Fn),R(Fn,Wo,C);const nn=Pt(cl);K(Fn,n,nn);const D=Pt();K(Fn,r),K(nn,n,nn),K(nn,r,D),K(D,n,nn),K(D,r,D),R(nn,Wo,C),R(D,Wo,C)}return R(o,da,k),R(o,Eg,$j),{start:o,tokens:fw}}function Bj(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=t,l=null,c=null,u=0,f=null,d=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(d=0,f=a):d>=0&&d++,i++,u++;if(d<0)i-=u,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(vd(G1,e,s)),s=[]),i-=d,u-=d;const h=f.t,p=n.slice(i-u,i);o.push(vd(h,e,p))}}return s.length>0&&o.push(vd(G1,e,s)),o}function vd(t,e,n){const r=n[0].s,i=n[n.length-1].e,o=e.slice(r,i);return new t(o,n)}const Hj=typeof console<"u"&&console&&console.warn||(()=>{}),Uj="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",me={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Vj(){ft.groups={},me.scanner=null,me.parser=null,me.tokenQueue=[],me.pluginQueue=[],me.customSchemes=[],me.initialized=!1}function Y1(t,e){if(e===void 0&&(e=!1),me.initialized&&Hj(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Uj}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
||
1. Must only contain digits, lowercase ASCII letters or "-"
|
||
2. Cannot start or end with "-"
|
||
3. "-" cannot repeat`);me.customSchemes.push([t,e])}function Wj(){me.scanner=Lj(me.customSchemes);for(let t=0;t<me.tokenQueue.length;t++)me.tokenQueue[t][1]({scanner:me.scanner});me.parser=Fj(me.scanner.tokens);for(let t=0;t<me.pluginQueue.length;t++)me.pluginQueue[t][1]({scanner:me.scanner,parser:me.parser});me.initialized=!0}function hw(t){return me.initialized||Wj(),Bj(me.parser.start,t,_j(me.scanner.start,t))}function pw(t,e,n){if(e===void 0&&(e=null),n===void 0&&(n=null),e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ag(n),i=hw(t),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}function Kj(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function Jj(t){return new ct({key:new tn("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=jR(n.doc,[...e]);if(HR(a).forEach(({newRange:c})=>{const u=DR(r.doc,c,h=>h.isTextblock);let f,d;if(u.length>1?(f=u[0],d=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(f=u[0],d=r.doc.textBetween(f.pos,c.to,void 0," ")),f&&d){const h=d.split(" ").filter(g=>g!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=f.pos+d.lastIndexOf(p);if(!p)return!1;const v=hw(p).map(g=>g.toObject());if(!Kj(v))return!1;v.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>t.validate?t.validate(g.value):!0).forEach(g=>{Og(g.from,g.to,r.doc).some(y=>y.mark.type===t.type)||s.addMark(g.from,g.to,t.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function qj(t){return new ct({key:new tn("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(t.whenNotEditable&&e.editable||r.button!==0)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(d=>d.nodeName==="A"))return!1;const l=ow(e.state,t.type.name),c=r.target,u=(i=c==null?void 0:c.href)!==null&&i!==void 0?i:l.href,f=(o=c==null?void 0:c.target)!==null&&o!==void 0?o:l.target;return c&&u?(window.open(u,f),!0):!1}}})}function Gj(t){return new ct({key:new tn("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});const l=pw(a).find(c=>c.isLink&&c.value===a);return!a||!l?!1:(t.editor.commands.setMark(t.type,{href:l.href}),!0)}}})}const Yj=vt.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(t=>{if(typeof t=="string"){Y1(t);return}Y1(t.scheme,t.optionalSlashes)})},onDestroy(){Vj()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){var e;return!((e=t.href)===null||e===void 0)&&e.startsWith("javascript:")?["a",fe(this.options.HTMLAttributes,{...t,href:""}),0]:["a",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>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[Nr({find:t=>{const e=[];if(t){const n=pw(t).filter(r=>r.isLink);n.length&&n.forEach(r=>e.push({text:r.value,data:{href:r.href},index:r.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push(Jj({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push(qj({type:this.type,whenNotEditable:this.options.openOnClick==="whenNotEditable"})),this.options.linkOnPaste&&t.push(Gj({editor:this.editor,type:this.type})),t}}),Qj=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},Xj=({renderers:t})=>M.createElement(M.Fragment,null,Object.entries(t).map(([e,n])=>eo.createPortal(n.reactElement,n.element,e)));class Zj extends M.Component{constructor(e){super(e),this.editorContentRef=M.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:e}=this.props;if(e&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=this,e.createNodeViews(),this.initialized=!0}}maybeFlushSync(e){this.initialized?eg.flushSync(e):e()}setRenderer(e,n){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>({renderers:{...r,[e]:n}}))})}removeRenderer(e){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>{const r={...n};return delete r[e],{renderers:r}})})}componentWillUnmount(){const{editor:e}=this.props;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return M.createElement(M.Fragment,null,M.createElement("div",{ref:Qj(n,this.editorContentRef),...r}),M.createElement(Xj,{renderers:this.state.renderers}))}}const e5=S.forwardRef((t,e)=>{const n=M.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return M.createElement(Zj,{key:n,innerRef:e,...t})}),t5=M.memo(e5);class n5 extends vj{constructor(){super(...arguments),this.contentComponent=null}}const r5=(t={},e=[])=>{const n=S.useRef(null),[,r]=S.useState({}),{onBeforeCreate:i,onBlur:o,onCreate:s,onDestroy:a,onFocus:l,onSelectionUpdate:c,onTransaction:u,onUpdate:f}=t,d=S.useRef(i),h=S.useRef(o),p=S.useRef(s),m=S.useRef(a),v=S.useRef(l),g=S.useRef(c),y=S.useRef(u),k=S.useRef(f);return S.useEffect(()=>{n.current&&(i&&(n.current.off("beforeCreate",d.current),n.current.on("beforeCreate",i),d.current=i),o&&(n.current.off("blur",h.current),n.current.on("blur",o),h.current=o),s&&(n.current.off("create",p.current),n.current.on("create",s),p.current=s),a&&(n.current.off("destroy",m.current),n.current.on("destroy",a),m.current=a),l&&(n.current.off("focus",v.current),n.current.on("focus",l),v.current=l),c&&(n.current.off("selectionUpdate",g.current),n.current.on("selectionUpdate",c),g.current=c),u&&(n.current.off("transaction",y.current),n.current.on("transaction",u),y.current=u),f&&(n.current.off("update",k.current),n.current.on("update",f),k.current=f))},[i,o,s,a,l,c,u,f,n.current]),S.useEffect(()=>{let w=!0;const O=new n5(t);return n.current=O,n.current.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{w&&r({})})})}),()=>{w=!1,O.destroy()}},e),n.current},Rg=S.createContext({editor:null}),i5=Rg.Consumer,o5=()=>S.useContext(Rg),s5=({children:t,slotAfter:e,slotBefore:n,...r})=>{const i=r5(r);return i?M.createElement(Rg.Provider,{value:{editor:i}},n,M.createElement(i5,null,({editor:o})=>M.createElement(t5,{editor:o})),t,e):null},mw=S.createContext({onDragStart:void 0}),a5=()=>S.useContext(mw),l5=M.forwardRef((t,e)=>{const{onDragStart:n}=a5(),r=t.as||"div";return M.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function c5(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function u5(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class f5{constructor(e,{editor:n,props:r={},as:i="div",className:o="",attrs:s}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),s&&Object.keys(s).forEach(a=>{this.element.setAttribute(a,s[a])}),this.render()}render(){var e,n;const r=this.component,i=this.props;(c5(r)||u5(r))&&(i.ref=o=>{this.ref=o}),this.reactElement=M.createElement(r,{...i}),(n=(e=this.editor)===null||e===void 0?void 0:e.contentComponent)===null||n===void 0||n.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e,n;(n=(e=this.editor)===null||e===void 0?void 0:e.contentComponent)===null||n===void 0||n.removeRenderer(this.id)}}class d5 extends xj{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(o={})=>this.updateAttributes(o),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const o=s=>s.charAt(0).toUpperCase()+s.substring(1);this.component.displayName=o(this.extension.name)}const n=o=>{const s=this.component,a=this.onDragStart.bind(this),l=c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)};return M.createElement(M.Fragment,null,M.createElement(mw.Provider,{value:{onDragStart:a,nodeViewContentRef:l}},M.createElement(s,{...o})))};n.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let r=this.node.isInline?"span":"div";this.options.as&&(r=this.options.as);const{className:i=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new f5(n,{editor:this.editor,props:e,as:r,className:`node-${this.node.type.name} ${i}`.trim(),attrs:this.options.attrs})}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection;if(e<=this.getPos()&&n>=this.getPos()+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n){const r=i=>{this.renderer.updateProps(i)};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations;return this.node=e,this.decorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:e,newDecorations:n,updateProps:()=>r({node:e,decorations:n})})}return e===this.node&&this.decorations===n||(this.node=e,this.decorations=n,r({node:e,decorations:n})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}}function h5(t,e){return n=>n.editor.contentComponent?new d5(t,n,e):{}}const p5=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,m5=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,g5=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,y5=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,v5=vt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",fe(this.options.HTMLAttributes,t),0]},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[xi({find:p5,type:this.type}),xi({find:g5,type:this.type})]},addPasteRules(){return[Nr({find:m5,type:this.type}),Nr({find:y5,type:this.type})]}}),b5=xt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",fe(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Q1=vt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Pa(t,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),X1=/^\s*([-+*])\s$/,x5=xt.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",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(b5.name,this.editor.getAttributes(Q1.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=fa({find:X1,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=fa({find:X1,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Q1.name),editor:this.editor})),[t]}}),k5=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,w5=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,S5=vt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",fe(this.options.HTMLAttributes,t),0]},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[xi({find:k5,type:this.type})]},addPasteRules(){return[Nr({find:w5,type:this.type})]}}),O5=/^```([a-z]+)?[\s\n]$/,C5=/^~~~([a-z]+)?[\s\n]$/,E5=xt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,o=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",fe(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},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},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 o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
|
||
|
||
`);return!o||!s?!1:t.chain().command(({tr:a})=>(a.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:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0||r.nodeAt(a)?!1:t.commands.exitCode()}}},addInputRules(){return[Pp({find:O5,type:this.type,getAttributes:t=>({language:t[1]})}),Pp({find:C5,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ct({key:new tn("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,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=t.state;return t.state.selection.from===t.state.doc.nodeSize-(1+t.state.selection.$to.depth*2)?s.insert(t.state.selection.from-1,this.type.create({language:o})):s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(U.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,`
|
||
`)),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),T5=xt.create({name:"doc",topNode:!0,content:"block+"});function N5(t={}){return new ct({view(e){return new M5(e,t)}})}class M5{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 o=s=>{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}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;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),f=a?u.bottom:u.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.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 o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"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,o=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=r2(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const P5=st.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[N5(this.options)]}});class xe extends q{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return xe.valid(r)?new xe(r):q.near(r)}content(){return I.empty}eq(e){return e instanceof xe&&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 xe(e.resolve(n.pos))}getBookmark(){return new jg(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!A5(e)||!R5(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&&xe.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){o=a.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=n;let l=e.doc.resolve(i);if(xe.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!B.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=s,i+=n;let a=e.doc.resolve(i);if(xe.valid(a))return a}return null}}}xe.prototype.visible=!1;xe.findFrom=xe.findGapCursorFrom;q.jsonID("gapcursor",xe);class jg{constructor(e){this.pos=e}map(e){return new jg(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return xe.valid(n)?new xe(n):q.near(n)}}function A5(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||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function R5(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||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function j5(){return new ct({props:{decorations:_5,createSelectionBetween(t,e,n){return e.pos==n.pos&&xe.valid(n)?new xe(n):null},handleClick:D5,handleKeyDown:I5,handleDOMEvents:{beforeinput:L5}}})}const I5=V2({ArrowLeft:ul("horiz",-1),ArrowRight:ul("horiz",1),ArrowUp:ul("vert",-1),ArrowDown:ul("vert",1)});function ul(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof U){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=xe.findGapCursorFrom(a,e,l);return c?(i&&i(r.tr.setSelection(new xe(c))),!0):!1}}function D5(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!xe.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&B.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new xe(r))),!0)}function L5(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof xe))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=N.empty;for(let s=r.length-1;s>=0;s--)i=N.from(r[s].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new I(i,0,0));return o.setSelection(U.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function _5(t){if(!(t.selection instanceof xe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Me.create(t.doc,[Lt.widget(t.selection.head,e,{key:"gapcursor"})])}const z5=st.create({name:"gapCursor",addProseMirrorPlugins(){return[j5()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=J($(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),$5=xt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",fe(this.options.HTMLAttributes,t)]},renderText(){return`
|
||
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const f=l.filter(d=>a.includes(d.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),F5=xt.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]}`,fe(this.options.HTMLAttributes,e),0]},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=>Pp({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var pu=200,ze=function(){};ze.prototype.append=function(e){return e.length?(e=ze.from(e),!this.length&&e||e.length<pu&&this.leafAppend(e)||this.length<pu&&e.leafPrepend(this)||this.appendInner(e)):this};ze.prototype.prepend=function(e){return e.length?ze.from(e).append(this):this};ze.prototype.appendInner=function(e){return new B5(this,e)};ze.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?ze.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};ze.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};ze.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)};ze.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},n,r),i};ze.from=function(e){return e instanceof ze?e:e&&e.length?new gw(e):ze.empty};var gw=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,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var l=o;l<s;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,a){for(var l=o-1;l>=s;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=pu)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=pu)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}(ze);ze.empty=new gw([]);var B5=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,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},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}(ze);const H5=500;class Jt{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,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,a,l,c=[],u=[];return this.items.forEach((f,d)=>{if(!f.step){i||(i=this.remapping(r,d+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new cn(f.map));let h=f.step.map(i.slice(o)),p;h&&s.maybeStep(h).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],c.push(new cn(p,void 0,void 0,c.length+u.length))),o--,p&&i.appendMap(p,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,l=new Jt(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),d=new cn(e.mapping.maps[u],f,n),h;(h=l&&l.merge(d))&&(d=h,u?o.pop():a=a.slice(0,a.length-1)),o.push(d),n&&(s++,n=void 0),i||(l=d)}let c=s-r.depth;return c>V5&&(a=U5(a,c),s-=c),new Jt(a.append(o),s)}remapping(e,n){let r=new po;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Jt(this.items.append(e.map(n=>new cn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(d=>{d.selection&&a--},i);let l=n;this.items.forEach(d=>{let h=o.getMirror(--l);if(h==null)return;s=Math.min(s,h);let p=o.maps[h];if(d.step){let m=e.steps[h].invert(e.docs[h]),v=d.selection&&d.selection.map(o.slice(l+1,h));v&&a++,r.push(new cn(p,m,v))}else r.push(new cn(p))},i);let c=[];for(let d=n;d<s;d++)c.push(new cn(o.maps[d]));let u=this.items.slice(0,i).append(c).append(r),f=new Jt(u,a);return f.emptyItemCount()>H5&&(f=f.compress(this.items.length-r.length)),f}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=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let f=new cn(c.invert(),l,u),d,h=i.length-1;(d=i.length&&i[h].merge(f))?i[h]=d:i.push(f)}}else s.map&&r--},this.items.length,0),new Jt(ze.from(i.reverse()),o)}}Jt.empty=new Jt(ze.empty,0);function U5(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class cn{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 cn(n.getMap().invert(),n,this.selection)}}}class Xn{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const V5=20;function W5(t,e,n,r){let i=n.getMeta(fi),o;if(i)return i.historyState;n.getMeta(q5)&&(t=new Xn(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(fi))return s.getMeta(fi).redo?new Xn(t.done.addTransform(n,void 0,r,Ll(e)),t.undone,Z1(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new Xn(t.done,t.undone.addTransform(n,void 0,r,Ll(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!K5(n,t.prevRanges)),c=s?bd(t.prevRanges,n.mapping):Z1(n.mapping.maps[n.steps.length-1]);return new Xn(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ll(e)),Jt.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new Xn(t.done.rebased(n,o),t.undone.rebased(n,o),bd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Xn(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),bd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function K5(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function Z1(t){let e=[];return t.forEach((n,r,i,o)=>e.push(i,o)),e}function bd(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function J5(t,e,n){let r=Ll(e),i=fi.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),l=new Xn(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(fi,{redo:n,historyState:l})}let xd=!1,ev=null;function Ll(t){let e=t.plugins;if(ev!=e){xd=!1,ev=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){xd=!0;break}}return xd}const fi=new tn("history"),q5=new tn("closeHistory");function G5(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ct({key:fi,state:{init(){return new Xn(Jt.empty,Jt.empty,null,0,-1)},apply(e,n,r){return W5(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?vw:r=="historyRedo"?bw:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function yw(t,e){return(n,r)=>{let i=fi.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=J5(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const vw=yw(!1,!0),bw=yw(!0,!0),Y5=st.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>vw(t,e),redo:()=>({state:t,dispatch:e})=>bw(t,e)}},addProseMirrorPlugins(){return[G5(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()}}}),Q5=xt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",fe(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{$to:n}=e.selection,r=t();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:o})=>{var s;if(o){const{$to:a}=i.selection,l=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?i.setSelection(U.create(i.doc,a.pos+1)):a.nodeAfter.isBlock?i.setSelection(B.create(i.doc,a.pos)):i.setSelection(U.create(i.doc,a.pos));else{const c=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();c&&(i.insert(l,c),i.setSelection(U.create(i.doc,l+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[sw({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),X5=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Z5=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,eI=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,tI=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,nI=vt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",fe(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)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xi({find:X5,type:this.type}),xi({find:eI,type:this.type})]},addPasteRules(){return[Nr({find:Z5,type:this.type}),Nr({find:tI,type:this.type})]}}),rI=xt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",fe(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tv=vt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Pa(t,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),nv=/^(\d+)\.\s$/,iI=xt.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}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",fe(this.options.HTMLAttributes,n),0]:["ol",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(rI.name,this.editor.getAttributes(tv.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=fa({find:nv,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=fa({find:nv,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tv.name)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),oI=xt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),sI=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,aI=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,lI=vt.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",fe(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){const t={};return wg()?t["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():t["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),t},addInputRules(){return[xi({find:sI,type:this.type})]},addPasteRules(){return[Nr({find:aI,type:this.type})]}}),cI=xt.create({name:"text",group:"inline"}),uI=st.create({name:"starterKit",addExtensions(){var t,e,n,r,i,o,s,a,l,c,u,f,d,h,p,m,v,g;const y=[];return this.options.blockquote!==!1&&y.push(aw.configure((t=this.options)===null||t===void 0?void 0:t.blockquote)),this.options.bold!==!1&&y.push(v5.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&y.push(x5.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&y.push(S5.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&y.push(E5.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&y.push(T5.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&y.push(P5.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&y.push(z5.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&y.push($5.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&y.push(F5.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&y.push(Y5.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&y.push(Q5.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&y.push(nI.configure((d=this.options)===null||d===void 0?void 0:d.italic)),this.options.listItem!==!1&&y.push(Rp.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&y.push(iI.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&y.push(oI.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&y.push(lI.configure((v=this.options)===null||v===void 0?void 0:v.strike)),this.options.text!==!1&&y.push(cI.configure((g=this.options)===null||g===void 0?void 0:g.text)),y}});function rv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rv(Object(n),!0).forEach(function(r){Re(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function mu(t){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mu(t)}function fI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dI(t,e,n){return e&&iv(t.prototype,e),n&&iv(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Re(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ig(t,e){return pI(t)||gI(t,e)||xw(t,e)||vI()}function Aa(t){return hI(t)||mI(t)||xw(t)||yI()}function hI(t){if(Array.isArray(t))return Fp(t)}function pI(t){if(Array.isArray(t))return t}function mI(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function gI(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function xw(t,e){if(t){if(typeof t=="string")return Fp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fp(t,e)}}function Fp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function yI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ov=function(){},Dg={},kw={},ww=null,Sw={mark:ov,measure:ov};try{typeof window<"u"&&(Dg=window),typeof document<"u"&&(kw=document),typeof MutationObserver<"u"&&(ww=MutationObserver),typeof performance<"u"&&(Sw=performance)}catch{}var bI=Dg.navigator||{},sv=bI.userAgent,av=sv===void 0?"":sv,Mr=Dg,ue=kw,lv=ww,fl=Sw;Mr.document;var $n=!!ue.documentElement&&!!ue.head&&typeof ue.addEventListener=="function"&&typeof ue.createElement=="function",Ow=~av.indexOf("MSIE")||~av.indexOf("Trident/"),dl,hl,pl,ml,gl,Dn="___FONT_AWESOME___",Bp=16,Cw="fa",Ew="svg-inline--fa",ki="data-fa-i2svg",Hp="data-fa-pseudo-element",xI="data-fa-pseudo-element-pending",Lg="data-prefix",_g="data-icon",cv="fontawesome-i2svg",kI="async",wI=["HTML","HEAD","STYLE","SCRIPT"],Tw=function(){try{return!0}catch{return!1}}(),le="classic",ke="sharp",zg=[le,ke];function Ra(t){return new Proxy(t,{get:function(n,r){return r in n?n[r]:n[le]}})}var pa=Ra((dl={},Re(dl,le,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit",fakd:"kit","fa-kit":"kit","fa-kit-duotone":"kit"}),Re(dl,ke,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"}),dl)),ma=Ra((hl={},Re(hl,le,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),Re(hl,ke,{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"}),hl)),ga=Ra((pl={},Re(pl,le,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),Re(pl,ke,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"}),pl)),SI=Ra((ml={},Re(ml,le,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),Re(ml,ke,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"}),ml)),OI=/fa(s|r|l|t|d|b|k|ss|sr|sl|st)?[\-\ ]/,Nw="fa-layers-text",CI=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,EI=Ra((gl={},Re(gl,le,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),Re(gl,ke,{900:"fass",400:"fasr",300:"fasl",100:"fast"}),gl)),Mw=[1,2,3,4,5,6,7,8,9,10],TI=Mw.concat([11,12,13,14,15,16,17,18,19,20]),NI=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ni={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},ya=new Set;Object.keys(ma[le]).map(ya.add.bind(ya));Object.keys(ma[ke]).map(ya.add.bind(ya));var MI=[].concat(zg,Aa(ya),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",ni.GROUP,ni.SWAP_OPACITY,ni.PRIMARY,ni.SECONDARY]).concat(Mw.map(function(t){return"".concat(t,"x")})).concat(TI.map(function(t){return"w-".concat(t)})),Rs=Mr.FontAwesomeConfig||{};function PI(t){var e=ue.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function AI(t){return t===""?!0:t==="false"?!1:t==="true"?!0:t}if(ue&&typeof ue.querySelector=="function"){var RI=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];RI.forEach(function(t){var e=Ig(t,2),n=e[0],r=e[1],i=AI(PI(n));i!=null&&(Rs[r]=i)})}var Pw={styleDefault:"solid",familyDefault:"classic",cssPrefix:Cw,replacementClass:Ew,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Rs.familyPrefix&&(Rs.cssPrefix=Rs.familyPrefix);var Do=_(_({},Pw),Rs);Do.autoReplaceSvg||(Do.observeMutations=!1);var F={};Object.keys(Pw).forEach(function(t){Object.defineProperty(F,t,{enumerable:!0,set:function(n){Do[t]=n,js.forEach(function(r){return r(F)})},get:function(){return Do[t]}})});Object.defineProperty(F,"familyPrefix",{enumerable:!0,set:function(e){Do.cssPrefix=e,js.forEach(function(n){return n(F)})},get:function(){return Do.cssPrefix}});Mr.FontAwesomeConfig=F;var js=[];function jI(t){return js.push(t),function(){js.splice(js.indexOf(t),1)}}var Vn=Bp,pn={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function II(t){if(!(!t||!$n)){var e=ue.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=ue.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return ue.head.insertBefore(e,r),t}}var DI="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function va(){for(var t=12,e="";t-- >0;)e+=DI[Math.random()*62|0];return e}function Ho(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function $g(t){return t.classList?Ho(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(e){return e})}function Aw(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function LI(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(Aw(t[n]),'" ')},"").trim()}function af(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")},"")}function Fg(t){return t.size!==pn.size||t.x!==pn.x||t.y!==pn.y||t.rotate!==pn.rotate||t.flipX||t.flipY}function _I(t){var e=t.transform,n=t.containerWidth,r=t.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(e.x*32,", ").concat(e.y*32,") "),s="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function zI(t){var e=t.transform,n=t.width,r=n===void 0?Bp:n,i=t.height,o=i===void 0?Bp:i,s=t.startCentered,a=s===void 0?!1:s,l="";return a&&Ow?l+="translate(".concat(e.x/Vn-r/2,"em, ").concat(e.y/Vn-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(e.x/Vn,"em), calc(-50% + ").concat(e.y/Vn,"em)) "):l+="translate(".concat(e.x/Vn,"em, ").concat(e.y/Vn,"em) "),l+="scale(".concat(e.size/Vn*(e.flipX?-1:1),", ").concat(e.size/Vn*(e.flipY?-1:1),") "),l+="rotate(".concat(e.rotate,"deg) "),l}var $I=`:root, :host {
|
||
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
|
||
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
|
||
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
|
||
--fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";
|
||
--fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
|
||
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
|
||
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
|
||
--fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";
|
||
--fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";
|
||
--fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
|
||
}
|
||
|
||
svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
||
overflow: visible;
|
||
box-sizing: content-box;
|
||
}
|
||
|
||
.svg-inline--fa {
|
||
display: var(--fa-display, inline-block);
|
||
height: 1em;
|
||
overflow: visible;
|
||
vertical-align: -0.125em;
|
||
}
|
||
.svg-inline--fa.fa-2xs {
|
||
vertical-align: 0.1em;
|
||
}
|
||
.svg-inline--fa.fa-xs {
|
||
vertical-align: 0em;
|
||
}
|
||
.svg-inline--fa.fa-sm {
|
||
vertical-align: -0.0714285705em;
|
||
}
|
||
.svg-inline--fa.fa-lg {
|
||
vertical-align: -0.2em;
|
||
}
|
||
.svg-inline--fa.fa-xl {
|
||
vertical-align: -0.25em;
|
||
}
|
||
.svg-inline--fa.fa-2xl {
|
||
vertical-align: -0.3125em;
|
||
}
|
||
.svg-inline--fa.fa-pull-left {
|
||
margin-right: var(--fa-pull-margin, 0.3em);
|
||
width: auto;
|
||
}
|
||
.svg-inline--fa.fa-pull-right {
|
||
margin-left: var(--fa-pull-margin, 0.3em);
|
||
width: auto;
|
||
}
|
||
.svg-inline--fa.fa-li {
|
||
width: var(--fa-li-width, 2em);
|
||
top: 0.25em;
|
||
}
|
||
.svg-inline--fa.fa-fw {
|
||
width: var(--fa-fw-width, 1.25em);
|
||
}
|
||
|
||
.fa-layers svg.svg-inline--fa {
|
||
bottom: 0;
|
||
left: 0;
|
||
margin: auto;
|
||
position: absolute;
|
||
right: 0;
|
||
top: 0;
|
||
}
|
||
|
||
.fa-layers-counter, .fa-layers-text {
|
||
display: inline-block;
|
||
position: absolute;
|
||
text-align: center;
|
||
}
|
||
|
||
.fa-layers {
|
||
display: inline-block;
|
||
height: 1em;
|
||
position: relative;
|
||
text-align: center;
|
||
vertical-align: -0.125em;
|
||
width: 1em;
|
||
}
|
||
.fa-layers svg.svg-inline--fa {
|
||
-webkit-transform-origin: center center;
|
||
transform-origin: center center;
|
||
}
|
||
|
||
.fa-layers-text {
|
||
left: 50%;
|
||
top: 50%;
|
||
-webkit-transform: translate(-50%, -50%);
|
||
transform: translate(-50%, -50%);
|
||
-webkit-transform-origin: center center;
|
||
transform-origin: center center;
|
||
}
|
||
|
||
.fa-layers-counter {
|
||
background-color: var(--fa-counter-background-color, #ff253a);
|
||
border-radius: var(--fa-counter-border-radius, 1em);
|
||
box-sizing: border-box;
|
||
color: var(--fa-inverse, #fff);
|
||
line-height: var(--fa-counter-line-height, 1);
|
||
max-width: var(--fa-counter-max-width, 5em);
|
||
min-width: var(--fa-counter-min-width, 1.5em);
|
||
overflow: hidden;
|
||
padding: var(--fa-counter-padding, 0.25em 0.5em);
|
||
right: var(--fa-right, 0);
|
||
text-overflow: ellipsis;
|
||
top: var(--fa-top, 0);
|
||
-webkit-transform: scale(var(--fa-counter-scale, 0.25));
|
||
transform: scale(var(--fa-counter-scale, 0.25));
|
||
-webkit-transform-origin: top right;
|
||
transform-origin: top right;
|
||
}
|
||
|
||
.fa-layers-bottom-right {
|
||
bottom: var(--fa-bottom, 0);
|
||
right: var(--fa-right, 0);
|
||
top: auto;
|
||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||
transform: scale(var(--fa-layers-scale, 0.25));
|
||
-webkit-transform-origin: bottom right;
|
||
transform-origin: bottom right;
|
||
}
|
||
|
||
.fa-layers-bottom-left {
|
||
bottom: var(--fa-bottom, 0);
|
||
left: var(--fa-left, 0);
|
||
right: auto;
|
||
top: auto;
|
||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||
transform: scale(var(--fa-layers-scale, 0.25));
|
||
-webkit-transform-origin: bottom left;
|
||
transform-origin: bottom left;
|
||
}
|
||
|
||
.fa-layers-top-right {
|
||
top: var(--fa-top, 0);
|
||
right: var(--fa-right, 0);
|
||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||
transform: scale(var(--fa-layers-scale, 0.25));
|
||
-webkit-transform-origin: top right;
|
||
transform-origin: top right;
|
||
}
|
||
|
||
.fa-layers-top-left {
|
||
left: var(--fa-left, 0);
|
||
right: auto;
|
||
top: var(--fa-top, 0);
|
||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||
transform: scale(var(--fa-layers-scale, 0.25));
|
||
-webkit-transform-origin: top left;
|
||
transform-origin: top left;
|
||
}
|
||
|
||
.fa-1x {
|
||
font-size: 1em;
|
||
}
|
||
|
||
.fa-2x {
|
||
font-size: 2em;
|
||
}
|
||
|
||
.fa-3x {
|
||
font-size: 3em;
|
||
}
|
||
|
||
.fa-4x {
|
||
font-size: 4em;
|
||
}
|
||
|
||
.fa-5x {
|
||
font-size: 5em;
|
||
}
|
||
|
||
.fa-6x {
|
||
font-size: 6em;
|
||
}
|
||
|
||
.fa-7x {
|
||
font-size: 7em;
|
||
}
|
||
|
||
.fa-8x {
|
||
font-size: 8em;
|
||
}
|
||
|
||
.fa-9x {
|
||
font-size: 9em;
|
||
}
|
||
|
||
.fa-10x {
|
||
font-size: 10em;
|
||
}
|
||
|
||
.fa-2xs {
|
||
font-size: 0.625em;
|
||
line-height: 0.1em;
|
||
vertical-align: 0.225em;
|
||
}
|
||
|
||
.fa-xs {
|
||
font-size: 0.75em;
|
||
line-height: 0.0833333337em;
|
||
vertical-align: 0.125em;
|
||
}
|
||
|
||
.fa-sm {
|
||
font-size: 0.875em;
|
||
line-height: 0.0714285718em;
|
||
vertical-align: 0.0535714295em;
|
||
}
|
||
|
||
.fa-lg {
|
||
font-size: 1.25em;
|
||
line-height: 0.05em;
|
||
vertical-align: -0.075em;
|
||
}
|
||
|
||
.fa-xl {
|
||
font-size: 1.5em;
|
||
line-height: 0.0416666682em;
|
||
vertical-align: -0.125em;
|
||
}
|
||
|
||
.fa-2xl {
|
||
font-size: 2em;
|
||
line-height: 0.03125em;
|
||
vertical-align: -0.1875em;
|
||
}
|
||
|
||
.fa-fw {
|
||
text-align: center;
|
||
width: 1.25em;
|
||
}
|
||
|
||
.fa-ul {
|
||
list-style-type: none;
|
||
margin-left: var(--fa-li-margin, 2.5em);
|
||
padding-left: 0;
|
||
}
|
||
.fa-ul > li {
|
||
position: relative;
|
||
}
|
||
|
||
.fa-li {
|
||
left: calc(var(--fa-li-width, 2em) * -1);
|
||
position: absolute;
|
||
text-align: center;
|
||
width: var(--fa-li-width, 2em);
|
||
line-height: inherit;
|
||
}
|
||
|
||
.fa-border {
|
||
border-color: var(--fa-border-color, #eee);
|
||
border-radius: var(--fa-border-radius, 0.1em);
|
||
border-style: var(--fa-border-style, solid);
|
||
border-width: var(--fa-border-width, 0.08em);
|
||
padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
|
||
}
|
||
|
||
.fa-pull-left {
|
||
float: left;
|
||
margin-right: var(--fa-pull-margin, 0.3em);
|
||
}
|
||
|
||
.fa-pull-right {
|
||
float: right;
|
||
margin-left: var(--fa-pull-margin, 0.3em);
|
||
}
|
||
|
||
.fa-beat {
|
||
-webkit-animation-name: fa-beat;
|
||
animation-name: fa-beat;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||
}
|
||
|
||
.fa-bounce {
|
||
-webkit-animation-name: fa-bounce;
|
||
animation-name: fa-bounce;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
||
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
||
}
|
||
|
||
.fa-fade {
|
||
-webkit-animation-name: fa-fade;
|
||
animation-name: fa-fade;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||
}
|
||
|
||
.fa-beat-fade {
|
||
-webkit-animation-name: fa-beat-fade;
|
||
animation-name: fa-beat-fade;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||
}
|
||
|
||
.fa-flip {
|
||
-webkit-animation-name: fa-flip;
|
||
animation-name: fa-flip;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||
}
|
||
|
||
.fa-shake {
|
||
-webkit-animation-name: fa-shake;
|
||
animation-name: fa-shake;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
||
animation-timing-function: var(--fa-animation-timing, linear);
|
||
}
|
||
|
||
.fa-spin {
|
||
-webkit-animation-name: fa-spin;
|
||
animation-name: fa-spin;
|
||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||
animation-delay: var(--fa-animation-delay, 0s);
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 2s);
|
||
animation-duration: var(--fa-animation-duration, 2s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
||
animation-timing-function: var(--fa-animation-timing, linear);
|
||
}
|
||
|
||
.fa-spin-reverse {
|
||
--fa-animation-direction: reverse;
|
||
}
|
||
|
||
.fa-pulse,
|
||
.fa-spin-pulse {
|
||
-webkit-animation-name: fa-spin;
|
||
animation-name: fa-spin;
|
||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||
animation-direction: var(--fa-animation-direction, normal);
|
||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||
animation-duration: var(--fa-animation-duration, 1s);
|
||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||
-webkit-animation-timing-function: var(--fa-animation-timing, steps(8));
|
||
animation-timing-function: var(--fa-animation-timing, steps(8));
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.fa-beat,
|
||
.fa-bounce,
|
||
.fa-fade,
|
||
.fa-beat-fade,
|
||
.fa-flip,
|
||
.fa-pulse,
|
||
.fa-shake,
|
||
.fa-spin,
|
||
.fa-spin-pulse {
|
||
-webkit-animation-delay: -1ms;
|
||
animation-delay: -1ms;
|
||
-webkit-animation-duration: 1ms;
|
||
animation-duration: 1ms;
|
||
-webkit-animation-iteration-count: 1;
|
||
animation-iteration-count: 1;
|
||
-webkit-transition-delay: 0s;
|
||
transition-delay: 0s;
|
||
-webkit-transition-duration: 0s;
|
||
transition-duration: 0s;
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-beat {
|
||
0%, 90% {
|
||
-webkit-transform: scale(1);
|
||
transform: scale(1);
|
||
}
|
||
45% {
|
||
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
||
transform: scale(var(--fa-beat-scale, 1.25));
|
||
}
|
||
}
|
||
@keyframes fa-beat {
|
||
0%, 90% {
|
||
-webkit-transform: scale(1);
|
||
transform: scale(1);
|
||
}
|
||
45% {
|
||
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
||
transform: scale(var(--fa-beat-scale, 1.25));
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-bounce {
|
||
0% {
|
||
-webkit-transform: scale(1, 1) translateY(0);
|
||
transform: scale(1, 1) translateY(0);
|
||
}
|
||
10% {
|
||
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||
}
|
||
30% {
|
||
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||
}
|
||
50% {
|
||
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||
}
|
||
57% {
|
||
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||
}
|
||
64% {
|
||
-webkit-transform: scale(1, 1) translateY(0);
|
||
transform: scale(1, 1) translateY(0);
|
||
}
|
||
100% {
|
||
-webkit-transform: scale(1, 1) translateY(0);
|
||
transform: scale(1, 1) translateY(0);
|
||
}
|
||
}
|
||
@keyframes fa-bounce {
|
||
0% {
|
||
-webkit-transform: scale(1, 1) translateY(0);
|
||
transform: scale(1, 1) translateY(0);
|
||
}
|
||
10% {
|
||
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||
}
|
||
30% {
|
||
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||
}
|
||
50% {
|
||
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||
}
|
||
57% {
|
||
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||
}
|
||
64% {
|
||
-webkit-transform: scale(1, 1) translateY(0);
|
||
transform: scale(1, 1) translateY(0);
|
||
}
|
||
100% {
|
||
-webkit-transform: scale(1, 1) translateY(0);
|
||
transform: scale(1, 1) translateY(0);
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-fade {
|
||
50% {
|
||
opacity: var(--fa-fade-opacity, 0.4);
|
||
}
|
||
}
|
||
@keyframes fa-fade {
|
||
50% {
|
||
opacity: var(--fa-fade-opacity, 0.4);
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-beat-fade {
|
||
0%, 100% {
|
||
opacity: var(--fa-beat-fade-opacity, 0.4);
|
||
-webkit-transform: scale(1);
|
||
transform: scale(1);
|
||
}
|
||
50% {
|
||
opacity: 1;
|
||
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||
}
|
||
}
|
||
@keyframes fa-beat-fade {
|
||
0%, 100% {
|
||
opacity: var(--fa-beat-fade-opacity, 0.4);
|
||
-webkit-transform: scale(1);
|
||
transform: scale(1);
|
||
}
|
||
50% {
|
||
opacity: 1;
|
||
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-flip {
|
||
50% {
|
||
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||
}
|
||
}
|
||
@keyframes fa-flip {
|
||
50% {
|
||
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-shake {
|
||
0% {
|
||
-webkit-transform: rotate(-15deg);
|
||
transform: rotate(-15deg);
|
||
}
|
||
4% {
|
||
-webkit-transform: rotate(15deg);
|
||
transform: rotate(15deg);
|
||
}
|
||
8%, 24% {
|
||
-webkit-transform: rotate(-18deg);
|
||
transform: rotate(-18deg);
|
||
}
|
||
12%, 28% {
|
||
-webkit-transform: rotate(18deg);
|
||
transform: rotate(18deg);
|
||
}
|
||
16% {
|
||
-webkit-transform: rotate(-22deg);
|
||
transform: rotate(-22deg);
|
||
}
|
||
20% {
|
||
-webkit-transform: rotate(22deg);
|
||
transform: rotate(22deg);
|
||
}
|
||
32% {
|
||
-webkit-transform: rotate(-12deg);
|
||
transform: rotate(-12deg);
|
||
}
|
||
36% {
|
||
-webkit-transform: rotate(12deg);
|
||
transform: rotate(12deg);
|
||
}
|
||
40%, 100% {
|
||
-webkit-transform: rotate(0deg);
|
||
transform: rotate(0deg);
|
||
}
|
||
}
|
||
@keyframes fa-shake {
|
||
0% {
|
||
-webkit-transform: rotate(-15deg);
|
||
transform: rotate(-15deg);
|
||
}
|
||
4% {
|
||
-webkit-transform: rotate(15deg);
|
||
transform: rotate(15deg);
|
||
}
|
||
8%, 24% {
|
||
-webkit-transform: rotate(-18deg);
|
||
transform: rotate(-18deg);
|
||
}
|
||
12%, 28% {
|
||
-webkit-transform: rotate(18deg);
|
||
transform: rotate(18deg);
|
||
}
|
||
16% {
|
||
-webkit-transform: rotate(-22deg);
|
||
transform: rotate(-22deg);
|
||
}
|
||
20% {
|
||
-webkit-transform: rotate(22deg);
|
||
transform: rotate(22deg);
|
||
}
|
||
32% {
|
||
-webkit-transform: rotate(-12deg);
|
||
transform: rotate(-12deg);
|
||
}
|
||
36% {
|
||
-webkit-transform: rotate(12deg);
|
||
transform: rotate(12deg);
|
||
}
|
||
40%, 100% {
|
||
-webkit-transform: rotate(0deg);
|
||
transform: rotate(0deg);
|
||
}
|
||
}
|
||
@-webkit-keyframes fa-spin {
|
||
0% {
|
||
-webkit-transform: rotate(0deg);
|
||
transform: rotate(0deg);
|
||
}
|
||
100% {
|
||
-webkit-transform: rotate(360deg);
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
@keyframes fa-spin {
|
||
0% {
|
||
-webkit-transform: rotate(0deg);
|
||
transform: rotate(0deg);
|
||
}
|
||
100% {
|
||
-webkit-transform: rotate(360deg);
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
.fa-rotate-90 {
|
||
-webkit-transform: rotate(90deg);
|
||
transform: rotate(90deg);
|
||
}
|
||
|
||
.fa-rotate-180 {
|
||
-webkit-transform: rotate(180deg);
|
||
transform: rotate(180deg);
|
||
}
|
||
|
||
.fa-rotate-270 {
|
||
-webkit-transform: rotate(270deg);
|
||
transform: rotate(270deg);
|
||
}
|
||
|
||
.fa-flip-horizontal {
|
||
-webkit-transform: scale(-1, 1);
|
||
transform: scale(-1, 1);
|
||
}
|
||
|
||
.fa-flip-vertical {
|
||
-webkit-transform: scale(1, -1);
|
||
transform: scale(1, -1);
|
||
}
|
||
|
||
.fa-flip-both,
|
||
.fa-flip-horizontal.fa-flip-vertical {
|
||
-webkit-transform: scale(-1, -1);
|
||
transform: scale(-1, -1);
|
||
}
|
||
|
||
.fa-rotate-by {
|
||
-webkit-transform: rotate(var(--fa-rotate-angle, 0));
|
||
transform: rotate(var(--fa-rotate-angle, 0));
|
||
}
|
||
|
||
.fa-stack {
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
height: 2em;
|
||
position: relative;
|
||
width: 2.5em;
|
||
}
|
||
|
||
.fa-stack-1x,
|
||
.fa-stack-2x {
|
||
bottom: 0;
|
||
left: 0;
|
||
margin: auto;
|
||
position: absolute;
|
||
right: 0;
|
||
top: 0;
|
||
z-index: var(--fa-stack-z-index, auto);
|
||
}
|
||
|
||
.svg-inline--fa.fa-stack-1x {
|
||
height: 1em;
|
||
width: 1.25em;
|
||
}
|
||
.svg-inline--fa.fa-stack-2x {
|
||
height: 2em;
|
||
width: 2.5em;
|
||
}
|
||
|
||
.fa-inverse {
|
||
color: var(--fa-inverse, #fff);
|
||
}
|
||
|
||
.sr-only,
|
||
.fa-sr-only {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
padding: 0;
|
||
margin: -1px;
|
||
overflow: hidden;
|
||
clip: rect(0, 0, 0, 0);
|
||
white-space: nowrap;
|
||
border-width: 0;
|
||
}
|
||
|
||
.sr-only-focusable:not(:focus),
|
||
.fa-sr-only-focusable:not(:focus) {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
padding: 0;
|
||
margin: -1px;
|
||
overflow: hidden;
|
||
clip: rect(0, 0, 0, 0);
|
||
white-space: nowrap;
|
||
border-width: 0;
|
||
}
|
||
|
||
.svg-inline--fa .fa-primary {
|
||
fill: var(--fa-primary-color, currentColor);
|
||
opacity: var(--fa-primary-opacity, 1);
|
||
}
|
||
|
||
.svg-inline--fa .fa-secondary {
|
||
fill: var(--fa-secondary-color, currentColor);
|
||
opacity: var(--fa-secondary-opacity, 0.4);
|
||
}
|
||
|
||
.svg-inline--fa.fa-swap-opacity .fa-primary {
|
||
opacity: var(--fa-secondary-opacity, 0.4);
|
||
}
|
||
|
||
.svg-inline--fa.fa-swap-opacity .fa-secondary {
|
||
opacity: var(--fa-primary-opacity, 1);
|
||
}
|
||
|
||
.svg-inline--fa mask .fa-primary,
|
||
.svg-inline--fa mask .fa-secondary {
|
||
fill: black;
|
||
}
|
||
|
||
.fad.fa-inverse,
|
||
.fa-duotone.fa-inverse {
|
||
color: var(--fa-inverse, #fff);
|
||
}`;function Rw(){var t=Cw,e=Ew,n=F.cssPrefix,r=F.replacementClass,i=$I;if(n!==t||r!==e){var o=new RegExp("\\.".concat(t,"\\-"),"g"),s=new RegExp("\\--".concat(t,"\\-"),"g"),a=new RegExp("\\.".concat(e),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var uv=!1;function kd(){F.autoAddCss&&!uv&&(II(Rw()),uv=!0)}var FI={mixout:function(){return{dom:{css:Rw,insertCss:kd}}},hooks:function(){return{beforeDOMElementCreation:function(){kd()},beforeI2svg:function(){kd()}}}},Ln=Mr||{};Ln[Dn]||(Ln[Dn]={});Ln[Dn].styles||(Ln[Dn].styles={});Ln[Dn].hooks||(Ln[Dn].hooks={});Ln[Dn].shims||(Ln[Dn].shims=[]);var Gt=Ln[Dn],jw=[],BI=function t(){ue.removeEventListener("DOMContentLoaded",t),gu=1,jw.map(function(e){return e()})},gu=!1;$n&&(gu=(ue.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(ue.readyState),gu||ue.addEventListener("DOMContentLoaded",BI));function HI(t){$n&&(gu?setTimeout(t,0):jw.push(t))}function ja(t){var e=t.tag,n=t.attributes,r=n===void 0?{}:n,i=t.children,o=i===void 0?[]:i;return typeof t=="string"?Aw(t):"<".concat(e," ").concat(LI(r),">").concat(o.map(ja).join(""),"</").concat(e,">")}function fv(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}var UI=function(e,n){return function(r,i,o,s){return e.call(n,r,i,o,s)}},wd=function(e,n,r,i){var o=Object.keys(e),s=o.length,a=i!==void 0?UI(n,i):n,l,c,u;for(r===void 0?(l=1,u=e[o[0]]):(l=0,u=r);l<s;l++)c=o[l],u=a(u,e[c],c,e);return u};function VI(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);(o&64512)==56320?e.push(((i&1023)<<10)+(o&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}function Up(t){var e=VI(t);return e.length===1?e[0].toString(16):null}function WI(t,e){var n=t.length,r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&n>e+1&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function dv(t){return Object.keys(t).reduce(function(e,n){var r=t[n],i=!!r.icon;return i?e[r.iconName]=r.icon:e[n]=r,e},{})}function Vp(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=dv(e);typeof Gt.hooks.addPack=="function"&&!i?Gt.hooks.addPack(t,dv(e)):Gt.styles[t]=_(_({},Gt.styles[t]||{}),o),t==="fas"&&Vp("fa",e)}var yl,vl,bl,io=Gt.styles,KI=Gt.shims,JI=(yl={},Re(yl,le,Object.values(ga[le])),Re(yl,ke,Object.values(ga[ke])),yl),Bg=null,Iw={},Dw={},Lw={},_w={},zw={},qI=(vl={},Re(vl,le,Object.keys(pa[le])),Re(vl,ke,Object.keys(pa[ke])),vl);function GI(t){return~MI.indexOf(t)}function YI(t,e){var n=e.split("-"),r=n[0],i=n.slice(1).join("-");return r===t&&i!==""&&!GI(i)?i:null}var $w=function(){var e=function(o){return wd(io,function(s,a,l){return s[l]=wd(a,o,{}),s},{})};Iw=e(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),Dw=e(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),zw=e(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in io||F.autoFetchSvg,r=wd(KI,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});Lw=r.names,_w=r.unicodes,Bg=lf(F.styleDefault,{family:F.familyDefault})};jI(function(t){Bg=lf(t.styleDefault,{family:F.familyDefault})});$w();function Hg(t,e){return(Iw[t]||{})[e]}function QI(t,e){return(Dw[t]||{})[e]}function ri(t,e){return(zw[t]||{})[e]}function Fw(t){return Lw[t]||{prefix:null,iconName:null}}function XI(t){var e=_w[t],n=Hg("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Pr(){return Bg}var Ug=function(){return{prefix:null,iconName:null,rest:[]}};function lf(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.family,r=n===void 0?le:n,i=pa[r][t],o=ma[r][t]||ma[r][i],s=t in Gt.styles?t:null;return o||s||null}var hv=(bl={},Re(bl,le,Object.keys(ga[le])),Re(bl,ke,Object.keys(ga[ke])),bl);function cf(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(e={},Re(e,le,"".concat(F.cssPrefix,"-").concat(le)),Re(e,ke,"".concat(F.cssPrefix,"-").concat(ke)),e),s=null,a=le;(t.includes(o[le])||t.some(function(c){return hv[le].includes(c)}))&&(a=le),(t.includes(o[ke])||t.some(function(c){return hv[ke].includes(c)}))&&(a=ke);var l=t.reduce(function(c,u){var f=YI(F.cssPrefix,u);if(io[u]?(u=JI[a].includes(u)?SI[a][u]:u,s=u,c.prefix=u):qI[a].indexOf(u)>-1?(s=u,c.prefix=lf(u,{family:a})):f?c.iconName=f:u!==F.replacementClass&&u!==o[le]&&u!==o[ke]&&c.rest.push(u),!i&&c.prefix&&c.iconName){var d=s==="fa"?Fw(c.iconName):{},h=ri(c.prefix,c.iconName);d.prefix&&(s=null),c.iconName=d.iconName||h||c.iconName,c.prefix=d.prefix||c.prefix,c.prefix==="far"&&!io.far&&io.fas&&!F.autoFetchSvg&&(c.prefix="fas")}return c},Ug());return(t.includes("fa-brands")||t.includes("fab"))&&(l.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===ke&&(io.fass||F.autoFetchSvg)&&(l.prefix="fass",l.iconName=ri(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=Pr()||"fas"),l}var ZI=function(){function t(){fI(this,t),this.definitions={}}return dI(t,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i.reduce(this._pullDefinitions,{});Object.keys(s).forEach(function(a){n.definitions[a]=_(_({},n.definitions[a]||{}),s[a]),Vp(a,s[a]);var l=ga[le][a];l&&Vp(l,s[a]),$w()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(o){var s=i[o],a=s.prefix,l=s.iconName,c=s.icon,u=c[2];n[a]||(n[a]={}),u.length>0&&u.forEach(function(f){typeof f=="string"&&(n[a][f]=c)}),n[a][l]=c}),n}}]),t}(),pv=[],oo={},vo={},eD=Object.keys(vo);function tD(t,e){var n=e.mixoutsTo;return pv=t,oo={},Object.keys(vo).forEach(function(r){eD.indexOf(r)===-1&&delete vo[r]}),pv.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),mu(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){oo[s]||(oo[s]=[]),oo[s].push(o[s])})}r.provides&&r.provides(vo)}),n}function Wp(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=oo[t]||[];return o.forEach(function(s){e=s.apply(null,[e].concat(r))}),e}function wi(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=oo[t]||[];i.forEach(function(o){o.apply(null,n)})}function _n(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return vo[t]?vo[t].apply(null,e):void 0}function Kp(t){t.prefix==="fa"&&(t.prefix="fas");var e=t.iconName,n=t.prefix||Pr();if(e)return e=ri(n,e)||e,fv(Bw.definitions,n,e)||fv(Gt.styles,n,e)}var Bw=new ZI,nD=function(){F.autoReplaceSvg=!1,F.observeMutations=!1,wi("noAuto")},rD={i2svg:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return $n?(wi("beforeI2svg",e),_n("pseudoElements2svg",e),_n("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot;F.autoReplaceSvg===!1&&(F.autoReplaceSvg=!0),F.observeMutations=!0,HI(function(){oD({autoReplaceSvgRoot:n}),wi("watch",e)})}},iD={icon:function(e){if(e===null)return null;if(mu(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:ri(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var n=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=lf(e[0]);return{prefix:r,iconName:ri(r,n)||n}}if(typeof e=="string"&&(e.indexOf("".concat(F.cssPrefix,"-"))>-1||e.match(OI))){var i=cf(e.split(" "),{skipLookups:!0});return{prefix:i.prefix||Pr(),iconName:ri(i.prefix,i.iconName)||i.iconName}}if(typeof e=="string"){var o=Pr();return{prefix:o,iconName:ri(o,e)||e}}}},Nt={noAuto:nD,config:F,dom:rD,parse:iD,library:Bw,findIconDefinition:Kp,toHtml:ja},oD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot,r=n===void 0?ue:n;(Object.keys(Gt.styles).length>0||F.autoFetchSvg)&&$n&&F.autoReplaceSvg&&Nt.dom.i2svg({node:r})};function uf(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(r){return ja(r)})}}),Object.defineProperty(t,"node",{get:function(){if($n){var r=ue.createElement("div");return r.innerHTML=t.html,r.children}}}),t}function sD(t){var e=t.children,n=t.main,r=t.mask,i=t.attributes,o=t.styles,s=t.transform;if(Fg(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=af(_(_({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}function aD(t){var e=t.prefix,n=t.iconName,r=t.children,i=t.attributes,o=t.symbol,s=o===!0?"".concat(e,"-").concat(F.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:_(_({},i),{},{id:s}),children:r}]}]}function Vg(t){var e=t.icons,n=e.main,r=e.mask,i=t.prefix,o=t.iconName,s=t.transform,a=t.symbol,l=t.title,c=t.maskId,u=t.titleId,f=t.extra,d=t.watchable,h=d===void 0?!1:d,p=r.found?r:n,m=p.width,v=p.height,g=i==="fak",y=[F.replacementClass,o?"".concat(F.cssPrefix,"-").concat(o):""].filter(function(L){return f.classes.indexOf(L)===-1}).filter(function(L){return L!==""||!!L}).concat(f.classes).join(" "),k={children:[],attributes:_(_({},f.attributes),{},{"data-prefix":i,"data-icon":o,class:y,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(v)})},w=g&&!~f.classes.indexOf("fa-fw")?{width:"".concat(m/v*16*.0625,"em")}:{};h&&(k.attributes[ki]=""),l&&(k.children.push({tag:"title",attributes:{id:k.attributes["aria-labelledby"]||"title-".concat(u||va())},children:[l]}),delete k.attributes.title);var O=_(_({},k),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:_(_({},w),f.styles)}),C=r.found&&n.found?_n("generateAbstractMask",O)||{children:[],attributes:{}}:_n("generateAbstractIcon",O)||{children:[],attributes:{}},T=C.children,j=C.attributes;return O.children=T,O.attributes=j,a?aD(O):sD(O)}function mv(t){var e=t.content,n=t.width,r=t.height,i=t.transform,o=t.title,s=t.extra,a=t.watchable,l=a===void 0?!1:a,c=_(_(_({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[ki]="");var u=_({},s.styles);Fg(i)&&(u.transform=zI({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=af(u);f.length>0&&(c.style=f);var d=[];return d.push({tag:"span",attributes:c,children:[e]}),o&&d.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),d}function lD(t){var e=t.content,n=t.title,r=t.extra,i=_(_(_({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=af(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[e]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var Sd=Gt.styles;function Jp(t){var e=t[0],n=t[1],r=t.slice(4),i=Ig(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(F.cssPrefix,"-").concat(ni.GROUP)},children:[{tag:"path",attributes:{class:"".concat(F.cssPrefix,"-").concat(ni.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(F.cssPrefix,"-").concat(ni.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:e,height:n,icon:s}}var cD={found:!1,width:512,height:512};function uD(t,e){!Tw&&!F.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function qp(t,e){var n=e;return e==="fa"&&F.styleDefault!==null&&(e=Pr()),new Promise(function(r,i){if(_n("missingIconAbstract"),n==="fa"){var o=Fw(t)||{};t=o.iconName||t,e=o.prefix||e}if(t&&e&&Sd[e]&&Sd[e][t]){var s=Sd[e][t];return r(Jp(s))}uD(t,e),r(_(_({},cD),{},{icon:F.showMissingIcons&&t?_n("missingIconAbstract")||{}:{}}))})}var gv=function(){},Gp=F.measurePerformance&&fl&&fl.mark&&fl.measure?fl:{mark:gv,measure:gv},hs='FA "6.5.2"',fD=function(e){return Gp.mark("".concat(hs," ").concat(e," begins")),function(){return Hw(e)}},Hw=function(e){Gp.mark("".concat(hs," ").concat(e," ends")),Gp.measure("".concat(hs," ").concat(e),"".concat(hs," ").concat(e," begins"),"".concat(hs," ").concat(e," ends"))},Wg={begin:fD,end:Hw},_l=function(){};function yv(t){var e=t.getAttribute?t.getAttribute(ki):null;return typeof e=="string"}function dD(t){var e=t.getAttribute?t.getAttribute(Lg):null,n=t.getAttribute?t.getAttribute(_g):null;return e&&n}function hD(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(F.replacementClass)}function pD(){if(F.autoReplaceSvg===!0)return zl.replace;var t=zl[F.autoReplaceSvg];return t||zl.replace}function mD(t){return ue.createElementNS("http://www.w3.org/2000/svg",t)}function gD(t){return ue.createElement(t)}function Uw(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.ceFn,r=n===void 0?t.tag==="svg"?mD:gD:n;if(typeof t=="string")return ue.createTextNode(t);var i=r(t.tag);Object.keys(t.attributes||[]).forEach(function(s){i.setAttribute(s,t.attributes[s])});var o=t.children||[];return o.forEach(function(s){i.appendChild(Uw(s,{ceFn:r}))}),i}function yD(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var zl={replace:function(e){var n=e[0];if(n.parentNode)if(e[1].forEach(function(i){n.parentNode.insertBefore(Uw(i),n)}),n.getAttribute(ki)===null&&F.keepOriginalSource){var r=ue.createComment(yD(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(e){var n=e[0],r=e[1];if(~$g(n).indexOf(F.replacementClass))return zl.replace(e);var i=new RegExp("".concat(F.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===F.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return ja(a)}).join(`
|
||
`);n.setAttribute(ki,""),n.innerHTML=s}};function vv(t){t()}function Vw(t,e){var n=typeof e=="function"?e:_l;if(t.length===0)n();else{var r=vv;F.mutateApproach===kI&&(r=Mr.requestAnimationFrame||vv),r(function(){var i=pD(),o=Wg.begin("mutate");t.map(i),o(),n()})}}var Kg=!1;function Ww(){Kg=!0}function Yp(){Kg=!1}var yu=null;function bv(t){if(lv&&F.observeMutations){var e=t.treeCallback,n=e===void 0?_l:e,r=t.nodeCallback,i=r===void 0?_l:r,o=t.pseudoElementsCallback,s=o===void 0?_l:o,a=t.observeMutationsRoot,l=a===void 0?ue:a;yu=new lv(function(c){if(!Kg){var u=Pr();Ho(c).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!yv(f.addedNodes[0])&&(F.searchPseudoElements&&s(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&F.searchPseudoElements&&s(f.target.parentNode),f.type==="attributes"&&yv(f.target)&&~NI.indexOf(f.attributeName))if(f.attributeName==="class"&&dD(f.target)){var d=cf($g(f.target)),h=d.prefix,p=d.iconName;f.target.setAttribute(Lg,h||u),p&&f.target.setAttribute(_g,p)}else hD(f.target)&&i(f.target)})}}),$n&&yu.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function vD(){yu&&yu.disconnect()}function bD(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function xD(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),r=t.innerText!==void 0?t.innerText.trim():"",i=cf($g(t));return i.prefix||(i.prefix=Pr()),e&&n&&(i.prefix=e,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=QI(i.prefix,t.innerText)||Hg(i.prefix,Up(t.innerText))),!i.iconName&&F.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=t.firstChild.data)),i}function kD(t){var e=Ho(t.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=t.getAttribute("title"),r=t.getAttribute("data-fa-title-id");return F.autoA11y&&(n?e["aria-labelledby"]="".concat(F.replacementClass,"-title-").concat(r||va()):(e["aria-hidden"]="true",e.focusable="false")),e}function wD(){return{iconName:null,title:null,titleId:null,prefix:null,transform:pn,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function xv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=xD(t),r=n.iconName,i=n.prefix,o=n.rest,s=kD(t),a=Wp("parseNodeAttributes",{},t),l=e.styleParser?bD(t):[];return _({iconName:r,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:i,transform:pn,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var SD=Gt.styles;function Kw(t){var e=F.autoReplaceSvg==="nest"?xv(t,{styleParser:!1}):xv(t);return~e.extra.classes.indexOf(Nw)?_n("generateLayersText",t,e):_n("generateSvgReplacementMutation",t,e)}var Ar=new Set;zg.map(function(t){Ar.add("fa-".concat(t))});Object.keys(pa[le]).map(Ar.add.bind(Ar));Object.keys(pa[ke]).map(Ar.add.bind(Ar));Ar=Aa(Ar);function kv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!$n)return Promise.resolve();var n=ue.documentElement.classList,r=function(f){return n.add("".concat(cv,"-").concat(f))},i=function(f){return n.remove("".concat(cv,"-").concat(f))},o=F.autoFetchSvg?Ar:zg.map(function(u){return"fa-".concat(u)}).concat(Object.keys(SD));o.includes("fa")||o.push("fa");var s=[".".concat(Nw,":not([").concat(ki,"])")].concat(o.map(function(u){return".".concat(u,":not([").concat(ki,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=Ho(t.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=Wg.begin("onTree"),c=a.reduce(function(u,f){try{var d=Kw(f);d&&u.push(d)}catch(h){Tw||h.name==="MissingIcon"&&console.error(h)}return u},[]);return new Promise(function(u,f){Promise.all(c).then(function(d){Vw(d,function(){r("active"),r("complete"),i("pending"),typeof e=="function"&&e(),l(),u()})}).catch(function(d){l(),f(d)})})}function OD(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Kw(t).then(function(n){n&&Vw([n],e)})}function CD(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:Kp(e||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Kp(i||{})),t(r,_(_({},n),{},{mask:i}))}}var ED=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?pn:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,u=c===void 0?null:c,f=n.title,d=f===void 0?null:f,h=n.titleId,p=h===void 0?null:h,m=n.classes,v=m===void 0?[]:m,g=n.attributes,y=g===void 0?{}:g,k=n.styles,w=k===void 0?{}:k;if(e){var O=e.prefix,C=e.iconName,T=e.icon;return uf(_({type:"icon"},e),function(){return wi("beforeDOMElementCreation",{iconDefinition:e,params:n}),F.autoA11y&&(d?y["aria-labelledby"]="".concat(F.replacementClass,"-title-").concat(p||va()):(y["aria-hidden"]="true",y.focusable="false")),Vg({icons:{main:Jp(T),mask:l?Jp(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:O,iconName:C,transform:_(_({},pn),i),symbol:s,title:d,maskId:u,titleId:p,extra:{attributes:y,styles:w,classes:v}})})}},TD={mixout:function(){return{icon:CD(ED)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=kv,n.nodeCallback=OD,n}}},provides:function(e){e.i2svg=function(n){var r=n.node,i=r===void 0?ue:r,o=n.callback,s=o===void 0?function(){}:o;return kv(i,s)},e.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,u=r.mask,f=r.maskId,d=r.extra;return new Promise(function(h,p){Promise.all([qp(i,a),u.iconName?qp(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(m){var v=Ig(m,2),g=v[0],y=v[1];h([n,Vg({icons:{main:g,mask:y},prefix:a,iconName:i,transform:l,symbol:c,maskId:f,title:o,titleId:s,extra:d,watchable:!0})])}).catch(p)})},e.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=af(a);l.length>0&&(i.style=l);var c;return Fg(s)&&(c=_n("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},ND={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return uf({type:"layer"},function(){wi("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(F.cssPrefix,"-layers")].concat(Aa(o)).join(" ")},children:s}]})}}}},MD={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,u=r.styles,f=u===void 0?{}:u;return uf({type:"counter",content:n},function(){return wi("beforeDOMElementCreation",{content:n,params:r}),lD({content:n.toString(),title:o,extra:{attributes:c,styles:f,classes:["".concat(F.cssPrefix,"-layers-counter")].concat(Aa(a))}})})}}}},PD={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?pn:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,u=r.attributes,f=u===void 0?{}:u,d=r.styles,h=d===void 0?{}:d;return uf({type:"text",content:n},function(){return wi("beforeDOMElementCreation",{content:n,params:r}),mv({content:n,transform:_(_({},pn),o),title:a,extra:{attributes:f,styles:h,classes:["".concat(F.cssPrefix,"-layers-text")].concat(Aa(c))}})})}}},provides:function(e){e.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(Ow){var c=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();a=u.width/c,l=u.height/c}return F.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,mv({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},AD=new RegExp('"',"ug"),wv=[1105920,1112319];function RD(t){var e=t.replace(AD,""),n=WI(e,0),r=n>=wv[0]&&n<=wv[1],i=e.length===2?e[0]===e[1]:!1;return{value:Up(i?e[0]:e),isSecondary:r||i}}function Sv(t,e){var n="".concat(xI).concat(e.replace(":","-"));return new Promise(function(r,i){if(t.getAttribute(n)!==null)return r();var o=Ho(t.children),s=o.filter(function(T){return T.getAttribute(Hp)===e})[0],a=Mr.getComputedStyle(t,e),l=a.getPropertyValue("font-family").match(CI),c=a.getPropertyValue("font-weight"),u=a.getPropertyValue("content");if(s&&!l)return t.removeChild(s),r();if(l&&u!=="none"&&u!==""){var f=a.getPropertyValue("content"),d=~["Sharp"].indexOf(l[2])?ke:le,h=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?ma[d][l[2].toLowerCase()]:EI[d][c],p=RD(f),m=p.value,v=p.isSecondary,g=l[0].startsWith("FontAwesome"),y=Hg(h,m),k=y;if(g){var w=XI(m);w.iconName&&w.prefix&&(y=w.iconName,h=w.prefix)}if(y&&!v&&(!s||s.getAttribute(Lg)!==h||s.getAttribute(_g)!==k)){t.setAttribute(n,k),s&&t.removeChild(s);var O=wD(),C=O.extra;C.attributes[Hp]=e,qp(y,h).then(function(T){var j=Vg(_(_({},O),{},{icons:{main:T,mask:Ug()},prefix:h,iconName:k,extra:C,watchable:!0})),L=ue.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(L,t.firstChild):t.appendChild(L),L.outerHTML=j.map(function(H){return ja(H)}).join(`
|
||
`),t.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function jD(t){return Promise.all([Sv(t,"::before"),Sv(t,"::after")])}function ID(t){return t.parentNode!==document.head&&!~wI.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(Hp)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function Ov(t){if($n)return new Promise(function(e,n){var r=Ho(t.querySelectorAll("*")).filter(ID).map(jD),i=Wg.begin("searchPseudoElements");Ww(),Promise.all(r).then(function(){i(),Yp(),e()}).catch(function(){i(),Yp(),n()})})}var DD={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=Ov,n}}},provides:function(e){e.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?ue:r;F.searchPseudoElements&&Ov(i)}}},Cv=!1,LD={mixout:function(){return{dom:{unwatch:function(){Ww(),Cv=!0}}}},hooks:function(){return{bootstrap:function(){bv(Wp("mutationObserverCallbacks",{}))},noAuto:function(){vD()},watch:function(n){var r=n.observeMutationsRoot;Cv?Yp():bv(Wp("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Ev=function(e){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},_D={mixout:function(){return{parse:{transform:function(n){return Ev(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=Ev(i)),n}}},provides:function(e){e.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),u="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(l," ").concat(c," ").concat(u)},d={transform:"translate(".concat(s/2*-1," -256)")},h={outer:a,inner:f,path:d};return{tag:"g",attributes:_({},h.outer),children:[{tag:"g",attributes:_({},h.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:_(_({},r.icon.attributes),h.path)}]}]}}}},Od={x:0,y:0,width:"100%",height:"100%"};function Tv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function zD(t){return t.tag==="g"?t.children:[t]}var $D={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?cf(i.split(" ").map(function(s){return s.trim()})):Ug();return o.prefix||(o.prefix=Pr()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(e){e.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,l=n.transform,c=o.width,u=o.icon,f=s.width,d=s.icon,h=_I({transform:l,containerWidth:f,iconWidth:c}),p={tag:"rect",attributes:_(_({},Od),{},{fill:"white"})},m=u.children?{children:u.children.map(Tv)}:{},v={tag:"g",attributes:_({},h.inner),children:[Tv(_({tag:u.tag,attributes:_(_({},u.attributes),h.path)},m))]},g={tag:"g",attributes:_({},h.outer),children:[v]},y="mask-".concat(a||va()),k="clip-".concat(a||va()),w={tag:"mask",attributes:_(_({},Od),{},{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,g]},O={tag:"defs",children:[{tag:"clipPath",attributes:{id:k},children:zD(d)},w]};return r.push(O,{tag:"rect",attributes:_({fill:"currentColor","clip-path":"url(#".concat(k,")"),mask:"url(#".concat(y,")")},Od)}),{children:r,attributes:i}}}},FD={provides:function(e){var n=!1;Mr.matchMedia&&(n=Mr.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:_(_({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var s=_(_({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:_(_({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:_(_({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:_(_({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:_(_({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:_(_({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:_(_({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:_(_({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},BD={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},HD=[FI,TD,ND,MD,PD,DD,LD,_D,$D,FD,BD];tD(HD,{mixoutsTo:Nt});Nt.noAuto;Nt.config;Nt.library;Nt.dom;var Qp=Nt.parse;Nt.findIconDefinition;Nt.toHtml;var UD=Nt.icon;Nt.layer;Nt.text;Nt.counter;function Nv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nv(Object(n),!0).forEach(function(r){so(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vu(t){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vu(t)}function so(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function VD(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function WD(t,e){if(t==null)return{};var n=VD(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Xp(t){return KD(t)||JD(t)||qD(t)||GD()}function KD(t){if(Array.isArray(t))return Zp(t)}function JD(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function qD(t,e){if(t){if(typeof t=="string")return Zp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zp(t,e)}}function Zp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function GD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YD(t){var e,n=t.beat,r=t.fade,i=t.beatFade,o=t.bounce,s=t.shake,a=t.flash,l=t.spin,c=t.spinPulse,u=t.spinReverse,f=t.pulse,d=t.fixedWidth,h=t.inverse,p=t.border,m=t.listItem,v=t.flip,g=t.size,y=t.rotation,k=t.pull,w=(e={"fa-beat":n,"fa-fade":r,"fa-beat-fade":i,"fa-bounce":o,"fa-shake":s,"fa-flash":a,"fa-spin":l,"fa-spin-reverse":u,"fa-spin-pulse":c,"fa-pulse":f,"fa-fw":d,"fa-inverse":h,"fa-border":p,"fa-li":m,"fa-flip":v===!0,"fa-flip-horizontal":v==="horizontal"||v==="both","fa-flip-vertical":v==="vertical"||v==="both"},so(e,"fa-".concat(g),typeof g<"u"&&g!==null),so(e,"fa-rotate-".concat(y),typeof y<"u"&&y!==null&&y!==0),so(e,"fa-pull-".concat(k),typeof k<"u"&&k!==null),so(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(w).map(function(O){return w[O]?O:null}).filter(function(O){return O})}function QD(t){return t=t-0,t===t}function Jw(t){return QD(t)?t:(t=t.replace(/[\-_\s]+(.)?/g,function(e,n){return n?n.toUpperCase():""}),t.substr(0,1).toLowerCase()+t.substr(1))}var XD=["style"];function ZD(t){return t.charAt(0).toUpperCase()+t.slice(1)}function e6(t){return t.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,n){var r=n.indexOf(":"),i=Jw(n.slice(0,r)),o=n.slice(r+1).trim();return i.startsWith("webkit")?e[ZD(i)]=o:e[i]=o,e},{})}function qw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(l){return qw(t,l)}),i=Object.keys(e.attributes||{}).reduce(function(l,c){var u=e.attributes[c];switch(c){case"class":l.attrs.className=u,delete e.attributes.class;break;case"style":l.attrs.style=e6(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[Jw(c)]=u}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=WD(n,XD);return i.attrs.style=cr(cr({},i.attrs.style),s),t.apply(void 0,[e.tag,cr(cr({},i.attrs),a)].concat(Xp(r)))}var Gw=!1;try{Gw=!0}catch{}function t6(){if(!Gw&&console&&typeof console.error=="function"){var t;(t=console).error.apply(t,arguments)}}function Mv(t){if(t&&vu(t)==="object"&&t.prefix&&t.iconName&&t.icon)return t;if(Qp.icon)return Qp.icon(t);if(t===null)return null;if(t&&vu(t)==="object"&&t.prefix&&t.iconName)return t;if(Array.isArray(t)&&t.length===2)return{prefix:t[0],iconName:t[1]};if(typeof t=="string")return{prefix:"fas",iconName:t}}function Cd(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?so({},t,e):{}}var X=M.forwardRef(function(t,e){var n=t.icon,r=t.mask,i=t.symbol,o=t.className,s=t.title,a=t.titleId,l=t.maskId,c=Mv(n),u=Cd("classes",[].concat(Xp(YD(t)),Xp(o.split(" ")))),f=Cd("transform",typeof t.transform=="string"?Qp.transform(t.transform):t.transform),d=Cd("mask",Mv(r)),h=UD(c,cr(cr(cr(cr({},u),f),d),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!h)return t6("Could not find icon",c),null;var p=h.abstract,m={ref:e};return Object.keys(t).forEach(function(v){X.defaultProps.hasOwnProperty(v)||(m[v]=t[v])}),n6(p[0],m)});X.displayName="FontAwesomeIcon";X.propTypes={beat:x.bool,border:x.bool,beatFade:x.bool,bounce:x.bool,className:x.string,fade:x.bool,flash:x.bool,mask:x.oneOfType([x.object,x.array,x.string]),maskId:x.string,fixedWidth:x.bool,inverse:x.bool,flip:x.oneOf([!0,!1,"horizontal","vertical","both"]),icon:x.oneOfType([x.object,x.array,x.string]),listItem:x.bool,pull:x.oneOf(["right","left"]),pulse:x.bool,rotation:x.oneOf([0,90,180,270]),shake:x.bool,size:x.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:x.bool,spinPulse:x.bool,spinReverse:x.bool,symbol:x.oneOfType([x.bool,x.string]),title:x.string,titleId:x.string,transform:x.oneOfType([x.string,x.object]),swapOpacity:x.bool};X.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var n6=qw.bind(null,M.createElement),r6={prefix:"fas",iconName:"strikethrough",icon:[512,512,[],"f0cc","M161.3 144c3.2-17.2 14-30.1 33.7-38.6c21.1-9 51.8-12.3 88.6-6.5c11.9 1.9 48.8 9.1 60.1 12c17.1 4.5 34.6-5.6 39.2-22.7s-5.6-34.6-22.7-39.2c-14.3-3.8-53.6-11.4-66.6-13.4c-44.7-7-88.3-4.2-123.7 10.9c-36.5 15.6-64.4 44.8-71.8 87.3c-.1 .6-.2 1.1-.2 1.7c-2.8 23.9 .5 45.6 10.1 64.6c4.5 9 10.2 16.9 16.7 23.9H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H270.1c-.1 0-.3-.1-.4-.1l-1.1-.3c-36-10.8-65.2-19.6-85.2-33.1c-9.3-6.3-15-12.6-18.2-19.1c-3.1-6.1-5.2-14.6-3.8-27.4zM348.9 337.2c2.7 6.5 4.4 15.8 1.9 30.1c-3 17.6-13.8 30.8-33.9 39.4c-21.1 9-51.7 12.3-88.5 6.5c-18-2.9-49.1-13.5-74.4-22.1c-5.6-1.9-11-3.7-15.9-5.4c-16.8-5.6-34.9 3.5-40.5 20.3s3.5 34.9 20.3 40.5c3.6 1.2 7.9 2.7 12.7 4.3l0 0 0 0c24.9 8.5 63.6 21.7 87.6 25.6l0 0 .2 0c44.7 7 88.3 4.2 123.7-10.9c36.5-15.6 64.4-44.8 71.8-87.3c3.6-21 2.7-40.4-3.1-58.1H335.1c7 5.6 11.4 11.2 13.9 17.2z"]},i6={prefix:"fas",iconName:"ruler-horizontal",icon:[640,512,[],"f547","M0 336c0 26.5 21.5 48 48 48l544 0c26.5 0 48-21.5 48-48l0-160c0-26.5-21.5-48-48-48l-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0c-26.5 0-48 21.5-48 48L0 336z"]},o6={prefix:"fas",iconName:"align-justify",icon:[448,512,[],"f039","M448 64c0-17.7-14.3-32-32-32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H32c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32z"]},s6={prefix:"fas",iconName:"highlighter",icon:[576,512,[],"f591","M315 315l158.4-215L444.1 70.6 229 229 315 315zm-187 5l0 0V248.3c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0c11.4 0 22.4 4.5 30.5 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5c0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5H224l-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l63-63 70.6 70.6-31 31c-4.5 4.5-10.6 7-17 7H24c-13.3 0-24-10.7-24-24v-4.7c0-6.4 2.5-12.5 7-17z"]},a6={prefix:"fas",iconName:"underline",icon:[448,512,[],"f0cd","M16 64c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H128V224c0 53 43 96 96 96s96-43 96-96V96H304c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H384V224c0 88.4-71.6 160-160 160s-160-71.6-160-160V96H48C30.3 96 16 81.7 16 64zM0 448c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32z"]},l6={prefix:"fas",iconName:"bold",icon:[384,512,[],"f032","M0 64C0 46.3 14.3 32 32 32H80 96 224c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128H96 80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V256 96H32C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64H112V224H224zM112 288V416H256c35.3 0 64-28.7 64-64s-28.7-64-64-64H224 112z"]},c6={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},u6={prefix:"fas",iconName:"rotate-left",icon:[512,512,["rotate-back","rotate-backward","undo-alt"],"f2ea","M48.5 224H40c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8H48.5z"]},f6={prefix:"fas",iconName:"italic",icon:[384,512,[],"f033","M128 64c0-17.7 14.3-32 32-32H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H293.3L160 416h64c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H90.7L224 96H160c-17.7 0-32-14.3-32-32z"]},d6={prefix:"fas",iconName:"list-ol",icon:[512,512,["list-1-2","list-numeric"],"f0cb","M24 56c0-13.3 10.7-24 24-24H80c13.3 0 24 10.7 24 24V176h16c13.3 0 24 10.7 24 24s-10.7 24-24 24H40c-13.3 0-24-10.7-24-24s10.7-24 24-24H56V80H48C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432H120c13.3 0 24 10.7 24 24s-10.7 24-24 24H32c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},h6={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"]},p6={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},m6={prefix:"fas",iconName:"quote-right",icon:[448,512,[8221,"quote-right-alt"],"f10e","M448 296c0 66.3-53.7 120-120 120h-8c-17.7 0-32-14.3-32-32s14.3-32 32-32h8c30.9 0 56-25.1 56-56v-8H320c-35.3 0-64-28.7-64-64V160c0-35.3 28.7-64 64-64h64c35.3 0 64 28.7 64 64v32 32 72zm-256 0c0 66.3-53.7 120-120 120H64c-17.7 0-32-14.3-32-32s14.3-32 32-32h8c30.9 0 56-25.1 56-56v-8H64c-35.3 0-64-28.7-64-64V160c0-35.3 28.7-64 64-64h64c35.3 0 64 28.7 64 64v32 32 72z"]},g6={prefix:"fas",iconName:"align-left",icon:[448,512,[],"f036","M288 64c0 17.7-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32H256c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H256c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},Jg={prefix:"fas",iconName:"left-long",icon:[512,512,["long-arrow-alt-left"],"f30a","M177.5 414c-8.8 3.8-19 2-26-4.6l-144-136C2.7 268.9 0 262.6 0 256s2.7-12.9 7.5-17.4l144-136c7-6.6 17.2-8.4 26-4.6s14.5 12.5 14.5 22l0 72 288 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-288 0 0 72c0 9.6-5.7 18.2-14.5 22z"]},y6={prefix:"fas",iconName:"align-center",icon:[448,512,[],"f037","M352 64c0-17.7-14.3-32-32-32H128c-17.7 0-32 14.3-32 32s14.3 32 32 32H320c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H32c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32H128c-17.7 0-32 14.3-32 32s14.3 32 32 32H320c17.7 0 32-14.3 32-32z"]},v6={prefix:"fas",iconName:"rotate-right",icon:[512,512,["redo-alt","rotate-forward"],"f2f9","M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z"]},b6={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},x6={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},k6={prefix:"fas",iconName:"list-ul",icon:[512,512,["list-dots"],"f0ca","M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z"]},w6={prefix:"fas",iconName:"quote-left",icon:[448,512,[8220,"quote-left-alt"],"f10d","M0 216C0 149.7 53.7 96 120 96h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V320 288 216zm256 0c0-66.3 53.7-120 120-120h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H320c-35.3 0-64-28.7-64-64V320 288 216z"]},S6={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},O6={prefix:"fas",iconName:"align-right",icon:[448,512,[],"f038","M448 64c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},Is={prefix:"fas",iconName:"brush",icon:[384,512,[],"f55d","M162.4 6c-1.5-3.6-5-6-8.9-6h-19c-3.9 0-7.5 2.4-8.9 6L104.9 57.7c-3.2 8-14.6 8-17.8 0L66.4 6c-1.5-3.6-5-6-8.9-6H48C21.5 0 0 21.5 0 48V224v22.4V256H9.6 374.4 384v-9.6V224 48c0-26.5-21.5-48-48-48H230.5c-3.9 0-7.5 2.4-8.9 6L200.9 57.7c-3.2 8-14.6 8-17.8 0L162.4 6zM0 288v32c0 35.3 28.7 64 64 64h64v64c0 35.3 28.7 64 64 64s64-28.7 64-64V384h64c35.3 0 64-28.7 64-64V288H0zM192 432a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]};const C6=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,E6=xt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},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}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",fe(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[sw({find:C6,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}});function T6(t){const{src:e,alt:n}=t.node.attrs,{updateAttributes:r}=t,i=()=>{const s=prompt("Set alt text:",n||"");r({alt:s})};let o="image";return t.selected&&(o+=" ProseMirror-selectednode"),b.jsx(l5,{className:o,"data-drag-handle":!0,children:b.jsxs("div",{className:"image-container d-md-block",children:[b.jsx("img",{className:"mx-auto d-block",src:e,alt:n}),b.jsx("div",{className:"image-overlay",children:b.jsxs("span",{className:"image-text mx-auto d-block",children:[n?b.jsx("span",{children:"✔"}):b.jsx("span",{children:"!"}),n?b.jsxs("span",{className:"text",children:['Alt text: "',n,'".']}):b.jsx("span",{className:"text",children:"Alt text missing."}),b.jsx(A,{className:"edit",type:"button",onClick:i,children:"Edit"})]})})]})})}const N6=E6.extend({addNodeView(){return h5(T6)}});function Yw(t,e){return function(){return t.apply(e,arguments)}}const{toString:M6}=Object.prototype,{getPrototypeOf:qg}=Object,ff=(t=>e=>{const n=M6.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xn=t=>(t=t.toLowerCase(),e=>ff(e)===t),df=t=>e=>typeof e===t,{isArray:Uo}=Array,ba=df("undefined");function P6(t){return t!==null&&!ba(t)&&t.constructor!==null&&!ba(t.constructor)&&$t(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Qw=xn("ArrayBuffer");function A6(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Qw(t.buffer),e}const R6=df("string"),$t=df("function"),Xw=df("number"),hf=t=>t!==null&&typeof t=="object",j6=t=>t===!0||t===!1,$l=t=>{if(ff(t)!=="object")return!1;const e=qg(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},I6=xn("Date"),D6=xn("File"),L6=xn("Blob"),_6=xn("FileList"),z6=t=>hf(t)&&$t(t.pipe),$6=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||$t(t.append)&&((e=ff(t))==="formdata"||e==="object"&&$t(t.toString)&&t.toString()==="[object FormData]"))},F6=xn("URLSearchParams"),B6=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ia(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Uo(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Zw(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const eS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tS=t=>!ba(t)&&t!==eS;function em(){const{caseless:t}=tS(this)&&this||{},e={},n=(r,i)=>{const o=t&&Zw(e,i)||i;$l(e[o])&&$l(r)?e[o]=em(e[o],r):$l(r)?e[o]=em({},r):Uo(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ia(arguments[r],n);return e}const H6=(t,e,n,{allOwnKeys:r}={})=>(Ia(e,(i,o)=>{n&&$t(i)?t[o]=Yw(i,n):t[o]=i},{allOwnKeys:r}),t),U6=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),V6=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},W6=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&qg(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},K6=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},J6=t=>{if(!t)return null;if(Uo(t))return t;let e=t.length;if(!Xw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},q6=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qg(Uint8Array)),G6=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},Y6=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Q6=xn("HTMLFormElement"),X6=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Pv=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Z6=xn("RegExp"),nS=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ia(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},eL=t=>{nS(t,(e,n)=>{if($t(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if($t(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tL=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Uo(t)?r(t):r(String(t).split(e)),n},nL=()=>{},rL=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Ed="abcdefghijklmnopqrstuvwxyz",Av="0123456789",rS={DIGIT:Av,ALPHA:Ed,ALPHA_DIGIT:Ed+Ed.toUpperCase()+Av},iL=(t=16,e=rS.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function oL(t){return!!(t&&$t(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const sL=t=>{const e=new Array(10),n=(r,i)=>{if(hf(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=Uo(r)?[]:{};return Ia(r,(s,a)=>{const l=n(s,i+1);!ba(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},aL=xn("AsyncFunction"),lL=t=>t&&(hf(t)||$t(t))&&$t(t.then)&&$t(t.catch),E={isArray:Uo,isArrayBuffer:Qw,isBuffer:P6,isFormData:$6,isArrayBufferView:A6,isString:R6,isNumber:Xw,isBoolean:j6,isObject:hf,isPlainObject:$l,isUndefined:ba,isDate:I6,isFile:D6,isBlob:L6,isRegExp:Z6,isFunction:$t,isStream:z6,isURLSearchParams:F6,isTypedArray:q6,isFileList:_6,forEach:Ia,merge:em,extend:H6,trim:B6,stripBOM:U6,inherits:V6,toFlatObject:W6,kindOf:ff,kindOfTest:xn,endsWith:K6,toArray:J6,forEachEntry:G6,matchAll:Y6,isHTMLForm:Q6,hasOwnProperty:Pv,hasOwnProp:Pv,reduceDescriptors:nS,freezeMethods:eL,toObjectSet:tL,toCamelCase:X6,noop:nL,toFiniteNumber:rL,findKey:Zw,global:eS,isContextDefined:tS,ALPHABET:rS,generateString:iL,isSpecCompliantForm:oL,toJSONObject:sL,isAsyncFn:aL,isThenable:lL};function Z(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}E.inherits(Z,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:E.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const iS=Z.prototype,oS={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{oS[t]={value:t}});Object.defineProperties(Z,oS);Object.defineProperty(iS,"isAxiosError",{value:!0});Z.from=(t,e,n,r,i,o)=>{const s=Object.create(iS);return E.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Z.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const cL=null;function tm(t){return E.isPlainObject(t)||E.isArray(t)}function sS(t){return E.endsWith(t,"[]")?t.slice(0,-2):t}function Rv(t,e,n){return t?t.concat(e).map(function(i,o){return i=sS(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function uL(t){return E.isArray(t)&&!t.some(tm)}const fL=E.toFlatObject(E,{},null,function(e){return/^is[A-Z]/.test(e)});function pf(t,e,n){if(!E.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=E.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!E.isUndefined(v[m])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&E.isSpecCompliantForm(e);if(!E.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(E.isDate(p))return p.toISOString();if(!l&&E.isBlob(p))throw new Z("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(p)||E.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,v){let g=p;if(p&&!v&&typeof p=="object"){if(E.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(E.isArray(p)&&uL(p)||(E.isFileList(p)||E.endsWith(m,"[]"))&&(g=E.toArray(p)))return m=sS(m),g.forEach(function(k,w){!(E.isUndefined(k)||k===null)&&e.append(s===!0?Rv([m],w,o):s===null?m:m+"[]",c(k))}),!1}return tm(p)?!0:(e.append(Rv(v,m,o),c(p)),!1)}const f=[],d=Object.assign(fL,{defaultVisitor:u,convertValue:c,isVisitable:tm});function h(p,m){if(!E.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(p),E.forEach(p,function(g,y){(!(E.isUndefined(g)||g===null)&&i.call(e,g,E.isString(y)?y.trim():y,m,d))===!0&&h(g,m?m.concat(y):[y])}),f.pop()}}if(!E.isObject(t))throw new TypeError("data must be an object");return h(t),e}function jv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Gg(t,e){this._pairs=[],t&&pf(t,this,e)}const aS=Gg.prototype;aS.append=function(e,n){this._pairs.push([e,n])};aS.toString=function(e){const n=e?function(r){return e.call(this,r,jv)}:jv;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function dL(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lS(t,e,n){if(!e)return t;const r=n&&n.encode||dL,i=n&&n.serialize;let o;if(i?o=i(e,n):o=E.isURLSearchParams(e)?e.toString():new Gg(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Iv{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){E.forEach(this.handlers,function(r){r!==null&&e(r)})}}const cS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},hL=typeof URLSearchParams<"u"?URLSearchParams:Gg,pL=typeof FormData<"u"?FormData:null,mL=typeof Blob<"u"?Blob:null,gL={isBrowser:!0,classes:{URLSearchParams:hL,FormData:pL,Blob:mL},protocols:["http","https","file","blob","url","data"]},uS=typeof window<"u"&&typeof document<"u",yL=(t=>uS&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),vL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uS,hasStandardBrowserEnv:yL,hasStandardBrowserWebWorkerEnv:vL},Symbol.toStringTag,{value:"Module"})),mn={...bL,...gL};function xL(t,e){return pf(t,new mn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return mn.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function kL(t){return E.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wL(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function fS(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&E.isArray(i)?i.length:s,l?(E.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!E.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&E.isArray(i[s])&&(i[s]=wL(i[s])),!a)}if(E.isFormData(t)&&E.isFunction(t.entries)){const n={};return E.forEachEntry(t,(r,i)=>{e(kL(r),i,n,0)}),n}return null}function SL(t,e,n){if(E.isString(t))try{return(e||JSON.parse)(t),E.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Yg={transitional:cS,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=E.isObject(e);if(o&&E.isHTMLForm(e)&&(e=new FormData(e)),E.isFormData(e))return i?JSON.stringify(fS(e)):e;if(E.isArrayBuffer(e)||E.isBuffer(e)||E.isStream(e)||E.isFile(e)||E.isBlob(e))return e;if(E.isArrayBufferView(e))return e.buffer;if(E.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xL(e,this.formSerializer).toString();if((a=E.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return pf(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),SL(e)):e}],transformResponse:[function(e){const n=this.transitional||Yg.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&E.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Z.from(a,Z.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mn.classes.FormData,Blob:mn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E.forEach(["delete","get","head","post","put","patch"],t=>{Yg.headers[t]={}});const Qg=Yg,OL=E.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),CL=t=>{const e={};let n,r,i;return t&&t.split(`
|
||
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&OL[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Dv=Symbol("internals");function ns(t){return t&&String(t).trim().toLowerCase()}function Fl(t){return t===!1||t==null?t:E.isArray(t)?t.map(Fl):String(t)}function EL(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const TL=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Td(t,e,n,r,i){if(E.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!E.isString(e)){if(E.isString(r))return e.indexOf(r)!==-1;if(E.isRegExp(r))return r.test(e)}}function NL(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function ML(t,e){const n=E.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class mf{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const u=ns(l);if(!u)throw new Error("header name must be a non-empty string");const f=E.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Fl(a))}const s=(a,l)=>E.forEach(a,(c,u)=>o(c,u,l));return E.isPlainObject(e)||e instanceof this.constructor?s(e,n):E.isString(e)&&(e=e.trim())&&!TL(e)?s(CL(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=ns(e),e){const r=E.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return EL(i);if(E.isFunction(n))return n.call(this,i,r);if(E.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ns(e),e){const r=E.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Td(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=ns(s),s){const a=E.findKey(r,s);a&&(!n||Td(r,r[a],a,n))&&(delete r[a],i=!0)}}return E.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||Td(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return E.forEach(this,(i,o)=>{const s=E.findKey(r,o);if(s){n[s]=Fl(i),delete n[o];return}const a=e?NL(o):String(o).trim();a!==o&&delete n[o],n[a]=Fl(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return E.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&E.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Dv]=this[Dv]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ns(s);r[a]||(ML(i,s),r[a]=!0)}return E.isArray(e)?e.forEach(o):o(e),this}}mf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(mf.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});E.freezeMethods(mf);const Pn=mf;function Nd(t,e){const n=this||Qg,r=e||n,i=Pn.from(r.headers);let o=r.data;return E.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function dS(t){return!!(t&&t.__CANCEL__)}function Da(t,e,n){Z.call(this,t??"canceled",Z.ERR_CANCELED,e,n),this.name="CanceledError"}E.inherits(Da,Z,{__CANCEL__:!0});function PL(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const AL=mn.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];E.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),E.isString(r)&&s.push("path="+r),E.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function RL(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function jL(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function hS(t,e){return t&&!RL(e)?jL(t,e):e}const IL=mn.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=E.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function DL(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function LL(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,d=0;for(;f!==i;)d+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const h=u&&c-u;return h?Math.round(d*1e3/h):void 0}}function Lv(t,e){let n=0;const r=LL(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),c=o<=s;n=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}const _L=typeof XMLHttpRequest<"u",zL=_L&&function(t){return new Promise(function(n,r){let i=t.data;const o=Pn.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let u;if(E.isFormData(i)){if(mn.hasStandardBrowserEnv||mn.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){const[m,...v]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([m||"multipart/form-data",...v].join("; "))}}let f=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(m+":"+v))}const d=hS(t.baseURL,t.url);f.open(t.method.toUpperCase(),lS(d,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function h(){if(!f)return;const m=Pn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:m,config:t,request:f};PL(function(k){n(k),c()},function(k){r(k),c()},g),f=null}if("onloadend"in f?f.onloadend=h:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(h)},f.onabort=function(){f&&(r(new Z("Request aborted",Z.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new Z("Network Error",Z.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let v=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const g=t.transitional||cS;t.timeoutErrorMessage&&(v=t.timeoutErrorMessage),r(new Z(v,g.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,t,f)),f=null},mn.hasStandardBrowserEnv&&(a&&E.isFunction(a)&&(a=a(t)),a||a!==!1&&IL(d))){const m=t.xsrfHeaderName&&t.xsrfCookieName&&AL.read(t.xsrfCookieName);m&&o.set(t.xsrfHeaderName,m)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&E.forEach(o.toJSON(),function(v,g){f.setRequestHeader(g,v)}),E.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),s&&s!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",Lv(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Lv(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{f&&(r(!m||m.type?new Da(null,t,f):m),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=DL(d);if(p&&mn.protocols.indexOf(p)===-1){r(new Z("Unsupported protocol "+p+":",Z.ERR_BAD_REQUEST,t));return}f.send(i||null)})},nm={http:cL,xhr:zL};E.forEach(nm,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const _v=t=>`- ${t}`,$L=t=>E.isFunction(t)||t===null||t===!1,pS={getAdapter:t=>{t=E.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let s;if(r=n,!$L(n)&&(r=nm[(s=String(n)).toLowerCase()],r===void 0))throw new Z(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
||
`+o.map(_v).join(`
|
||
`):" "+_v(o[0]):"as no adapter specified";throw new Z("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:nm};function Md(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Da(null,t)}function zv(t){return Md(t),t.headers=Pn.from(t.headers),t.data=Nd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),pS.getAdapter(t.adapter||Qg.adapter)(t).then(function(r){return Md(t),r.data=Nd.call(t,t.transformResponse,r),r.headers=Pn.from(r.headers),r},function(r){return dS(r)||(Md(t),r&&r.response&&(r.response.data=Nd.call(t,t.transformResponse,r.response),r.response.headers=Pn.from(r.response.headers))),Promise.reject(r)})}const $v=t=>t instanceof Pn?{...t}:t;function Lo(t,e){e=e||{};const n={};function r(c,u,f){return E.isPlainObject(c)&&E.isPlainObject(u)?E.merge.call({caseless:f},c,u):E.isPlainObject(u)?E.merge({},u):E.isArray(u)?u.slice():u}function i(c,u,f){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function o(c,u){if(!E.isUndefined(u))return r(void 0,u)}function s(c,u){if(E.isUndefined(u)){if(!E.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>i($v(c),$v(u),!0)};return E.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,d=f(t[u],e[u],u);E.isUndefined(d)&&f!==a||(n[u]=d)}),n}const mS="1.6.8",Xg={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Xg[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Fv={};Xg.transitional=function(e,n,r){function i(o,s){return"[Axios v"+mS+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Z(i(s," has been removed"+(n?" in "+n:"")),Z.ERR_DEPRECATED);return n&&!Fv[s]&&(Fv[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function FL(t,e,n){if(typeof t!="object")throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Z("option "+o+" must be "+l,Z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Z("Unknown option "+o,Z.ERR_BAD_OPTION)}}const rm={assertOptions:FL,validators:Xg},Wn=rm.validators;class bu{constructor(e){this.defaults=e,this.interceptors={request:new Iv,response:new Iv}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||
`+o):r.stack=o}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Lo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&rm.assertOptions(r,{silentJSONParsing:Wn.transitional(Wn.boolean),forcedJSONParsing:Wn.transitional(Wn.boolean),clarifyTimeoutError:Wn.transitional(Wn.boolean)},!1),i!=null&&(E.isFunction(i)?n.paramsSerializer={serialize:i}:rm.assertOptions(i,{encode:Wn.function,serialize:Wn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&E.merge(o.common,o[n.method]);o&&E.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=Pn.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,f=0,d;if(!l){const p=[zv.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),d=p.length,u=Promise.resolve(n);f<d;)u=u.then(p[f++],p[f++]);return u}d=a.length;let h=n;for(f=0;f<d;){const p=a[f++],m=a[f++];try{h=p(h)}catch(v){m.call(this,v);break}}try{u=zv.call(this,h)}catch(p){return Promise.reject(p)}for(f=0,d=c.length;f<d;)u=u.then(c[f++],c[f++]);return u}getUri(e){e=Lo(this.defaults,e);const n=hS(e.baseURL,e.url);return lS(n,e.params,e.paramsSerializer)}}E.forEach(["delete","get","head","options"],function(e){bu.prototype[e]=function(n,r){return this.request(Lo(r||{},{method:e,url:n,data:(r||{}).data}))}});E.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Lo(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}bu.prototype[e]=n(),bu.prototype[e+"Form"]=n(!0)});const Bl=bu;class Zg{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new Da(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Zg(function(i){e=i}),cancel:e}}}const BL=Zg;function HL(t){return function(n){return t.apply(null,n)}}function UL(t){return E.isObject(t)&&t.isAxiosError===!0}const im={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(im).forEach(([t,e])=>{im[e]=t});const VL=im;function gS(t){const e=new Bl(t),n=Yw(Bl.prototype.request,e);return E.extend(n,Bl.prototype,e,{allOwnKeys:!0}),E.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return gS(Lo(t,i))},n}const he=gS(Qg);he.Axios=Bl;he.CanceledError=Da;he.CancelToken=BL;he.isCancel=dS;he.VERSION=mS;he.toFormData=pf;he.AxiosError=Z;he.Cancel=he.CanceledError;he.all=function(e){return Promise.all(e)};he.spread=HL;he.isAxiosError=UL;he.mergeConfig=Lo;he.AxiosHeaders=Pn;he.formToJSON=t=>fS(E.isHTMLForm(t)?new FormData(t):t);he.getAdapter=pS.getAdapter;he.HttpStatusCode=VL;he.default=he;he.interceptors.request.use(t=>{const e=document.cookie.split(";").find(n=>n.trim().startsWith("csrftoken="));return e&&(t.headers["X-CSRFToken"]=e.split("=")[1]),t},t=>Promise.reject(t));const WL=t=>he.get(t),KL=(t,e)=>he.patch(t,e),JL=(t,e)=>he.post(t,e),qL=t=>he.delete(t),Ae={getData:WL,updateData:KL,createData:JL,deleteData:qL};function GL(t){const[e,n]=S.useState(null);S.useState(""),S.useState("");const r=o=>{n(o.target.files[0])},i=async o=>{o.preventDefault();const s=new FormData;s.append("media",e),s.append("resource_type",t.resourceType),s.append("resource_id",t.resourceId);try{const a=await Ae.createData("/data/upload/",s);t.notificationToggler("Media uploaded successfully")}catch{t.notificationToggler("Media upload failed","danger")}};return b.jsxs("form",{onSubmit:i,children:[b.jsx(Rk,{for:"exampleFile",children:"File"}),b.jsx(br,{id:"exampleFile",name:"file",type:"file",onChange:r}),b.jsx(A,{className:"mt-2",type:"submit",children:"Upload"})]})}function YL(t){const[e,n]=S.useState([]),r=async()=>{try{const o=await Ae.getData(`/data/media/${t.resourceType}/${t.resourceId}/`);n(o.data.media)}catch{t.notificationToggler("Error fetching media","danger")}};S.useEffect(()=>{r()},[]);const i=o=>{const s=o.substring(o.lastIndexOf("/")+1);Ae.deleteData(`/data/media/${t.resourceType}/${t.resourceId}/?file=${s}`).then(()=>{t.notificationToggler("Media deleted"),r()}).catch(a=>{t.notificationToggler("Error deleting media","danger")})};return b.jsxs("div",{children:[b.jsx("h4",{children:"Choose media to insert"}),e.map(o=>b.jsxs("div",{className:"mb-2",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))",gap:"1px"},children:[b.jsx("img",{src:o,style:{width:"150px",height:"auto"}}),b.jsx(A,{color:"success",onClick:()=>t.setMedia(o),style:{cursor:"pointer"},children:"Upload"}),b.jsx(A,{color:"danger",onClick:()=>i(o),style:{cursor:"pointer"},children:"Remove"})]},o))]})}function ey(t){const[e,n]=S.useState("insert"),r=()=>{e==="insert"&&n("upload"),e==="upload"&&n("insert")};return b.jsx("div",{children:b.jsxs(sg,{isOpen:t.modal,toggle:t.toggle,children:[b.jsx(Hu,{toggle:t.toggle,children:t.modalTitle}),b.jsxs(Uu,{children:[b.jsxs(Ve,{children:[b.jsx(A,{outline:!0,active:e==="insert",onClick:()=>r(),children:"Insert Media"}),b.jsx(A,{outline:!0,active:e==="upload",onClick:()=>r(),children:"Upload Media"})]}),b.jsx("div",{className:"mt-3",children:e==="insert"?b.jsx("div",{children:b.jsx(YL,{setMedia:t.setMedia,notificationToggler:t.notificationToggler,resourceType:t.resourceType,resourceId:t.resourceId})}):b.jsx("div",{children:b.jsx(GL,{notificationToggler:t.notificationToggler,resourceType:t.resourceType,resourceId:t.resourceId})})})]}),b.jsx(Vu,{children:b.jsx(A,{color:"secondary",onClick:t.toggle,children:"Cancel"})})]})})}const QL=t=>{const{editor:e}=o5(),n=s=>{e.commands.setImage({src:s})};if(!e)return null;S.useEffect(()=>{if(e){const s=()=>{t.setContent(e.getHTML())};return e.on("update",s),()=>{e.on("update",s)}}},[e]);const r=t.GlobalTheme,i=t.ThemeConfig,o=S.useCallback(()=>{const s=e.getAttributes("link").href,a=window.prompt("URL",s);if(a!==null){if(a===""){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:a}).run()}},[e]);return e?b.jsxs(b.Fragment,{children:[b.jsxs(Ve,{className:"mt-2",children:[b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().setTextAlign("left").run(),outline:!0,active:e.isActive("left"),children:b.jsx(X,{icon:g6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().setTextAlign("center").run(),outline:!0,active:e.isActive("center"),children:b.jsx(X,{icon:y6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().setTextAlign("right").run(),outline:!0,active:e.isActive("right"),children:b.jsx(X,{icon:O6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().setTextAlign("justify").run(),outline:!0,active:e.isActive("justify"),children:b.jsx(X,{icon:o6})})]}),b.jsxs(Ve,{className:"mt-2",style:{marginLeft:"10px"},children:[b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleBold().run(),disabled:!e.can().chain().focus().toggleBold().run(),outline:!0,active:e.isActive("bold"),children:b.jsx(X,{icon:l6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleItalic().run(),disabled:!e.can().chain().focus().toggleItalic().run(),outline:!0,active:e.isActive("italic"),children:b.jsx(X,{icon:f6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleUnderline().run(),outline:!0,active:e.isActive("underline"),children:b.jsx(X,{icon:a6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHighlight().run(),outline:!0,active:e.isActive("highlight"),children:b.jsx(X,{icon:s6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleStrike().run(),disabled:!e.can().chain().focus().toggleStrike().run(),outline:!0,active:e.isActive("strike"),children:b.jsx(X,{icon:r6})})]}),b.jsx(A,{className:"mt-2",color:i[r].buttonColor,onClick:o,style:{marginLeft:"10px"},outline:!0,active:e.isActive("link"),children:b.jsx(X,{icon:x6})}),b.jsx(A,{className:"mt-2",color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleCodeBlock().run(),style:{marginLeft:"10px"},outline:!0,active:e.isActive("codeBlock"),children:b.jsx(X,{icon:h6})}),b.jsxs(Ve,{className:"mt-2",style:{marginLeft:"10px"},children:[b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().setParagraph().run(),outline:!0,active:e.isActive("paragraph"),children:"p"}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHeading({level:1}).run(),outline:!0,active:e.isActive("heading",{level:1}),children:"h1"}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHeading({level:2}).run(),outline:!0,active:e.isActive("heading",{level:2}),children:"h2"}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHeading({level:3}).run(),outline:!0,active:e.isActive("heading",{level:3}),children:"h3"}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHeading({level:4}).run(),outline:!0,active:e.isActive("heading",{level:4}),children:"h4"}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHeading({level:5}).run(),outline:!0,active:e.isActive("heading",{level:5}),children:"h5"}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleHeading({level:6}).run(),outline:!0,active:e.isActive("heading",{level:6}),children:"h6"})]}),b.jsxs(Ve,{className:"mt-2",style:{marginLeft:"10px"},children:[b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleBulletList().run(),outline:!0,active:e.isActive("bulletList"),children:b.jsx(X,{icon:k6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleOrderedList().run(),outline:!0,active:e.isActive("orderedList"),children:b.jsx(X,{icon:d6})})]}),b.jsxs(A,{className:"mt-2",color:i[r].buttonColor,onClick:()=>e.chain().focus().toggleBlockquote().run(),style:{marginLeft:"10px"},outline:!0,active:e.isActive("blockquote"),children:[b.jsx(X,{icon:w6})," ",b.jsx(X,{icon:m6})]}),b.jsx(A,{className:"mt-2",color:i[r].buttonColor,onClick:()=>e.chain().focus().setHorizontalRule().run(),outline:!0,style:{marginLeft:"10px"},children:b.jsx(X,{icon:i6})}),b.jsxs(Ve,{className:"mt-2",style:{marginLeft:"10px"},children:[b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().undo().run(),disabled:!e.can().chain().focus().undo().run(),children:b.jsx(X,{icon:u6})}),b.jsx(A,{color:i[r].buttonColor,onClick:()=>e.chain().focus().redo().run(),disabled:!e.can().chain().focus().redo().run(),children:b.jsx(X,{icon:v6})})]}),b.jsx(A,{className:"mt-2 ms-2",color:i[r].buttonColor,onClick:()=>t.toggle(),outline:!0,children:b.jsx(X,{icon:c6})}),b.jsx(ey,{setMedia:n,notificationToggler:t.notificationToggler,modal:t.modal,toggle:t.toggle,resourceType:t.resourceType,resourceId:t.resourceId})]}):null},XL=[kj.configure({types:[B1.name,Rp.name]}),B1.configure({types:[Rp.name]}),uI.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),Ej,aw,N6,Cj.configure({types:["heading","paragraph"]}),Oj,Yj.configure({openOnClick:!1,autolink:!0})],yS=t=>{const e=t.GlobalTheme,n=t.ThemeConfig,[r,i]=S.useState(!1),o=()=>i(!r);if(t.content&&e&&n)return b.jsx(b.Fragment,{children:b.jsx(s5,{slotBefore:b.jsx(QL,{resourceType:t.resourceType,resourceId:t.resourceId,modal:r,toggle:o,notificationToggler:t.notificationToggler,setContent:t.setContent,GlobalTheme:e,ThemeConfig:n}),extensions:XL,content:t.content})})},ZL=t=>`${t}`,gf={getMedia:ZL};function e_(t){const[e,n]=S.useState(""),[r,i]=S.useState(!1),[o,s]=S.useState(!1),[a,l]=S.useState(!1),c=S.useRef(null),u=t.UserData?t.UserData:b.jsx(_r,{children:" Loading... "}),f=t.GlobalTheme,d=t.ThemeConfig,h=async()=>{let v=await t.setInfo("/data/shared/update/user-data/",{name:c.current.value,intro_content:e,profile_photo:r?r!=="-"?r:"":u.profilePhoto});console.log(v),v===200&&t.notificationToggler("Data saved successfully!"),[500,404,403,400].includes(v)&&t.notificationToggler("Something failed!","danger")},p=()=>{l(!a)},m=(v,g)=>{console.log(v),g==="nameField"&&s(v==="")};if(S.useEffect(()=>{n(u.introContent)},[u]),S.useEffect(()=>{r&&(h(),r!=="-"&&p())},[r]),f&&d)return b.jsxs(Lr,{fluid:!0,className:`${d[f].textColor} ${d[f].background}`,children:[b.jsx(ey,{setMedia:i,notificationToggler:t.notificationToggler,modal:a,toggle:p,resourceType:"homepage",resourceId:"homepage"}),b.jsxs(ht,{className:"mb-4",children:[b.jsx(ae,{xs:"3",className:"d-none d-md-block"}),b.jsxs(ae,{className:"p-0",children:[b.jsxs(ht,{className:"d-md-block",children:[b.jsx(ae,{xs:"4",className:"d-none d-md-block"}),u.profilePhoto!==""&&b.jsx("center",{children:b.jsx("img",{style:{width:"180px",height:"180px",objectFit:"cover"},className:"mt-5 mb-2 rounded-circle",src:gf.getMedia(u.profilePhoto),alt:"Profile Photo"})}),b.jsx(ae,{xs:"4",className:"d-none d-md-block"})]}),b.jsx(ht,{children:b.jsxs(Ve,{className:"mt-4",children:[b.jsx(A,{outline:!0,color:d[f].buttonColor,onClick:()=>p(),children:"Set Profile Photo"}),b.jsx(A,{outline:!0,color:d[f].buttonColor,onClick:()=>i("-"),children:"Remove Profile Photo"})]})})]}),b.jsx(ae,{xs:"3",className:"d-none d-md-block"})]}),b.jsxs(ht,{className:"mr-2 ml-2 mb-2 mt-1 blogContent",children:[b.jsx(ae,{xs:"3",className:"d-none d-md-block"}),b.jsxs(ae,{md:"6",xs:"12",children:[b.jsxs(xr,{className:"mb-5",children:[b.jsx(kr,{children:"Name"}),b.jsx(br,{invalid:o,innerRef:c,defaultValue:u.name,onChange:()=>m(c.current.value,"nameField")}),o&&b.jsx(Os,{tooltip:!0,className:"mt-1",children:"This field cannot be empty"})]}),b.jsx(yS,{notificationToggler:t.notificationToggler,GlobalTheme:f,ThemeConfig:d,content:u.introContent,setContent:n,resourceType:"homepage",resourceId:"homepage"}),b.jsx(A,{className:"mt-3 mb-2",onClick:()=>h(),color:d[f].buttonColor,outline:!0,children:"Save Data"})]}),b.jsx(ae,{xs:"3",className:"d-none d-md-block"})]})]})}function vS(t){return b.jsx("div",{children:b.jsxs(sg,{isOpen:t.modal,toggle:t.toggle,children:[b.jsx(Hu,{toggle:t.toggle,children:t.modalTitle}),b.jsx(Uu,{children:t.modalText}),b.jsxs(Vu,{children:[b.jsx(A,{color:"primary",onClick:t.confirmAction,children:"Yes"})," ",b.jsx(A,{color:"secondary",onClick:t.toggle,children:"Cancel"})]})]})})}function om(t){const[e,n]=S.useState(!1),[r,i]=S.useState(!1),[o,s]=S.useState(!1),[a,l]=S.useState(!1),[c,u]=S.useState(!1),[f,d]=S.useState(!1),h=()=>l(!a),p=S.useRef(null),m=S.useRef(null),v=S.useRef(null),g=(O,C)=>{C==="nameField"&&n(O===""),C==="descriptionField"&&i(O===""),C==="taglineField"&&s(O===""),t.addToIdsToUpdate({id:t.id,name:p.current.value,featuredBlog:"",description:m.current.value,tagLine:v.current.value})},y=()=>{d("Confirm"),u("Are you sure that you wish to delete this category?"),h()},k=()=>{t.deleteResource(t.id),h()},w=t.itemObject;return t.totalItems>0&&w&&Object.keys(w).length!==0?t.resourceType==="categories"?b.jsxs(b.Fragment,{children:[b.jsx(vS,{modalText:c,modalTitle:f,modal:a,toggle:h,confirmAction:k}),b.jsx(To,{color:t.borderColor,outline:!0,className:`my-2 ${t.bgColor}`,style:{width:t.cardType==="smallCard"?"18rem":"100%"},children:b.jsxs(No,{children:[b.jsx(ra,{className:`mb-3 ${t.textColor}`,tag:"h5",children:b.jsxs(xr,{children:[b.jsx(kr,{children:"Name"}),b.jsx(br,{defaultValue:w.name,invalid:e,innerRef:p,onChange:()=>g(p.current.value,"nameField")}),e?b.jsx(Os,{tooltip:!0,className:"mt-1",children:"This field cannot be empty"}):""]})}),b.jsx(_i,{className:`${t.textColor}`,children:b.jsxs(xr,{children:[b.jsx(kr,{children:"Description"}),b.jsx(br,{defaultValue:w.description,invalid:r,innerRef:m,onChange:()=>g(m.current.value,"descriptionField")}),r?b.jsx(Os,{tooltip:!0,className:"mt-1",children:"This field cannot be empty"}):""]})}),b.jsx(_i,{children:b.jsx("small",{className:`${t.textColor}`,children:b.jsxs(xr,{children:[b.jsx(kr,{children:"Tagline"}),b.jsx(br,{defaultValue:w.tagLine,invalid:o,innerRef:v,onChange:()=>g(v.current.value,"taglineField")}),o?b.jsx(Os,{tooltip:!0,className:"mt-1",children:"This field cannot be empty"}):""]})})}),b.jsxs(_i,{children:[b.jsx(ea,{className:`${t.textColor}`,to:`/${t.resourceType}/${w.id}`,children:"Open this resource"}),b.jsx(A,{color:"danger",onClick:()=>y(),className:"m-2",children:"Delete Category"})]})]})})]}):b.jsxs(To,{color:t.borderColor,outline:!0,className:`my-2 ${t.bgColor}`,style:{width:t.cardType==="smallCard"?"18rem":"100%"},children:[w.coverImage!==""?b.jsx(Nk,{src:gf.getMedia(w.coverImage),style:{height:"180px",objectFit:"cover"},top:!0,width:"100%"}):"",b.jsx(No,{children:b.jsxs(ea,{to:`/${t.resourceType}/${w.id}`,children:[b.jsx(ra,{className:`${t.textColor}`,tag:"h3",children:w.name}),b.jsx(_i,{className:`${t.textColor}`,tag:"h5",children:w.description}),b.jsx(_i,{tag:"h6",children:b.jsx("small",{className:`${t.textColor}`,children:w.tagLine})})]})}),b.jsxs(Ve,{children:[b.jsx(A,{outline:!0,active:w.id===t.featuredBlog,onClick:()=>t.updateFeaturedBlog(w.id),children:"Set this as featured"}),b.jsx(A,{outline:!0,onClick:()=>t.updateFeaturedBlog(""),children:"Unset featured blog"})]})]}):b.jsx("h3",{className:`${t.textColor}`,children:"No items found in this section"})}function t_(t){let e=$u();const n=t.GlobalTheme,r=t.ThemeConfig,[i,o]=S.useState([]),[s,a]=S.useState({});S.useEffect(()=>{l()},[]);const l=()=>{Ae.getData("/data/category/").then(h=>{let p=h.data,m=[];for(let v of p)m.push({id:v.category_id,name:v.name,featuredBlog:v.featured_id,description:v.description,tagLine:v.tagline,coverImage:v.cover_image});o(m)})},c=h=>{let p={...s};p[h.id]={name:h.name,featured_blog:h.featuredBlog,description:h.description,tagline:h.tagLine,cover_image:h.coverImage},a(p)},u=h=>{Ae.deleteData(`/data/category/delete/${h}/`).then(p=>{t.notificationToggler("Category successfully deleted"),l()}).catch(p=>{t.notificationToggler("Failed to delete category","danger")})},f=()=>{Ae.createData("/data/category/create/",{name:"Enter name",featured_id:"",description:"Enter description",tagline:"Enter tagline",cover_image:""}).then(h=>{t.notificationToggler("Category created successfully"),l()}).catch(h=>{t.notificationToggler("Failed to add category","danger")})},d=()=>{for(let h of Object.keys(s))Ae.updateData(`/data/category/update/${h}/`,s[h]).then(p=>{t.notificationToggler("Category data updated successfully")}).catch(p=>{t.notificationToggler("Failed to update category data","danger")});l()};return n&&r?b.jsxs(Lr,{fluid:!0,className:`p-0 mb-2 ${r[n].background}`,children:[b.jsx(ae,{xs:"3",className:"d-md-block",children:b.jsx(A,{color:r[n].buttonColor,onClick:()=>e("/"),className:"ms-5 mt-5",outline:!0,children:b.jsx(X,{icon:Jg})})}),b.jsx(ht,{className:"justify-content-center align-items-center",children:b.jsxs(ae,{className:"d-flex flex-column align-items-center",children:[b.jsx("div",{className:"w-100",children:b.jsx(To,{className:`my-2 ${r[n].background}`,style:{width:"100%",border:"none"},children:b.jsx(No,{children:b.jsxs(ra,{style:{display:"grid"},className:`${r[n].textColor} justify-content-center`,tag:"h1",children:["Categories",b.jsx(A,{className:"mt-2",color:r[n].buttonColor,outline:!0,onClick:()=>f(),children:"Add New"})]})})})}),b.jsxs("div",{className:"",style:{width:"70%",margin:"auto"},children:[i.length>0?i.map((h,p)=>b.jsx(om,{id:h.id,totalItems:i.length,addToIdsToUpdate:c,cardType:"longCard",deleteResource:u,resourceType:"categories",textColor:r[n].textColor,bgColor:r[n].background,borderColor:r[n].borderColor,buttonColor:r[n].buttonColor,notificationToggler:t.notificationToggler,itemObject:h},h.id)):b.jsx(_r,{}),b.jsx(A,{className:"mt-3 mb-2",onClick:()=>d(),color:r[n].buttonColor,outline:!0,children:"Save Data"})]})]})})]}):null}function bS(t){const[e,n]=S.useState([]),r=()=>{Ae.getData("/data/category/").then(a=>{let l=a.data,c=[];for(let u of l)c.push({id:u.category_id,name:u.name,featuredBlog:u.featured_id,description:u.description,tagLine:u.tagline,coverImage:u.cover_image});n(c)})};S.useEffect(()=>{r()},[]);const i={height:"auto",width:"auto",overflowX:"auto",display:"grid"},o=t.GlobalTheme,s=t.ThemeConfig;if(o&&s)return b.jsx(Lr,{fluid:!0,className:`${s[o].background}`,children:b.jsx(ht,{style:i,children:b.jsx("center",{style:{marginTop:"1.5em",marginBottom:"1.5em"},children:b.jsx(ae,{children:b.jsx(Ve,{style:{marginTop:"15px",marginBottom:"15px"},children:e.length>0?e.map((a,l)=>b.jsx(A,{className:"btn-lg",color:`${s[o].buttonColor}`,outline:!0,active:t.currentPage===a.id,children:b.jsx(ea,{className:"p-3",to:`/categories/${a.id}`,children:a.name})},a.id)):b.jsx(_r,{})})})})})})}function n_(t){const{categoryID:e}=lk();let n=$u();const r=t.GlobalTheme,i=t.ThemeConfig,[o,s]=S.useState("loading"),[a,l]=S.useState(null),c=()=>{Ae.getData(`/data/category/${e}/`).then(d=>{let h=d.data,p=[],m={id:h.category_id,name:h.name,coverImage:h.cover_image,tagLine:h.tagline,description:h.description,featuredBlog:h.featured_id,blogMetadata:h.blog_metadata};for(let v of h.blog_metadata)p.push({id:v.blog_id,name:v.name,description:v.description,tagLine:v.tagline,coverImage:v.cover_image,parentCategory:v.parent_category});m.blogMetadata=p,s(m),l(p.find(v=>v.id===m.featuredBlog))})};S.useEffect(()=>{c()},[e]);const u=()=>{Ae.createData("/data/blog/create/",{name:"Enter a blog name",description:"Enter a description",tagline:"Enter a tagline",cover_image:"",content_body:"<p></p>",parent_category:e}).then(d=>{t.notificationToggler("New blog created"),c()}).catch(d=>{t.notificationToggler("Failed to add a new blog","danger")})},f=d=>{Ae.updateData(`/data/category/update/${e}/`,{featured_id:d}).then(h=>{d?t.notificationToggler("Blog set as featured"):t.notificationToggler("Featured blog removed"),c()})};return r&&i?b.jsxs(Lr,{fluid:!0,className:`mb-2 p-0 ${i[r].background}`,children:[b.jsx(ae,{className:"d-md-block",children:b.jsx(A,{color:i[r].buttonColor,onClick:()=>n("/categories/"),className:"ms-5 mt-5",outline:!0,children:b.jsx(X,{icon:Jg})})}),b.jsx(bS,{currentPage:e,GlobalTheme:r,ThemeConfig:i}),b.jsx(ht,{className:"justify-content-center align-items-center",children:b.jsxs(ae,{className:"d-flex flex-column align-items-center",children:[b.jsx("div",{className:"w-100",children:b.jsx(To,{className:`my-2 ${i[r].background}`,style:{width:"100%",border:"none"},children:b.jsx(No,{children:b.jsxs(ra,{style:{display:"grid"},className:`${i[r].textColor} justify-content-center`,tag:"h1",children:[`Blogs in ${o.name}`,b.jsx(A,{className:"mt-2",color:i[r].buttonColor,outline:!0,onClick:()=>u(),children:"Add New"})]})})})}),b.jsxs("div",{className:"container",children:[a?b.jsx(om,{totalItems:a==="nodata"?0:1,cardType:"longCard",resourceType:"blog",textColor:i[r].textColor,bgColor:i[r].background,borderColor:i[r].borderColor,itemObject:a},a.id):"",b.jsx(ht,{children:o==="loading"?b.jsx(_r,{}):o.blogMetadata.map((d,h)=>b.jsx(ae,{children:b.jsx("div",{className:`p-2 ml-2 ${i[r].textColor}`,children:b.jsx(om,{totalItems:o.blogMetadata.length,featuredBlog:o.featuredBlog,updateFeaturedBlog:f,cardType:"smallCard",resourceType:"blog",textColor:i[r].textColor,bgColor:i[r].background,borderColor:i[r].borderColor,itemObject:d})})},d.blog_id))})]})]})})]}):null}function r_(t){let e=$u();const n=S.useRef(null),r=S.useRef(null),i=S.useRef(null),{blogID:o}=lk(),s=t.GlobalTheme,a=t.ThemeConfig,[l,c]=S.useState([]),[u,f]=S.useState(),[d,h]=S.useState(!1),[p,m]=S.useState(!1),[v,g]=S.useState(!1),[y,k]=S.useState(!1),[w,O]=S.useState(!1),C=()=>m(!p),T=()=>O(!w),j=Je=>{Ae.updateData(`/data/blog/update/${o}/`,{name:n.current.value,description:r.current.value,tagline:i.current.value,content_body:u,cover_image:d?d!=="-"?d:"":l.coverImage}).then(Te=>{t.notificationToggler("Blog data saved!"),pe()}).catch(Te=>{t.notificationToggler("Failed to update blog!","danger")})},L=()=>{k("Confirm"),g("Are you sure that you wish to delete this blog?"),C()},H=()=>{Ae.deleteData(`/data/blog/delete/${l.id}/`).then(Je=>{t.notificationToggler("Blog successfully deleted"),e(`/categories/${l.parentCategory}`)}).catch(Je=>{t.notificationToggler("Failed to delete blog","danger")}),C()},pe=()=>{Ae.getData(`/data/blog/${o}/`).then(Je=>{let Te=Je.data;c({id:Te.blog_id,name:Te.name,description:Te.description,tagLine:Te.tagline,coverImage:Te.cover_image,parentCategory:Te.parent_category}),f(Te.content_body)})};return S.useEffect(()=>{pe()},[]),S.useEffect(()=>{d&&(j(),d!=="-"&&T())},[d]),s&&a&&l?b.jsxs(Lr,{fluid:!0,className:`${a[s].background}`,children:[b.jsx(vS,{modalText:v,modalTitle:y,modal:p,toggle:C,confirmAction:H}),b.jsx(ey,{setMedia:h,notificationToggler:t.notificationToggler,modal:w,toggle:T,resourceType:"blog",resourceId:l.id}),b.jsx(ae,{xs:"3",className:"d-md-block",children:b.jsx(A,{color:a[s].buttonColor,onClick:()=>e(`/categories/${l.parentCategory}`),className:"ms-5 mt-5",outline:!0,children:b.jsx(X,{icon:Jg})})}),b.jsx(bS,{currentPage:l.parentCategory,GlobalTheme:s,ThemeConfig:a}),b.jsx(ht,{className:"mb-4",children:b.jsx(ae,{className:"p-0",children:l.coverImage!==""?b.jsx("img",{src:gf.getMedia(l.coverImage),alt:"Banner",style:{width:"100%",height:"auto",maxHeight:"20vh",objectFit:"cover"}}):""})}),b.jsxs(ht,{className:"mr-2 ml-2 mb-2 mt-1 blogContent",children:[b.jsx(ae,{xs:"3",className:"d-none d-md-block"}),b.jsxs(ae,{xs:`${window.screen.width>=765?"6":""}`,children:[b.jsx(A,{color:"danger",onClick:()=>L(),className:"mb-5",children:"Delete Blog"}),b.jsxs(Ve,{className:"mb-5 ms-5",children:[b.jsx(A,{outline:!0,color:a[s].buttonColor,onClick:()=>T(),children:"Set Cover Image"}),b.jsx(A,{outline:!0,color:a[s].buttonColor,onClick:()=>h("-"),children:"Remove Cover Image"})]}),b.jsxs(xr,{className:"mb-3",children:[b.jsx(kr,{children:"Name"}),b.jsx(br,{innerRef:n,defaultValue:l.name})]}),b.jsxs(xr,{className:"mb-3",children:[b.jsx(kr,{children:"Description"}),b.jsx(br,{innerRef:r,defaultValue:l.description})]}),b.jsxs(xr,{children:[b.jsx(kr,{children:"Tagline"}),b.jsx(br,{innerRef:i,defaultValue:l.tagLine})]})]}),b.jsx(ae,{xs:"3",className:"d-none d-md-block"})]}),b.jsx(ht,{className:`my-2 ${a[s].background}`,children:b.jsx(ae,{children:b.jsx("hr",{style:{borderColor:`${a[s].borderColor}`}})})}),b.jsxs(ht,{className:"mr-2 ml-2 mt-1",children:[b.jsx(ae,{xs:"3",className:"d-none d-md-block"}),b.jsxs(ae,{className:`blogContent ${a[s].textColor}`,style:{marginBottom:"25px"},children:[b.jsx(yS,{notificationToggler:t.notificationToggler,setContent:f,GlobalTheme:s,ThemeConfig:a,content:u,resourceType:"blog",resourceId:l.id}),b.jsx(A,{className:"mt-3 mb-2",onClick:Je=>j(),color:a[s].buttonColor,outline:!0,children:"Save Data"})]}),b.jsx(ae,{xs:"3",className:"d-none d-md-block"})]})]}):b.jsx(_r,{})}function i_(t){const[e,n]=S.useState(null);S.useEffect(()=>{r()},[]);const r=async()=>{try{const o=await Ae.getData("/data/publish/methods/");n(o.data)}catch{t.notificationToggler("Error fetching methods","danger")}},i=async o=>{try{const s=await Ae.getData(`/data/publish/${o}/`);t.notificationToggler("Deployment Sucess")}catch{t.notificationToggler("Deployment Failed","danger")}};return b.jsx("div",{children:b.jsxs(sg,{isOpen:t.modal,toggle:t.toggle,children:[b.jsx(Hu,{toggle:t.toggle,children:"Publish Website"}),b.jsxs(Uu,{children:[b.jsx("h4",{children:"Select a publish method"}),e?Object.values(e).map((o,s)=>b.jsx("div",{className:"mb-3",children:b.jsx(A,{color:"danger",onClick:()=>i(s),children:o},s)})):""]}),b.jsx(Vu,{children:b.jsx(A,{color:"secondary",onClick:t.toggle,children:"Cancel"})})]})})}function o_(t){const e=t.GlobalTheme,n=t.ThemeConfig,r=t.UserData;S.useState("");const[i,o]=S.useState("lightTheme"),[s,a]=S.useState("lightTheme"),[l,c]=S.useState(!1),u=()=>{c(!l)},f=async(d,h,p)=>{let m={...n};d&&h&&(m[e].navBar[d]=`${h}`);let v=await t.setInfo("/data/shared/update/theme-config/",e==="darkTheme"?{default_theme:p,dark_theme:JSON.stringify(m[e])}:{default_theme:p,light_theme:JSON.stringify(m[e])});v===200&&t.notificationToggler(`Color set for ${n[e].theme} successfully!`),[500,404,403].includes(v)&&t.notificationToggler("Something failed!","danger")};if(S.useEffect(()=>{t.ThemeSwitcher(i)},[i]),S.useEffect(()=>{o(t.ThemeConfig.defaultTheme),a(t.ThemeConfig.defaultTheme)},[]),e&&n&&r)return b.jsx("header",{className:"header-global",id:"site-header",children:b.jsx(bk,{className:`navbar-horizontal ${n[e].navBar.navBarTheme} ${n[e].navBar.background}`,expand:"lg",children:b.jsxs(Lr,{children:[b.jsx(i_,{notificationToggler:t.notificationToggler,modal:l,toggle:u}),b.jsx(xk,{children:b.jsxs(ea,{to:"/",children:[r.profilePhoto!==""?b.jsx("img",{style:{width:"40px",height:"40px",objectFit:"cover",marginRight:"10px"},className:"rounded-circle",src:gf.getMedia(r.profilePhoto)}):"",b.jsx(A,{color:`${n?n[e].navBar.buttonColor:""}`,size:"lg",children:r?r.name:b.jsx(_r,{children:" Loading... "})})]})}),b.jsx(kk,{className:"ml-lg-auto",navbar:!0,children:b.jsxs(wk,{children:[b.jsxs(Ve,{style:{marginTop:"15px",marginBottom:"15px",marginRight:"15px"},children:[b.jsx(A,{color:`${n?n[e].navBar.buttonColor:""}`,children:b.jsxs(ea,{to:"/categories",children:[b.jsx(X,{icon:p6})," Blogs"]})}),b.jsxs(A,{color:`${n?n[e].navBar.buttonColor:""}`,outline:!0,onClick:()=>{o("lightTheme")},active:i==="lightTheme",children:[b.jsx(X,{icon:b6})," Light Theme"]}),b.jsxs(A,{color:`${n?n[e].navBar.buttonColor:""}`,outline:!0,onClick:()=>{o("darkTheme")},active:i==="darkTheme",children:[b.jsx(X,{icon:S6})," Dark Theme"]})]}),b.jsxs(Ve,{style:{marginTop:"15px",marginBottom:"15px",marginRight:"15px"},children:[b.jsxs(A,{disabled:!0,color:`${n?n[e].navBar.buttonColor:""}`,children:[b.jsx(X,{icon:Is})," Set color"]}),b.jsx(A,{color:"primary",onClick:()=>f("background","bg-primary",n.defaultTheme)}),b.jsx(A,{color:"secondary",onClick:()=>f("background","bg-secondary",n.defaultTheme)}),b.jsx(A,{color:"success",onClick:()=>f("background","bg-success",n.defaultTheme)}),b.jsx(A,{color:"danger",onClick:()=>f("background","bg-danger",n.defaultTheme)}),b.jsx(A,{color:"warning",onClick:()=>f("background","bg-warning",n.defaultTheme)}),b.jsx(A,{color:"info",onClick:()=>f("background","bg-info",n.defaultTheme)}),b.jsx(A,{color:"light",onClick:()=>f("background","bg-light",n.defaultTheme)}),b.jsx(A,{color:"dark",onClick:()=>f("background","bg-dark",n.defaultTheme)})]}),b.jsxs(Ve,{style:{marginTop:"15px",marginBottom:"15px"},children:[b.jsxs(A,{disabled:!0,color:`${n?n[e].navBar.buttonColor:""}`,children:[b.jsx(X,{icon:Is})," Set button color"]}),b.jsx(A,{color:"light",onClick:()=>f("buttonColor","light",n.defaultTheme),children:"White"}),b.jsx(A,{color:"dark",onClick:()=>f("buttonColor","black",n.defaultTheme),children:"Black"})]}),b.jsxs(Ve,{style:{marginTop:"15px",marginBottom:"15px"},children:[b.jsxs(A,{disabled:!0,color:`${n?n[e].navBar.buttonColor:""}`,children:[b.jsx(X,{icon:Is})," Default Theme"]}),b.jsx(A,{color:`${n?n[e].navBar.buttonColor:""}`,outline:!0,onClick:()=>f(null,null,"lightTheme"),children:"Light Theme"}),b.jsx(A,{color:`${n?n[e].navBar.buttonColor:""}`,outline:!0,onClick:()=>f(null,null,"darkTheme"),children:"Dark Theme"})]}),b.jsx(A,{color:`${n?n[e].navBar.buttonColor:""}`,className:"ms-5",outline:!0,onClick:()=>u(),children:"Publish Data"})]})})]})})})}const s_=t=>{const e=t.GlobalTheme,n=t.ThemeConfig,r=t.UserData,i=async(o,s)=>{let a={...n};a[e].footer[o]=`${s}`;let l=await t.setInfo("/data/shared/update/theme-config/",e==="darkTheme"?{dark_theme:JSON.stringify(a[e])}:{light_theme:JSON.stringify(a[e])});l===200&&t.notificationToggler(`Color set for ${n[e].theme} successfully!`),[500,404,403].includes(l)&&t.notificationToggler("Something failed!","danger")};return b.jsx("footer",{className:`footer p-4 ${n?n[e].footer.background+" "+n[e].footer.text:""}`,id:"site-footer",children:b.jsx(Lr,{className:"p-1",children:b.jsxs(ht,{children:[b.jsxs(Ve,{style:{marginTop:"15px",marginBottom:"15px",marginRight:"15px"},children:[b.jsxs(A,{disabled:!0,color:`${n?n[e].navBar.buttonColor:""}`,children:[b.jsx(X,{icon:Is})," Set color"]}),b.jsx(A,{color:"primary",onClick:()=>i("background","bg-primary")}),b.jsx(A,{color:"secondary",onClick:()=>i("background","bg-secondary")}),b.jsx(A,{color:"success",onClick:()=>i("background","bg-success")}),b.jsx(A,{color:"danger",onClick:()=>i("background","bg-danger")}),b.jsx(A,{color:"warning",onClick:()=>i("background","bg-warning")}),b.jsx(A,{color:"info",onClick:()=>i("background","bg-info")}),b.jsx(A,{color:"light",onClick:()=>i("background","bg-light")}),b.jsx(A,{color:"dark",onClick:()=>i("background","bg-dark")})]}),b.jsxs(Ve,{style:{marginTop:"15px",marginBottom:"15px"},children:[b.jsxs(A,{disabled:!0,color:`${n?n[e].navBar.buttonColor:""}`,children:[b.jsx(X,{icon:Is})," Set footer text color"]}),b.jsx(A,{color:"light",onClick:()=>i("text","text-white"),children:"White"}),b.jsx(A,{color:"dark",onClick:()=>i("text","text-black"),children:"Black"})]}),b.jsx(ae,{md:"12",children:b.jsxs("div",{className:"blogContent text-center text-md-left mt-3",children:[new Date().getFullYear(),", ",b.jsx("a",{className:`${n[e].linkBackground} ${n[e].linkTextColor}`,href:"/",children:r?r.name:b.jsx(_r,{children:" Loading... "})}),b.jsx("br",{}),b.jsx("div",{className:"m-2",children:r.builtWith?b.jsxs("span",{children:["Built with ",b.jsx("a",{target:"_blank",className:`${n[e].linkBackground} ${n[e].linkTextColor}`,href:"https://github.com/barunespadhy/rangolio",children:"Rangolio"})]}):""})]})})]})})})};function a_(t){return b.jsx(M.StrictMode,{children:b.jsx(H3,{isOpen:t.isOpen,...t,children:b.jsx(To,{children:b.jsx(No,{children:b.jsx(jk,{color:t.message.color,children:t.message.message})})})})})}function l_(){const[t,e]=S.useState(null),[n,r]=S.useState(null),[i,o]=S.useState("lightTheme"),[s,a]=S.useState(!1),[l,c]=S.useState(""),u=(p,m)=>{a(!0),c({message:p,color:m}),setTimeout(()=>{a(!1)},1500)},f=async(p,m)=>{try{const v=await Ae.updateData(p,m);return d(),v.status}catch(v){return v.response?v.response.status:500}},d=()=>{Ae.getData("/data/shared/user-data/").then(p=>{let m=p.data[0];e({name:m.name,introContent:m.intro_content,profilePhoto:m.profile_photo,builtWith:m.built_with}),document.title=m.name}),Ae.getData("/data/shared/theme-config/").then(p=>{let m=p.data[0];r({defaultTheme:m.default_theme,darkTheme:JSON.parse(m.dark_theme),lightTheme:JSON.parse(m.light_theme)})})};S.useEffect(()=>{d()},[]);const h=p=>{o(p)};if(n&&t&&i)return b.jsx("div",{className:"app-container",children:b.jsxs(BE,{children:[b.jsx(o_,{className:"header",ThemeSwitcher:h,GlobalTheme:i,ThemeConfig:n,UserData:t,notificationToggler:u,setInfo:f}),b.jsx("div",{className:`p-0 ${n[i].background}`,children:b.jsxs(IE,{children:[b.jsx(ls,{path:"/",element:b.jsx(e_,{notificationToggler:u,GlobalTheme:i,ThemeConfig:n,UserData:t,setInfo:f})}),b.jsx(ls,{path:"/categories",element:b.jsx(t_,{notificationToggler:u,GlobalTheme:i,ThemeConfig:n})}),b.jsx(ls,{path:"/categories/:categoryID",element:b.jsx(n_,{notificationToggler:u,GlobalTheme:i,ThemeConfig:n})}),b.jsx(ls,{path:"/blog/:blogID",element:b.jsx(r_,{notificationToggler:u,GlobalTheme:i,ThemeConfig:n})})]})}),b.jsx(s_,{notificationToggler:u,setInfo:f,className:"footer",ThemeSwitcher:h,GlobalTheme:i,ThemeConfig:n,UserData:t}),b.jsx(a_,{style:{width:"20%"},className:"fixed-top",isOpen:s,message:l})]})})}Pd.createRoot(document.getElementById("root")).render(b.jsx(M.StrictMode,{children:b.jsx(l_,{})}));
|