vendor: 5,549 bytes, line 1
1function ER(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function mS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rm={exports:{}},Vl={},Om={exports:{}},Be={};var u1;function TR(){if(u1)return Be;u1=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function S(D,V,ae){this.props=D,this.context=V,this.refs=b,this.updater=ae||y}S.prototype.isReactComponent={},S.prototype.setState=function(D,V){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,V,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(D,V,ae){this.props=D,this.context=V,this.refs=b,this.updater=ae||y}var M=E.prototype=new N;M.constructor=E,w(M,S.prototype),M.isPureReactComponent=!0;var j=Array.isArray,A=Object.prototype.hasOwnProperty,P={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function z(D,V,ae){var we,ge={},Se=null,oe=null;if(V!=null)for(we in V.ref!==void 0&&(oe=V.ref),V.key!==void 0&&(Se=""+V.key),V)A.call(V,we)&&!O.hasOwnProperty(we)&&(ge[we]=V[we]);var fe=arguments.length-2;if(fe===1)ge.children=ae;else if(1<fe){for(var Te=Array(fe),ue=0;ue<fe;ue++)Te[ue]=arguments[ue+2];ge.children=Te}if(D&&D.defaultProps)for(we in fe=D.defaultProps,fe)ge[we]===void 0&&(ge[we]=fe[we]);return{$$typeof:t,type:D,key:Se,ref:oe,props:ge,_owner:P.current}}function U(D,V){return{$$typeof:t,type:D.type,key:V,ref:D.ref,props:D.props,_owner:D._owner}}function Y(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function Q(D){var V={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ae){return V[ae]})}var X=/\/+/g;function le(D,V){return typeof D=="object"&&D!==null&&D.key!=null?Q(""+D.key):V.toString(36)}function W(D,V,ae,we,ge){var Se=typeof D;(Se==="undefined"||Se==="boolean")&&(D=null);var oe=!1;if(D===null)oe=!0;else switch(Se){case"string":case"number":oe=!0;break;case"object":switch(D.$$typeof){case t:case e:oe=!0}}if(oe)return oe=D,ge=ge(oe),D=we===""?"."+le(oe,0):we,j(ge)?(ae="",D!=null&&(ae=D.replace(X,"$&/")+"/"),W(ge,V,ae,"",function(ue){return ue})):ge!=null&&(Y(ge)&&(ge=U(ge,ae+(!ge.key||oe&&oe.key===ge.key?"":(""+ge.key).replace(X,"$&/")+"/")+D)),V.push(ge)),1;if(oe=0,we=we===""?".":we+":",j(D))for(var fe=0;fe<D.length;fe++){Se=D[fe];var Te=we+le(Se,fe);oe+=W(Se,V,ae,Te,ge)}else if(Te=x(D),typeof Te=="function")for(D=Te.call(D),fe=0;!(Se=D.next()).done;)Se=Se.value,Te=we+le(Se,fe++),oe+=W(Se,V,ae,Te,ge);else if(Se==="object")throw V=String(D),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return oe}function ce(D,V,ae){if(D==null)return D;var we=[],ge=0;return W(D,we,"","",function(Se){return V.call(ae,Se,ge++)}),we}function se(D){if(D._status===-1){var V=D._result;V=V(),V.then(function(ae){(D._status===0||D._status===-1)&&(D._status=1,D._result=ae)},function(ae){(D._status===0||D._status===-1)&&(D._status=2,D._result=ae)}),D._status===-1&&(D._status=0,D._result=V)}if(D._status===1)return D._result.default;throw D._result}var ie={current:null},H={transition:null},J={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:H,ReactCurrentOwner:P};function ee(){throw Error("act(...) is not supported in production builds of React.")}return Be.Children={map:ce,forEach:function(D,V,ae){ce(D,function(){V.apply(this,arguments)},ae)},count:function(D){var V=0;return ce(D,function(){V++}),V},toArray:function(D){return ce(D,function(V){return V})||[]},only:function(D){if(!Y(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Be.Component=S,Be.Fragment=n,Be.Profiler=s,Be.PureComponent=E,Be.StrictMode=r,Be.Suspense=u,Be.__SECRET_INT
vendor: 8,537 bytes, line 1
1ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Be.act=ee,Be.cloneElement=function(D,V,ae){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var we=w({},D.props),ge=D.key,Se=D.ref,oe=D._owner;if(V!=null){if(V.ref!==void 0&&(Se=V.ref,oe=P.current),V.key!==void 0&&(ge=""+V.key),D.type&&D.type.defaultProps)var fe=D.type.defaultProps;for(Te in V)A.call(V,Te)&&!O.hasOwnProperty(Te)&&(we[Te]=V[Te]===void 0&&fe!==void 0?fe[Te]:V[Te])}var Te=arguments.length-2;if(Te===1)we.children=ae;else if(1<Te){fe=Array(Te);for(var ue=0;ue<Te;ue++)fe[ue]=arguments[ue+2];we.children=fe}return{$$typeof:t,type:D.type,key:ge,ref:Se,props:we,_owner:oe}},Be.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:i,_context:D},D.Consumer=D},Be.createElement=z,Be.createFactory=function(D){var V=z.bind(null,D);return V.type=D,V},Be.createRef=function(){return{current:null}},Be.forwardRef=function(D){return{$$typeof:c,render:D}},Be.isValidElement=Y,Be.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:se}},Be.memo=function(D,V){return{$$typeof:f,type:D,compare:V===void 0?null:V}},Be.startTransition=function(D){var V=H.transition;H.transition={};try{D()}finally{H.transition=V}},Be.unstable_act=ee,Be.useCallback=function(D,V){return ie.current.useCallback(D,V)},Be.useContext=function(D){return ie.current.useContext(D)},Be.useDebugValue=function(){},Be.useDeferredValue=function(D){return ie.current.useDeferredValue(D)},Be.useEffect=function(D,V){return ie.current.useEffect(D,V)},Be.useId=function(){return ie.current.useId()},Be.useImperativeHandle=function(D,V,ae){return ie.current.useImperativeHandle(D,V,ae)},Be.useInsertionEffect=function(D,V){return ie.current.useInsertionEffect(D,V)},Be.useLayoutEffect=function(D,V){return ie.current.useLayoutEffect(D,V)},Be.useMemo=function(D,V){return ie.current.useMemo(D,V)},Be.useReducer=function(D,V,ae){return ie.current.useReducer(D,V,ae)},Be.useRef=function(D){return ie.current.useRef(D)},Be.useState=function(D){return ie.current.useState(D)},Be.useSyncExternalStore=function(D,V,ae){return ie.current.useSyncExternalStore(D,V,ae)},Be.useTransition=function(){return ie.current.useTransition()},Be.version="18.3.1",Be}var d1;function Bc(){return d1||(d1=1,Om.exports=TR()),Om.exports}var f1;function MR(){if(f1)return Vl;f1=1;var t=Bc(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(c,u,f){var p,m={},x=null,y=null;f!==void 0&&(x=""+f),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(y=u.ref);for(p in u)r.call(u,p)&&!i.hasOwnProperty(p)&&(m[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)m[p]===void 0&&(m[p]=u[p]);return{$$typeof:e,type:c,key:x,ref:y,props:m,_owner:s.current}}return Vl.Fragment=n,Vl.jsx=a,Vl.jsxs=a,Vl}var h1;function jR(){return h1||(h1=1,Rm.exports=MR()),Rm.exports}var d=jR(),cd={},Pm={exports:{}},Hn={},Dm={exports:{}},Im={};var p1;function AR(){return p1||(p1=1,(function(t){function e(H,J){var ee=H.length;H.push(J);e:for(;0<ee;){var D=ee-1>>>1,V=H[D];if(0<s(V,J))H[D]=J,H[ee]=V,ee=D;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var J=H[0],ee=H.pop();if(ee!==J){H[0]=ee;e:for(var D=0,V=H.length,ae=V>>>1;D<ae;){var we=2*(D+1)-1,ge=H[we],Se=we+1,oe=H[Se];if(0>s(ge,ee))Se<V&&0>s(oe,ge)?(H[D]=oe,H[Se]=ee,D=Se):(H[D]=ge,H[we]=ee,D=we);else if(Se<V&&0>s(oe,ee))H[D]=oe,H[Se]=ee,D=Se;else break e}}return J}function s(H,J){var ee=H.sortIndex-J.sortIndex;return ee!==0?ee:H.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var u=[],f=[],p=1,m=null,x=3,y=!1,w=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(H){for(var J=n(f);J!==null;){if(J.callback===null)r(f);else if(J.startTime<=H)r(f),J.sortIndex=J.expirationTime,e(u,J);else break;J=n(f)}}function j(H){if(b=!1,M(H),!w)if(n(u)!==null)w=!0,se(A);else{var J=n(f);J!==null&&ie(j,J.startTime-H)}}function A(H,J){w=!1,b&&(b=!1,N(z),z=-1),y=!0;var ee=x;try{for(M(J),m=n(u);m!==null&&(!(m.expirationTime>J)||H&&!Q());){var D=m.callback;if(typeof D=="function"){m.callback=null,x=m.priorityLevel;var V=D(m.expirationTime<=J);J=t.unstable_now(),typeof V=="function"?m.callback=V:m===n(u)&&r(u),M(J)}else r(u);m=n(u)}if(m!==null)var ae=!0;else{var we=n(f);we!==null&&ie(j,we.startTime-J),ae=!1}return ae}finally{m=null,x=ee,y=!1}}var P=!1,O=null,z=-1,U=5,Y=-1;function Q(){return!(t.unstable_now()-Y<U)}function X(){if(O!==null){var H=t.unstable_now();Y=H;var J=!0;try{J=O(!0,H)}finally{J?le():(P=!1,O=null)}}else P=!1}var le;if(typeof E=="function")le=function(){E(X)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ce=W.port2;W.port1.onmessage=X,le=function(){ce.postMessage(null)}}else le=function(){S(X,0)};function se(H){O=H,P||(P=!0,le())}function ie(H,J){z=S(function(){H(t.unstable_now())},J)}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(H){H.callback=null},t.unstable_continueExecution=function(){w||y||(w=!0,se(A))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(H){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var ee=x;x=J;try{return H()}finally{x=ee}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,J){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ee=x;x=H;try{return J()}finally{x=ee}},t.unstable_scheduleCallback=function(H,J,ee){var D=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?D+ee:D):ee=D,H){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=ee+V,H={id:p++,callback:J,priorityLevel:H,startTime:ee,expirationTime:V,sortIndex:-1},ee>D?(H.sortIndex=ee,e(f,H),n(u)===null&&H===n(f)&&(b?(N(z),z=-1):b=!0,ie(j,ee-D))):(H.sortIndex=V,e(u,H),w||y||(w=!0,se(A))),H},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(H){var J=x;return function(){var ee=x;x=J;try{return H.apply(this,arguments)}finally{x=ee}}}})(Im)),Im}var m1;function RR(){return m1||(m1=1,Dm.exports=AR()),Dm.exports}var g1;function OR(){if(g1)return Hn;g1=1;var t=Bc(),e=RR();function n(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,h=1;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function i(o,l){a(o,l),a(o+"Capture",l)}function a(o,l){for(s[o]=l,o=0;o<l.length;o++)r.add(l[o])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},m={};function x(o){return u.call(m,o)?!0:u.call(p,o)?!1:f.test(o)?m[o]=!0:(p[o]=!0,!1)}function y(o,l,h,g){if(h!==null&&h.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:h!==null?!h.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function w(o,l,h,g){if(l===null||typeof l>"u"||y(o,l,h,g))return!0;
vendor: 47,056 bytes, lines 1-6
1if(g)return!1;if(h!==null)switch(h.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function b(o,l,h,g,v,C,T){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=v,this.mustUseProperty=h,this.propertyName=o,this.type=l,this.sanitizeURL=C,this.removeEmptyString=T}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){S[o]=new b(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];S[l]=new b(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){S[o]=new b(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){S[o]=new b(o,2,!1,o,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(o){S[o]=new b(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){S[o]=new b(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){S[o]=new b(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){S[o]=new b(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){S[o]=new b(o,5,!1,o.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(o){return o[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(o){var l=o.replace(N,E);S[l]=new b(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(N,E);S[l]=new b(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(N,E);S[l]=new b(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){S[o]=new b(o,1,!1,o.toLowerCase(),null,!1,!1)}),S.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){S[o]=new b(o,1,!1,o.toLowerCase(),null,!0,!0)});function M(o,l,h,g){var v=S.hasOwnProperty(l)?S[l]:null;(v!==null?v.type!==0:g||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(w(l,h,v,g)&&(h=null),g||v===null?x(l)&&(h===null?o.removeAttribute(l):o.setAttribute(l,""+h)):v.mustUseProperty?o[v.propertyName]=h===null?v.type===3?!1:"":h:(l=v.attributeName,g=v.attributeNamespace,h===null?o.removeAttribute(l):(v=v.type,h=v===3||v===4&&h===!0?"":""+h,g?o.setAttributeNS(g,l,h):o.setAttribute(l,h))))}var j=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),P=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),Q=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),H=Symbol.iterator;function J(o){return o===null||typeof o!="object"?null:(o=H&&o[H]||o["@@iterator"],typeof o=="function"?o:null)}var ee=Object.assign,D;function V(o){if(D===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return` 2`+D+o}var ae=!1;function we(o,l){if(!o||ae)return"";ae=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(B){var g=B}Reflect.construct(o,[],l)}else{try{l.call()}catch(B){g=B}o.call(l.prototype)}else{try{throw Error()}catch(B){g=B}o()}}catch(B){if(B&&g&&typeof B.stack=="string"){for(var v=B.stack.split(` 3`),C=g.stack.split(` 4`),T=v.length-1,R=C.length-1;1<=T&&0<=R&&v[T]!==C[R];)R--;for(;1<=T&&0<=R;T--,R--)if(v[T]!==C[R]){if(T!==1||R!==1)do if(T--,R--,0>R||v[T]!==C[R]){var I=` 5`+v[T].replace(" at new "," at ");return o.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",o.displayName)),I}while(1<=T&&0<=R);break}}}finally{ae=!1,Error.prepareStackTrace=h}return(o=o?o.displayName||o.name:"")?V(o):""}function ge(o){switch(o.tag){case 5:return V(o.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return o=we(o.type,!1),o;case 11:return o=we(o.type.render,!1),o;case 1:return o=we(o.type,!0),o;default:return""}}function Se(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case O:return"Fragment";case P:return"Portal";case U:return"Profiler";case z:return"StrictMode";case le:return"Suspense";case W:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case Q:return(o.displayName||"Context")+".Consumer";case Y:return(o._context.displayName||"Context")+".Provider";case X:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ce:return l=o.displayName||null,l!==null?l:Se(o.type)||"Memo";case se:l=o._payload,o=o._init;try{return Se(o(l))}catch{}}return null}function oe(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Se(l);case 8:return l===z?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function fe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Te(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ue(o){var l=Te(o)?"checked":"value",h=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),g=""+o[l];if(!o.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,C=h.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return v.call(this)},set:function(T){g=""+T,C.call(this,T)}}),Object.defineProperty(o,l,{enumerable:h.enumerable}),{getValue:function(){return g},setValue:function(T){g=""+T},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Fe(o){o._valueTracker||(o._valueTracker=ue(o))}function We(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var h=l.getValue(),g="";return o&&(g=Te(o)?o.checked?"true":"false":o.value),o=g,o!==h?(l.setValue(o),!0):!1}function Xe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function ot(o,l){var h=l.checked;return ee({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??o._wrapperState.initialChecked})}function Mt(o,l){var h=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;h=fe(l.value!=null?l.value:h),o._wrapperState={initialChecked:g,initialValue:h,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function nn(o,l){l=l.checked,l!=null&&M(o,"checked",l,!1)}function In(o,l){nn(o,l);var h=fe(l.value),g=l.type;if(h!=null)g==="number"?(h===0&&o.value===""||o.value!=h)&&(o.value=""+h):o.value!==""+h&&(o.value=""+h);else if(g==="submit"||g==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?cr(o,l.type,h):l.hasOwnProperty("defaultValue")&&cr(o,l.type,fe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function lr(o,l,h){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,h||l===o.value||(o.value=l),o.defaultValue=l}h=o.name,h!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,h!==""&&(o.name=h)}function cr(o,l,h){(l!=="number"||Xe(o.ownerDocument)!==o)&&(h==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+h&&(o.defaultValue=""+h))}var _t=Array.isArray;function Ln(o,l,h,g){if(o=o.options,l){l={};for(var v=0;v<h.length;v++)l["$"+h[v]]=!0;for(h=0;h<o.length;h++)v=l.hasOwnProperty("$"+o[h].value),o[h].selected!==v&&(o[h].selected=v),v&&g&&(o[h].defaultSelected=!0)}else{for(h=""+fe(h),l=null,v=0;v<o.length;v++){if(o[v].value===h){o[v].selected=!0,g&&(o[v].defaultSelected=!0);return}l!==null||o[v].disabled||(l=o[v])}l!==null&&(l.selected=!0)}}function Ar(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return ee({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function no(o,l){var h=l.value;if(h==null){if(h=l.children,l=l.defaultValue,h!=null){if(l!=null)throw Error(n(92));if(_t(h)){if(1<h.length)throw Error(n(93));h=h[0]}l=h}l==null&&(l=""),h=l}o._wrapperState={initialValue:fe(h)}}function Es(o,l){var h=fe(l.value),g=fe(l.defaultValue);h!=null&&(h=""+h,h!==o.value&&(o.value=h),l.defaultValue==null&&o.defaultValue!==h&&(o.defaultValue=h)),g!=null&&(o.defaultValue=""+g)}function es(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function Rr(o){switch(o){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 jt(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?Rr(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Cn,Or=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,h,g,v){MSApp.execUnsafeLocalFunction(function(){return o(l,h,g,v)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(Cn=Cn||document.createElement("div"),Cn.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Cn.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Pr(o,l){if(l){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=l;return}}o.textContent=l}var Wt={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},ro=["Webkit","ms","Moz","O"];Object.keys(Wt).forEach(function(o){ro.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Wt[l]=Wt[o]})});function Ts(o,l,h){return l==null||typeof l=="boolean"||l===""?"":h||typeof l!="number"||l===0||Wt.hasOwnProperty(o)&&Wt[o]?(""+l).trim():l+"px"}function Ms(o,l){o=o.style;for(var h in l)if(l.hasOwnProperty(h)){var g=h.indexOf("--")===0,v=Ts(h,l[h],g);h==="float"&&(h="cssFloat"),g?o.setProperty(h,v):o[h]=v}}var Nn=ee({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 qn(o,l){if(l){if(Nn[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function js(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 ts=null;function so(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ns=null,Gn=null,ut=null;function wt(o){if(o=Ml(o)){if(typeof ns!="function")throw Error(n(280));var l=o.stateNode;l&&(l=Cu(l),ns(o.stateNode,o.type,l))}}function Kt(o){Gn?ut?ut.push(o):ut=[o]:Gn=o}function Qn(){if(Gn){var o=Gn,l=ut;if(ut=Gn=null,wt(o),l)for(o=0;o<l.length;o++)wt(l[o])}}function qe(o,l){return o(l)}function gt(){}var fn=!1;function ur(o,l,h){if(fn)return o(l,h);fn=!0;try{return qe(o,l,h)}finally{fn=!1,(Gn!==null||ut!==null)&&(gt(),Qn())}}function st(o,l){var h=o.stateNode;if(h===null)return null;var g=Cu(h);if(g===null)return null;h=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(n(231,l,typeof h));return h}var En=!1;if(c)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){En=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch{En=!1}function Jn(o,l,h,g,v,C,T,R,I){var B=Array.prototype.slice.call(arguments,3);try{l.apply(h,B)}catch(q){this.onError(q)}}var kt=!1,qt=null,hn=!1,dr=null,As={onError:function(o){kt=!0,qt=o}};function ru(o,l,h,g,v,C,T,R,I){kt=!1,qt=null,Jn.apply(As,arguments)}function Dr(o,l,h,g,v,C,T,R,I){if(ru.apply(this,arguments),kt){if(kt){var B=qt;kt=!1,qt=null}else throw Error(n(198));hn||(hn=!0,dr=B)}}function rs(o){var l=o,h=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(h=l.return),o=l.return;while(o)}return l.tag===3?h:null}function al(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function ll(o){if(rs(o)!==o)throw Error(n(188))}function su(o){var l=o.alternate;if(!l){if(l=rs(o),l===null)throw Error(n(188));return l!==o?null:o}for(var h=o,g=l;;){var v=h.return;if(v===null)break;var C=v.alternate;if(C===null){if(g=v.return,g!==null){h=g;continue}break}if(v.child===C.child){for(C=v.child;C;){if(C===h)return ll(v),o;if(C===g)return ll(v),l;C=C.sibling}throw Error(n(188))}if(h.return!==g.return)h=v,g=C;else{for(var T=!1,R=v.child;R;){if(R===h){T=!0,h=v,g=C;break}if(R===g){T=!0,g=v,h=C;break}R=R.sibling}if(!T){for(R=C.child;R;){if(R===h){T=!0,h=C,g=v;break}if(R===g){T=!0,g=C,h=v;break}R=R.sibling}if(!T)throw Error(n(189))}}if(h.alternate!==g)throw Error(n(190))}if(h.tag!==3)throw Error(n(188));return h.stateNode.current===h?o:l}function iu(o){return o=su(o),o!==null?Ce(o):null}function Ce(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=Ce(o);if(l!==null)return l;o=o.sibling}return null}var L=e.unstable_scheduleCallback,te=e.unstable_cancelCallback,ve=e.unstable_shouldYield,at=e.unstable_requestPaint,$e=e.unstable_now,St=e.unstable_getCurrentPriorityLevel,Gt=e.unstable_ImmediatePriority,fr=e.unstable_UserBlockingPriority,Ir=e.unstable_NormalPriority,cl=e.unstable_LowPriority,Ot=e.unstable_IdlePriority,io=null,Yn=null;function Bj(o){if(Yn&&typeof Yn.onCommitFiberRoot=="function")try{Yn.onCommitFiberRoot(io,o,void 0,(o.current.flags&128)===128)}catch{}}var Lr=Math.clz32?Math.clz32:Uj,Hj=Math.log,Vj=Math.LN2;function Uj(o){return o>>>=0,o===0?32:31-(Hj(o)/Vj|0)|0}var ou=64,au=4194304;function ul(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function lu(o,l){var h=o.pendingLanes;if(h===0)return 0;var g=0,v=o.suspendedLanes,C=o.pingedLanes,T=h&268435455;if(T!==0){var R=T&~v;R!==0?g=ul(R):(C&=T,C!==0&&(g=ul(C)))}else T=h&~v,T!==0?g=ul(T):C!==0&&(g=ul(C));if(g===0)return 0;if(l!==0&&l!==g&&(l&v)===0&&(v=g&-g,C=l&-l,v>=C||v===16&&(C&4194240)!==0))return l;if((g&4)!==0&&(g|=h&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=g;0<l;)h=31-Lr(l),v=1<<h,g|=o[h],l&=~v;return g}function Wj(o,l){switch(o){case 1:case 2:case 4:return l+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 l+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 Kj(o,l){for(var h=o.suspendedLanes,g=o.pingedLanes,v=o.expirationTimes,C=o.pendingLanes;0<C;){var T=31-Lr(C),R=1<<T,I=v[T];I===-1?((R&h)===0||(R&g)!==0)&&(v[T]=Wj(R,l)):I<=l&&(o.expiredLanes|=R),C&=~R}}function Xh(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Bv(){var o=ou;return ou<<=1,(ou&4194240)===0&&(ou=64),o}function Zh(o){for(var l=[],h=0;31>h;h++)l.push(o);return l}function dl(o,l,h){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-Lr(l),o[l]=h}function qj(o,l){var h=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var g=o.eventTimes;for(o=o.expirationTimes;0<h;){var v=31-Lr(h),C=1<<v;l[v]=0,g[v]=-1,o[v]=-1,h&=~C}}function ep(o,l){var h=o.entangledLanes|=l;for(o=o.entanglements;h;){var g=31-Lr(h),v=1<<g;v&l|o[g]&l&&(o[g]|=l),h&=~v}}var Ze=0;function Hv(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Vv,tp,Uv,Wv,Kv,np=!1,cu=[],ti=null,ni=null,ri=null,fl=new Map,hl=new Map,si=[],Gj="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 qv(o,l){switch(o){case"focusin":case"focusout":ti=null;break;case"dragenter":case"dragleave":ni=null;break;case"mouseover":case"mouseout":ri=null;break;case"pointerover":case"pointerout":fl.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":hl.delete(l.pointerId)}}function pl(o,l,h,g,v,C){return o===null||o.nativeEvent!==C?(o={blockedOn:l,domEventName:h,eventSystemFlags:g,nativeEvent:C,targetContainers:[v]},l!==null&&(l=Ml(l),l!==null&&tp(l)),o):(o.eventSystemFlags|=g,l=o.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),o)}function Qj(o,l,h,g,v){switch(l){case"focusin":return ti=pl(ti,o,l,h,g,v),!0;case"dragenter":return ni=pl(ni,o,l,h,g,v),!0;case"mouseover":return ri=pl(ri,o,l,h,g,v),!0;case"pointerover":var C=v.pointerId;return fl.set(C,pl(fl.get(C)||null,o,l,h,g,v)),!0;case"gotpointercapture":return C=v.pointerId,hl.set(C,pl(hl.get(C)||null,o,l,h,g,v)),!0}return!1}function Gv(o){var l=oo(o.target);if(l!==null){var h=rs(l);if(h!==null){if(l=h.tag,l===13){if(l=al(h),l!==null){o.blockedOn=l,Kv(o.priority,function(){Uv(h)});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function uu(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var h=sp(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(h===null){h=o.nativeEvent;var g=new h.constructor(h.type,h);ts=g,h.target.dispatchEvent(g),ts=null}else return l=Ml(h),l!==null&&tp(l),o.blockedOn=h,!1;l.shift()}return!0}function Qv(o,l,h){uu(o)&&h.delete(l)}function Jj(){np=!1,ti!==null&&uu(ti)&&(ti=null),ni!==null&&uu(ni)&&(ni=null),ri!==null&&uu(ri)&&(ri=null),fl.forEach(Qv),hl.forEach(Qv)}function ml(o,l){o.blockedOn===l&&(o.blockedOn=null,np||(np=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Jj)))}function gl(o){function l(v){return ml(v,o)}if(0<cu.length){ml(cu[0],o);for(var h=1;h<cu.length;h++){var g=cu[h];g.blockedOn===o&&(g.blockedOn=null)}}for(ti!==null&&ml(ti,o),ni!==null&&ml(ni,o),ri!==null&&ml(ri,o),fl.forEach(l),hl.forEach(l),h=0;h<si.length;h++)g=si[h],g.blockedOn===o&&(g.blockedOn=null);for(;0<si.length&&(h=si[0],h.blockedOn===null);)Gv(h),h.blockedOn===null&&si.shift()}var Yo=j.ReactCurrentBatchConfig,du=!0;function Yj(o,l,h,g){var v=Ze,C=Yo.transition;Yo.transition=null;try{Ze=1,rp(o,l,h,g)}finally{Ze=v,Yo.transition=C}}function Xj(o,l,h,g){var v=Ze,C=Yo.transition;Yo.transition=null;try{Ze=4,rp(o,l,h,g)}finally{Ze=v,Yo.transition=C}}function rp(o,l,h,g){if(du){var v=sp(o,l,h,g);if(v===null)wp(o,l,g,fu,h),qv(o,g);else if(Qj(v,o,l,h,g))g.stopPropagation();else if(qv(o,g),l&4&&-1<Gj.indexOf(o)){for(;v!==null;){var C=Ml(v);if(C!==null&&Vv(C),C=sp(o,l,h,g),C===null&&wp(o,l,g,fu,h),C===v)break;v=C}v!==null&&g.stopPropagation()}else wp(o,l,g,null,h)}}var fu=null;function sp(o,l,h,g){if(fu=null,o=so(g),o=oo(o),o!==null)if(l=rs(o),l===null)o=null;else if(h=l.tag,h===13){if(o=al(l),o!==null)return o;o=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return fu=o,null}function Jv(o){switch(o){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(St()){case Gt:return 1;case fr:return 4;case Ir:case cl:return 16;case Ot:return 536870912;default:return 16}default:return 16}}var ii=null,ip=null,hu=null;function Yv(){if(hu)return hu;var o,l=ip,h=l.length,g,v="value"in ii?ii.value:ii.textContent,C=v.length;for(o=0;o<h&&l[o]===v[o];o++);var T=h-o;for(g=1;g<=T&&l[h-g]===v[C-g];g++);return hu=v.slice(o,1<g?1-g:void 0)}function pu(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function mu(){return!0}function Xv(){return!1}function Xn(o){function l(h,g,v,C,T){this._reactName=h,this._targetInst=v,this.type=g,this.nativeEvent=C,this.target=T,this.currentTarget=null;for(var R in o)o.hasOwnProperty(R)&&(h=o[R],this[R]=h?h(C):C[R]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?mu:Xv,this.isPropagationStopped=Xv,this}return ee(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=mu)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=mu)},persist:function(){},isPersistent:mu}),l}var Xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},op=Xn(Xo),xl=ee({},Xo,{view:0,detail:0}),Zj=Xn(xl),ap,lp,yl,gu=ee({},xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:up,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==yl&&(yl&&o.type==="mousemove"?(ap=o.screenX-yl.screenX,lp=o.screenY-yl.screenY):lp=ap=0,yl=o),ap)},movementY:function(o){return"movementY"in o?o.movementY:lp}}),Zv=Xn(gu),eA=ee({},gu,{dataTransfer:0}),tA=Xn(eA),nA=ee({},xl,{relatedTarget:0}),cp=Xn(nA),rA=ee({},Xo,{animationName:0,elapsedTime:0,pseudoElement:0}),sA=Xn(rA),iA=ee({},Xo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),oA=Xn(iA),aA=ee({},Xo,{data:0}),e0=Xn(aA),lA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cA={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"},uA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dA(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=uA[o])?!!l[o]:!1}function up(){return dA}var fA=ee({},xl,{key:function(o){if(o.key){var l=lA[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=pu(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?cA[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:up,charCode:function(o){return o.type==="keypress"?pu(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?pu(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),hA=Xn(fA),pA=ee({},gu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),t0=Xn(pA),mA=ee({},xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:up}),gA=Xn(mA),xA=ee({},Xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),yA=Xn(xA),vA=ee({},gu,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),bA=Xn(vA),wA=[9,13,27,32],dp=c&&"CompositionEvent"in window,vl=null;c&&"documentMode"in document&&(vl=document.documentMode);var kA=c&&"TextEvent"in window&&!vl,n0=c&&(!dp||vl&&8<vl&&11>=vl),r0=" ",s0=!1;function i0(o,l){switch(o){case"keyup":return wA.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function o0(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Zo=!1;function SA(o,l){switch(o){case"compositionend":return o0(l);case"keypress":return l.which!==32?null:(s0=!0,r0);case"textInput":return o=l.data,o===r0&&s0?null:o;default:return null}}function CA(o,l){if(Zo)return o==="compositionend"||!dp&&i0(o,l)?(o=Yv(),hu=ip=ii=null,Zo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return n0&&l.locale!=="ko"?null:l.data;default:return null}}var NA={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 a0(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!NA[o.type]:l==="textarea"}function l0(o,l,h,g){Kt(g),l=wu(l,"onChange"),0<l.length&&(h=new op("onChange","change",null,h,g),o.push({event:h,listeners:l}))}var bl=null,wl=null;function EA(o){E0(o,0)}function xu(o){var l=sa(o);if(We(l))return o}function TA(o,l){if(o==="change")return l}var c0=!1;if(c){var fp;if(c){var hp="oninput"in document;if(!hp){var u0=document.createElement("div");u0.setAttribute("oninput","return;"),hp=typeof u0.oninput=="function"}fp=hp}else fp=!1;c0=fp&&(!document.documentMode||9<document.documentMode)}function d0(){bl&&(bl.detachEvent("onpropertychange",f0),wl=bl=null)}function f0(o){if(o.propertyName==="value"&&xu(wl)){var l=[];l0(l,wl,o,so(o)),ur(EA,l)}}function MA(o,l,h){o==="focusin"?(d0(),bl=l,wl=h,bl.attachEvent("onpropertychange",f0)):o==="focusout"&&d0()}function jA(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return xu(wl)}function AA(o,l){if(o==="click")return xu(l)}function RA(o,l){if(o==="input"||o==="change")return xu(l)}function OA(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var _r=typeof Object.is=="function"?Object.is:OA;function kl(o,l){if(_r(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var h=Object.keys(o),g=Object.keys(l);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var v=h[g];if(!u.call(l,v)||!_r(o[v],l[v]))return!1}return!0}function h0(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function p0(o,l){var h=h0(o);o=0;for(var g;h;){if(h.nodeType===3){if(g=o+h.textContent.length,o<=l&&g>=l)return{node:h,offset:l-o};o=g}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=h0(h)}}function m0(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?m0(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function g0(){for(var o=window,l=Xe();l instanceof o.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)o=l.contentWindow;else break;l=Xe(o.document)}return l}function pp(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function PA(o){var l=g0(),h=o.focusedElem,g=o.selectionRange;if(l!==h&&h&&h.ownerDocument&&m0(h.ownerDocument.documentElement,h)){if(g!==null&&pp(h)){if(l=g.start,o=g.end,o===void 0&&(o=l),"selectionStart"in h)h.selectionStart=l,h.selectionEnd=Math.min(o,h.value.length);else if(o=(l=h.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var v=h.textContent.length,C=Math.min(g.start,v);g=g.end===void 0?C:Math.min(g.end,v),!o.extend&&C>g&&(v=g,g=C,C=v),v=p0(h,C);var T=p0(h,g);v&&T&&(o.rangeCount!==1||o.anchorNode!==v.node||o.anchorOffset!==v.offset||o.focusNode!==T.node||o.focusOffset!==T.offset)&&(l=l.createRange(),l.setStart(v.node,v.offset),o.removeAllRanges(),C>g?(o.addRange(l),o.extend(T.node,T.offset)):(l.setEnd(T.node,T.offset),o.addRange(l)))}}for(l=[],o=h;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<l.length;h++)o=l[h],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var DA=c&&"documentMode"in document&&11>=document.documentMode,ea=null,mp=null,Sl=null,gp=!1;function x0(o,l,h){var g=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;gp||ea==null||ea!==Xe(g)||(g=ea,"selectionStart"in g&&pp(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Sl&&kl(Sl,g)||(Sl=g,g=wu(mp,"onSelect"),0<g.length&&(l=new op("onSelect","select",null,l,h),o.push({event:l,listeners:g}),l.target=ea)))}function yu(o,l){var h={};return h[o.toLowerCase()]=l.toLowerCase(),h["Webkit"+o]="webkit"+l,h["Moz"+o]="moz"+l,h}var ta={animationend:yu("Animation","AnimationEnd"),animationiteration:yu("Animation","AnimationIteration"),animationstart:yu("Animation","AnimationStart"),transitionend:yu("Transition","TransitionEnd")},xp={},y0={};c&&(y0=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function vu(o){if(xp[o])return xp[o];if(!ta[o])return o;var l=ta[o],h;for(h in l)if(l.hasOwnProperty(h)&&h in y0)return xp[o]=l[h];return o}var v0=vu("animationend"),b0=vu("animationiteration"),w0=vu("animationstart"),k0=vu("transitionend"),S0=new Map,C0="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 oi(o,l){S0.set(o,l),i(l,[o])}for(var yp=0;yp<C0.length;yp++){var vp=C0[yp],IA=vp.toLowerCase(),LA=vp[0].toUpperCase()+vp.slice(1);oi(IA,"on"+LA)}oi(v0,"onAnimationEnd"),oi(b0,"onAnimationIteration"),oi(w0,"onAnimationStart"),oi("dblclick","onDoubleClick"),oi("focusin","onFocus"),oi("focusout","onBlur"),oi(k0,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cl="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(" "),_A=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cl));function N0(o,l,h){var g=o.type||"unknown-event";o.currentTarget=h,Dr(g,l,void 0,o),o.currentTarget=null}function E0(o,l){l=(l&4)!==0;for(var h=0;h<o.length;h++){var g=o[h],v=g.event;g=g.listeners;e:{var C=void 0;if(l)for(var T=g.length-1;0<=T;T--){var R=g[T],I=R.instance,B=R.currentTarget;if(R=R.listener,I!==C&&v.isPropagationStopped())break e;N0(v,R,B),C=I}else for(T=0;T<g.length;T++){if(R=g[T],I=R.instance,B=R.currentTarget,R=R.listener,I!==C&&v.isPropagationStopped())break e;N0(v,R,B),C=I}}}if(hn)throw o=dr,hn=!1,dr=null,o}function dt(o,l){var h=l[Tp];h===void 0&&(h=l[Tp]=new Set);var g=o+"__bubble";h.has(g)||(T0(l,o,2,!1),h.add(g))}function bp(o,l,h){var g=0;l&&(g|=4),T0(h,o,g,l)}var bu="_reactListening"+Math.random().toString(36).slice(2);function Nl(o){if(!o[bu]){o[bu]=!0,r.forEach(function(h){h!=="selectionchange"&&(_A.has(h)||bp(h,!1,o),bp(h,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[bu]||(l[bu]=!0,bp("selectionchange",!1,l))}}function T0(o,l,h,g){switch(Jv(l)){case 1:var v=Yj;break;case 4:v=Xj;break;default:v=rp}h=v.bind(null,l,h,o),v=void 0,!En||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),g?v!==void 0?o.addEventListener(l,h,{capture:!0,passive:v}):o.addEventListener(l,h,!0):v!==void 0?o.addEventListener(l,h,{passive:v}):o.addEventListener(l,h,!1)}function wp(o,l,h,g,v){var C=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var T=g.tag;if(T===3||T===4){var R=g.stateNode.containerInfo;if(R===v||R.nodeType===8&&R.parentNode===v)break;if(T===4)for(T=g.return;T!==null;){var I=T.tag;if((I===3||I===4)&&(I=T.stateNode.containerInfo,I===v||I.nodeType===8&&I.parentNode===v))return;T=T.return}for(;R!==null;){if(T=oo(R),T===null)return;if(I=T.tag,I===5||I===6){g=C=T;continue e}R=R.parentNode}}g=g.return}ur(function(){var B=C,q=so(h),Z=[];e:{var K=S0.get(o);if(K!==void 0){var he=op,ye=o;switch(o){case"keypress":if(pu(h)===0)break e;case"keydown":case"keyup":he=hA;break;case"focusin":ye="focus",he=cp;break;case"focusout":ye="blur",he=cp;break;case"beforeblur":case"afterblur":he=cp;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=Zv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=tA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=gA;break;case v0:case b0:case w0:he=sA;break;case k0:he=yA;break;case"scroll":he=Zj;break;case"wheel":he=bA;break;case"copy":case"cut":case"paste":he=oA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=t0}var be=(l&4)!==0,At=!be&&o==="scroll",F=be?K!==null?K+"Capture":null:K;be=[];for(var _=B,$;_!==null;){$=_;var re=$.stateNode;if($.tag===5&&re!==null&&($=re,F!==null&&(re=st(_,F),re!=null&&be.push(El(_,re,$)))),At)break;_=_.return}0<be.length&&(K=new he(K,ye,null,h,q),Z.push({event:K,listeners:be}))}}if((l&7)===0){e:{if(K=o==="mouseover"||o==="pointerover",he=o==="mouseout"||o==="pointerout",K&&h!==ts&&(ye=h.relatedTarget||h.fromElement)&&(oo(ye)||ye[Rs]))break e;if((he||K)&&(K=q.window===q?q:(K=q.ownerDocument)?K.defaultView||K.parentWindow:window,he?(ye=h.relatedTarget||h.toElement,he=B,ye=ye?oo(ye):null,ye!==null&&(At=rs(ye),ye!==At||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(he=null,ye=B),he!==ye)){if(be=Zv,re="onMouseLeave",F="onMouseEnter",_="mouse",(o==="pointerout"||o==="pointerover")&&(be=t0,re="onPointerLeave",F="onPointerEnter",_="pointer"),At=he==null?K:sa(he),$=ye==null?K:sa(ye),K=new be(re,_+"leave",he,h,q),K.target=At,K.relatedTarget=$,re=null,oo(q)===B&&(be=new be(F,_+"enter",ye,h,q),be.target=$,be.relatedTarget=At,re=be),At=re,he&&ye)t:{for(be=he,F=ye,_=0,$=be;$;$=na($))_++;for($=0,re=F;re;re=na(re))$++;for(;0<_-$;)be=na(be),_--;for(;0<$-_;)F=na(F),$--;for(;_--;){if(be===F||F!==null&&be===F.alternate)break t;be=na(be),F=na(F)}be=null}else be=null;he!==null&&M0(Z,K,he,be,!1),ye!==null&&At!==null&&M0(Z,At,ye,be,!0)}}e:{if(K=B?sa(B):window,he=K.nodeName&&K.nodeName.toLowerCase(),he==="select"||he==="input"&&K.type==="file")var ke=TA;else if(a0(K))if(c0)ke=RA;else{ke=jA;var je=MA}else(he=K.nodeName)&&he.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(ke=AA);if(ke&&(ke=ke(o,B))){l0(Z,ke,h,q);break e}je&&je(o,K,B),o==="focusout"&&(je=K._wrapperState)&&je.controlled&&K.type==="number"&&cr(K,"number",K.value)}switch(je=B?sa(B):window,o){case"focusin":(a0(je)||je.contentEditable==="true")&&(ea=je,mp=B,Sl=null);break;case"focusout":Sl=mp=ea=null;break;case"mousedown":gp=!0;break;case"contextmenu":case"mouseup":case"dragend":gp=!1,x0(Z,h,q);break;case"selectionchange":if(DA)break;case"keydown":case"keyup":x0(Z,h,q)}var Ae;if(dp)e:{switch(o){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Zo?i0(o,h)&&(Pe="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(Pe="onCompositionStart");Pe&&(n0&&h.locale!=="ko"&&(Zo||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Zo&&(Ae=Yv()):(ii=q,ip="value"in ii?ii.value:ii.textContent,Zo=!0)),je=wu(B,Pe),0<je.length&&(Pe=new e0(Pe,o,null,h,q),Z.push({event:Pe,listeners:je}),Ae?Pe.data=Ae:(Ae=o0(h),Ae!==null&&(Pe.data=Ae)))),(Ae=kA?SA(o,h):CA(o,h))&&(B=wu(B,"onBeforeInput"),0<B.length&&(q=new e0("onBeforeInput","beforeinput",null,h,q),Z.push({event:q,listeners:B}),q.data=Ae))}E0(Z,l)})}function El(o,l,h){return{instance:o,listener:l,currentTarget:h}}function wu(o,l){for(var h=l+"Capture",g=[];o!==null;){var v=o,C=v.stateNode;v.tag===5&&C!==null&&(v=C,C=st(o,h),C!=null&&g.unshift(El(o,C,v)),C=st(o,l),C!=null&&g.push(El(o,C,v))),o=o.return}return g}function na(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function M0(o,l,h,g,v){for(var C=l._reactName,T=[];h!==null&&h!==g;){var R=h,I=R.alternate,B=R.stateNode;if(I!==null&&I===g)break;R.tag===5&&B!==null&&(R=B,v?(I=st(h,C),I!=null&&T.unshift(El(h,I,R))):v||(I=st(h,C),I!=null&&T.push(El(h,I,R)))),h=h.return}T.length!==0&&o.push({event:l,listeners:T})}var zA=/\r\n?/g,FA=/\u0000|\uFFFD/g;function j0(o){return(typeof o=="string"?o:""+o).replace(zA,` 6`).replace(FA,"")}function ku(o,l,h){if(l=j0(l),j0(o)!==l&&h)throw Error(n(425))}function Su(){}var kp=null,Sp=null;function Cp(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Np=typeof setTimeout=="function"?setTimeout:void 0,$A=typeof clearTimeout=="function"?clearTimeout:void 0,A0=typeof Promise=="function"?Promise:void 0,BA=typeof queueMicrotask=="function"?queueMicrotask:typeof A0<"u"?function(o){return A0.resolve(null).then(o).catch(HA)}:Np;function HA(o){setTimeout(function(){throw o})}function Ep(o,l){var h=l,g=0;do{var v=h.nextSibling;if(o.removeChild(h),v&&v.nodeType===8)if(h=v.data,h==="/$"){if(g===0){o.removeChild(v),gl(l);return}g--}else h!=="$"&&h!=="$?"&&h!=="$!"||g++;h=v}while(h);gl(l)}function ai(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function R0(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"){if(l===0)return o;l--}else h==="/$"&&l++}o=o.previousSibling}return null}var ra=Math.random().toString(36).slice(2),ss="__reactFiber$"+ra,Tl="__reactProps$"+ra,Rs="__reactContainer$"+ra,Tp="__reactEvents$"+ra,VA="__reactListeners$"+ra,UA="__reactHandles$"+ra;function oo(o){var l=o[ss];if(l)return l;for(var h=o.parentNode;h;){if(l=h[Rs]||h[ss]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(o=R0(o);o!==null;){if(h=o[ss])return h;o=R0(o)}return l}o=h,h=o.parentNode}return null}function Ml(o){return o=o[ss]||o[Rs],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function sa(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function Cu(o){return o[Tl]||null}var Mp=[],ia=-1;function li(o){return{current:o}}function ft(o){0>ia||(o.current=Mp[ia],Mp[ia]=null,ia--)}function lt(o,l){ia++,Mp[ia]=o.current,o.current=l}var ci={},pn=li(ci),_n=li(!1),ao=ci;function oa(o,l){var h=o.type.contextTypes;if(!h)return ci;var g=o.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var v={},C;for(C in h)v[C]=l[C];return g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=v),v}function zn(o){return o=o.childContextTypes,o!=null}function Nu(){ft(_n),ft(pn)}function O0(o,l,h){if(pn.current!==ci)throw Error(n(168));lt(pn,l),lt(_n,h)}function P0(o,l,h){var g=o.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return h;g=g.getChildContext();for(var v in g)if(!(v in l))throw Error(n(108,oe(o)||"Unknown",v));return ee({},h,g)}function Eu(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||ci,ao=pn.current,lt(pn,o),lt(_n,_n.current),!0}function D0(o,l,h){var g=o.stateNode;if(!g)throw Error(n(169));h?(o=P0(o,l,ao),g.__reactInternalMemoizedMergedChildContext=o,ft(_n),ft(pn),lt(pn,o)):ft(_n),lt(_n,h)}var Os=null,Tu=!1,jp=!1;function I0(o){Os===null?Os=[o]:Os.push(o)}function WA(o){Tu=!0,I0(o)}function ui(){if(!jp&&Os!==null){jp=!0;var o=0,l=Ze;try{var h=Os;for(Ze=1;o<h.length;o++){var g=h[o];do g=g(!0);while(g!==null)}Os=null,Tu=!1}catch(v){throw Os!==null&&(Os=Os.slice(o+1)),L(Gt,ui),v}finally{Ze=l,jp=!1}}return null}var aa=[],la=0,Mu=null,ju=0,hr=[],pr=0,lo=null,Ps=1,Ds="";function co(o,l){aa[la++]=ju,aa[la++]=Mu,Mu=o,ju=l}function L0(o,l,h){hr[pr++]=Ps,hr[pr++]=Ds,hr[pr++]=lo,lo=o;var g=Ps;o=Ds;var v=32-Lr(g)-1;g&=~(1<<v),h+=1;var C=32-Lr(l)+v;if(30<C){var T=v-v%5;C=(g&(1<<T)-1).toString(32),g>>=T,v-=T,Ps=1<<32-Lr(l)+v|h<<v|g,Ds=C+o}else Ps=1<<C|h<<v|g,Ds=o}function Ap(o){o.return!==null&&(co(o,1),L0(o,1,0))}function Rp(o){for(;o===Mu;)Mu=aa[--la],aa[la]=null,ju=aa[--la],aa[la]=null;for(;o===lo;)lo=hr[--pr],hr[pr]=null,Ds=hr[--pr],hr[pr]=null,Ps=hr[--pr],hr[pr]=null}var Zn=null,er=null,mt=!1,zr=null;
vendor: 8,630 bytes, line 6
6function _0(o,l){var h=yr(5,null,null,0);h.elementType="DELETED",h.stateNode=l,h.return=o,l=o.deletions,l===null?(o.deletions=[h],o.flags|=16):l.push(h)}function z0(o,l){switch(o.tag){case 5:var h=o.type;return l=l.nodeType!==1||h.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,Zn=o,er=ai(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,Zn=o,er=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(h=lo!==null?{id:Ps,overflow:Ds}:null,o.memoizedState={dehydrated:l,treeContext:h,retryLane:1073741824},h=yr(18,null,null,0),h.stateNode=l,h.return=o,o.child=h,Zn=o,er=null,!0):!1;default:return!1}}function Op(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Pp(o){if(mt){var l=er;if(l){var h=l;if(!z0(o,l)){if(Op(o))throw Error(n(418));l=ai(h.nextSibling);var g=Zn;l&&z0(o,l)?_0(g,h):(o.flags=o.flags&-4097|2,mt=!1,Zn=o)}}else{if(Op(o))throw Error(n(418));o.flags=o.flags&-4097|2,mt=!1,Zn=o}}}function F0(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Zn=o}function Au(o){if(o!==Zn)return!1;if(!mt)return F0(o),mt=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!Cp(o.type,o.memoizedProps)),l&&(l=er)){if(Op(o))throw $0(),Error(n(418));for(;l;)_0(o,l),l=ai(l.nextSibling)}if(F0(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="/$"){if(l===0){er=ai(o.nextSibling);break e}l--}else h!=="$"&&h!=="$!"&&h!=="$?"||l++}o=o.nextSibling}er=null}}else er=Zn?ai(o.stateNode.nextSibling):null;return!0}function $0(){for(var o=er;o;)o=ai(o.nextSibling)}function ca(){er=Zn=null,mt=!1}function Dp(o){zr===null?zr=[o]:zr.push(o)}var KA=j.ReactCurrentBatchConfig;function jl(o,l,h){if(o=h.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(n(309));var g=h.stateNode}if(!g)throw Error(n(147,o));var v=g,C=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===C?l.ref:(l=function(T){var R=v.refs;T===null?delete R[C]:R[C]=T},l._stringRef=C,l)}if(typeof o!="string")throw Error(n(284));if(!h._owner)throw Error(n(290,o))}return o}function Ru(o,l){throw o=Object.prototype.toString.call(l),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function B0(o){var l=o._init;return l(o._payload)}function H0(o){function l(F,_){if(o){var $=F.deletions;$===null?(F.deletions=[_],F.flags|=16):$.push(_)}}function h(F,_){if(!o)return null;for(;_!==null;)l(F,_),_=_.sibling;return null}function g(F,_){for(F=new Map;_!==null;)_.key!==null?F.set(_.key,_):F.set(_.index,_),_=_.sibling;return F}function v(F,_){return F=yi(F,_),F.index=0,F.sibling=null,F}function C(F,_,$){return F.index=$,o?($=F.alternate,$!==null?($=$.index,$<_?(F.flags|=2,_):$):(F.flags|=2,_)):(F.flags|=1048576,_)}function T(F){return o&&F.alternate===null&&(F.flags|=2),F}function R(F,_,$,re){return _===null||_.tag!==6?(_=Nm($,F.mode,re),_.return=F,_):(_=v(_,$),_.return=F,_)}function I(F,_,$,re){var ke=$.type;return ke===O?q(F,_,$.props.children,re,$.key):_!==null&&(_.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===se&&B0(ke)===_.type)?(re=v(_,$.props),re.ref=jl(F,_,$),re.return=F,re):(re=td($.type,$.key,$.props,null,F.mode,re),re.ref=jl(F,_,$),re.return=F,re)}function B(F,_,$,re){return _===null||_.tag!==4||_.stateNode.containerInfo!==$.containerInfo||_.stateNode.implementation!==$.implementation?(_=Em($,F.mode,re),_.return=F,_):(_=v(_,$.children||[]),_.return=F,_)}function q(F,_,$,re,ke){return _===null||_.tag!==7?(_=yo($,F.mode,re,ke),_.return=F,_):(_=v(_,$),_.return=F,_)}function Z(F,_,$){if(typeof _=="string"&&_!==""||typeof _=="number")return _=Nm(""+_,F.mode,$),_.return=F,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case A:return $=td(_.type,_.key,_.props,null,F.mode,$),$.ref=jl(F,null,_),$.return=F,$;case P:return _=Em(_,F.mode,$),_.return=F,_;case se:var re=_._init;return Z(F,re(_._payload),$)}if(_t(_)||J(_))return _=yo(_,F.mode,$,null),_.return=F,_;Ru(F,_)}return null}function K(F,_,$,re){var ke=_!==null?_.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return ke!==null?null:R(F,_,""+$,re);if(typeof $=="object"&&$!==null){switch($.$$typeof){case A:return $.key===ke?I(F,_,$,re):null;case P:return $.key===ke?B(F,_,$,re):null;case se:return ke=$._init,K(F,_,ke($._payload),re)}if(_t($)||J($))return ke!==null?null:q(F,_,$,re,null);Ru(F,$)}return null}function he(F,_,$,re,ke){if(typeof re=="string"&&re!==""||typeof re=="number")return F=F.get($)||null,R(_,F,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case A:return F=F.get(re.key===null?$:re.key)||null,I(_,F,re,ke);case P:return F=F.get(re.key===null?$:re.key)||null,B(_,F,re,ke);case se:var je=re._init;return he(F,_,$,je(re._payload),ke)}if(_t(re)||J(re))return F=F.get($)||null,q(_,F,re,ke,null);Ru(_,re)}return null}function ye(F,_,$,re){for(var ke=null,je=null,Ae=_,Pe=_=0,Yt=null;Ae!==null&&Pe<$.length;Pe++){Ae.index>Pe?(Yt=Ae,Ae=null):Yt=Ae.sibling;var Ye=K(F,Ae,$[Pe],re);if(Ye===null){Ae===null&&(Ae=Yt);break}o&&Ae&&Ye.alternate===null&&l(F,Ae),_=C(Ye,_,Pe),je===null?ke=Ye:je.sibling=Ye,je=Ye,Ae=Yt}if(Pe===$.length)return h(F,Ae),mt&&co(F,Pe),ke;if(Ae===null){for(;Pe<$.length;Pe++)Ae=Z(F,$[Pe],re),Ae!==null&&(_=C(Ae,_,Pe),je===null?ke=Ae:je.sibling=Ae,je=Ae);return mt&&co(F,Pe),ke}for(Ae=g(F,Ae);Pe<$.length;Pe++)Yt=he(Ae,F,Pe,$[Pe],re),Yt!==null&&(o&&Yt.alternate!==null&&Ae.delete(Yt.key===null?Pe:Yt.key),_=C(Yt,_,Pe),je===null?ke=Yt:je.sibling=Yt,je=Yt);return o&&Ae.forEach(function(vi){return l(F,vi)}),mt&&co(F,Pe),ke}function be(F,_,$,re){var ke=J($);if(typeof ke!="function")throw Error(n(150));if($=ke.call($),$==null)throw Error(n(151));for(var je=ke=null,Ae=_,Pe=_=0,Yt=null,Ye=$.next();Ae!==null&&!Ye.done;Pe++,Ye=$.next()){Ae.index>Pe?(Yt=Ae,Ae=null):Yt=Ae.sibling;var vi=K(F,Ae,Ye.value,re);if(vi===null){Ae===null&&(Ae=Yt);break}o&&Ae&&vi.alternate===null&&l(F,Ae),_=C(vi,_,Pe),je===null?ke=vi:je.sibling=vi,je=vi,Ae=Yt}if(Ye.done)return h(F,Ae),mt&&co(F,Pe),ke;if(Ae===null){for(;!Ye.done;Pe++,Ye=$.next())Ye=Z(F,Ye.value,re),Ye!==null&&(_=C(Ye,_,Pe),je===null?ke=Ye:je.sibling=Ye,je=Ye);return mt&&co(F,Pe),ke}for(Ae=g(F,Ae);!Ye.done;Pe++,Ye=$.next())Ye=he(Ae,F,Pe,Ye.value,re),Ye!==null&&(o&&Ye.alternate!==null&&Ae.delete(Ye.key===null?Pe:Ye.key),_=C(Ye,_,Pe),je===null?ke=Ye:je.sibling=Ye,je=Ye);return o&&Ae.forEach(function(NR){return l(F,NR)}),mt&&co(F,Pe),ke}function At(F,_,$,re){if(typeof $=="object"&&$!==null&&$.type===O&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case A:e:{for(var ke=$.key,je=_;je!==null;){if(je.key===ke){if(ke=$.type,ke===O){if(je.tag===7){h(F,je.sibling),_=v(je,$.props.children),_.return=F,F=_;break e}}else if(je.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===se&&B0(ke)===je.type){h(F,je.sibling),_=v(je,$.props),_.ref=jl(F,je,$),_.return=F,F=_;break e}h(F,je);break}else l(F,je);je=je.sibling}$.type===O?(_=yo($.props.children,F.mode,re,$.key),_.return=F,F=_):(re=td($.type,$.key,$.props,null,F.mode,re),re.ref=jl(F,_,$),re.return=F,F=re)}return T(F);case P:e:{for(je=$.key;_!==null;){if(_.key===je)if(_.tag===4&&_.stateNode.containerInfo===$.containerInfo&&_.stateNode.implementation===$.implementation){h(F,_.sibling),_=v(_,$.children||[]),_.return=F,F=_;break e}else{h(F,_);break}else l(F,_);_=_.sibling}_=Em($,F.mode,re),_.return=F,F=_}return T(F);case se:return je=$._init,At(F,_,je($._payload),re)}if(_t($))return ye(F,_,$,re);if(J($))return be(F,_,$,re);Ru(F,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,_!==null&&_.tag===6?(h(F,_.sibling),_=v(_,$),_.return=F,F=_):(h(F,_),_=Nm($,F.mode,re),_.return=F,F=_),T(F)):h(F,_)}return At}var ua=H0(!0),V0=H0(!1),Ou=li(null),Pu=null,da=null,Ip=null;function Lp(){Ip=da=Pu=null}function _p(o){var l=Ou.current;ft(Ou),o._currentValue=l}function zp(o,l,h){for(;o!==null;){var g=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),o===h)break;o=o.return}}function fa(o,l){Pu=o,Ip=da=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(Fn=!0),o.firstContext=null)}function mr(o){var l=o._currentValue;if(Ip!==o)if(o={context:o,memoizedValue:l,next:null},da===null){if(Pu===null)throw Error(n(308));da=o,Pu.dependencies={lanes:0,firstContext:o}}else da=da.next=o;return l}var uo=null;function Fp(o){uo===null?uo=[o]:uo.push(o)}function U0(o,l,h,g){var v=l.interleaved;
vendor: 1,713 bytes, line 6
6return v===null?(h.next=h,Fp(l)):(h.next=v.next,v.next=h),l.interleaved=h,Is(o,g)}function Is(o,l){o.lanes|=l;var h=o.alternate;for(h!==null&&(h.lanes|=l),h=o,o=o.return;o!==null;)o.childLanes|=l,h=o.alternate,h!==null&&(h.childLanes|=l),h=o,o=o.return;return h.tag===3?h.stateNode:null}var di=!1;function $p(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function W0(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Ls(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function fi(o,l,h){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(Je&2)!==0){var v=g.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),g.pending=l,Is(o,h)}return v=g.interleaved,v===null?(l.next=l,Fp(g)):(l.next=v.next,v.next=l),g.interleaved=l,Is(o,h)}function Du(o,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194240)!==0)){var g=l.lanes;g&=o.pendingLanes,h|=g,l.lanes=h,ep(o,h)}}function K0(o,l){var h=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var v=null,C=null;if(h=h.firstBaseUpdate,h!==null){do{var T={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};C===null?v=C=T:C=C.next=T,h=h.next}while(h!==null);C===null?v=C=l:C=C.next=l}else v=C=l;h={baseState:g.baseState,firstBaseUpdate:v,lastBaseUpdate:C,shared:g.shared,effects:g.effects},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=l:o.next=l,h.lastBaseUpdate=l}function Iu(o,l,h,g){var v=o.updateQueue;di=!1;
vendor: 9,012 bytes, line 6
6var C=v.firstBaseUpdate,T=v.lastBaseUpdate,R=v.shared.pending;if(R!==null){v.shared.pending=null;var I=R,B=I.next;I.next=null,T===null?C=B:T.next=B,T=I;var q=o.alternate;q!==null&&(q=q.updateQueue,R=q.lastBaseUpdate,R!==T&&(R===null?q.firstBaseUpdate=B:R.next=B,q.lastBaseUpdate=I))}if(C!==null){var Z=v.baseState;T=0,q=B=I=null,R=C;do{var K=R.lane,he=R.eventTime;if((g&K)===K){q!==null&&(q=q.next={eventTime:he,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ye=o,be=R;switch(K=l,he=h,be.tag){case 1:if(ye=be.payload,typeof ye=="function"){Z=ye.call(he,Z,K);break e}Z=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=be.payload,K=typeof ye=="function"?ye.call(he,Z,K):ye,K==null)break e;Z=ee({},Z,K);break e;case 2:di=!0}}R.callback!==null&&R.lane!==0&&(o.flags|=64,K=v.effects,K===null?v.effects=[R]:K.push(R))}else he={eventTime:he,lane:K,tag:R.tag,payload:R.payload,callback:R.callback,next:null},q===null?(B=q=he,I=Z):q=q.next=he,T|=K;if(R=R.next,R===null){if(R=v.shared.pending,R===null)break;K=R,R=K.next,K.next=null,v.lastBaseUpdate=K,v.shared.pending=null}}while(!0);if(q===null&&(I=Z),v.baseState=I,v.firstBaseUpdate=B,v.lastBaseUpdate=q,l=v.shared.interleaved,l!==null){v=l;do T|=v.lane,v=v.next;while(v!==l)}else C===null&&(v.shared.lanes=0);po|=T,o.lanes=T,o.memoizedState=Z}}function q0(o,l,h){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var g=o[l],v=g.callback;if(v!==null){if(g.callback=null,g=h,typeof v!="function")throw Error(n(191,v));v.call(g)}}}var Al={},is=li(Al),Rl=li(Al),Ol=li(Al);function fo(o){if(o===Al)throw Error(n(174));return o}function Bp(o,l){switch(lt(Ol,l),lt(Rl,o),lt(is,Al),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:jt(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=jt(l,o)}ft(is),lt(is,l)}function ha(){ft(is),ft(Rl),ft(Ol)}function G0(o){fo(Ol.current);var l=fo(is.current),h=jt(l,o.type);l!==h&&(lt(Rl,o),lt(is,h))}function Hp(o){Rl.current===o&&(ft(is),ft(Rl))}var xt=li(0);function Lu(o){for(var l=o;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Vp=[];function Up(){for(var o=0;o<Vp.length;o++)Vp[o]._workInProgressVersionPrimary=null;Vp.length=0}var _u=j.ReactCurrentDispatcher,Wp=j.ReactCurrentBatchConfig,ho=0,yt=null,Ft=null,Qt=null,zu=!1,Pl=!1,Dl=0,qA=0;function mn(){throw Error(n(321))}function Kp(o,l){if(l===null)return!1;for(var h=0;h<l.length&&h<o.length;h++)if(!_r(o[h],l[h]))return!1;return!0}function qp(o,l,h,g,v,C){if(ho=C,yt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,_u.current=o===null||o.memoizedState===null?YA:XA,o=h(g,v),Pl){C=0;do{if(Pl=!1,Dl=0,25<=C)throw Error(n(301));C+=1,Qt=Ft=null,l.updateQueue=null,_u.current=ZA,o=h(g,v)}while(Pl)}if(_u.current=Bu,l=Ft!==null&&Ft.next!==null,ho=0,Qt=Ft=yt=null,zu=!1,l)throw Error(n(300));return o}function Gp(){var o=Dl!==0;return Dl=0,o}function as(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?yt.memoizedState=Qt=o:Qt=Qt.next=o,Qt}function gr(){if(Ft===null){var o=yt.alternate;o=o!==null?o.memoizedState:null}else o=Ft.next;var l=Qt===null?yt.memoizedState:Qt.next;if(l!==null)Qt=l,Ft=o;else{if(o===null)throw Error(n(310));Ft=o,o={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},Qt===null?yt.memoizedState=Qt=o:Qt=Qt.next=o}return Qt}function Il(o,l){return typeof l=="function"?l(o):l}function Qp(o){var l=gr(),h=l.queue;if(h===null)throw Error(n(311));h.lastRenderedReducer=o;var g=Ft,v=g.baseQueue,C=h.pending;if(C!==null){if(v!==null){var T=v.next;v.next=C.next,C.next=T}g.baseQueue=v=C,h.pending=null}if(v!==null){C=v.next,g=g.baseState;var R=T=null,I=null,B=C;do{var q=B.lane;if((ho&q)===q)I!==null&&(I=I.next={lane:0,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),g=B.hasEagerState?B.eagerState:o(g,B.action);else{var Z={lane:q,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null};I===null?(R=I=Z,T=g):I=I.next=Z,yt.lanes|=q,po|=q}B=B.next}while(B!==null&&B!==C);I===null?T=g:I.next=R,_r(g,l.memoizedState)||(Fn=!0),l.memoizedState=g,l.baseState=T,l.baseQueue=I,h.lastRenderedState=g}if(o=h.interleaved,o!==null){v=o;do C=v.lane,yt.lanes|=C,po|=C,v=v.next;while(v!==o)}else v===null&&(h.lanes=0);return[l.memoizedState,h.dispatch]}function Jp(o){var l=gr(),h=l.queue;if(h===null)throw Error(n(311));h.lastRenderedReducer=o;var g=h.dispatch,v=h.pending,C=l.memoizedState;if(v!==null){h.pending=null;var T=v=v.next;do C=o(C,T.action),T=T.next;while(T!==v);_r(C,l.memoizedState)||(Fn=!0),l.memoizedState=C,l.baseQueue===null&&(l.baseState=C),h.lastRenderedState=C}return[C,g]}function Q0(){}function J0(o,l){var h=yt,g=gr(),v=l(),C=!_r(g.memoizedState,v);if(C&&(g.memoizedState=v,Fn=!0),g=g.queue,Yp(Z0.bind(null,h,g,o),[o]),g.getSnapshot!==l||C||Qt!==null&&Qt.memoizedState.tag&1){if(h.flags|=2048,Ll(9,X0.bind(null,h,g,v,l),void 0,null),Jt===null)throw Error(n(349));(ho&30)!==0||Y0(h,l,v)}return v}function Y0(o,l,h){o.flags|=16384,o={getSnapshot:l,value:h},l=yt.updateQueue,l===null?(l={lastEffect:null,stores:null},yt.updateQueue=l,l.stores=[o]):(h=l.stores,h===null?l.stores=[o]:h.push(o))}function X0(o,l,h,g){l.value=h,l.getSnapshot=g,eb(l)&&tb(o)}function Z0(o,l,h){return h(function(){eb(l)&&tb(o)})}function eb(o){var l=o.getSnapshot;o=o.value;try{var h=l();return!_r(o,h)}catch{return!0}}function tb(o){var l=Is(o,1);l!==null&&Hr(l,o,1,-1)}function nb(o){var l=as();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:o},l.queue=o,o=o.dispatch=JA.bind(null,yt,o),[l.memoizedState,o]}function Ll(o,l,h,g){return o={tag:o,create:l,destroy:h,deps:g,next:null},l=yt.updateQueue,l===null?(l={lastEffect:null,stores:null},yt.updateQueue=l,l.lastEffect=o.next=o):(h=l.lastEffect,h===null?l.lastEffect=o.next=o:(g=h.next,h.next=o,o.next=g,l.lastEffect=o)),o}function rb(){return gr().memoizedState}function Fu(o,l,h,g){var v=as();yt.flags|=o,v.memoizedState=Ll(1|l,h,void 0,g===void 0?null:g)}function $u(o,l,h,g){var v=gr();g=g===void 0?null:g;var C=void 0;if(Ft!==null){var T=Ft.memoizedState;if(C=T.destroy,g!==null&&Kp(g,T.deps)){v.memoizedState=Ll(l,h,C,g);return}}yt.flags|=o,v.memoizedState=Ll(1|l,h,C,g)}function sb(o,l){return Fu(8390656,8,o,l)}function Yp(o,l){return $u(2048,8,o,l)}function ib(o,l){return $u(4,2,o,l)}function ob(o,l){return $u(4,4,o,l)}function ab(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function lb(o,l,h){return h=h!=null?h.concat([o]):null,$u(4,4,ab.bind(null,l,o),h)}function Xp(){}function cb(o,l){var h=gr();l=l===void 0?null:l;var g=h.memoizedState;return g!==null&&l!==null&&Kp(l,g[1])?g[0]:(h.memoizedState=[o,l],o)}function ub(o,l){var h=gr();l=l===void 0?null:l;var g=h.memoizedState;return g!==null&&l!==null&&Kp(l,g[1])?g[0]:(o=o(),h.memoizedState=[o,l],o)}function db(o,l,h){return(ho&21)===0?(o.baseState&&(o.baseState=!1,Fn=!0),o.memoizedState=h):(_r(h,l)||(h=Bv(),yt.lanes|=h,po|=h,o.baseState=!0),l)}function GA(o,l){var h=Ze;Ze=h!==0&&4>h?h:4,o(!0);var g=Wp.transition;Wp.transition={};try{o(!1),l()}finally{Ze=h,Wp.transition=g}}function fb(){return gr().memoizedState}function QA(o,l,h){var g=gi(o);if(h={lane:g,action:h,hasEagerState:!1,eagerState:null,next:null},hb(o))pb(l,h);else if(h=U0(o,l,h,g),h!==null){var v=Mn();Hr(h,o,g,v),mb(h,l,g)}}function JA(o,l,h){var g=gi(o),v={lane:g,action:h,hasEagerState:!1,eagerState:null,next:null};if(hb(o))pb(l,v);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var T=l.lastRenderedState,R=C(T,h);if(v.hasEagerState=!0,v.eagerState=R,_r(R,T)){var I=l.interleaved;I===null?(v.next=v,Fp(l)):(v.next=I.next,I.next=v),l.interleaved=v;return}}catch{}h=U0(o,l,v,g),h!==null&&(v=Mn(),Hr(h,o,g,v),mb(h,l,g))}}function hb(o){var l=o.alternate;return o===yt||l!==null&&l===yt}function pb(o,l){Pl=zu=!0;var h=o.pending;h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l}function mb(o,l,h){if((h&4194240)!==0){var g=l.lanes;g&=o.pendingLanes,h|=g,l.lanes=h,ep(o,h)}}var Bu={readContext:mr,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useInsertionEffect:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useSyncExternalStore:mn,useId:mn,unstable_isNewReconciler:!1},YA={readContext:mr,useCallback:function(o,l){return as().memoizedState=[o,l===void 0?null:l],o}
vendor: 1,616 bytes, line 6
6,useContext:mr,useEffect:sb,useImperativeHandle:function(o,l,h){return h=h!=null?h.concat([o]):null,Fu(4194308,4,ab.bind(null,l,o),h)},useLayoutEffect:function(o,l){return Fu(4194308,4,o,l)},useInsertionEffect:function(o,l){return Fu(4,2,o,l)},useMemo:function(o,l){var h=as();return l=l===void 0?null:l,o=o(),h.memoizedState=[o,l],o},useReducer:function(o,l,h){var g=as();return l=h!==void 0?h(l):l,g.memoizedState=g.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},g.queue=o,o=o.dispatch=QA.bind(null,yt,o),[g.memoizedState,o]},useRef:function(o){var l=as();return o={current:o},l.memoizedState=o},useState:nb,useDebugValue:Xp,useDeferredValue:function(o){return as().memoizedState=o},useTransition:function(){var o=nb(!1),l=o[0];return o=GA.bind(null,o[1]),as().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,h){var g=yt,v=as();if(mt){if(h===void 0)throw Error(n(407));h=h()}else{if(h=l(),Jt===null)throw Error(n(349));(ho&30)!==0||Y0(g,l,h)}v.memoizedState=h;var C={value:h,getSnapshot:l};return v.queue=C,sb(Z0.bind(null,g,C,o),[o]),g.flags|=2048,Ll(9,X0.bind(null,g,C,h,l),void 0,null),h},useId:function(){var o=as(),l=Jt.identifierPrefix;if(mt){var h=Ds,g=Ps;h=(g&~(1<<32-Lr(g)-1)).toString(32)+h,l=":"+l+"R"+h,h=Dl++,0<h&&(l+="H"+h.toString(32)),l+=":"}else h=qA++,l=":"+l+"r"+h.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},XA={readContext:mr,useCallback:cb,useContext:mr,useEffect:Yp,useImperativeHandle:lb,useInsertionEffect:ib,useLayoutEffect:ob,useMemo:ub,useReducer:Qp,useRef
vendor: 5,928 bytes, lines 6-8
6:rb,useState:function(){return Qp(Il)},useDebugValue:Xp,useDeferredValue:function(o){var l=gr();return db(l,Ft.memoizedState,o)},useTransition:function(){var o=Qp(Il)[0],l=gr().memoizedState;return[o,l]},useMutableSource:Q0,useSyncExternalStore:J0,useId:fb,unstable_isNewReconciler:!1},ZA={readContext:mr,useCallback:cb,useContext:mr,useEffect:Yp,useImperativeHandle:lb,useInsertionEffect:ib,useLayoutEffect:ob,useMemo:ub,useReducer:Jp,useRef:rb,useState:function(){return Jp(Il)},useDebugValue:Xp,useDeferredValue:function(o){var l=gr();return Ft===null?l.memoizedState=o:db(l,Ft.memoizedState,o)},useTransition:function(){var o=Jp(Il)[0],l=gr().memoizedState;return[o,l]},useMutableSource:Q0,useSyncExternalStore:J0,useId:fb,unstable_isNewReconciler:!1};function Fr(o,l){if(o&&o.defaultProps){l=ee({},l),o=o.defaultProps;for(var h in o)l[h]===void 0&&(l[h]=o[h]);return l}return l}function Zp(o,l,h,g){l=o.memoizedState,h=h(g,l),h=h==null?l:ee({},l,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var Hu={isMounted:function(o){return(o=o._reactInternals)?rs(o)===o:!1},enqueueSetState:function(o,l,h){o=o._reactInternals;var g=Mn(),v=gi(o),C=Ls(g,v);C.payload=l,h!=null&&(C.callback=h),l=fi(o,C,v),l!==null&&(Hr(l,o,v,g),Du(l,o,v))},enqueueReplaceState:function(o,l,h){o=o._reactInternals;var g=Mn(),v=gi(o),C=Ls(g,v);C.tag=1,C.payload=l,h!=null&&(C.callback=h),l=fi(o,C,v),l!==null&&(Hr(l,o,v,g),Du(l,o,v))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var h=Mn(),g=gi(o),v=Ls(h,g);v.tag=2,l!=null&&(v.callback=l),l=fi(o,v,g),l!==null&&(Hr(l,o,g,h),Du(l,o,g))}};function gb(o,l,h,g,v,C,T){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,C,T):l.prototype&&l.prototype.isPureReactComponent?!kl(h,g)||!kl(v,C):!0}function xb(o,l,h){var g=!1,v=ci,C=l.contextType;return typeof C=="object"&&C!==null?C=mr(C):(v=zn(l)?ao:pn.current,g=l.contextTypes,C=(g=g!=null)?oa(o,v):ci),l=new l(h,C),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Hu,o.stateNode=l,l._reactInternals=o,g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=v,o.__reactInternalMemoizedMaskedChildContext=C),l}function yb(o,l,h,g){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,g),l.state!==o&&Hu.enqueueReplaceState(l,l.state,null)}function em(o,l,h,g){var v=o.stateNode;v.props=h,v.state=o.memoizedState,v.refs={},$p(o);var C=l.contextType;typeof C=="object"&&C!==null?v.context=mr(C):(C=zn(l)?ao:pn.current,v.context=oa(o,C)),v.state=o.memoizedState,C=l.getDerivedStateFromProps,typeof C=="function"&&(Zp(o,l,C,h),v.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(l=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),l!==v.state&&Hu.enqueueReplaceState(v,v.state,null),Iu(o,h,v,g),v.state=o.memoizedState),typeof v.componentDidMount=="function"&&(o.flags|=4194308)}function pa(o,l){try{var h="",g=l;do h+=ge(g),g=g.return;while(g);var v=h}catch(C){v=` 7Error generating stack: `+C.message+` 8`+C.stack}return{value:o,source:l,stack:v,digest:null}}function tm(o,l,h){return{value:o,source:null,stack:h??null,digest:l??null}}function nm(o,l){try{console.error(l.value)}catch(h){setTimeout(function(){throw h})}}var eR=typeof WeakMap=="function"?WeakMap:Map;function vb(o,l,h){h=Ls(-1,h),h.tag=3,h.payload={element:null};var g=l.value;return h.callback=function(){Qu||(Qu=!0,xm=g),nm(o,l)},h}function bb(o,l,h){h=Ls(-1,h),h.tag=3;var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var v=l.value;h.payload=function(){return g(v)},h.callback=function(){nm(o,l)}}var C=o.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(h.callback=function(){nm(o,l),typeof g!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})}),h}function wb(o,l,h){var g=o.pingCache;if(g===null){g=o.pingCache=new eR;var v=new Set;g.set(l,v)}else v=g.get(l),v===void 0&&(v=new Set,g.set(l,v));v.has(h)||(v.add(h),o=pR.bind(null,o,l,h),l.then(o,o))}function kb(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function Sb(o,l,h,g,v){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(l=Ls(-1,1),l.tag=2,fi(h,l,1))),h.lanes|=1),o):(o.flags|=65536,o.lanes=v,o)}var tR=j.ReactCurrentOwner,Fn=!1;function Tn(o,l,h,g){l.child=o===null?V0(l,null,h,g):ua(l,o.child,h,g)}function Cb(o,l,h,g,v){h=h.render;var C=l.ref;return fa(l,v),g=qp(o,l,h,g,C,v),h=Gp(),o!==null&&!Fn?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~v,_s(o,l,v)):(mt&&h&&Ap(l),l.flags|=1,Tn(o,l,g,v),l.child)}function Nb(o,l,h,g,v){if(o===null){var C=h.type;return typeof C=="function"&&!Cm(C)&&C.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(l.tag=15,l.type=C,Eb(o,l,C,g,v)):(o=td(h.type,null,g,l,l.mode,v),o.ref=l.ref,o.return=l,l.child=o)}if(C=o.child,(o.lanes&v)===0){var T=C.memoizedProps;if(h=h.compare,h=h!==null?h:kl,h(T,g)&&o.ref===l.ref)return _s(o,l,v)}return l.flags|=1,o=yi(C,g),o.ref=l.ref,o.return=l,l.child=o}function Eb(o,l,h,g,v){if(o!==null){var C=o.memoizedProps;if(kl(C,g)&&o.ref===l.ref)if(Fn=!1,l.pendingProps=g=C,(o.lanes&v)!==0)(o.flags&131072)!==0&&(Fn=!0);else return l.lanes=o.lanes,_s(o,l,v)}return rm(o,l,h,g,v)}function Tb(o,l,h){var g=l.pendingProps,v=g.children,C=o!==null?o.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(ga,tr),tr|=h;
vendor: 9,943 bytes, line 8
8else{if((h&1073741824)===0)return o=C!==null?C.baseLanes|h:h,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,lt(ga,tr),tr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=C!==null?C.baseLanes:h,lt(ga,tr),tr|=g}else C!==null?(g=C.baseLanes|h,l.memoizedState=null):g=h,lt(ga,tr),tr|=g;return Tn(o,l,v,h),l.child}function Mb(o,l){var h=l.ref;(o===null&&h!==null||o!==null&&o.ref!==h)&&(l.flags|=512,l.flags|=2097152)}function rm(o,l,h,g,v){var C=zn(h)?ao:pn.current;return C=oa(l,C),fa(l,v),h=qp(o,l,h,g,C,v),g=Gp(),o!==null&&!Fn?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~v,_s(o,l,v)):(mt&&g&&Ap(l),l.flags|=1,Tn(o,l,h,v),l.child)}function jb(o,l,h,g,v){if(zn(h)){var C=!0;Eu(l)}else C=!1;if(fa(l,v),l.stateNode===null)Uu(o,l),xb(l,h,g),em(l,h,g,v),g=!0;else if(o===null){var T=l.stateNode,R=l.memoizedProps;T.props=R;var I=T.context,B=h.contextType;typeof B=="object"&&B!==null?B=mr(B):(B=zn(h)?ao:pn.current,B=oa(l,B));var q=h.getDerivedStateFromProps,Z=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function";Z||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(R!==g||I!==B)&&yb(l,T,g,B),di=!1;var K=l.memoizedState;T.state=K,Iu(l,g,T,v),I=l.memoizedState,R!==g||K!==I||_n.current||di?(typeof q=="function"&&(Zp(l,h,q,g),I=l.memoizedState),(R=di||gb(l,h,R,g,K,I,B))?(Z||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(l.flags|=4194308)):(typeof T.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=I),T.props=g,T.state=I,T.context=B,g=R):(typeof T.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{T=l.stateNode,W0(o,l),R=l.memoizedProps,B=l.type===l.elementType?R:Fr(l.type,R),T.props=B,Z=l.pendingProps,K=T.context,I=h.contextType,typeof I=="object"&&I!==null?I=mr(I):(I=zn(h)?ao:pn.current,I=oa(l,I));var he=h.getDerivedStateFromProps;(q=typeof he=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(R!==Z||K!==I)&&yb(l,T,g,I),di=!1,K=l.memoizedState,T.state=K,Iu(l,g,T,v);var ye=l.memoizedState;R!==Z||K!==ye||_n.current||di?(typeof he=="function"&&(Zp(l,h,he,g),ye=l.memoizedState),(B=di||gb(l,h,B,g,K,ye,I)||!1)?(q||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,ye,I),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,ye,I)),typeof T.componentDidUpdate=="function"&&(l.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof T.componentDidUpdate!="function"||R===o.memoizedProps&&K===o.memoizedState||(l.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||R===o.memoizedProps&&K===o.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=ye),T.props=g,T.state=ye,T.context=I,g=B):(typeof T.componentDidUpdate!="function"||R===o.memoizedProps&&K===o.memoizedState||(l.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||R===o.memoizedProps&&K===o.memoizedState||(l.flags|=1024),g=!1)}return sm(o,l,h,g,C,v)}function sm(o,l,h,g,v,C){Mb(o,l);var T=(l.flags&128)!==0;if(!g&&!T)return v&&D0(l,h,!1),_s(o,l,C);g=l.stateNode,tR.current=l;var R=T&&typeof h.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,o!==null&&T?(l.child=ua(l,o.child,null,C),l.child=ua(l,null,R,C)):Tn(o,l,R,C),l.memoizedState=g.state,v&&D0(l,h,!0),l.child}function Ab(o){var l=o.stateNode;l.pendingContext?O0(o,l.pendingContext,l.pendingContext!==l.context):l.context&&O0(o,l.context,!1),Bp(o,l.containerInfo)}function Rb(o,l,h,g,v){return ca(),Dp(v),l.flags|=256,Tn(o,l,h,g),l.child}var im={dehydrated:null,treeContext:null,retryLane:0};function om(o){return{baseLanes:o,cachePool:null,transitions:null}}function Ob(o,l,h){var g=l.pendingProps,v=xt.current,C=!1,T=(l.flags&128)!==0,R;if((R=T)||(R=o!==null&&o.memoizedState===null?!1:(v&2)!==0),R?(C=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(v|=1),lt(xt,v&1),o===null)return Pp(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(T=g.children,o=g.fallback,C?(g=l.mode,C=l.child,T={mode:"hidden",children:T},(g&1)===0&&C!==null?(C.childLanes=0,C.pendingProps=T):C=nd(T,g,0,null),o=yo(o,g,h,null),C.return=l,o.return=l,C.sibling=o,l.child=C,l.child.memoizedState=om(h),l.memoizedState=im,o):am(l,T));if(v=o.memoizedState,v!==null&&(R=v.dehydrated,R!==null))return nR(o,l,T,g,R,v,h);if(C){C=g.fallback,T=l.mode,v=o.child,R=v.sibling;var I={mode:"hidden",children:g.children};return(T&1)===0&&l.child!==v?(g=l.child,g.childLanes=0,g.pendingProps=I,l.deletions=null):(g=yi(v,I),g.subtreeFlags=v.subtreeFlags&14680064),R!==null?C=yi(R,C):(C=yo(C,T,h,null),C.flags|=2),C.return=l,g.return=l,g.sibling=C,l.child=g,g=C,C=l.child,T=o.child.memoizedState,T=T===null?om(h):{baseLanes:T.baseLanes|h,cachePool:null,transitions:T.transitions},C.memoizedState=T,C.childLanes=o.childLanes&~h,l.memoizedState=im,g}return C=o.child,o=C.sibling,g=yi(C,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=h),g.return=l,g.sibling=null,o!==null&&(h=l.deletions,h===null?(l.deletions=[o],l.flags|=16):h.push(o)),l.child=g,l.memoizedState=null,g}function am(o,l){return l=nd({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Vu(o,l,h,g){return g!==null&&Dp(g),ua(l,o.child,null,h),o=am(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function nR(o,l,h,g,v,C,T){if(h)return l.flags&256?(l.flags&=-257,g=tm(Error(n(422))),Vu(o,l,T,g)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(C=g.fallback,v=l.mode,g=nd({mode:"visible",children:g.children},v,0,null),C=yo(C,v,T,null),C.flags|=2,g.return=l,C.return=l,g.sibling=C,l.child=g,(l.mode&1)!==0&&ua(l,o.child,null,T),l.child.memoizedState=om(T),l.memoizedState=im,C);if((l.mode&1)===0)return Vu(o,l,T,null);if(v.data==="$!"){if(g=v.nextSibling&&v.nextSibling.dataset,g)var R=g.dgst;return g=R,C=Error(n(419)),g=tm(C,g,void 0),Vu(o,l,T,g)}if(R=(T&o.childLanes)!==0,Fn||R){if(g=Jt,g!==null){switch(T&-T){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(g.suspendedLanes|T))!==0?0:v,v!==0&&v!==C.retryLane&&(C.retryLane=v,Is(o,v),Hr(g,o,v,-1))}return Sm(),g=tm(Error(n(421))),Vu(o,l,T,g)}return v.data==="$?"?(l.flags|=128,l.child=o.child,l=mR.bind(null,o),v._reactRetry=l,null):(o=C.treeContext,er=ai(v.nextSibling),Zn=l,mt=!0,zr=null,o!==null&&(hr[pr++]=Ps,hr[pr++]=Ds,hr[pr++]=lo,Ps=o.id,Ds=o.overflow,lo=l),l=am(l,g.children),l.flags|=4096,l)}function Pb(o,l,h){o.lanes|=l;var g=o.alternate;g!==null&&(g.lanes|=l),zp(o.return,l,h)}function lm(o,l,h,g,v){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:v}:(C.isBackwards=l,C.rendering=null,C.renderingStartTime=0,C.last=g,C.tail=h,C.tailMode=v)}function Db(o,l,h){var g=l.pendingProps,v=g.revealOrder,C=g.tail;if(Tn(o,l,g.children,h),g=xt.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Pb(o,h,l);else if(o.tag===19)Pb(o,h,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}if(lt(xt,g),(l.mode&1)===0)l.memoizedState=null;else switch(v){case"forwards":for(h=l.child,v=null;h!==null;)o=h.alternate,o!==null&&Lu(o)===null&&(v=h),h=h.sibling;h=v,h===null?(v=l.child,l.child=null):(v=h.sibling,h.sibling=null),lm(l,!1,v,h,C);break;case"backwards":for(h=null,v=l.child,l.child=null;v!==null;){if(o=v.alternate,o!==null&&Lu(o)===null){l.child=v;break}o=v.sibling,v.sibling=h,h=v,v=o}lm(l,!0,h,null,C);break;case"together":lm(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Uu(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function _s(o,l,h){if(o!==null&&(l.dependencies=o.dependencies),po|=l.lanes,(h&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(n(153));if(l.child!==null){for(o=l.child,h=yi(o,o.pendingProps),l.child=h,h.return=l;o.sibling!==null;)o=o.sibling,h=h.sibling=yi(o,o.pendingProps),h.return=l;h.sibling=null}return l.child}function rR(o,l,h){switch(l.tag){case 3:Ab(l),ca();break;case 5:G0(l);break;case 1:zn(l.type)&&Eu(l);break;case 4:Bp(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,v=l.memoizedProps.value;lt(Ou,g._currentValue),g._currentValue=v;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(lt(xt,xt.current&1),l.flags|=128,null):(h&l.child.childLanes)!==0?Ob(o,l,h):(lt(xt,xt.current&1),o=_s(o,l,h),o!==null?o.sibling:null);lt(xt,xt.current&1);break;case 19:if(g=(h&l.childLanes)!==0,(o.flags&128)!==0){if(g)return Db(o,l,h);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),lt(xt,xt.current),g)break;return null;case 22:case 23:return l.lanes=0,Tb(o,l,h)}return _s(o,l,h)}var Ib,cm,Lb,_b;Ib=function(o,l){for(var h=l.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return;h=h.return}
vendor: 4,250 bytes, line 8
8h.sibling.return=h.return,h=h.sibling}},cm=function(){},Lb=function(o,l,h,g){var v=o.memoizedProps;if(v!==g){o=l.stateNode,fo(is.current);var C=null;switch(h){case"input":v=ot(o,v),g=ot(o,g),C=[];break;case"select":v=ee({},v,{value:void 0}),g=ee({},g,{value:void 0}),C=[];break;case"textarea":v=Ar(o,v),g=Ar(o,g),C=[];break;default:typeof v.onClick!="function"&&typeof g.onClick=="function"&&(o.onclick=Su)}qn(h,g);var T;h=null;for(B in v)if(!g.hasOwnProperty(B)&&v.hasOwnProperty(B)&&v[B]!=null)if(B==="style"){var R=v[B];for(T in R)R.hasOwnProperty(T)&&(h||(h={}),h[T]="")}else B!=="dangerouslySetInnerHTML"&&B!=="children"&&B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(s.hasOwnProperty(B)?C||(C=[]):(C=C||[]).push(B,null));for(B in g){var I=g[B];if(R=v?.[B],g.hasOwnProperty(B)&&I!==R&&(I!=null||R!=null))if(B==="style")if(R){for(T in R)!R.hasOwnProperty(T)||I&&I.hasOwnProperty(T)||(h||(h={}),h[T]="");for(T in I)I.hasOwnProperty(T)&&R[T]!==I[T]&&(h||(h={}),h[T]=I[T])}else h||(C||(C=[]),C.push(B,h)),h=I;else B==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,R=R?R.__html:void 0,I!=null&&R!==I&&(C=C||[]).push(B,I)):B==="children"?typeof I!="string"&&typeof I!="number"||(C=C||[]).push(B,""+I):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&(s.hasOwnProperty(B)?(I!=null&&B==="onScroll"&&dt("scroll",o),C||R===I||(C=[])):(C=C||[]).push(B,I))}h&&(C=C||[]).push("style",h);var B=C;(l.updateQueue=B)&&(l.flags|=4)}},_b=function(o,l,h,g){h!==g&&(l.flags|=4)};function _l(o,l){if(!mt)switch(o.tailMode){case"hidden":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function gn(o){var l=o.alternate!==null&&o.alternate.child===o.child,h=0,g=0;if(l)for(var v=o.child;v!==null;)h|=v.lanes|v.childLanes,g|=v.subtreeFlags&14680064,g|=v.flags&14680064,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)h|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=g,o.childLanes=h,l}function sR(o,l,h){var g=l.pendingProps;switch(Rp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(l),null;case 1:return zn(l.type)&&Nu(),gn(l),null;case 3:return g=l.stateNode,ha(),ft(_n),ft(pn),Up(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(o===null||o.child===null)&&(Au(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,zr!==null&&(bm(zr),zr=null))),cm(o,l),gn(l),null;case 5:Hp(l);var v=fo(Ol.current);if(h=l.type,o!==null&&l.stateNode!=null)Lb(o,l,h,g,v),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(n(166));return gn(l),null}if(o=fo(is.current),Au(l)){g=l.stateNode,h=l.type;var C=l.memoizedProps;switch(g[ss]=l,g[Tl]=C,o=(l.mode&1)!==0,h){case"dialog":dt("cancel",g),dt("close",g);break;case"iframe":case"object":case"embed":dt("load",g);break;case"video":case"audio":for(v=0;v<Cl.length;v++)dt(Cl[v],g);break;case"source":dt("error",g);break;case"img":case"image":case"link":dt("error",g),dt("load",g);break;case"details":dt("toggle",g);break;case"input":Mt(g,C),dt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!C.multiple},dt("invalid",g);break;case"textarea":no(g,C),dt("invalid",g)}qn(h,C),v=null;for(var T in C)if(C.hasOwnProperty(T)){var R=C[T];T==="children"?typeof R=="string"?g.textContent!==R&&(C.suppressHydrationWarning!==!0&&ku(g.textContent,R,o),v=["children",R]):typeof R=="number"&&g.textContent!==""+R&&(C.suppressHydrationWarning!==!0&&ku(g.textContent,R,o),v=["children",""+R]):s.hasOwnProperty(T)&&R!=null&&T==="onScroll"&&dt("scroll",g)}switch(h){case"input":Fe(g),lr(g,C,!0);break;case"textarea":Fe(g),es(g);break;case"select":case"option":break;default:typeof C.onClick=="function"&&(g.onclick=Su)}g=v,l.updateQueue=g,g!==null&&(l.flags|=4)}else{T=v.nodeType===9?v:v.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=Rr(h)),o==="http://www.w3.org/1999/xhtml"?h==="script"?(o=T.createElement("div"),o.innerHTML="<script><\/script>
8",o=o.removeChild(o.firstChild)):typeof g.is=="string"?o=T.createElement(h,{is:g.is}):(o=T.createElement(h),h==="select"&&(T=o,g.multiple?T.multiple=!0:g.size&&(T.size=g.size))):o=T.createElementNS(o,h),o[ss]=l,o[Tl]=g,Ib(o,l,!1,!1),l.stateNode=o;e:{switch(T=js(h,g),h){case"dialog":dt("cancel",o),dt("close",o),v=g;break;case"iframe":case"object":case"embed":dt("load",o),v=g;break;case"video":case"audio":for(v=0;v<Cl.length;v++)dt(Cl[v],o);v=g;break;case"source":dt("error",o),v=g;break;case"img":case"image":case"link":dt("error",o),dt("load",o),v=g;break;case"details":dt("toggle",o),v=g;break;case"input":Mt(o,g),v=ot(o,g),dt("invalid",o);break;case"option":v=g;break;case"select":o._wrapperState={wasMultiple:!!g.multiple},v=ee({},g,{value:void 0}),dt("invalid",o);break;case"textarea":no(o,g),v=Ar(o,g),dt("invalid",o);break;default:v=g}qn(h,v),R=v;for(C in R)if(R.hasOwnProperty(C)){var I=R[C];C==="style"?Ms(o,I):C==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&Or(o,I)):C==="children"?typeof I=="string"?(h!=="textarea"||I!=="")&&Pr(o,I):typeof I=="number"&&Pr(o,""+I):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(s.hasOwnProperty(C)?I!=null&&C==="onScroll"&&dt("scroll",o):I!=null&&M(o,C,I,T))}switch(h){case"input":Fe(o),lr(o,g,!1);break;case"textarea":Fe(o),es(o);break;case"option":g.value!=null&&o.setAttribute("value",""+fe(g.value));break;case"select":o.multiple=!!g.multiple,C=g.value,C!=null?Ln(o,!!g.multiple,C,!1):g.defaultValue!=null&&Ln(o,!!g.multiple,g.defaultValue,!0);break;default:typeof v.onClick=="function"&&(o.onclick=Su)}switch(h){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return gn(l),null;case 6:if(o&&l.stateNode!=null)_b(o,l,o.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(n(166));if(h=fo(Ol.current),fo(is.current),Au(l)){if(g=l.stateNode,h=l.memoizedProps,g[ss]=l,(C=g.nodeValue!==h)&&(o=Zn,o!==null))switch(o.tag){case 3:ku(g.nodeValue,h,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&ku(g.nodeValue,h,(o.mode&1)!==0)}C&&(l.flags|=4)}else g=(h.nodeType===9?h:h.ownerDocument).createTextNode(g),g[ss]=l,l.stateNode=g}return gn(l),null;case 13:if(ft(xt),g=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(mt&&er!==null&&(l.mode&1)!==0&&(l.flags&128)===0)$0(),ca(),l.flags|=98560,C=!1;else if(C=Au(l),g!==null&&g.dehydrated!==null){if(o===null){if(!C)throw Error(n(318));if(C=l.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[ss]=l}else ca(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;gn(l),C=!1}else zr!==null&&(bm(zr),zr=null),C=!0;if(!C)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=h,l):(g=g!==null,g!==(o!==null&&o.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(xt.current&1)!==0?$t===0&&($t=3):Sm())),l.updateQueue!==null&&(l.flags|=4),gn(l),null);case 4:return ha(),cm(o,l),o===null&&Nl(l.stateNode.containerInfo),gn(l),null;case 10:return _p(l.type._context),gn(l),null;case 17:return zn(l.type)&&Nu(),gn(l),null;case 19:if(ft(xt),C=l.memoizedState,C===null)return gn(l),null;if(g=(l.flags&128)!==0,T=C.rendering,T===null)if(g)_l(C,!1);else{if($t!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(T=Lu(o),T!==null){for(l.flags|=128,_l(C,!1),g=T.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=h,h=l.child;h!==null;
vendor: 7,363 bytes, line 8
8)C=h,o=g,C.flags&=14680066,T=C.alternate,T===null?(C.childLanes=0,C.lanes=o,C.child=null,C.subtreeFlags=0,C.memoizedProps=null,C.memoizedState=null,C.updateQueue=null,C.dependencies=null,C.stateNode=null):(C.childLanes=T.childLanes,C.lanes=T.lanes,C.child=T.child,C.subtreeFlags=0,C.deletions=null,C.memoizedProps=T.memoizedProps,C.memoizedState=T.memoizedState,C.updateQueue=T.updateQueue,C.type=T.type,o=T.dependencies,C.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),h=h.sibling;return lt(xt,xt.current&1|2),l.child}o=o.sibling}C.tail!==null&&$e()>xa&&(l.flags|=128,g=!0,_l(C,!1),l.lanes=4194304)}else{if(!g)if(o=Lu(T),o!==null){if(l.flags|=128,g=!0,h=o.updateQueue,h!==null&&(l.updateQueue=h,l.flags|=4),_l(C,!0),C.tail===null&&C.tailMode==="hidden"&&!T.alternate&&!mt)return gn(l),null}else 2*$e()-C.renderingStartTime>xa&&h!==1073741824&&(l.flags|=128,g=!0,_l(C,!1),l.lanes=4194304);C.isBackwards?(T.sibling=l.child,l.child=T):(h=C.last,h!==null?h.sibling=T:l.child=T,C.last=T)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=$e(),l.sibling=null,h=xt.current,lt(xt,g?h&1|2:h&1),l):(gn(l),null);case 22:case 23:return km(),g=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(tr&1073741824)!==0&&(gn(l),l.subtreeFlags&6&&(l.flags|=8192)):gn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function iR(o,l){switch(Rp(l),l.tag){case 1:return zn(l.type)&&Nu(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return ha(),ft(_n),ft(pn),Up(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Hp(l),null;case 13:if(ft(xt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));ca()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return ft(xt),null;case 4:return ha(),null;case 10:return _p(l.type._context),null;case 22:case 23:return km(),null;case 24:return null;default:return null}}var Wu=!1,xn=!1,oR=typeof WeakSet=="function"?WeakSet:Set,xe=null;function ma(o,l){var h=o.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(g){Ct(o,l,g)}else h.current=null}function um(o,l,h){try{h()}catch(g){Ct(o,l,g)}}var zb=!1;function aR(o,l){if(kp=du,o=g0(),pp(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var g=h.getSelection&&h.getSelection();if(g&&g.rangeCount!==0){h=g.anchorNode;var v=g.anchorOffset,C=g.focusNode;g=g.focusOffset;try{h.nodeType,C.nodeType}catch{h=null;break e}var T=0,R=-1,I=-1,B=0,q=0,Z=o,K=null;t:for(;;){for(var he;Z!==h||v!==0&&Z.nodeType!==3||(R=T+v),Z!==C||g!==0&&Z.nodeType!==3||(I=T+g),Z.nodeType===3&&(T+=Z.nodeValue.length),(he=Z.firstChild)!==null;)K=Z,Z=he;for(;;){if(Z===o)break t;if(K===h&&++B===v&&(R=T),K===C&&++q===g&&(I=T),(he=Z.nextSibling)!==null)break;Z=K,K=Z.parentNode}Z=he}h=R===-1||I===-1?null:{start:R,end:I}}else h=null}h=h||{start:0,end:0}}else h=null;for(Sp={focusedElem:o,selectionRange:h},du=!1,xe=l;xe!==null;)if(l=xe,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,xe=o;else for(;xe!==null;){l=xe;try{var ye=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var be=ye.memoizedProps,At=ye.memoizedState,F=l.stateNode,_=F.getSnapshotBeforeUpdate(l.elementType===l.type?be:Fr(l.type,be),At);F.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var $=l.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(re){Ct(l,l.return,re)}if(o=l.sibling,o!==null){o.return=l.return,xe=o;break}xe=l.return}return ye=zb,zb=!1,ye}function zl(o,l,h){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var v=g=g.next;do{if((v.tag&o)===o){var C=v.destroy;v.destroy=void 0,C!==void 0&&um(l,h,C)}v=v.next}while(v!==g)}}function Ku(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var h=l=l.next;do{if((h.tag&o)===o){var g=h.create;h.destroy=g()}h=h.next}while(h!==l)}}function dm(o){var l=o.ref;if(l!==null){var h=o.stateNode;o.tag,o=h,typeof l=="function"?l(o):l.current=o}}function Fb(o){var l=o.alternate;l!==null&&(o.alternate=null,Fb(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[ss],delete l[Tl],delete l[Tp],delete l[VA],delete l[UA])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function $b(o){return o.tag===5||o.tag===3||o.tag===4}function Bb(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||$b(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function fm(o,l,h){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?h.nodeType===8?h.parentNode.insertBefore(o,l):h.insertBefore(o,l):(h.nodeType===8?(l=h.parentNode,l.insertBefore(o,h)):(l=h,l.appendChild(o)),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=Su));else if(g!==4&&(o=o.child,o!==null))for(fm(o,l,h),o=o.sibling;o!==null;)fm(o,l,h),o=o.sibling}function hm(o,l,h){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?h.insertBefore(o,l):h.appendChild(o);else if(g!==4&&(o=o.child,o!==null))for(hm(o,l,h),o=o.sibling;o!==null;)hm(o,l,h),o=o.sibling}var rn=null,$r=!1;function hi(o,l,h){for(h=h.child;h!==null;)Hb(o,l,h),h=h.sibling}function Hb(o,l,h){if(Yn&&typeof Yn.onCommitFiberUnmount=="function")try{Yn.onCommitFiberUnmount(io,h)}catch{}switch(h.tag){case 5:xn||ma(h,l);case 6:var g=rn,v=$r;rn=null,hi(o,l,h),rn=g,$r=v,rn!==null&&($r?(o=rn,h=h.stateNode,o.nodeType===8?o.parentNode.removeChild(h):o.removeChild(h)):rn.removeChild(h.stateNode));break;case 18:rn!==null&&($r?(o=rn,h=h.stateNode,o.nodeType===8?Ep(o.parentNode,h):o.nodeType===1&&Ep(o,h),gl(o)):Ep(rn,h.stateNode));break;case 4:g=rn,v=$r,rn=h.stateNode.containerInfo,$r=!0,hi(o,l,h),rn=g,$r=v;break;case 0:case 11:case 14:case 15:if(!xn&&(g=h.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){v=g=g.next;do{var C=v,T=C.destroy;C=C.tag,T!==void 0&&((C&2)!==0||(C&4)!==0)&&um(h,l,T),v=v.next}while(v!==g)}hi(o,l,h);break;case 1:if(!xn&&(ma(h,l),g=h.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=h.memoizedProps,g.state=h.memoizedState,g.componentWillUnmount()}catch(R){Ct(h,l,R)}hi(o,l,h);break;case 21:hi(o,l,h);break;case 22:h.mode&1?(xn=(g=xn)||h.memoizedState!==null,hi(o,l,h),xn=g):hi(o,l,h);break;default:hi(o,l,h)}}function Vb(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var h=o.stateNode;h===null&&(h=o.stateNode=new oR),l.forEach(function(g){var v=gR.bind(null,o,g);h.has(g)||(h.add(g),g.then(v,v))})}}function Br(o,l){var h=l.deletions;if(h!==null)for(var g=0;g<h.length;g++){var v=h[g];try{var C=o,T=l,R=T;e:for(;R!==null;){switch(R.tag){case 5:rn=R.stateNode,$r=!1;break e;case 3:rn=R.stateNode.containerInfo,$r=!0;break e;case 4:rn=R.stateNode.containerInfo,$r=!0;break e}R=R.return}if(rn===null)throw Error(n(160));Hb(C,T,v),rn=null,$r=!1;var I=v.alternate;I!==null&&(I.return=null),v.return=null}catch(B){Ct(v,l,B)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)Ub(l,o),l=l.sibling}
vendor: 12,691 bytes, line 8
8function Ub(o,l){var h=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Br(l,o),ls(o),g&4){try{zl(3,o,o.return),Ku(3,o)}catch(be){Ct(o,o.return,be)}try{zl(5,o,o.return)}catch(be){Ct(o,o.return,be)}}break;case 1:Br(l,o),ls(o),g&512&&h!==null&&ma(h,h.return);break;case 5:if(Br(l,o),ls(o),g&512&&h!==null&&ma(h,h.return),o.flags&32){var v=o.stateNode;try{Pr(v,"")}catch(be){Ct(o,o.return,be)}}if(g&4&&(v=o.stateNode,v!=null)){var C=o.memoizedProps,T=h!==null?h.memoizedProps:C,R=o.type,I=o.updateQueue;if(o.updateQueue=null,I!==null)try{R==="input"&&C.type==="radio"&&C.name!=null&&nn(v,C),js(R,T);var B=js(R,C);for(T=0;T<I.length;T+=2){var q=I[T],Z=I[T+1];q==="style"?Ms(v,Z):q==="dangerouslySetInnerHTML"?Or(v,Z):q==="children"?Pr(v,Z):M(v,q,Z,B)}switch(R){case"input":In(v,C);break;case"textarea":Es(v,C);break;case"select":var K=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!C.multiple;var he=C.value;he!=null?Ln(v,!!C.multiple,he,!1):K!==!!C.multiple&&(C.defaultValue!=null?Ln(v,!!C.multiple,C.defaultValue,!0):Ln(v,!!C.multiple,C.multiple?[]:"",!1))}v[Tl]=C}catch(be){Ct(o,o.return,be)}}break;case 6:if(Br(l,o),ls(o),g&4){if(o.stateNode===null)throw Error(n(162));v=o.stateNode,C=o.memoizedProps;try{v.nodeValue=C}catch(be){Ct(o,o.return,be)}}break;case 3:if(Br(l,o),ls(o),g&4&&h!==null&&h.memoizedState.isDehydrated)try{gl(l.containerInfo)}catch(be){Ct(o,o.return,be)}break;case 4:Br(l,o),ls(o);break;case 13:Br(l,o),ls(o),v=o.child,v.flags&8192&&(C=v.memoizedState!==null,v.stateNode.isHidden=C,!C||v.alternate!==null&&v.alternate.memoizedState!==null||(gm=$e())),g&4&&Vb(o);break;case 22:if(q=h!==null&&h.memoizedState!==null,o.mode&1?(xn=(B=xn)||q,Br(l,o),xn=B):Br(l,o),ls(o),g&8192){if(B=o.memoizedState!==null,(o.stateNode.isHidden=B)&&!q&&(o.mode&1)!==0)for(xe=o,q=o.child;q!==null;){for(Z=xe=q;xe!==null;){switch(K=xe,he=K.child,K.tag){case 0:case 11:case 14:case 15:zl(4,K,K.return);break;case 1:ma(K,K.return);var ye=K.stateNode;if(typeof ye.componentWillUnmount=="function"){g=K,h=K.return;try{l=g,ye.props=l.memoizedProps,ye.state=l.memoizedState,ye.componentWillUnmount()}catch(be){Ct(g,h,be)}}break;case 5:ma(K,K.return);break;case 22:if(K.memoizedState!==null){qb(Z);continue}}he!==null?(he.return=K,xe=he):qb(Z)}q=q.sibling}e:for(q=null,Z=o;;){if(Z.tag===5){if(q===null){q=Z;try{v=Z.stateNode,B?(C=v.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none"):(R=Z.stateNode,I=Z.memoizedProps.style,T=I!=null&&I.hasOwnProperty("display")?I.display:null,R.style.display=Ts("display",T))}catch(be){Ct(o,o.return,be)}}}else if(Z.tag===6){if(q===null)try{Z.stateNode.nodeValue=B?"":Z.memoizedProps}catch(be){Ct(o,o.return,be)}}else if((Z.tag!==22&&Z.tag!==23||Z.memoizedState===null||Z===o)&&Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===o)break e;for(;Z.sibling===null;){if(Z.return===null||Z.return===o)break e;q===Z&&(q=null),Z=Z.return}q===Z&&(q=null),Z.sibling.return=Z.return,Z=Z.sibling}}break;case 19:Br(l,o),ls(o),g&4&&Vb(o);break;case 21:break;default:Br(l,o),ls(o)}}function ls(o){var l=o.flags;if(l&2){try{e:{for(var h=o.return;h!==null;){if($b(h)){var g=h;break e}h=h.return}throw Error(n(160))}switch(g.tag){case 5:var v=g.stateNode;g.flags&32&&(Pr(v,""),g.flags&=-33);var C=Bb(o);hm(o,C,v);break;case 3:case 4:var T=g.stateNode.containerInfo,R=Bb(o);fm(o,R,T);break;default:throw Error(n(161))}}catch(I){Ct(o,o.return,I)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function lR(o,l,h){xe=o,Wb(o)}function Wb(o,l,h){for(var g=(o.mode&1)!==0;xe!==null;){var v=xe,C=v.child;if(v.tag===22&&g){var T=v.memoizedState!==null||Wu;if(!T){var R=v.alternate,I=R!==null&&R.memoizedState!==null||xn;R=Wu;var B=xn;if(Wu=T,(xn=I)&&!B)for(xe=v;xe!==null;)T=xe,I=T.child,T.tag===22&&T.memoizedState!==null?Gb(v):I!==null?(I.return=T,xe=I):Gb(v);for(;C!==null;)xe=C,Wb(C),C=C.sibling;xe=v,Wu=R,xn=B}Kb(o)}else(v.subtreeFlags&8772)!==0&&C!==null?(C.return=v,xe=C):Kb(o)}}function Kb(o){for(;xe!==null;){var l=xe;if((l.flags&8772)!==0){var h=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:xn||Ku(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!xn)if(h===null)g.componentDidMount();else{var v=l.elementType===l.type?h.memoizedProps:Fr(l.type,h.memoizedProps);g.componentDidUpdate(v,h.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var C=l.updateQueue;C!==null&&q0(l,C,g);break;case 3:var T=l.updateQueue;if(T!==null){if(h=null,l.child!==null)switch(l.child.tag){case 5:h=l.child.stateNode;break;case 1:h=l.child.stateNode}q0(l,T,h)}break;case 5:var R=l.stateNode;if(h===null&&l.flags&4){h=R;var I=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&h.focus();break;case"img":I.src&&(h.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var B=l.alternate;if(B!==null){var q=B.memoizedState;if(q!==null){var Z=q.dehydrated;Z!==null&&gl(Z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||l.flags&512&&dm(l)}catch(K){Ct(l,l.return,K)}}if(l===o){xe=null;break}if(h=l.sibling,h!==null){h.return=l.return,xe=h;break}xe=l.return}}function qb(o){for(;xe!==null;){var l=xe;if(l===o){xe=null;break}var h=l.sibling;if(h!==null){h.return=l.return,xe=h;break}xe=l.return}}function Gb(o){for(;xe!==null;){var l=xe;try{switch(l.tag){case 0:case 11:case 15:var h=l.return;try{Ku(4,l)}catch(I){Ct(l,h,I)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var v=l.return;try{g.componentDidMount()}catch(I){Ct(l,v,I)}}var C=l.return;try{dm(l)}catch(I){Ct(l,C,I)}break;case 5:var T=l.return;try{dm(l)}catch(I){Ct(l,T,I)}}}catch(I){Ct(l,l.return,I)}if(l===o){xe=null;break}var R=l.sibling;if(R!==null){R.return=l.return,xe=R;break}xe=l.return}}var cR=Math.ceil,qu=j.ReactCurrentDispatcher,pm=j.ReactCurrentOwner,xr=j.ReactCurrentBatchConfig,Je=0,Jt=null,Pt=null,sn=0,tr=0,ga=li(0),$t=0,Fl=null,po=0,Gu=0,mm=0,$l=null,$n=null,gm=0,xa=1/0,zs=null,Qu=!1,xm=null,pi=null,Ju=!1,mi=null,Yu=0,Bl=0,ym=null,Xu=-1,Zu=0;function Mn(){return(Je&6)!==0?$e():Xu!==-1?Xu:Xu=$e()}function gi(o){return(o.mode&1)===0?1:(Je&2)!==0&&sn!==0?sn&-sn:KA.transition!==null?(Zu===0&&(Zu=Bv()),Zu):(o=Ze,o!==0||(o=window.event,o=o===void 0?16:Jv(o.type)),o)}function Hr(o,l,h,g){if(50<Bl)throw Bl=0,ym=null,Error(n(185));dl(o,h,g),((Je&2)===0||o!==Jt)&&(o===Jt&&((Je&2)===0&&(Gu|=h),$t===4&&xi(o,sn)),Bn(o,g),h===1&&Je===0&&(l.mode&1)===0&&(xa=$e()+500,Tu&&ui()))}function Bn(o,l){var h=o.callbackNode;Kj(o,l);var g=lu(o,o===Jt?sn:0);if(g===0)h!==null&&te(h),o.callbackNode=null,o.callbackPriority=0;else if(l=g&-g,o.callbackPriority!==l){if(h!=null&&te(h),l===1)o.tag===0?WA(Jb.bind(null,o)):I0(Jb.bind(null,o)),BA(function(){(Je&6)===0&&ui()}),h=null;else{switch(Hv(g)){case 1:h=Gt;break;case 4:h=fr;break;case 16:h=Ir;break;case 536870912:h=Ot;break;default:h=Ir}h=s1(h,Qb.bind(null,o))}o.callbackPriority=l,o.callbackNode=h}}function Qb(o,l){if(Xu=-1,Zu=0,(Je&6)!==0)throw Error(n(327));var h=o.callbackNode;if(ya()&&o.callbackNode!==h)return null;var g=lu(o,o===Jt?sn:0);if(g===0)return null;if((g&30)!==0||(g&o.expiredLanes)!==0||l)l=ed(o,g);else{l=g;var v=Je;Je|=2;var C=Xb();(Jt!==o||sn!==l)&&(zs=null,xa=$e()+500,go(o,l));do try{fR();break}catch(R){Yb(o,R)}while(!0);Lp(),qu.current=C,Je=v,Pt!==null?l=0:(Jt=null,sn=0,l=$t)}if(l!==0){if(l===2&&(v=Xh(o),v!==0&&(g=v,l=vm(o,v))),l===1)throw h=Fl,go(o,0),xi(o,g),Bn(o,$e()),h;if(l===6)xi(o,g);else{if(v=o.current.alternate,(g&30)===0&&!uR(v)&&(l=ed(o,g),l===2&&(C=Xh(o),C!==0&&(g=C,l=vm(o,C))),l===1))throw h=Fl,go(o,0),xi(o,g),Bn(o,$e()),h;switch(o.finishedWork=v,o.finishedLanes=g,l){case 0:case 1:throw Error(n(345));case 2:xo(o,$n,zs);break;case 3:if(xi(o,g),(g&130023424)===g&&(l=gm+500-$e(),10<l)){if(lu(o,0)!==0)break;if(v=o.suspendedLanes,(v&g)!==g){Mn(),o.pingedLanes|=o.suspendedLanes&v;break}o.timeoutHandle=Np(xo.bind(null,o,$n,zs),l);break}xo(o,$n,zs);break;case 4:if(xi(o,g),(g&4194240)===g)break;for(l=o.eventTimes,v=-1;0<g;){var T=31-Lr(g);C=1<<T,T=l[T],T>v&&(v=T),g&=~C}if(g=v,g=$e()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*cR(g/1960))-g,10<g){o.timeoutHandle=Np(xo.bind(null,o,$n,zs),g);break}xo(o,$n,zs);break;case 5:xo(o,$n,zs);break;default:throw Error(n(329))}}}return Bn(o,$e()),o.callbackNode===h?Qb.bind(null,o):null}function vm(o,l){var h=$l;return o.current.memoizedState.isDehydrated&&(go(o,l).flags|=256),o=ed(o,l),o!==2&&(l=$n,$n=h,l!==null&&bm(l)),o}function bm(o){$n===null?$n=o:$n.push.apply($n,o)}function uR(o){for(var l=o;;){if(l.flags&16384){var h=l.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var g=0;g<h.length;g++){var v=h[g],C=v.getSnapshot;v=v.value;try{if(!_r(C(),v))return!1}catch{return!1}}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function xi(o,l){for(l&=~mm,l&=~Gu,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var h=31-Lr(l),g=1<<h;o[h]=-1,l&=~g}}function Jb(o){if((Je&6)!==0)throw Error(n(327));ya();var l=lu(o,0);if((l&1)===0)return Bn(o,$e()),null;var h=ed(o,l);if(o.tag!==0&&h===2){var g=Xh(o);g!==0&&(l=g,h=vm(o,g))}if(h===1)throw h=Fl,go(o,0),xi(o,l),Bn(o,$e()),h;if(h===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,xo(o,$n,zs),Bn(o,$e()),null}function wm(o,l){var h=Je;Je|=1;try{return o(l)}finally{Je=h,Je===0&&(xa=$e()+500,Tu&&ui())}}function mo(o){mi!==null&&mi.tag===0&&(Je&6)===0&&ya();var l=Je;Je|=1;var h=xr.transition,g=Ze;try{if(xr.transition=null,Ze=1,o)return o()}finally{Ze=g,xr.transition=h,Je=l,(Je&6)===0&&ui()}}function km(){tr=ga.current,ft(ga)}function go(o,l){o.finishedWork=null,o.finishedLanes=0;var h=o.timeoutHandle;if(h!==-1&&(o.timeoutHandle=-1,$A(h)),Pt!==null)for(h=Pt.return;h!==null;){var g=h;switch(Rp(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&Nu();break;case 3:ha(),ft(_n),ft(pn),Up();break;case 5:Hp(g);break;case 4:ha();break;case 13:ft(xt);break;case 19:ft(xt);break;case 10:_p(g.type._context);break;case 22:case 23:km()}h=h.return}if(Jt=o,Pt=o=yi(o.current,null),sn=tr=l,$t=0,Fl=null,mm=Gu=po=0,$n=$l=null,uo!==null){for(l=0;l<uo.length;l++)if(h=uo[l],g=h.interleaved,g!==null){h.interleaved=null;var v=g.next,C=h.pending;if(C!==null){var T=C.next;C.next=v,g.next=T}h.pending=g}uo=null}return o}function Yb(o,l){do{var h=Pt;try{if(Lp(),_u.current=Bu,zu){for(var g=yt.memoizedState;g!==null;){var v=g.queue;v!==null&&(v.pending=null),g=g.next}zu=!1}if(ho=0,Qt=Ft=yt=null,Pl=!1,Dl=0,pm.current=null,h===null||h.return===null){$t=1,Fl=l,Pt=null;break}e:{var C=o,T=h.return,R=h,I=l;if(l=sn,R.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var B=I,q=R,Z=q.tag;if((q.mode&1)===0&&(Z===0||Z===11||Z===15)){var K=q.alternate;K?(q.updateQueue=K.updateQueue,q.memoizedState=K.memoizedState,q.lanes=K.lanes):(q.updateQueue=null,q.memoizedState=null)}var he=kb(T);if(he!==null){he.flags&=-257,Sb(he,T,R,C,l),he.mode&1&&wb(C,B,l),l=he,I=B;var ye=l.updateQueue;if(ye===null){var be=new Set;be.add(I),l.updateQueue=be}else ye.add(I);break e}else{if((l&1)===0){wb(C,B,l),Sm();break e}I=Error(n(426))}}else if(mt&&R.mode&1){var At=kb(T);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),Sb(At,T,R,C,l),Dp(pa(I,R));break e}}C=I=pa(I,R),$t!==4&&($t=2),$l===null?$l=[C]:$l.push(C),C=T;do{switch(C.tag){case 3:C.flags|=65536,l&=-l,C.lanes|=l;var F=vb(C,I,l);K0(C,F);break e;case 1:R=I;var _=C.type,$=C.stateNode;if((C.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(pi===null||!pi.has($)))){C.flags|=65536,l&=-l,C.lanes|=l;var re=bb(C,R,l);K0(C,re);break e}}C=C.return}while(C!==null)}e1(h)}catch(ke){l=ke,Pt===h&&h!==null&&(Pt=h=h.return);continue}break}while(!0)}function Xb(){var o=qu.current;return qu.current=Bu,o===null?Bu:o}function Sm(){($t===0||$t===3||$t===2)&&($t=4),Jt===null||(po&268435455)===0&&(Gu&268435455)===0||xi(Jt,sn)}function ed(o,l){var h=Je;Je|=2;var g=Xb();(Jt!==o||sn!==l)&&(zs=null,go(o,l));do try{dR();break}catch(v){Yb(o,v)}while(!0);if(Lp(),Je=h,qu.current=g,Pt!==null)throw Error(n(261));return Jt=null,sn=0,$t}function dR(){for(;Pt!==null;)Zb(Pt)}function fR(){for(;Pt!==null&&!ve();)Zb(Pt)}function Zb(o){var l=r1(o.alternate,o,tr);o.memoizedProps=o.pendingProps,l===null?e1(o):Pt=l,pm.current=null}function e1(o){var l=o;do{var h=l.alternate;if(o=l.return,(l.flags&32768)===0){if(h=sR(h,l,tr),h!==null){Pt=h;return}}else{if(h=iR(h,l),h!==null){h.flags&=32767,Pt=h;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;
vendor: 4,482 bytes, line 8
8else{$t=6,Pt=null;return}}if(l=l.sibling,l!==null){Pt=l;return}Pt=l=o}while(l!==null);$t===0&&($t=5)}function xo(o,l,h){var g=Ze,v=xr.transition;try{xr.transition=null,Ze=1,hR(o,l,h,g)}finally{xr.transition=v,Ze=g}return null}function hR(o,l,h,g){do ya();while(mi!==null);if((Je&6)!==0)throw Error(n(327));h=o.finishedWork;var v=o.finishedLanes;if(h===null)return null;if(o.finishedWork=null,o.finishedLanes=0,h===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var C=h.lanes|h.childLanes;if(qj(o,C),o===Jt&&(Pt=Jt=null,sn=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Ju||(Ju=!0,s1(Ir,function(){return ya(),null})),C=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||C){C=xr.transition,xr.transition=null;var T=Ze;Ze=1;var R=Je;Je|=4,pm.current=null,aR(o,h),Ub(h,o),PA(Sp),du=!!kp,Sp=kp=null,o.current=h,lR(h),at(),Je=R,Ze=T,xr.transition=C}else o.current=h;if(Ju&&(Ju=!1,mi=o,Yu=v),C=o.pendingLanes,C===0&&(pi=null),Bj(h.stateNode),Bn(o,$e()),l!==null)for(g=o.onRecoverableError,h=0;h<l.length;h++)v=l[h],g(v.value,{componentStack:v.stack,digest:v.digest});if(Qu)throw Qu=!1,o=xm,xm=null,o;return(Yu&1)!==0&&o.tag!==0&&ya(),C=o.pendingLanes,(C&1)!==0?o===ym?Bl++:(Bl=0,ym=o):Bl=0,ui(),null}function ya(){if(mi!==null){var o=Hv(Yu),l=xr.transition,h=Ze;try{if(xr.transition=null,Ze=16>o?16:o,mi===null)var g=!1;else{if(o=mi,mi=null,Yu=0,(Je&6)!==0)throw Error(n(331));var v=Je;for(Je|=4,xe=o.current;xe!==null;){var C=xe,T=C.child;if((xe.flags&16)!==0){var R=C.deletions;if(R!==null){for(var I=0;I<R.length;I++){var B=R[I];for(xe=B;xe!==null;){var q=xe;switch(q.tag){case 0:case 11:case 15:zl(8,q,C)}var Z=q.child;if(Z!==null)Z.return=q,xe=Z;else for(;xe!==null;){q=xe;var K=q.sibling,he=q.return;if(Fb(q),q===B){xe=null;break}if(K!==null){K.return=he,xe=K;break}xe=he}}}var ye=C.alternate;if(ye!==null){var be=ye.child;if(be!==null){ye.child=null;do{var At=be.sibling;be.sibling=null,be=At}while(be!==null)}}xe=C}}if((C.subtreeFlags&2064)!==0&&T!==null)T.return=C,xe=T;else e:for(;xe!==null;){if(C=xe,(C.flags&2048)!==0)switch(C.tag){case 0:case 11:case 15:zl(9,C,C.return)}var F=C.sibling;if(F!==null){F.return=C.return,xe=F;break e}xe=C.return}}var _=o.current;for(xe=_;xe!==null;){T=xe;var $=T.child;if((T.subtreeFlags&2064)!==0&&$!==null)$.return=T,xe=$;else e:for(T=_;xe!==null;){if(R=xe,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:Ku(9,R)}}catch(ke){Ct(R,R.return,ke)}if(R===T){xe=null;break e}var re=R.sibling;if(re!==null){re.return=R.return,xe=re;break e}xe=R.return}}if(Je=v,ui(),Yn&&typeof Yn.onPostCommitFiberRoot=="function")try{Yn.onPostCommitFiberRoot(io,o)}catch{}g=!0}return g}finally{Ze=h,xr.transition=l}}return!1}function t1(o,l,h){l=pa(h,l),l=vb(o,l,1),o=fi(o,l,1),l=Mn(),o!==null&&(dl(o,1,l),Bn(o,l))}function Ct(o,l,h){if(o.tag===3)t1(o,o,h);else for(;l!==null;){if(l.tag===3){t1(l,o,h);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(pi===null||!pi.has(g))){o=pa(h,o),o=bb(l,o,1),l=fi(l,o,1),o=Mn(),l!==null&&(dl(l,1,o),Bn(l,o));break}}l=l.return}}function pR(o,l,h){var g=o.pingCache;g!==null&&g.delete(l),l=Mn(),o.pingedLanes|=o.suspendedLanes&h,Jt===o&&(sn&h)===h&&($t===4||$t===3&&(sn&130023424)===sn&&500>$e()-gm?go(o,0):mm|=h),Bn(o,l)}function n1(o,l){l===0&&((o.mode&1)===0?l=1:(l=au,au<<=1,(au&130023424)===0&&(au=4194304)));var h=Mn();o=Is(o,l),o!==null&&(dl(o,l,h),Bn(o,h))}function mR(o){var l=o.memoizedState,h=0;l!==null&&(h=l.retryLane),n1(o,h)}function gR(o,l){var h=0;switch(o.tag){case 13:var g=o.stateNode,v=o.memoizedState;v!==null&&(h=v.retryLane);break;case 19:g=o.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(l),n1(o,h)}var r1;r1=function(o,l,h){if(o!==null)if(o.memoizedProps!==l.pendingProps||_n.current)Fn=!0;else{if((o.lanes&h)===0&&(l.flags&128)===0)return Fn=!1,rR(o,l,h);Fn=(o.flags&131072)!==0}else Fn=!1,mt&&(l.flags&1048576)!==0&&L0(l,ju,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;Uu(o,l),o=l.pendingProps;var v=oa(l,pn.current);fa(l,h),v=qp(null,l,g,o,v,h);var C=Gp();return l.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,zn(g)?(C=!0,Eu(l)):C=!1,l.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,$p(l),v.updater=Hu,l.stateNode=v,v._reactInternals=l,em(l,g,o,h),l=sm(null,l,g,!0,C,h)):(l.tag=0,mt&&C&&Ap(l),Tn(null,l,v,h),l=l.child),l;case 16:g=l.elementType;
vendor: 2,878 bytes, line 8
8e:{switch(Uu(o,l),o=l.pendingProps,v=g._init,g=v(g._payload),l.type=g,v=l.tag=yR(g),o=Fr(g,o),v){case 0:l=rm(null,l,g,o,h);break e;case 1:l=jb(null,l,g,o,h);break e;case 11:l=Cb(null,l,g,o,h);break e;case 14:l=Nb(null,l,g,Fr(g.type,o),h);break e}throw Error(n(306,g,""))}return l;case 0:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:Fr(g,v),rm(o,l,g,v,h);case 1:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:Fr(g,v),jb(o,l,g,v,h);case 3:e:{if(Ab(l),o===null)throw Error(n(387));g=l.pendingProps,C=l.memoizedState,v=C.element,W0(o,l),Iu(l,g,null,h);var T=l.memoizedState;if(g=T.element,C.isDehydrated)if(C={element:g,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){v=pa(Error(n(423)),l),l=Rb(o,l,g,h,v);break e}else if(g!==v){v=pa(Error(n(424)),l),l=Rb(o,l,g,h,v);break e}else for(er=ai(l.stateNode.containerInfo.firstChild),Zn=l,mt=!0,zr=null,h=V0(l,null,g,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ca(),g===v){l=_s(o,l,h);break e}Tn(o,l,g,h)}l=l.child}return l;case 5:return G0(l),o===null&&Pp(l),g=l.type,v=l.pendingProps,C=o!==null?o.memoizedProps:null,T=v.children,Cp(g,v)?T=null:C!==null&&Cp(g,C)&&(l.flags|=32),Mb(o,l),Tn(o,l,T,h),l.child;case 6:return o===null&&Pp(l),null;case 13:return Ob(o,l,h);case 4:return Bp(l,l.stateNode.containerInfo),g=l.pendingProps,o===null?l.child=ua(l,null,g,h):Tn(o,l,g,h),l.child;case 11:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:Fr(g,v),Cb(o,l,g,v,h);case 7:return Tn(o,l,l.pendingProps,h),l.child;case 8:return Tn(o,l,l.pendingProps.children,h),l.child;case 12:return Tn(o,l,l.pendingProps.children,h),l.child;case 10:e:{if(g=l.type._context,v=l.pendingProps,C=l.memoizedProps,T=v.value,lt(Ou,g._currentValue),g._currentValue=T,C!==null)if(_r(C.value,T)){if(C.children===v.children&&!_n.current){l=_s(o,l,h);break e}}else for(C=l.child,C!==null&&(C.return=l);C!==null;){var R=C.dependencies;if(R!==null){T=C.child;for(var I=R.firstContext;I!==null;){if(I.context===g){if(C.tag===1){I=Ls(-1,h&-h),I.tag=2;var B=C.updateQueue;if(B!==null){B=B.shared;var q=B.pending;q===null?I.next=I:(I.next=q.next,q.next=I),B.pending=I}}C.lanes|=h,I=C.alternate,I!==null&&(I.lanes|=h),zp(C.return,h,l),R.lanes|=h;break}I=I.next}}else if(C.tag===10)T=C.type===l.type?null:C.child;else if(C.tag===18){if(T=C.return,T===null)throw Error(n(341));T.lanes|=h,R=T.alternate,R!==null&&(R.lanes|=h),zp(T,h,l),T=C.sibling}else T=C.child;if(T!==null)T.return=C;else for(T=C;T!==null;){if(T===l){T=null;break}if(C=T.sibling,C!==null){C.return=T.return,T=C;break}T=T.return}C=T}Tn(o,l,v.children,h),l=l.child}return l;case 9:return v=l.type,g=l.pendingProps.children,fa(l,h),v=mr(v),g=g(v),l.flags|=1,Tn(o,l,g,h),l.child;case 14:return g=l.type,v=Fr(g,l.pendingProps),v=Fr(g.type,v),Nb(o,l,g,v,h);
vendor: 4,989 bytes, line 8
8case 15:return Eb(o,l,l.type,l.pendingProps,h);case 17:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:Fr(g,v),Uu(o,l),l.tag=1,zn(g)?(o=!0,Eu(l)):o=!1,fa(l,h),xb(l,g,v),em(l,g,v,h),sm(null,l,g,!0,o,h);case 19:return Db(o,l,h);case 22:return Tb(o,l,h)}throw Error(n(156,l.tag))};function s1(o,l){return L(o,l)}function xR(o,l,h,g){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yr(o,l,h,g){return new xR(o,l,h,g)}function Cm(o){return o=o.prototype,!(!o||!o.isReactComponent)}function yR(o){if(typeof o=="function")return Cm(o)?1:0;if(o!=null){if(o=o.$$typeof,o===X)return 11;if(o===ce)return 14}return 2}function yi(o,l){var h=o.alternate;return h===null?(h=yr(o.tag,l,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=l,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&14680064,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,l=o.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h}function td(o,l,h,g,v,C){var T=2;if(g=o,typeof o=="function")Cm(o)&&(T=1);else if(typeof o=="string")T=5;else e:switch(o){case O:return yo(h.children,v,C,l);case z:T=8,v|=8;break;case U:return o=yr(12,h,l,v|2),o.elementType=U,o.lanes=C,o;case le:return o=yr(13,h,l,v),o.elementType=le,o.lanes=C,o;case W:return o=yr(19,h,l,v),o.elementType=W,o.lanes=C,o;case ie:return nd(h,v,C,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case Y:T=10;break e;case Q:T=9;break e;case X:T=11;break e;case ce:T=14;break e;case se:T=16,g=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return l=yr(T,h,l,v),l.elementType=o,l.type=g,l.lanes=C,l}function yo(o,l,h,g){return o=yr(7,o,g,l),o.lanes=h,o}function nd(o,l,h,g){return o=yr(22,o,g,l),o.elementType=ie,o.lanes=h,o.stateNode={isHidden:!1},o}function Nm(o,l,h){return o=yr(6,o,null,l),o.lanes=h,o}function Em(o,l,h){return l=yr(4,o.children!==null?o.children:[],o.key,l),l.lanes=h,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function vR(o,l,h,g,v){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zh(0),this.expirationTimes=Zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zh(0),this.identifierPrefix=g,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function Tm(o,l,h,g,v,C,T,R,I){return o=new vR(o,l,h,R,I),l===1?(l=1,C===!0&&(l|=8)):l=0,C=yr(3,null,null,l),o.current=C,C.stateNode=o,C.memoizedState={element:g,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},$p(C),o}function bR(o,l,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:g==null?null:""+g,children:o,containerInfo:l,implementation:h}}function i1(o){if(!o)return ci;o=o._reactInternals;e:{if(rs(o)!==o||o.tag!==1)throw Error(n(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(zn(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(o.tag===1){var h=o.type;if(zn(h))return P0(o,h,l)}return l}function o1(o,l,h,g,v,C,T,R,I){return o=Tm(h,g,!0,o,v,C,T,R,I),o.context=i1(null),h=o.current,g=Mn(),v=gi(h),C=Ls(g,v),C.callback=l??null,fi(h,C,v),o.current.lanes=v,dl(o,v,g),Bn(o,g),o}function rd(o,l,h,g){var v=l.current,C=Mn(),T=gi(v);return h=i1(h),l.context===null?l.context=h:l.pendingContext=h,l=Ls(C,T),l.payload={element:o},g=g===void 0?null:g,g!==null&&(l.callback=g),o=fi(v,l,T),o!==null&&(Hr(o,v,T,C),Du(o,v,T)),T}function sd(o){return o=o.current,o.child?(o.child.tag===5,o.child.stateNode):null}function a1(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<l?h:l}}function Mm(o,l){a1(o,l),(o=o.alternate)&&a1(o,l)}function wR(){return null}var l1=typeof reportError=="function"?reportError:function(o){console.error(o)};function jm(o){this._internalRoot=o}id.prototype.render=jm.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(n(409));rd(o,l,null,null)},id.prototype.unmount=jm.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;mo(function(){rd(null,o,null,null)}),l[Rs]=null}};function id(o){this._internalRoot=o}
vendor: 4,315 bytes, line 8
8id.prototype.unstable_scheduleHydration=function(o){if(o){var l=Wv();o={blockedOn:null,target:o,priority:l};for(var h=0;h<si.length&&l!==0&&l<si[h].priority;h++);si.splice(h,0,o),h===0&&Gv(o)}};function Am(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function od(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function c1(){}function kR(o,l,h,g,v){if(v){if(typeof g=="function"){var C=g;g=function(){var B=sd(T);C.call(B)}}var T=o1(l,g,o,0,null,!1,!1,"",c1);return o._reactRootContainer=T,o[Rs]=T.current,Nl(o.nodeType===8?o.parentNode:o),mo(),T}for(;v=o.lastChild;)o.removeChild(v);if(typeof g=="function"){var R=g;g=function(){var B=sd(I);R.call(B)}}var I=Tm(o,0,!1,null,null,!1,!1,"",c1);return o._reactRootContainer=I,o[Rs]=I.current,Nl(o.nodeType===8?o.parentNode:o),mo(function(){rd(l,I,h,g)}),I}function ad(o,l,h,g,v){var C=h._reactRootContainer;if(C){var T=C;if(typeof v=="function"){var R=v;v=function(){var I=sd(T);R.call(I)}}rd(l,T,o,v)}else T=kR(h,l,o,v,g);return sd(T)}Vv=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var h=ul(l.pendingLanes);h!==0&&(ep(l,h|1),Bn(l,$e()),(Je&6)===0&&(xa=$e()+500,ui()))}break;case 13:mo(function(){var g=Is(o,1);if(g!==null){var v=Mn();Hr(g,o,1,v)}}),Mm(o,1)}},tp=function(o){if(o.tag===13){var l=Is(o,134217728);if(l!==null){var h=Mn();Hr(l,o,134217728,h)}Mm(o,134217728)}},Uv=function(o){if(o.tag===13){var l=gi(o),h=Is(o,l);if(h!==null){var g=Mn();Hr(h,o,l,g)}Mm(o,l)}},Wv=function(){return Ze},Kv=function(o,l){var h=Ze;try{return Ze=o,l()}finally{Ze=h}},ns=function(o,l,h){switch(l){case"input":if(In(o,h),l=h.name,h.type==="radio"&&l!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<h.length;l++){var g=h[l];if(g!==o&&g.form===o.form){var v=Cu(g);if(!v)throw Error(n(90));We(g),In(g,v)}}}break;case"textarea":Es(o,h);break;case"select":l=h.value,l!=null&&Ln(o,!!h.multiple,l,!1)}},qe=wm,gt=mo;var SR={usingClientEntryPoint:!1,Events:[Ml,sa,Cu,Kt,Qn,wm]},Hl={findFiberByHostInstance:oo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},CR={bundleType:Hl.bundleType,version:Hl.version,rendererPackageName:Hl.rendererPackageName,rendererConfig:Hl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=iu(o),o===null?null:o.stateNode},findFiberByHostInstance:Hl.findFiberByHostInstance||wR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ld.isDisabled&&ld.supportsFiber)try{io=ld.inject(CR),Yn=ld}catch{}}return Hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SR,Hn.createPortal=function(o,l){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Am(l))throw Error(n(200));return bR(o,l,null,h)},Hn.createRoot=function(o,l){if(!Am(o))throw Error(n(299));var h=!1,g="",v=l1;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(v=l.onRecoverableError)),l=Tm(o,1,!1,null,null,h,!1,g,v),o[Rs]=l.current,Nl(o.nodeType===8?o.parentNode:o),new jm(l)},Hn.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=iu(l),o=o===null?null:o.stateNode,o},Hn.flushSync=function(o){return mo(o)},Hn.hydrate=function(o,l,h){if(!od(l))throw Error(n(200));return ad(null,o,l,!0,h)},Hn.hydrateRoot=function(o,l,h){if(!Am(o))throw Error(n(405));var g=h!=null&&h.hydratedSources||null,v=!1,C="",T=l1;if(h!=null&&(h.unstable_strictMode===!0&&(v=!0),h.identifierPrefix!==void 0&&(C=h.identifierPrefix),h.onRecoverableError!==void 0&&(T=h.onRecoverableError)),l=o1(l,null,o,1,h??null,v,!1,C,T),o[Rs
8]=l.current,Nl(o),g)for(o=0;o<g.length;o++)h=g[o],v=h._getVersion,v=v(h._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[h,v]:l.mutableSourceEagerHydrationData.push(h,v);return new id(l)},Hn.render=function(o,l,h){if(!od(l))throw Error(n(200));return ad(null,o,l,!1,h)},Hn.unmountComponentAtNode=function(o){if(!od(o))throw Error(n(40));return o._reactRootContainer?(mo(function(){ad(null,null,o,!1,function(){o._reactRootContainer=null,o[Rs]=null})}),!0):!1},Hn.unstable_batchedUpdates=wm,Hn.unstable_renderSubtreeIntoContainer=function(o,l,h,g){if(!od(h))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return ad(o,l,h,!1,g)},Hn.version="18.3.1-next-f1338f8080-20240426",Hn}var x1;function gS(){if(x1)return Pm.exports;x1=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Pm.exports=OR(),Pm.exports}var y1;function PR(){if(y1)return cd;y1=1;var t=gS();return cd.createRoot=t.createRoot,cd.hydrateRoot=t.hydrateRoot,cd}var DR=PR(),k=Bc();const Oe=mS(k),xS=ER({__proto__:null,default:Oe},[k]);function IR(t,e){if(t instanceof RegExp)return{keys:!1,pattern:t};var n,r,s,i,a=[],c="",u=t.split("/");for(u[0]||u.shift();s=u.shift();)n=s[0],n==="*"?(a.push(n),c+=s[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(r=s.indexOf("?",1),i=s.indexOf(".",1),a.push(s.substring(1,~r?r:~i?i:s.length)),c+=~r&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(c+=(~r?"?":"")+"\\"+s.substring(i))):c+="/"+s;return{keys:a,pattern:new RegExp("^"+c+(e?"(?=$|/)":"/?$"),"i")}}var Lm={exports:{}},_m={};var v1;function LR(){if(v1)return _m;v1=1;var t=Bc();function e(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function c(m,x){var y=x(),w=r({inst:{value:y,getSnapshot:x}}),b=w[0].inst,S=w[1];return i(function(){b.value=y,b.getSnapshot=x,u(b)&&S({inst:b})},[m,y,x]),s(function(){return u(b)&&S({inst:b}),m(function(){u(b)&&S({inst:b})})},[m]),a(y),y}function u(m){var x=m.getSnapshot;m=m.value;try{var y=x();return!n(m,y)}catch{return!0}}function f(m,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return _m.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,_m}var b1;function yS(){return b1||(b1=1,Lm.exports=LR()),Lm.exports}var Qx=yS();const _R=xS.useInsertionEffect,zR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",FR=zR?k.useLayoutEffect:k.useEffect,$R=_R||FR,vS=t=>{const e=k.useRef([t,(...n)=>e[0](...n)]).current;return $R(()=>{e[0]=t}),e[1]},BR="popstate",Jx="pushState",Yx="replaceState",HR="hashchange",w1=[BR,Jx,Yx,HR],VR=t=>{for(const e of w1)addEventListener(e,t);return()=>{for(const e of w1)removeEventListener(e,t)}},bS=(t,e)=>Qx.useSyncExternalStore(VR,t,e),UR=()=>location.search,WR=({ssrSearch:t=""}={})=>bS(UR,()=>t),k1=()=>location.pathname,KR=({ssrPath:t}={})=>bS(k1,t?()=>t:k1),qR=(t,{replace:e=!1,state:n=null}={})=>history[e?Yx:Jx](n,"",t),GR=(t={})=>[KR(t),qR],S1=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[S1]>"u"){for(const t of[Jx,Yx]){const e=history[t];history[t]=function(){const n=e.apply(this,arguments),r=new Event(t);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,S1,{value:!0})}const QR=(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())?"~"+e:e.slice(t.length)||"/",wS=(t="")=>t==="/"?"":t,JR=(t,e)=>t[0]==="~"?t.slice(1):wS(e)+t,YR=(t="",e)=>QR(C1(wS(t)),C1(e)),C1=t=>{try{return decodeURI(t)}catch{return t}},kS={hook:GR,searchHook:WR,parser:IR,base:"",ssrPath:void 0,ssrSearch:void 0,hrefs:t=>t},SS=k.createContext(kS),Hc=()=>k.useContext(SS),CS={},NS=k.createContext(CS),XR=()=>k.useContext(NS),nh=t=>{const[e,n]=t.hook(t);return[YR(t.base,e),vS((r,s)=>n(JR(r,t.base),s))]},rh=()=>nh(Hc()),ES=(t,e,n,r)=>{const{pattern:s,keys:i}=e instanceof RegExp?{keys:!1,pattern:e}:t(e||"*",r),a=s.exec(n)||[],[c,...u]=a;return c!==void 0?[!0,(()=>{const f=i!==!1?Object.fromEntries(i.map((m,x)=>[m,u[x]])):a.groups;let p={...u};return f&&Object.assign(p,f),p})(),...r?[c]:[]]:[!1,null]},ZR=({children:t,...e})=>{const n=Hc(),r=e.hook?kS:n;let s=r;const[i,a]=e.ssrPath?.split("?")??[];a&&(e.ssrSearch=a,e.ssrPath=i),e.hrefs=e.hrefs??e.hook?.hrefs;let c=k.useRef({}),u=c.current,f=u;for(let p in r){const m=p==="base"?r[p]+(e[p]||""):e[p]||r[p];u===f&&m!==f[p]&&(c.current=f={...f}),f[p]=m,m!==r[p]&&(s=f)}return k.createElement(SS.Provider,{value:s,children:t})},N1=({children:t,component:e},n)=>e?k.createElement(e,{params:n}):typeof t=="function"?t(n):t,eO=t=>{let e=k.useRef(CS),n=e.current;for(const r in t)t[r]!==n[r]&&(n=t);return Object.keys(t).length===0&&(n=t),e.current=n},vr=({path:t,nest:e,match:n,...r})=>{const s=Hc(),[i]=nh(s),[a,c,u]=n??ES(s.parser,t,i,e),f=eO({...XR(),...c});if(!a)return null;const p=u?k.createElement(ZR,{base:u},N1(r,f)):N1(r,f);return k.createElement(NS.Provider,{value:f,children:p})},Gr=k.forwardRef((t,e)=>{const n=Hc(),[r,s]=nh(n),{to:i="",href:a=i,onClick:c,asChild:u,children:f,className:p,replace:m,state:x,...y}=t,w=vS(S=>{S.ctrlKey||S.metaKey||S.altKey||S.shiftKey||S.button!==0||(c?.(S),S.defaultPrevented||(S.preventDefault(),s(a,t)))}),b=n.hrefs(a[0]==="~"?a.slice(1):n.base+a,n);return u&&k.isValidElement(f)?k.cloneElement(f,{onClick:w,href:b}):k.createElement("a",{...y,onClick:w,href:b,className:p?.call?p(r===a):p,children:f,ref:e})}),TS=t=>Array.isArray(t)?t.flatMap(e=>TS(e&&e.type===k.Fragment?e.props.children:e)):[t],tO=({children:t,location:e})=>{const n=Hc(),[r]=nh(n);for(const s of TS(t)){let i=0;if(k.isValidElement(s)&&(i=ES(n.parser,s.props.path,e||r,s.props.nest))[0])return k.cloneElement(s,{match:i})}return null};var Wa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ao=typeof window>"u"||"Deno"in globalThis;function Sr(){}function nO(t,e){return typeof t=="function"?t(e):t}function Bg(t){return typeof t=="number"&&t>=0&&t!==1/0}function MS(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ma(t,e){return typeof t=="function"?t(e):t}function Ur(t,e){return typeof t=="function"?t(e):t}function E1(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:c}=t;if(a){if(r){if(e.queryHash!==Xx(a,e.options))return!1}else if(!Sc(e.queryKey,a))return!1}if(n!=="all"){const u=e.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||s&&s!==e.state.fetchStatus||i&&!i(e))}function T1(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Ro(e.options.mutationKey)!==Ro(i))return!1}else if(!Sc(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function Xx(t,e){return(e?.queryKeyHashFn||Ro)(t)}function Ro(t){return JSON.stringify(t,(e,n)=>Hg(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Sc(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Sc(t[n],e[n])):!1}function jS(t,e){if(t===e)return t;const n=M1(t)&&M1(e);if(n||Hg(t)&&Hg(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),a=i.length,c=n?[]:{};let u=0;for(let f=0;f<a;f++){const p=n?f:i[f];(!n&&r.includes(p)||n)&&t[p]===void 0&&e[p]===void 0?(c[p]=void 0,u++):(c[p]=jS(t[p],e[p]),c[p]===t[p]&&t[p]!==void 0&&u++)}return s===a&&u===s?t:c}return e}function Qd(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function M1(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Hg(t){if(!j1(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!j1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function j1(t){return Object.prototype.toString.call(t)==="[object Object]"}function rO(t){return new Promise(e=>{setTimeout(e,t)})}function Vg(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?jS(t,e):e}function sO(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function iO(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Zx=Symbol();function AS(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Zx?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var oO=class extends Wa{#e;#t;#r;constructor(){super(),this.#r=t=>
vendor: 27,627 bytes, line 8
8{if(!Ao&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#r=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ey=new oO,aO=class extends Wa{#e=!0;#t;#r;constructor(){super(),this.#r=t=>{if(!Ao&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#r=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},Jd=new aO;function Ug(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function lO(t){return Math.min(1e3*2**t,3e4)}function RS(t){return(t??"online")==="online"?Jd.isOnline():!0}var OS=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function zm(t){return t instanceof OS}function PS(t){let e=!1,n=0,r=!1,s;const i=Ug(),a=b=>{r||(x(new OS(b)),t.abort?.())},c=()=>{e=!0},u=()=>{e=!1},f=()=>ey.isFocused()&&(t.networkMode==="always"||Jd.isOnline())&&t.canRun(),p=()=>RS(t.networkMode)&&t.canRun(),m=b=>{r||(r=!0,t.onSuccess?.(b),s?.(),i.resolve(b))},x=b=>{r||(r=!0,t.onError?.(b),s?.(),i.reject(b))},y=()=>new Promise(b=>{s=S=>{(r||f())&&b(S)},t.onPause?.()}).then(()=>{s=void 0,r||t.onContinue?.()}),w=()=>{if(r)return;let b;const S=n===0?t.initialPromise:void 0;try{b=S??t.fn()}catch(N){b=Promise.reject(N)}Promise.resolve(b).then(m).catch(N=>{if(r)return;const E=t.retry??(Ao?0:3),M=t.retryDelay??lO,j=typeof M=="function"?M(n,N):M,A=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,N);if(e||!A){x(N);return}n++,t.onFail?.(n,N),rO(j).then(()=>f()?void 0:y()).then(()=>{e?x(N):w()})})};return{promise:i,cancel:a,continue:()=>(s?.(),i),cancelRetry:c,continueRetry:u,canStart:p,start:()=>(p()?w():y().then(w),i)}}function cO(){let t=[],e=0,n=c=>{c()},r=c=>{c()},s=c=>setTimeout(c,0);const i=c=>{e?t.push(c):s(()=>{n(c)})},a=()=>{const c=t;t=[],c.length&&s(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;e++;try{u=c()}finally{e--,e||a()}return u},batchCalls:c=>(...u)=>{i(()=>{c(...u)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{s=c}}}var Ht=cO(),DS=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bg(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ao?1/0:300*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},uO=class extends DS{#e;#t;#r;#n;#o;#i;constructor(t){super(),this.#i=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=dO(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(t){this.options={...this.#o,...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=Vg(this.state.data,t,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#s({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!MS(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#n&&(this.#i?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}fetch(t,e){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},s=()=>{const c=AS(this.options,e),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#i=!1,this.options.persister?this.options.persister(c,u,this):c(u)},i={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};r(i),this.options.behavior?.onFetch(i,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#s({type:"fetch",meta:i.fetchOptions?.meta});const a=c=>{zm(c)&&c.silent||this.#s({type:"error",error:c}),zm(c)||(this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this)),this.scheduleGc()};return this.#n=PS({initialPromise:e?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:c=>{if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(u){a(u);return}this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#n.start()}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...IS(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return zm(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),Ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function IS(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:RS(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function dO(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fO=class extends Wa{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??Xx(r,e);let i=this.get(s);return i||(i=new uO({cache:this,queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>E1(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>E1(t,n)):e}notify(t){Ht.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hO=class extends DS{#e;#t;#r;constructor(t){super(),this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#e=[],this.state=t.state||LS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){this.#r=PS({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(r,s)=>{this.#n({type:"failed",failureCount:r,error:s})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const e=this.state.status==="pending",n=!this.#r.canStart();try{if(!e){this.#n({type:"pending",variables:t,isPaused:n}),await this.#t.config.onMutate?.(t,this);const s=await this.options.onMutate?.(t);s!==this.state.context&&this.#n({type:"pending",context:s,variables:t,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,t,this.state.context,this),await this.options.onSuccess?.(r,t,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,t,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,t,this.state.context,this),await this.options.onError?.(r,t,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,t,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Ht.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function LS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pO=class extends Wa{constructor(t={}){super(),this.config=t,this.#e=new Map,this.#t=Date.now()}#e;#t;build(t,e,n){const r=new hO({mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){const e=ud(t),n=this.#e.get(e)??[];n.push(t),this.#e.set(e,n),this.notify({type:"added",mutation:t})}remove(t){const e=ud(t);if(this.#e.has(e)){const n=this.#e.get(e)?.filter(r=>r!==t);n&&(n.length===0?this.#e.delete(e):this.#e.set(e,n))}this.notify({type:"removed",mutation:t})}canRun(t){const e=this.#e.get(ud(t))?.find(n=>n.state.status==="pending");return!e||e===t}runNext(t){return this.#e.get(ud(t))?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...this.#e.values()].flat()}find(t){const e={exact:!0,...t};return this.getAll().find(n=>T1(e,n))}findAll(t={}){return this.getAll().filter(e=>T1(t,e))}notify(t){Ht.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Ht.batch(()=>Promise.all(t.map(e=>e.continue().catch(Sr))))}};function ud(t){return t.options.scope?.id??String(t.mutationId)}function A1(t){return{onFetch:(e,n)=>{const r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let p=!1;const m=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?p=!0:e.signal.addEventListener("abort",()=>{p=!0}),e.signal)})},x=AS(e.options,e.fetchOptions),y=async(w,b,S)=>{if(p)return Promise.reject();if(b==null&&w.pages.length)return Promise.resolve(w);const N={queryKey:e.queryKey,pageParam:b,direction:S?"backward":"forward",meta:e.options.meta};m(N);const E=await x(N),{maxPages:M}=e.options,j=S?iO:sO;return{pages:j(w.pages,E,M),pageParams:j(w.pageParams,b,M)}};if(s&&i.length){const w=s==="backward",b=w?mO:R1,S={pages:i,pageParams:a},N=b(r,S);c=await y(S,N,w)}else{const w=t??i.length;do{const b=u===0?a[0]??r.initialPageParam:R1(r,c);if(u>0&&b==null)break;c=await y(c,b),u++}while(u<w)}return c};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function R1(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function mO(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var gO=class{#e;#t;#r;#n;#o;#i;#s;#a;constructor(t={}){this.#e=t.queryCache||new fO,this.#t=t.mutationCache||new pO,this.#r=t.defaultOptions||{},this.#n=new Map,this.#o=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=ey.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Jd.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=this.#e.build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Ma(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=this.#e.get(r.queryHash)?.state.data,a=nO(e,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Ht.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Ht.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e,r={type:"active",...t};return Ht.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Ht.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Sr).catch(Sr)}invalidateQueries(t={},e={}){return Ht.batch(()=>{if(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:e?.cancelRefetch??!0},r=Ht.batch(()=>this.#e.findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Sr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Sr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Ma(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Sr).catch(Sr)}fetchInfiniteQuery(t){return t.behavior=A1(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Sr).catch(Sr)}ensureInfiniteQueryData(t){return t.behavior=A1(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Jd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(t){this.#r=t}setQueryDefaults(t,e){this.#n.set(Ro(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#n.values()];let n={};return e.forEach(r=>{Sc(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){this.#o.set(Ro(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()];let n={};return e.forEach(r=>{Sc(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#r.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Xx(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Zx&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#r.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},xO=class extends Wa{constructor(t,e){super(),this.options=e,this.#e=t,this.#a=null,this.#s=Ug(),this.options.experimental_prefetchInRender||this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#r=void 0;#n=void 0;#o;#i;#s;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),O1(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wg(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(t,e){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ur(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#k(),this.#t.setOptions(this.options),n._defaulted&&!Qd(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&P1(this.#t,r,this.options,n)&&this.#d(),this.updateResult(e),s&&(this.#t!==r||Ur(this.options.enabled,this.#t)!==Ur(n.enabled,this.#t)||Ma(this.options.staleTime,this.#t)!==Ma(n.staleTime,this.#t))&&this.#g();const i=this.#x();s&&(this.#t!==r||Ur(this.options.enabled,this.#t)!==Ur(n.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return vO(this,n)&&(this.#n=n,this.#i=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(t,e){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),e?.(r),t[r])})}),n}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(t){this.#k();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Sr)),e}#g(){this.#b();const t=Ma(this.options.staleTime,this.#t);if(Ao||this.#n.isStale||!Bg(t))return;const n=MS(this.#n.dataUpdatedAt,t)+1;this.#c=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#w(),this.#l=t,!(Ao||Ur(this.options.enabled,this.#t)===!1||!Bg(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||ey.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#x())}#b(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(t,e){const n=this.#t,r=this.options,s=this.#n,i=this.#o,a=this.#i,u=t!==n?t.state:this.#r,{state:f}=t;let p={...f},m=!1,x;if(e._optimisticResults){const O=this.hasListeners(),z=!O&&O1(t,e),U=O&&P1(t,n,e,r);(z||U)&&(p={...p,...IS(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:b}=p;if(e.select&&p.data!==void 0)if(s&&p.data===i?.data&&e.select===this.#m)x=this.#f;else try{this.#m=e.select,x=e.select(p.data),x=Vg(s?.data,x,e),this.#f=x,this.#a=null}catch(O){this.#a=O}else x=p.data;if(e.placeholderData!==void 0&&x===void 0&&b==="pending"){let O;if(s?.isPlaceholderData&&e.placeholderData===a?.placeholderData)O=s.data;else if(O=typeof e.placeholderData=="function"?e.placeholderData(this.#h?.state.data,this.#h):e.placeholderData,e.select&&O!==void 0)try{O=e.select(O),this.#a=null}catch(z){this.#a=z}O!==void 0&&(b="success",x=Vg(s?.data,O,e),m=!0)}this.#a&&(y=this.#a,x=this.#f,w=Date.now(),b="error");const S=p.fetchStatus==="fetching",N=b==="pending",E=b==="error",M=N&&S,j=x!==void 0,P={status:b,fetchStatus:p.fetchStatus,isPending:N,isSuccess:b==="success",isError:E,isInitialLoading:M,isLoading:M,data:x,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!N,isLoadingError:E&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&j,isStale:ty(t,e),refetch:this.refetch,promise:this.#s};if(this.options.experimental_prefetchInRender){const O=Y=>{P.status==="error"?Y.reject(P.error):P.data!==void 0&&Y.resolve(P.data)},z=()=>{const Y=this.#s=P.promise=Ug();O(Y)},U=this.#s;switch(U.status){case"pending":t.queryHash===n.queryHash&&O(U);break;case"fulfilled":(P.status==="error"||P.data!==U.value)&&z();break;case"rejected":(P.status!=="error"||P.error!==U.reason)&&z();break}}return P}updateResult(t){const e=this.#n,n=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#i=this.options,this.#o.data!==void 0&&(this.#h=this.#t),Qd(n,e))return;this.#n=n;const r={},s=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!this.#p.size)return!0;const c=new Set(a??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#n).some(u=>{const f=u;return this.#n[f]!==e[f]&&c.has(f)})};t?.listeners!==!1&&s()&&(r.listeners=!0),this.#S({...r,...t})}#k(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#S(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function yO(t,e){return Ur(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function O1(t,e){return yO(t,e)||t.state.data!==void 0&&Wg(t,e,e.refetchOnMount)}function Wg(t,e,n){if(Ur(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&ty(t,e)}return!1}function P1(t,e,n,r){return(t!==e||Ur(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&ty(t,n)}function ty(t,e){return Ur(e.enabled,t)!==!1&&t.isStaleByTime(Ma(e.staleTime,t))}function vO(t,e){return!Qd(t.getCurrentResult(),e)}var bO=class extends Wa{#e;#t=void 0;#r;#n;constructor(e,n){super(),this.#e=e,this.setOptions(n),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const n=this.options;this.options=this.#e.defaultMutationOptions(e),Qd(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Ro(n.mutationKey)!==Ro(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#o(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#i()}mutate(e,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#o(){const e=this.#r?.state??LS();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#i(e){Ht.batch(()=>
8{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;e?.type==="success"?(this.#n.onSuccess?.(e.data,n,r),this.#n.onSettled?.(e.data,null,n,r)):e?.type==="error"&&(this.#n.onError?.(e.error,n,r),this.#n.onSettled?.(void 0,e.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},_S=k.createContext(void 0),zS=t=>{const e=k.useContext(_S);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},wO=({client:t,children:e})=>(k.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),d.jsx(_S.Provider,{value:t,children:e})),FS=k.createContext(!1),kO=()=>k.useContext(FS);FS.Provider;function SO(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var CO=k.createContext(SO()),NO=()=>k.useContext(CO);function $S(t,e){return typeof t=="function"?t(...e):!!t}function Kg(){}var EO=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},TO=t=>{k.useEffect(()=>{t.clearReset()},[t])},MO=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&$S(n,[t.error,r]),jO=t=>{t.suspense&&(t.staleTime===void 0&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},AO=(t,e)=>t.isLoading&&t.isFetching&&!e,RO=(t,e)=>t?.suspense&&e.isPending,D1=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function OO(t,e,n){const r=zS(),s=kO(),i=NO(),a=r.defaultQueryOptions(t);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=s?"isRestoring":"optimistic",jO(a),EO(a,i),TO(i);const c=!r.getQueryCache().get(a.queryHash),[u]=k.useState(()=>new e(r,a)),f=u.getOptimisticResult(a);if(k.useSyncExternalStore(k.useCallback(p=>{const m=s?Kg:u.subscribe(Ht.batchCalls(p));return u.updateResult(),m},[u,s]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),RO(a,f))throw D1(a,u,i);if(MO({result:f,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw f.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,f),a.experimental_prefetchInRender&&!Ao&&AO(f,s)&&(c?D1(a,u,i):r.getQueryCache().get(a.queryHash)?.promise)?.catch(Kg).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?f:u.trackResult(f)}function rt(t,e){return OO(t,xO)}function Tt(t,e){const n=zS(),[r]=k.useState(()=>new bO(n,t));k.useEffect(()=>{r.setOptions(t)},[r,t]);const s=k.useSyncExternalStore(k.useCallback(a=>r.subscribe(Ht.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=k.useCallback((a,c)=>{r.mutate(a,c).catch(Kg)},[r]);if(s.error&&$S(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}async function BS(t){if(!t.ok){const e=await t.text()||t.statusText;throw new Error(`${t.status}: ${e}`)}}async function Qe(t,e,n){const r=await fetch(e,{method:t,headers:n?{"Content-Type":"application/json"}:{},body:n?JSON.stringify(n):void 0,credentials:"include"});return await BS(r),r}const PO=({on401:t})=>async({queryKey:e})=>{const n=await fetch(e.join("/"),{credentials:"include"});return await BS(n),await n.json()},Ve=new gO({defaultOptions:{queries:{queryFn:PO({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),DO=1,IO=1e6;let Fm=0;function LO(){return Fm=(Fm+1)%Number.MAX_SAFE_INTEGER,Fm.toString()}const $m=new Map,I1=t=>{if($m.has(t))return;const e=setTimeout(()=>{$m.delete(t),ac({type:"REMOVE_TOAST",toastId:t})},IO);$m.set(t,e)},_O=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,DO)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?I1(n):t.toasts.forEach(r=>{I1(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Id=[];let Ld={toasts:[]};function ac(t){Ld=_O(Ld,t),Id.forEach(e=>{e(Ld)})}function zO({...t}){const e=LO(),n=s=>ac({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>ac({type:"DISMISS_TOAST",toastId:e});return ac({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function dn(){const[t,e]=k.useState(Ld);return k.useEffect(()=>(Id.push(e),()=>{const n=Id.indexOf(e);n>-1&&Id.splice(n,1)}),[t]),{...t,toast:zO,dismiss:n=>ac({type:"DISMISS_TOAST",toastId:n})}}var Kr=gS();const HS=mS(Kr);function Me(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t?.(s),n===!1||!s.defaultPrevented)return e?.(s)}}function L1(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function VS(...t){return e=>{let n=!1;const r=t.map(s=>{const i=L1(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():L1(t[s],null)}}}}function nt(...t){return k.useCallback(VS(...t),t)}function FO(t,e){const n=k.createContext(e),r=i=>{const{children:a,...c}=i,u=k.useMemo(()=>c,Object.values(c));return d.jsx(n.Provider,{value:u,children:a})};r.displayName=t+"Provider";function s(i){const a=k.useContext(n);if(a)return a;
vendor: 6,714 bytes, line 8
8if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function Xr(t,e=[]){let n=[];function r(i,a){const c=k.createContext(a),u=n.length;n=[...n,a];const f=m=>{const{scope:x,children:y,...w}=m,b=x?.[t]?.[u]||c,S=k.useMemo(()=>w,Object.values(w));return d.jsx(b.Provider,{value:S,children:y})};f.displayName=i+"Provider";function p(m,x){const y=x?.[t]?.[u]||c,w=k.useContext(y);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return[f,p]}const s=()=>{const i=n.map(a=>k.createContext(a));return function(c){const u=c?.[t]||i;return k.useMemo(()=>({[`__scope${t}`]:{...c,[t]:u}}),[c,u])}};return s.scopeName=t,[r,$O(s,...e)]}function $O(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((c,{useScope:u,scopeName:f})=>{const m=u(i)[`__scope${f}`];return{...c,...m}},{});return k.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Ia(t){const e=HO(t),n=k.forwardRef((r,s)=>{const{children:i,...a}=r,c=k.Children.toArray(i),u=c.find(UO);if(u){const f=u.props.children,p=c.map(m=>m===u?k.Children.count(f)>1?k.Children.only(null):k.isValidElement(f)?f.props.children:null:m);return d.jsx(e,{...a,ref:s,children:k.isValidElement(f)?k.cloneElement(f,void 0,p):null})}return d.jsx(e,{...a,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var BO=Ia("Slot");function HO(t){const e=k.forwardRef((n,r)=>{const{children:s,...i}=n;if(k.isValidElement(s)){const a=KO(s),c=WO(i,s.props);return s.type!==k.Fragment&&(c.ref=r?VS(r,a):a),k.cloneElement(s,c)}return k.Children.count(s)>1?k.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var US=Symbol("radix.slottable");function VO(t){const e=({children:n})=>d.jsx(d.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=US,e}function UO(t){return k.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===US}function WO(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...c)=>{i(...c),s(...c)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function KO(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function sh(t){const e=t+"CollectionProvider",[n,r]=Xr(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:S,children:N}=b,E=Oe.useRef(null),M=Oe.useRef(new Map).current;return d.jsx(s,{scope:S,itemMap:M,collectionRef:E,children:N})};a.displayName=e;const c=t+"CollectionSlot",u=Ia(c),f=Oe.forwardRef((b,S)=>{const{scope:N,children:E}=b,M=i(c,N),j=nt(S,M.collectionRef);return d.jsx(u,{ref:j,children:E})});f.displayName=c;const p=t+"CollectionItemSlot",m="data-radix-collection-item",x=Ia(p),y=Oe.forwardRef((b,S)=>{const{scope:N,children:E,...M}=b,j=Oe.useRef(null),A=nt(S,j),P=i(p,N);return Oe.useEffect(()=>(P.itemMap.set(j,{ref:j,...M}),()=>{P.itemMap.delete(j)})),d.jsx(x,{[m]:"",ref:A,children:E})});y.displayName=p;function w(b){const S=i(t+"CollectionConsumer",b);return Oe.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const M=Array.from(E.querySelectorAll(`[${m}]`));return Array.from(S.itemMap.values()).sort((P,O)=>M.indexOf(P.ref.current)-M.indexOf(O.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:f,ItemSlot:y},w,r]}var qO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ie=qO.reduce((t,e)=>{const n=Ia(`Primitive.${e}`),r=k.forwardRef((s,i)=>{const{asChild:a,...c}=s,u=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function WS(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}function Wn(t){const e=k.useRef(t);return k.useEffect(()=>{e.current=t}),k.useMemo(()=>(...n)=>e.current?.(...n),[])}function GO(t,e=globalThis?.document){const n=Wn(t);k.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var QO="DismissableLayer",qg="dismissableLayer.update",JO="dismissableLayer.pointerDownOutside",YO="dismissableLayer.focusOutside",_1,KS=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vc=k.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...u}=t,f=k.useContext(KS),[p,m]=k.useState(null),x=p?.ownerDocument??globalThis?.document,[,y]=k.useState({}),w=nt(e,O=>m(O)),b=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(S),E=p?b.indexOf(p):-1,M=f.layersWithOutsidePointerEventsDisabled.size>0,j=E>=N,A=ZO(O=>{const z=O.target,U=[...f.branches].some(Y=>Y.contains(z));!j||U||(s?.(O),a?.(O),O.defaultPrevented||c?.())},x),P=eP(O=>{const z=O.target;[...f.branches].some(Y=>Y.contains(z))||(i?.(O),a?.(O),O.defaultPrevented||c?.())},x);return GO(O=>{E===f.layers.size-1&&(r?.(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},x),k.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(_1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),z1(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=_1)}},[p,x,n,f]),k.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),z1())},[p,f]),k.useEffect(()=>{const O=()=>y({});return document.addEventListener(qg,O),()=>document.removeEventListener(qg,O)},[]),d.jsx(Ie.div,{...u,ref:w,style:{pointerEvents:M?j?"auto":"none":void 0,...t.style},onFocusCapture:Me(t.onFocusCapture,P.onFocusCapture),onBlurCapture:Me(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Me(t.onPointerDownCapture,A.onPointerDownCapture)})});Vc.displayName=QO;var XO="DismissableLayerBranch",qS=k.forwardRef((t,e)=>{const n=k.useContext(KS),r=k.useRef(null),s=nt(e,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),d.jsx(Ie.div,{...t,ref:s})});qS.displayName=XO;function ZO(t,e=globalThis?.document){const n=Wn(t),r=k.useRef(!1),s=k.useRef(()=>{});return k.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){GS(JO,n,f,{discrete:!0})};const f={originalEvent:c};
8c.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=u,e.addEventListener("click",s.current,{once:!0})):u()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function eP(t,e=globalThis?.document){const n=Wn(t),r=k.useRef(!1);return k.useEffect(()=>{const s=i=>{i.target&&!r.current&&GS(YO,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function z1(){const t=new CustomEvent(qg);document.dispatchEvent(t)}function GS(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?WS(s,i):s.dispatchEvent(i)}var tP=Vc,nP=qS,un=globalThis?.document?k.useLayoutEffect:()=>{},rP="Portal",ih=k.forwardRef((t,e)=>{const{container:n,...r}=t,[s,i]=k.useState(!1);un(()=>i(!0),[]);const a=n||s&&globalThis?.document?.body;return a?HS.createPortal(d.jsx(Ie.div,{...r,ref:e}),a):null});ih.displayName=rP;function sP(t,e){return k.useReducer((n,r)=>e[n][r]??n,t)}var Qi=t=>{const{present:e,children:n}=t,r=iP(e),s=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=nt(r.ref,oP(s));return typeof n=="function"||r.isPresent?k.cloneElement(s,{ref:i}):null};Qi.displayName="Presence";function iP(t){const[e,n]=k.useState(),r=k.useRef({}),s=k.useRef(t),i=k.useRef("none"),a=t?"mounted":"unmounted",[c,u]=sP(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const f=dd(r.current);i.current=c==="mounted"?f:"none"},[c]),un(()=>{const f=r.current,p=s.current;if(p!==t){const x=i.current,y=dd(f);t?u("MOUNT"):y==="none"||f?.display==="none"?u("UNMOUNT"):u(p&&x!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,u]),un(()=>{if(e){let f;const p=e.ownerDocument.defaultView??window,m=y=>{const b=dd(r.current).includes(y.animationName);if(y.target===e&&b&&(u("ANIMATION_END"),!s.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",f=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},x=y=>{y.target===e&&(i.current=dd(r.current))};return e.addEventListener("animationstart",x),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(f),e.removeEventListener("animationstart",x),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:k.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function dd(t){return t?.animationName||"none"}function oP(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function ys({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=aP({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,c=Wn(n),u=k.useCallback(f=>{if(i){const m=typeof f=="function"?f(t):f;m!==t&&c(m)}else s(f)},[i,t,s,c]);return[a,u]}function aP({defaultProp:t,onChange:e}){const n=k.useState(t),[r]=n,s=k.useRef(r),i=Wn(e);return k.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var lP="VisuallyHidden",Uc=k.forwardRef((t,e)=>d.jsx(Ie.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));Uc.displayName=lP;var cP=Uc,ny="ToastProvider",[ry,uP,dP]=sh("Toast"),[QS]=Xr("Toast",[dP]),[fP,oh]=QS(ny),JS=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[c,u]=k.useState(null),[f,p]=k.useState(0),m=k.useRef(!1),x=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ny}\`. Expected non-empty \`string\`.`),d.jsx(ry.Provider,{scope:e,children:d.jsx(fP,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:f,viewport:c,onViewportChange:u,onToastAdd:k.useCallback(()=>p(y=>y+1),[]),onToastRemove:k.useCallback(()=>p(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:x,children:a})})};JS.displayName=ny;var YS="ToastViewport",hP=["F8"],Gg="toast.viewportPause",Qg="toast.viewportResume",XS=k.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=hP,label:s="Notifications ({hotkey})",...i}=t,a=oh(YS,n),c=uP(n),u=k.useRef(null),f=k.useRef(null),p=k.useRef(null),m=k.useRef(null),x=nt(e,m,a.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;k.useEffect(()=>{const S=N=>{r.length!==0&&r.every(M=>N[M]||N.code===M)&&m.current?.focus()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),k.useEffect(()=>{const S=u.current,N=m.current;if(w&&S&&N){const E=()=>
8{if(!a.isClosePausedRef.current){const P=new CustomEvent(Gg);N.dispatchEvent(P),a.isClosePausedRef.current=!0}},M=()=>{if(a.isClosePausedRef.current){const P=new CustomEvent(Qg);N.dispatchEvent(P),a.isClosePausedRef.current=!1}},j=P=>{!S.contains(P.relatedTarget)&&M()},A=()=>{S.contains(document.activeElement)||M()};return S.addEventListener("focusin",E),S.addEventListener("focusout",j),S.addEventListener("pointermove",E),S.addEventListener("pointerleave",A),window.addEventListener("blur",E),window.addEventListener("focus",M),()=>{S.removeEventListener("focusin",E),S.removeEventListener("focusout",j),S.removeEventListener("pointermove",E),S.removeEventListener("pointerleave",A),window.removeEventListener("blur",E),window.removeEventListener("focus",M)}}},[w,a.isClosePausedRef]);const b=k.useCallback(({tabbingDirection:S})=>{const E=c().map(M=>{const j=M.ref.current,A=[j,...EP(j)];return S==="forwards"?A:A.reverse()});return(S==="forwards"?E.reverse():E).flat()},[c]);return k.useEffect(()=>{const S=m.current;if(S){const N=E=>{const M=E.altKey||E.ctrlKey||E.metaKey;if(E.key==="Tab"&&!M){const A=document.activeElement,P=E.shiftKey;if(E.target===S&&P){f.current?.focus();return}const U=b({tabbingDirection:P?"backwards":"forwards"}),Y=U.findIndex(Q=>Q===A);Bm(U.slice(Y+1))?E.preventDefault():P?f.current?.focus():p.current?.focus()}};return S.addEventListener("keydown",N),()=>S.removeEventListener("keydown",N)}},[c,b]),d.jsxs(nP,{ref:u,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&d.jsx(Jg,{ref:f,onFocusFromOutsideViewport:()=>{const S=b({tabbingDirection:"forwards"});Bm(S)}}),d.jsx(ry.Slot,{scope:n,children:d.jsx(Ie.ol,{tabIndex:-1,...i,ref:x})}),w&&d.jsx(Jg,{ref:p,onFocusFromOutsideViewport:()=>{const S=b({tabbingDirection:"backwards"});Bm(S)}})]})});XS.displayName=YS;var ZS="ToastFocusProxy",Jg=k.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=oh(ZS,n);return d.jsx(Uc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!i.viewport?.contains(c)&&r()}})});Jg.displayName=ZS;var ah="Toast",pP="toast.swipeStart",mP="toast.swipeMove",gP="toast.swipeCancel",xP="toast.swipeEnd",eC=k.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...a}=t,[c=!0,u]=ys({prop:r,defaultProp:s,onChange:i});return d.jsx(Qi,{present:n||c,children:d.jsx(bP,{open:c,...a,ref:e,onClose:()=>u(!1),onPause:Wn(t.onPause),onResume:Wn(t.onResume),onSwipeStart:Me(t.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Me(t.onSwipeMove,f=>{const{x:p,y:m}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Me(t.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Me(t.onSwipeEnd,f=>{const{x:p,y:m}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),u(!1)})})})});eC.displayName=ah;var[yP,vP]=QS(ah,{onClose(){}}),bP=k.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:c,onPause:u,onResume:f,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:x,onSwipeEnd:y,...w}=t,b=oh(ah,n),[S,N]=k.useState(null),E=nt(e,W=>N(W)),M=k.useRef(null),j=k.useRef(null),A=s||b.duration,P=k.useRef(0),O=k.useRef(A),z=k.useRef(0),{onToastAdd:U,onToastRemove:Y}=b,Q=Wn(()=>{S?.contains(document.activeElement)&&b.viewport?.focus(),a()}),X=k.useCallback(W=>
8{!W||W===1/0||(window.clearTimeout(z.current),P.current=new Date().getTime(),z.current=window.setTimeout(Q,W))},[Q]);k.useEffect(()=>{const W=b.viewport;if(W){const ce=()=>{X(O.current),f?.()},se=()=>{const ie=new Date().getTime()-P.current;O.current=O.current-ie,window.clearTimeout(z.current),u?.()};return W.addEventListener(Gg,se),W.addEventListener(Qg,ce),()=>{W.removeEventListener(Gg,se),W.removeEventListener(Qg,ce)}}},[b.viewport,A,u,f,X]),k.useEffect(()=>{i&&!b.isClosePausedRef.current&&X(A)},[i,A,b.isClosePausedRef,X]),k.useEffect(()=>(U(),()=>Y()),[U,Y]);const le=k.useMemo(()=>S?aC(S):null,[S]);return b.viewport?d.jsxs(d.Fragment,{children:[le&&d.jsx(wP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:le}),d.jsx(yP,{scope:n,onClose:Q,children:Kr.createPortal(d.jsx(ry.ItemSlot,{scope:n,children:d.jsx(tP,{asChild:!0,onEscapeKeyDown:Me(c,()=>{b.isFocusedToastEscapeKeyDownRef.current||Q(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Ie.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":b.swipeDirection,...w,ref:E,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Me(t.onKeyDown,W=>{W.key==="Escape"&&(c?.(W.nativeEvent),W.nativeEvent.defaultPrevented||(b.is
8FocusedToastEscapeKeyDownRef.current=!0,Q()))}),onPointerDown:Me(t.onPointerDown,W=>{W.button===0&&(M.current={x:W.clientX,y:W.clientY})}),onPointerMove:Me(t.onPointerMove,W=>{if(!M.current)return;const ce=W.clientX-M.current.x,se=W.clientY-M.current.y,ie=!!j.current,H=["left","right"].includes(b.swipeDirection),J=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,ee=H?J(0,ce):0,D=H?0:J(0,se),V=W.pointerType==="touch"?10:2,ae={x:ee,y:D},we={originalEvent:W,delta:ae};ie?(j.current=ae,fd(mP,m,we,{discrete:!1})):F1(ae,b.swipeDirection,V)?(j.current=ae,fd(pP,p,we,{discrete:!1}),W.target.setPointerCapture(W.pointerId)):(Math.abs(ce)>V||Math.abs(se)>V)&&(M.current=null)}),onPointerUp:Me(t.onPointerUp,W=>{const ce=j.current,se=W.target;if(se.hasPointerCapture(W.pointerId)&&se.releasePointerCapture(W.pointerId),j.current=null,M.current=null,ce){const ie=W.currentTarget,H={originalEvent:W,delta:ce};F1(ce,b.swipeDirection,b.swipeThreshold)?fd(xP,y,H,{discrete:!0}):fd(gP,x,H,{discrete:!0}),ie.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),wP=t=>{const{__scopeToast:e,children:n,...r}=t,s=oh(ah,e),[i,a]=k.useState(!1),[c,u]=k.useState(!1);return CP(()=>a(!0)),k.useEffect(()=>{const f=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(f)},[]),c?null:d.jsx(ih,{asChild:!0,children:d.jsx(Uc,{...r,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",n]})})})},kP="ToastTitle",tC=k.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(Ie.div,{...r,ref:e})});tC.displayName=kP;var SP="ToastDescription",nC=k.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(Ie.div,{...r,ref:e})});nC.displayName=SP;var rC="ToastAction",sC=k.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?d.jsx(oC,{altText:n,asChild:!0,children:d.jsx(sy,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${rC}\`. Expected non-empty \`string\`.`),null)});sC.displayName=rC;var iC="ToastClose",sy=k.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=vP(iC,n);return d.jsx(oC,{asChild:!0,children:d.jsx(Ie.button,{type:"button",...r,ref:e,onClick:Me(t.onClick,s.onClose)})})});sy.displayName=iC;var oC=k.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return d.jsx(Ie.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function aC(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),NP(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...aC(r))}}),e}function fd(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?WS(s,i):s.dispatchEvent(i)}var F1=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function CP(t=()=>{}){const e=Wn(t);un(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function NP(t){return t.nodeType===t.ELEMENT_NODE}function EP(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Bm(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var TP=JS,lC=XS,cC=eC,uC=tC,dC=nC,fC=sC,hC=sy;function pC(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=pC(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function mC(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=pC(t))&&(r&&(r+=" "),r+=e);return r}const $1=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,B1=mC,iy=(t,e)=>n=>{var r;if(e?.variants==null)return B1(t,n?.class,n?.className);const{variants:s,defaultVariants:i}=e,a=Object.keys(s).map(f=>{const p=n?.[f],m=i?.[f];if(p===null)return null;const x=$1(p)||$1(m);return s[f][x]}),c=n&&Object.entries(n).reduce((f,p)=>{let[m,x]=p;return x===void 0||(f[m]=x),f},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:m,className:x,...y}=p;return Object.entries(y).every(w=>{let[b,S]=w;return Array.isArray(S)?S.includes({...i,...c}[b]):{...i,...c}[b]===S})?[...f,m,x]:f},[]);return B1(t,a,u,n?.class,n?.className)};const MP=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gC=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");var jP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const AP=k.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...c},u)=>k.createElement("svg",{ref:u,...jP,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:gC("lucide",s),...c},[...a.map(([f,p])=>k.createElement(f,p)),...Array.isArray(i)?i:[i]]));const de=(t,e)=>{const n=k.forwardRef(({className:r,...s},i)=>k.createElement(AP,{ref:i,iconNode:e,className:gC(`lucide-${MP(t)}`,r),...s}));return n.displayName=`${t}`,n};const oy=de("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
8-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const RP=de("Apple",[["path",{d:"M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z",key:"3s7exb"}],["path",{d:"M10 2c1 .5 2 2 2 5",key:"fcco2y"}]]);const OP=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Yg=de("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const xC=de("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);const ay=de("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);const PP=de("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);const DP=de("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const ly=de("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);const lh=de("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);const Oo=de("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Vo=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Wc=de("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Yd=de("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const IP=de("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const LP=de("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const _P=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const yC=de("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const zP=de("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);const Po=de("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const vC=de("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const bC=de("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const wC=de("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);const FP=de("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const ch=de("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const $P=de("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);const BP=de("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}
8]]);const HP=de("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);const uh=de("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);const VP=de("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);const UP=de("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);const kC=de("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const WP=de("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const KP=de("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);const qP=de("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);const GP=de("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);const QP=de("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);const JP=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);const lc=de("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const YP=de("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const cy=de("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const uy=de("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);const XP=de("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);const dy=de("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);const fy=de("MonitorSmartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);const ZP=de("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);const Ka=de("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const Gs=de("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);const hy=de("Pill",[["path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z",key:"wa1lgi"}],["path",{d:"m8.5 8.5 7 7",key:"rvfmvr"}]]);const qa=de("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const eD=de("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);const tD=de("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}
8],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);const nD=de("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);const rD=de("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);const sD=de("RemoveFormatting",[["path",{d:"M4 7V4h16v3",key:"9msm58"}],["path",{d:"M5 20h6",key:"1h6pxn"}],["path",{d:"M13 4 8 20",key:"kqq6aj"}],["path",{d:"m15 15 5 5",key:"me55sn"}],["path",{d:"m20 15-5 5",key:"11p7ol"}]]);const Ji=de("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const py=de("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);const my=de("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);const dh=de("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const _d=de("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const Kc=de("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);const gy=de("Syringe",[["path",{d:"m18 2 4 4",key:"22kx64"}],["path",{d:"m17 7 3-3",key:"1w1zoj"}],["path",{d:"M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5",key:"1exhtz"}],["path",{d:"m9 11 4 4",key:"rovt3i"}],["path",{d:"m5 19-3 3",key:"59f2uf"}],["path",{d:"m14 4 6 6",key:"yqp9t2"}]]);const iD=de("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);const Do=de("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const xy=de("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);const oD=de("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);const aD=de("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const lD=de("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);const cD=de("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);const SC=de("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const yy=de("Weight",[["circle",{cx:"12",cy:"5",r:"3",key:"rqqgnr"}],["path",{d:"M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z",key:"56o5sh"}]]);const Uo=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,881 bytes, line 8
8],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),vy="-",uD=t=>{const e=fD(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const c=a.split(vy);return c[0]===""&&c.length!==1&&c.shift(),CC(c,e)||dD(a)},getConflictingClassGroupIds:(a,c)=>{const u=n[a]||[];return c&&r[a]?[...u,...r[a]]:u}}},CC=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?CC(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(vy);return e.validators.find(({validator:a})=>a(i))?.classGroupId},H1=/^\[(.+)\]$/,dD=t=>{if(H1.test(t)){const e=H1.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},fD=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return pD(Object.entries(t.classGroups),n).forEach(([i,a])=>{Xg(a,r,i,e)}),r},Xg=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:V1(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(hD(s)){Xg(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,a])=>{Xg(a,V1(e,i),n,r)})})},V1=(t,e)=>{let n=t;return e.split(vy).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hD=t=>t.isThemeGetter,pD=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,c])=>[e+a,c])):i);return[n,s]}):t,mD=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,a)=>{n.set(i,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return s(i,a),a},set(i,a){n.has(i)?n.set(i,a):s(i,a)}}},NC="!",gD=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,a=c=>{const u=[];let f=0,p=0,m;for(let S=0;S<c.length;S++){let N=c[S];if(f===0){if(N===s&&(r||c.slice(S,S+i)===e)){u.push(c.slice(p,S)),p=S+i;continue}if(N==="/"){m=S;continue}}N==="["?f++:N==="]"&&f--}const x=u.length===0?c:c.substring(p),y=x.startsWith(NC),w=y?x.substring(1):x,b=m&&m>p?m-p:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:b}};return n?c=>n({className:c,parseClassName:a}):a},xD=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},yD=t=>({cache:mD(t.cacheSize),parseClassName:gD(t),...uD(t)}),vD=/\s+/,bD=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],a=t.trim().split(vD);let c="";for(let u=a.length-1;u>=0;u-=1){const f=a[u],{modifiers:p,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:y}=n(f);let w=!!y,b=r(w?x.substring(0,y):x);if(!b){if(!w){c=f+(c.length>0?" "+c:c);continue}if(b=r(x),!b){c=f+(c.length>0?" "+c:c);continue}w=!1}const S=xD(p).join(":"),N=m?S+NC:S,E=N+b;if(i.includes(E))continue;i.push(E);const M=s(b,w);for(let j=0;j<M.length;++j){const A=M[j];i.push(N+A)}c=f+(c.length>0?" "+c:c)}return c};function wD(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=EC(e))&&(r&&(r+=" "),r+=n);return r}const EC=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=EC(t[r]))&&(n&&(n+=" "),n+=e);return n};function kD(t,...e){let n,r,s,i=a;function a(u){const f=e.reduce((p,m)=>m(p),t());return n=yD(f),r=n.cache.get,s=n.cache.set,i=c,c(u)}function c(u){const f=r(u);if(f)return f;const p=bD(u,n);return s(u,p),p}return function(){return i(wD.apply(null,arguments))}}const ht=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},TC=/^\[(?:([a-z-]+):)?(.+)\]$/i,SD=/^\d+\/\d+$/,CD=new Set(["px","full","screen"]),ND=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ED=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,MD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fs=t=>ja(t)||CD.has(t)||SD.test(t),bi=t=>Ga(t,"length",_D),ja=t=>!!t&&!Number.isNaN(Number(t)),Hm=t=>Ga(t,"number",ja),Ul=t=>!!t&&Number.isInteger(Number(t)),AD=t=>t.endsWith("%")&&ja(t.slice(0,-1)),Le=t=>TC.test(t),wi=t=>ND.test(t),RD=new Set(["length","size","percentage"]),OD=t=>Ga(t,RD,MC),PD=t=>Ga(t,"position",MC),DD=new Set(["image","url"]),ID=t=>Ga(t,DD,FD),LD=t=>Ga(t,"",zD),Wl=()=>!0,Ga=(t,e,n)=>{const r=TC.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},_D=t=>ED.test(t)&&!TD.test(t),MC=()=>!1,zD=t=>MD.test(t),FD=t=>jD.test(t),$D=()=>{const t=ht("colors"),e=ht("spacing"),n=ht("blur"),r=ht("brightness"),s=ht("borderColor"),i=ht("borderRadius"),a=ht("borderSpacing"),c=ht("borderWidth"),u=ht("contrast"),f=ht("grayscale"),p=ht("hueRotate"),m=ht("invert"),x=ht("gap"),y=ht("gradientColorStops"),w=ht("gradientColorStopPositions"),b=ht("inset"),S=ht("margin"),N=ht("opacity"),E=ht("padding"),M=ht("saturate"),j=ht("scale"),A=ht("sepia"),P=ht("skew"),O=ht("space"),z=ht("translate"),U=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",Le,e],X=()=>[Le,e],le=()=>["",Fs,bi],W=()=>["auto",ja,Le],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",Le],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[ja,Le];return{cacheSize:500,separator:":",theme:{colors:[Wl],spacing:[Fs,bi],blur:["none","",wi,Le],brightness:D(),borderColor:[t],borderRadius:["n
8one","","full",wi,Le],borderSpacing:X(),borderWidth:le(),contrast:D(),grayscale:J(),hueRotate:D(),invert:J(),gap:X(),gradientColorStops:[t],gradientColorStopPositions:[AD,bi],inset:Q(),margin:Q(),opacity:D(),padding:X(),saturate:D(),scale:D(),sepia:J(),skew:D(),space:X(),translate:X()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[wi]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ce(),Le]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ul,Le]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Ul,Le]}],"grid-cols":[{"grid-cols":[Wl]}],"col-start-end":[{col:["auto",{span:["full",Ul,Le]},Le]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Wl]}],"row-start-end":[{row:["auto",{span:[Ul,Le]},Le]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Le,e]}],"min-w":[{"min-w":[Le,e,"min","max","fit"]}],"max-w":[{"max-w":[Le,e,"none","full","min","max","fit","prose",{screen:[wi]},wi]}],h:[{h:[Le,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,e,"auto","min","max","fit"]}],"font-size":[{text:["base",wi,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hm]}],"font-family":[{font:[Wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Le]}],"line-clamp":[{"line-clamp":["none",ja,Hm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fs,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fs,bi]}],"underline-offset":[{"underline-offset":["auto",Fs,Le]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),PD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ID]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[w]}
8],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}
vendor: 4,472 bytes, line 8
8],"divide-style":[{divide:se()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[Fs,Le]}],"outline-w":[{outline:[Fs,bi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Fs,bi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",wi,LD]}],"shadow-color":[{shadow:[Wl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",wi,Le]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[M]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Le]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Ul,Le]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Le]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Fs,bi,Hm]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
8none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},BD=kD($D);function Ue(...t){return BD(mC(t))}const HD=TP,jC=k.forwardRef(({className:t,...e},n)=>d.jsx(lC,{ref:n,className:Ue("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));jC.displayName=lC.displayName;const VD=iy("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),AC=k.forwardRef(({className:t,variant:e,...n},r)=>d.jsx(cC,{ref:r,className:Ue(VD({variant:e}),t),...n}));AC.displayName=cC.displayName;const UD=k.forwardRef(({className:t,...e},n)=>d.jsx(fC,{ref:n,className:Ue("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));UD.displayName=fC.displayName;const RC=k.forwardRef(({className:t,...e},n)=>d.jsx(hC,{ref:n,className:Ue("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 3,191 bytes, line 8
8/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:d.jsx(Uo,{className:"h-4 w-4"})}));RC.displayName=hC.displayName;const OC=k.forwardRef(({className:t,...e},n)=>d.jsx(uC,{ref:n,className:Ue("text-sm font-semibold",t),...e}));OC.displayName=uC.displayName;const PC=k.forwardRef(({className:t,...e},n)=>d.jsx(dC,{ref:n,className:Ue("text-sm opacity-90",t),...e}));PC.displayName=dC.displayName;function WD(){const{toasts:t}=dn();return d.jsxs(HD,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return d.jsxs(AC,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(OC,{children:n}),r&&d.jsx(PC,{children:r})]}),s,d.jsx(RC,{})]},e)}),d.jsx(jC,{})]})}var KD=xS[" useId ".trim().toString()]||(()=>{}),qD=0;function gs(t){const[e,n]=k.useState(KD());return un(()=>{n(r=>r??String(qD++))},[t]),e?`radix-${e}`:""}const GD=["top","right","bottom","left"],$i=Math.min,rr=Math.max,Xd=Math.round,hd=Math.floor,xs=t=>({x:t,y:t}),QD={left:"right",right:"left",bottom:"top",top:"bottom"},JD={start:"end",end:"start"};function Zg(t,e,n){return rr(t,$i(e,n))}function Qs(t,e){return typeof t=="function"?t(e):t}function Js(t){return t.split("-")[0]}function Qa(t){return t.split("-")[1]}function by(t){return t==="x"?"y":"x"}function wy(t){return t==="y"?"height":"width"}function Bi(t){return["top","bottom"].includes(Js(t))?"y":"x"}function ky(t){return by(Bi(t))}function YD(t,e,n){n===void 0&&(n=!1);const r=Qa(t),s=ky(t),i=wy(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Zd(a)),[a,Zd(a)]}function XD(t){const e=Zd(t);return[ex(t),e,ex(e)]}function ex(t){return t.replace(/start|end/g,e=>JD[e])}function ZD(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:a;default:return[]}}function eI(t,e,n,r){const s=Qa(t);let i=ZD(Js(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(ex)))),i}function Zd(t){return t.replace(/left|right|bottom|top/g,e=>QD[e])}function tI(t){return{top:0,right:0,bottom:0,left:0,...t}}function DC(t){return typeof t!="number"?tI(t):{top:t,right:t,bottom:t,left:t}}function ef(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function U1(t,e,n){let{reference:r,floating:s}=t;const i=Bi(e),a=ky(e),c=wy(a),u=Js(e),f=i==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,x=r[c]/2-s[c]/2;let y;switch(u){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}switch(Qa(e)){case"start":y[a]-=x*(n&&f?-1:1);break;case"end":y[a]+=x*(n&&f?-1:1);break}return y}const nI=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}
vendor: 9,803 bytes, line 8
8=n,c=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let f=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:p,y:m}=U1(f,r,u),x=r,y={},w=0;for(let b=0;b<c.length;b++){const{name:S,fn:N}=c[b],{x:E,y:M,data:j,reset:A}=await N({x:p,y:m,initialPlacement:r,placement:x,strategy:s,middlewareData:y,rects:f,platform:a,elements:{reference:t,floating:e}});p=E??p,m=M??m,y={...y,[S]:{...y[S],...j}},A&&w<=50&&(w++,typeof A=="object"&&(A.placement&&(x=A.placement),A.rects&&(f=A.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):A.rects),{x:p,y:m}=U1(f,x,u)),b=-1)}return{x:p,y:m,placement:x,strategy:s,middlewareData:y}};async function Cc(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:a,elements:c,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:x=!1,padding:y=0}=Qs(e,t),w=DC(y),S=c[x?m==="floating"?"reference":"floating":m],N=ef(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:u})),E=m==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),j=await(i.isElement==null?void 0:i.isElement(M))?await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1}:{x:1,y:1},A=ef(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:M,strategy:u}):E);return{top:(N.top-A.top+w.top)/j.y,bottom:(A.bottom-N.bottom+w.bottom)/j.y,left:(N.left-A.left+w.left)/j.x,right:(A.right-N.right+w.right)/j.x}}const rI=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:a,elements:c,middlewareData:u}=e,{element:f,padding:p=0}=Qs(t,e)||{};if(f==null)return{};const m=DC(p),x={x:n,y:r},y=ky(s),w=wy(y),b=await a.getDimensions(f),S=y==="y",N=S?"top":"left",E=S?"bottom":"right",M=S?"clientHeight":"clientWidth",j=i.reference[w]+i.reference[y]-x[y]-i.floating[w],A=x[y]-i.reference[y],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let O=P?P[M]:0;(!O||!await(a.isElement==null?void 0:a.isElement(P)))&&(O=c.floating[M]||i.floating[w]);const z=j/2-A/2,U=O/2-b[w]/2-1,Y=$i(m[N],U),Q=$i(m[E],U),X=Y,le=O-b[w]-Q,W=O/2-b[w]/2+z,ce=Zg(X,W,le),se=!u.arrow&&Qa(s)!=null&&W!==ce&&i.reference[w]/2-(W<X?Y:Q)-b[w]/2<0,ie=se?W<X?W-X:W-le:0;return{[y]:x[y]+ie,data:{[y]:ce,centerOffset:W-ce-ie,...se&&{alignmentOffset:ie}},reset:se}}}),sI=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:c,platform:u,elements:f}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,...S}=Qs(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const N=Js(s),E=Bi(c),M=Js(c)===c,j=await(u.isRTL==null?void 0:u.isRTL(f.floating)),A=x||(M||!b?[Zd(c)]:XD(c)),P=w!=="none";!x&&P&&A.push(...eI(c,b,w,j));const O=[c,...A],z=await Cc(e,S),U=[];let Y=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&U.push(z[N]),m){const W=YD(s,a,j);U.push(z[W[0]],z[W[1]])}if(Y=[...Y,{placement:s,overflows:U}],!U.every(W=>W<=0)){var Q,X;const W=(((Q=i.flip)==null?void 0:Q.index)||0)+1,ce=O[W];if(ce)return{data:{index:W,overflows:Y},reset:{placement:ce}};let se=(X=Y.filter(ie=>ie.overflows[0]<=0).sort((ie,H)=>ie.overflows[1]-H.overflows[1])[0])==null?void 0:X.placement;if(!se)switch(y){case"bestFit":{var le;const ie=(le=Y.filter(H=>{if(P){const J=Bi(H.placement);return J===E||J==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(J=>J>0).reduce((J,ee)=>J+ee,0)]).sort((H,J)=>H[1]-J[1])[0])==null?void 0:le[0];ie&&(se=ie);break}case"initialPlacement":se=c;break}if(s!==se)return{reset:{placement:se}}}return{}}}};function W1(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function K1(t){return GD.some(e=>t[e]>=0)}const iI=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Qs(t,e);switch(r){case"referenceHidden":{const i=await Cc(e,{...s,elementContext:"reference"}),a=W1(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:K1(a)}}}case"escaped":{const i=await Cc(e,{...s,altBoundary:!0}),a=W1(i,n.floating);return{data:{escapedOffsets:a,escaped:K1(a)}}}default:return{}}}}};async function oI(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Js(n),c=Qa(n),u=Bi(n)==="y",f=["left","top"].includes(a)?-1:1,p=i&&u?-1:1,m=Qs(e,t);let{mainAxis:x,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),u?{x:y*p,y:x*f}:{x:x*f,y:y*p}}const aI=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:a,middlewareData:c}=e,u=await oI(e,t);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+u.x,y:i+u.y,data:{...u,placement:a}}}}},lI=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:S=>{let{x:N,y:E}=S;return{x:N,y:E}}},...u}=Qs(t,e),f={x:n,y:r},p=await Cc(e,u),m=Bi(Js(s)),x=by(m);let y=f[x],w=f[m];if(i){const S=x==="y"?"top":"left",N=x==="y"?"bottom":"right",E=y+p[S],M=y-p[N];y=Zg(E,y,M)}if(a){const S=m==="y"?"top":"left",N=m==="y"?"bottom":"right",E=w+p[S],M=w-p[N];w=Zg(E,w,M)}const b=c.fn({...e,[x]:y,[m]:w});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[x]:i,[m]:a}}}}}},cI=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:a}=e,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=Qs(t,e),p={x:n,y:r},m=Bi(s),x=by(m);let y=p[x],w=p[m];const b=Qs(c,e),S=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const M=x==="y"?"height":"width",j=i.reference[x]-i.floating[M]+S.mainAxis,A=i.reference[x]+i.reference[M]-S.mainAxis;y<j?y=j:y>A&&(y=A)}if(f){var N,E;const M=x==="y"?"width":"height",j=["top","left"].includes(Js(s)),A=i.reference[m]-i.floating[M]+(j&&((N=a.offset)==null?void 0:N[m])||0)+(j?0:S.crossAxis),P=i.reference[m]+i.reference[M]+(j?0:((E=a.offset)==null?void 0:E[m])||0)-(j?S.crossAxis:0);w<A?w=A:w>P&&(w=P)}return{[x]:y,[m]:w}}}},uI=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:a,elements:c}=e,{apply:u=()=>{},...f}=Qs(t,e),p=await Cc(e,f),m=Js(s),x=Qa(s),y=Bi(s)==="y",{width:w,height:b}=i.floating;let S,N;m==="top"||m==="bottom"?(S=m,N=x===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(N=m,S=x==="end"?"top":"bottom");const E=b-p.top-p.bottom,M=w-p.left-p.right,j=$i(b-p[S],E),A=$i(w-p[N],M),P=!e.middlewareData.shift;let O=j,z=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(z=M),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(O=E),P&&!x){const Y=rr(p.left,0),Q=rr(p.right,0),X=rr(p.top,0),le=rr(p.bottom,0);y?z=w-2*(Y!==0||Q!==0?Y+Q:rr(p.left,p.right)):O=b-2*(X!==0||le!==0?X+le:rr(p.top,p.bottom))}await u({...e,availableWidth:z,availableHeight:O});const U=await a.getDimensions(c.floating);return w!==U.width||b!==U.height?{reset:{rects:!0}}:{}}}};function fh(){return typeof window<"u"}function Ja(t){return IC(t)?(t.nodeName||"").toLowerCase():"#document"}function ir(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ss(t){var e;return(e=(IC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function IC(t){return fh()?t instanceof Node||t instanceof ir(t).Node:!1}function Qr(t){return fh()?t instanceof Element||t instanceof ir(t).Element:!1}function vs(t){return fh()?t instanceof HTMLElement||t instanceof ir(t).HTMLElement:!1}function q1(t){return!fh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ir(t).ShadowRoot}function qc(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Jr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function dI(t){return["table","td","th"].includes(Ja(t))}function hh(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Sy(t){const e=Cy(),n=Qr(t)?Jr(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function fI(t){let e=Hi(t);for(;vs(e)&&!La(e);){if(Sy(e))return e;if(hh(e))return null;e=Hi(e)}return null}function Cy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function La(t){return["html","body","#document"].includes(Ja(t))}function Jr(t){return ir(t).getComputedStyle(t)}function ph(t){return Qr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Hi(t){if(Ja(t)==="html")return t;const e=t.assignedSlot||t.parentNode||q1(t)&&t.host||Ss(t);return q1(e)?e.host:e}function LC(t){const e=Hi(t);return La(e)?t.ownerDocument?t.ownerDocument.body:t.body:vs(e)&&qc(e)?e:LC(e)}function Nc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=LC(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=ir(s);if(i){const c=tx(a);
vendor: 5,723 bytes, line 8
8return e.concat(a,a.visualViewport||[],qc(s)?s:[],c&&n?Nc(c):[])}return e.concat(s,Nc(s,[],n))}function tx(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function _C(t){const e=Jr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=vs(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,c=Xd(n)!==i||Xd(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function Ny(t){return Qr(t)?t:t.contextElement}function Aa(t){const e=Ny(t);if(!vs(e))return xs(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=_C(e);let a=(i?Xd(n.width):n.width)/r,c=(i?Xd(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const hI=xs(0);function zC(t){const e=ir(t);return!Cy()||!e.visualViewport?hI:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pI(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ir(t)?!1:e}function Io(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=Ny(t);let a=xs(1);e&&(r?Qr(r)&&(a=Aa(r)):a=Aa(t));const c=pI(i,n,r)?zC(i):xs(0);let u=(s.left+c.x)/a.x,f=(s.top+c.y)/a.y,p=s.width/a.x,m=s.height/a.y;if(i){const x=ir(i),y=r&&Qr(r)?ir(r):r;let w=x,b=tx(w);for(;b&&r&&y!==w;){const S=Aa(b),N=b.getBoundingClientRect(),E=Jr(b),M=N.left+(b.clientLeft+parseFloat(E.paddingLeft))*S.x,j=N.top+(b.clientTop+parseFloat(E.paddingTop))*S.y;u*=S.x,f*=S.y,p*=S.x,m*=S.y,u+=M,f+=j,w=ir(b),b=tx(w)}}return ef({width:p,height:m,x:u,y:f})}function Ey(t,e){const n=ph(t).scrollLeft;return e?e.left+n:Io(Ss(t)).left+n}function FC(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:Ey(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function mI(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=Ss(r),c=e?hh(e.floating):!1;if(r===a||c&&i)return n;let u={scrollLeft:0,scrollTop:0},f=xs(1);const p=xs(0),m=vs(r);if((m||!m&&!i)&&((Ja(r)!=="body"||qc(a))&&(u=ph(r)),vs(r))){const y=Io(r);f=Aa(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const x=a&&!m&&!i?FC(a,u,!0):xs(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+p.x+x.x,y:n.y*f.y-u.scrollTop*f.y+p.y+x.y}}function gI(t){return Array.from(t.getClientRects())}function xI(t){const e=Ss(t),n=ph(t),r=t.ownerDocument.body,s=rr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=rr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ey(t);const c=-n.scrollTop;return Jr(r).direction==="rtl"&&(a+=rr(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:a,y:c}}function yI(t,e){const n=ir(t),r=Ss(t),s=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){i=s.width,a=s.height;const f=Cy();(!f||f&&e==="fixed")&&(c=s.offsetLeft,u=s.offsetTop)}return{width:i,height:a,x:c,y:u}}function vI(t,e){const n=Io(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=vs(t)?Aa(t):xs(1),a=t.clientWidth*i.x,c=t.clientHeight*i.y,u=s*i.x,f=r*i.y;return{width:a,height:c,x:u,y:f}}function G1(t,e,n){let r;if(e==="viewport")r=yI(t,n);else if(e==="document")r=xI(Ss(t));else if(Qr(e))r=vI(e,n);else{const s=zC(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return ef(r)}function $C(t,e){const n=Hi(t);return n===e||!Qr(n)||La(n)?!1:Jr(n).position==="fixed"||$C(n,e)}function bI(t,e){const n=e.get(t);if(n)return n;let r=Nc(t,[],!1).filter(c=>Qr(c)&&Ja(c)!=="body"),s=null;const i=Jr(t).position==="fixed";let a=i?Hi(t):t;for(;Qr(a)&&!La(a);){const c=Jr(a),u=Sy(a);!u&&c.position==="fixed"&&(s=null),(i?!u&&!s:!u&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||qc(a)&&!u&&$C(t,a))?r=r.filter(p=>p!==a):s=c,a=Hi(a)}return e.set(t,r),r}function wI(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?hh(e)?[]:bI(e,this._c):[].concat(n),r],c=a[0],u=a.reduce((f,p)=>{const m=G1(e,p,s);return f.top=rr(m.top,f.top),f.right=$i(m.right,f.right),f.bottom=$i(m.bottom,f.bottom),f.left=rr(m.left,f.left),f},G1(e,c,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function kI(t){const{width:e,height:n}=_C(t);return{width:e,height:n}}function SI(t,e,n){const r=vs(e),s=Ss(e),i=n==="fixed",a=Io(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const u=xs(0);if(r||!r&&!i)if((Ja(e)!=="body"||qc(s))&&(c=ph(e)),r){const x=Io(e,!0,i,e);u.x=x.x+e.clientLeft,u.y=x.y+e.clientTop}else s&&(u.x=Ey(s));const f=s&&!r&&!i?FC(s,c):xs(0),p=a.left+c.scrollLeft-u.x-f.x,m=a.top+c.scrollTop-u.y-f.y;return{x:p,y:m,width:a.width,height:a.height}}function Vm(t){return Jr(t).position==="static"}function Q1(t,e){if(!vs(t)||Jr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ss(t)===n&&(n=n.ownerDocument.body),n}function BC(t,e){const n=ir(t);if(hh(t))return n;if(!vs(t)){let s=Hi(t);for(;s&&!La(s);){if(Qr(s)&&!Vm(s))return s;s=Hi(s)}return n}let r=Q1(t,e);for(;r&&dI(r)&&Vm(r);)r=Q1(r,e);return r&&La(r)&&Vm(r)&&!Sy(r)?n:r||fI(t)||n}const CI=async function(t){const e=this.getOffsetParent||BC,n=this.getDimensions,r=await n(t.floating);return{reference:SI(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NI(t){return Jr(t).direction==="rtl"}const EI={convertOffsetParentRelativeRectToViewportRelativeRect:mI,getDocumentElement:Ss,getClippingRect:wI,getOffsetParent:BC,getElementRects:CI,getClientRects:gI,getDimensions:kI,getScale:Aa,isElement:Qr,isRTL:NI};function HC(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function TI(t,e){let n=null,r;const s=Ss(t);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const f=t.getBoundingClientRect(),{left:p,top:m,width:x,height:y}=f;
vendor: 11,499 bytes, line 8
8if(c||e(),!x||!y)return;const w=hd(m),b=hd(s.clientWidth-(p+x)),S=hd(s.clientHeight-(m+y)),N=hd(p),M={rootMargin:-w+"px "+-b+"px "+-S+"px "+-N+"px",threshold:rr(0,$i(1,u))||1};let j=!0;function A(P){const O=P[0].intersectionRatio;if(O!==u){if(!j)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!HC(f,t.getBoundingClientRect())&&a(),j=!1}try{n=new IntersectionObserver(A,{...M,root:s.ownerDocument})}catch{n=new IntersectionObserver(A,M)}n.observe(t)}return a(!0),i}function MI(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=Ny(t),p=s||i?[...f?Nc(f):[],...Nc(e)]:[];p.forEach(N=>{s&&N.addEventListener("scroll",n,{passive:!0}),i&&N.addEventListener("resize",n)});const m=f&&c?TI(f,n):null;let x=-1,y=null;a&&(y=new ResizeObserver(N=>{let[E]=N;E&&E.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var M;(M=y)==null||M.observe(e)})),n()}),f&&!u&&y.observe(f),y.observe(e));let w,b=u?Io(t):null;u&&S();function S(){const N=Io(t);b&&!HC(b,N)&&n(),b=N,w=requestAnimationFrame(S)}return n(),()=>{var N;p.forEach(E=>{s&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),m?.(),(N=y)==null||N.disconnect(),y=null,u&&cancelAnimationFrame(w)}}const jI=aI,AI=lI,RI=sI,OI=uI,PI=iI,J1=rI,DI=cI,II=(t,e,n)=>{const r=new Map,s={platform:EI,...n},i={...s.platform,_c:r};return nI(t,e,{...s,platform:i})};var zd=typeof document<"u"?k.useLayoutEffect:k.useEffect;function tf(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!tf(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!tf(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function VC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Y1(t,e){const n=VC(t);return Math.round(e*n)/n}function Um(t){const e=k.useRef(t);return zd(()=>{e.current=t}),e}function LI(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:u,open:f}=t,[p,m]=k.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[x,y]=k.useState(r);tf(x,r)||y(r);const[w,b]=k.useState(null),[S,N]=k.useState(null),E=k.useCallback(H=>{H!==P.current&&(P.current=H,b(H))},[]),M=k.useCallback(H=>{H!==O.current&&(O.current=H,N(H))},[]),j=i||w,A=a||S,P=k.useRef(null),O=k.useRef(null),z=k.useRef(p),U=u!=null,Y=Um(u),Q=Um(s),X=Um(f),le=k.useCallback(()=>{if(!P.current||!O.current)return;const H={placement:e,strategy:n,middleware:x};Q.current&&(H.platform=Q.current),II(P.current,O.current,H).then(J=>{const ee={...J,isPositioned:X.current!==!1};W.current&&!tf(z.current,ee)&&(z.current=ee,Kr.flushSync(()=>{m(ee)}))})},[x,e,n,Q,X]);zd(()=>{f===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,m(H=>({...H,isPositioned:!1})))},[f]);const W=k.useRef(!1);zd(()=>(W.current=!0,()=>{W.current=!1}),[]),zd(()=>{if(j&&(P.current=j),A&&(O.current=A),j&&A){if(Y.current)return Y.current(j,A,le);le()}},[j,A,le,Y,U]);const ce=k.useMemo(()=>({reference:P,floating:O,setReference:E,setFloating:M}),[E,M]),se=k.useMemo(()=>({reference:j,floating:A}),[j,A]),ie=k.useMemo(()=>{const H={position:n,left:0,top:0};if(!se.floating)return H;const J=Y1(se.floating,p.x),ee=Y1(se.floating,p.y);return c?{...H,transform:"translate("+J+"px, "+ee+"px)",...VC(se.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:ee}},[n,c,se.floating,p.x,p.y]);return k.useMemo(()=>({...p,update:le,refs:ce,elements:se,floatingStyles:ie}),[p,le,ce,se,ie])}const _I=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?J1({element:r.current,padding:s}).fn(n):{}:r?J1({element:r,padding:s}).fn(n):{}}}},zI=(t,e)=>({...jI(t),options:[t,e]}),FI=(t,e)=>({...AI(t),options:[t,e]}),$I=(t,e)=>({...DI(t),options:[t,e]}),BI=(t,e)=>({...RI(t),options:[t,e]}),HI=(t,e)=>({...OI(t),options:[t,e]}),VI=(t,e)=>({...PI(t),options:[t,e]}),UI=(t,e)=>({..._I(t),options:[t,e]});var WI="Arrow",UC=k.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return d.jsx(Ie.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});UC.displayName=WI;var KI=UC;function WC(t){const[e,n]=k.useState(void 0);return un(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,c;if("borderBoxSize"in i){const u=i.borderBoxSize,f=Array.isArray(u)?u[0]:u;a=f.inlineSize,c=f.blockSize}else a=t.offsetWidth,c=t.offsetHeight;n({width:a,height:c})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var Ty="Popper",[KC,mh]=Xr(Ty),[qI,qC]=KC(Ty),GC=t=>{const{__scopePopper:e,children:n}=t,[r,s]=k.useState(null);return d.jsx(qI,{scope:e,anchor:r,onAnchorChange:s,children:n})};GC.displayName=Ty;var QC="PopperAnchor",JC=k.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=qC(QC,n),a=k.useRef(null),c=nt(e,a);return k.useEffect(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:d.jsx(Ie.div,{...s,ref:c})});JC.displayName=QC;var My="PopperContent",[GI,QI]=KC(My),YC=k.forwardRef((t,e)=>{const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:y="optimized",onPlaced:w,...b}=t,S=qC(My,n),[N,E]=k.useState(null),M=nt(e,oe=>E(oe)),[j,A]=k.useState(null),P=WC(j),O=P?.width??0,z=P?.height??0,U=r+(i!=="center"?"-"+i:""),Y=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},Q=Array.isArray(f)?f:[f],X=Q.length>0,le={padding:Y,boundary:Q.filter(YI),altBoundary:X},{refs:W,floatingStyles:ce,placement:se,isPositioned:ie,middlewareData:H}=LI({strategy:"fixed",placement:U,whileElementsMounted:(...oe)=>MI(...oe,{animationFrame:y==="always"}),elements:{reference:S.anchor},middleware:[zI({mainAxis:s+z,alignmentAxis:a}),u&&FI({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?$I():void 0,...le}),u&&BI({...le}),HI({...le,apply:({elements:oe,rects:fe,availableWidth:Te,availableHeight:ue})=>{const{width:Fe,height:We}=fe.reference,Xe=oe.floating.style;Xe.setProperty("--radix-popper-available-width",`${Te}px`),Xe.setProperty("--radix-popper-available-height",`${ue}px`),Xe.setProperty("--radix-popper-anchor-width",`${Fe}px`),Xe.setProperty("--radix-popper-anchor-height",`${We}px`)}}),j&&UI({element:j,padding:c}),XI({arrowWidth:O,arrowHeight:z}),x&&VI({strategy:"referenceHidden",...le})]}),[J,ee]=eN(se),D=Wn(w);un(()=>{ie&&D?.()},[ie,D]);const V=H.arrow?.x,ae=H.arrow?.y,we=H.arrow?.centerOffset!==0,[ge,Se]=k.useState();return un(()=>{N&&Se(window.getComputedStyle(N).zIndex)},[N]),d.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:ie?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(GI,{scope:n,placedSide:J,onArrowChange:A,arrowX:V,arrowY:ae,shouldHideArrow:we,children:d.jsx(Ie.div,{"data-side":J,"data-align":ee,...b,ref:M,style:{...b.style,animation:ie?void 0:"none"}})})})});YC.displayName=My;var XC="PopperArrow",JI={top:"bottom",right:"left",bottom:"top",left:"right"},ZC=k.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=QI(XC,r),a=JI[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(KI,{...s,ref:n,style:{...s.style,display:"block"}})})});ZC.displayName=XC;function YI(t){return t!==null}var XI=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:s}=e,a=s.arrow?.centerOffset!==0,c=a?0:t.arrowWidth,u=a?0:t.arrowHeight,[f,p]=eN(n),m={start:"0%",center:"50%",end:"100%"}[p],x=(s.arrow?.x??0)+c/2,y=(s.arrow?.y??0)+u/2;let w="",b="";return f==="bottom"?(w=a?m:`${x}px`,b=`${-u}px`):f==="top"?(w=a?m:`${x}px`,b=`${r.floating.height+u}px`):f==="right"?(w=`${-u}px`,b=a?m:`${y}px`):f==="left"&&(w=`${r.floating.width+u}px`,b=a?m:`${y}px`),{data:{x:w,y:b}}}});function eN(t){const[e,n="center"]=t.split("-");return[e,n]}var ZI=GC,tN=JC,nN=YC,rN=ZC,[gh]=Xr("Tooltip",[mh]),jy=mh(),sN="TooltipProvider",eL=700,X1="tooltip.open",[tL,iN]=gh(sN),oN=t=>{const{__scopeTooltip:e,delayDuration:n=eL,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,a=k.useRef(!0),c=k.useRef(!1),u=k.useRef(0);return k.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),d.jsx(tL,{scope:e,isOpenDelayedRef:a,delayDuration:n,onOpen:k.useCallback(()=>{window.clearTimeout(u.current),a.current=!1},[]),onClose:k.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:k.useCallback(f=>{c.current=f},[]),disableHoverableContent:s,children:i})};oN.displayName=sN;var aN="Tooltip",[dU,xh]=gh(aN),nx="TooltipTrigger",nL=k.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=xh(nx,n),i=iN(nx,n),a=jy(n),c=k.useRef(null),u=nt(e,c,s.onTriggerChange),f=k.useRef(!1),p=k.useRef(!1),m=k.useCallback(()=>f.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),d.jsx(tN,{asChild:!0,...a,children:d.jsx(Ie.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:u,onPointerMove:Me(t.onPointerMove,x=>{x.pointerType!=="touch"&&!p.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:Me(t.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:Me(t.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Me(t.onFocus,()=>{f.current||s.onOpen()}),onBlur:Me(t.onBlur,s.onClose),onClick:Me(t.onClick,s.onClose)})})});nL.displayName=nx;var rL="TooltipPortal",[fU,sL]=gh(rL,{forceMount:void 0}),_a="TooltipContent",lN=k.forwardRef((t,e)=>{const n=sL(_a,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,a=xh(_a,t.__scopeTooltip);return d.jsx(Qi,{present:r||a.open,children:a.disableHoverableContent?d.jsx(cN,{side:s,...i,ref:e}):d.jsx(iL,{side:s,...i,ref:e})})}),iL=k.forwardRef((t,e)=>{const n=xh(_a,t.__scopeTooltip),r=iN(_a,t.__scopeTooltip),s=k.useRef(null),i=nt(e,s),[a,c]=k.useState(null),{trigger:u,onClose:f}=n,p=s.current,{onPointerInTransitChange:m}=r,x=k.useCallback(()=>{c(null),m(!1)},[m]),y=k.useCallback((w,b)=>{const S=w.currentTarget,N={x:w.clientX,y:w.clientY}
vendor: 4,352 bytes, line 8
8,E=uL(N,S.getBoundingClientRect()),M=dL(N,E),j=fL(b.getBoundingClientRect()),A=pL([...M,...j]);c(A),m(!0)},[m]);return k.useEffect(()=>()=>x(),[x]),k.useEffect(()=>{if(u&&p){const w=S=>y(S,p),b=S=>y(S,u);return u.addEventListener("pointerleave",w),p.addEventListener("pointerleave",b),()=>{u.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",b)}}},[u,p,y,x]),k.useEffect(()=>{if(a){const w=b=>{const S=b.target,N={x:b.clientX,y:b.clientY},E=u?.contains(S)||p?.contains(S),M=!hL(N,a);E?x():M&&(x(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,p,a,f,x]),d.jsx(cN,{...t,ref:i})}),[oL,aL]=gh(aN,{isInside:!1}),lL=VO("TooltipContent"),cN=k.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=t,u=xh(_a,n),f=jy(n),{onClose:p}=u;return k.useEffect(()=>(document.addEventListener(X1,p),()=>document.removeEventListener(X1,p)),[p]),k.useEffect(()=>{if(u.trigger){const m=x=>{x.target?.contains(u.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,p]),d.jsx(Vc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:d.jsxs(nN,{"data-state":u.stateAttribute,...f,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(lL,{children:r}),d.jsx(oL,{scope:n,isInside:!0,children:d.jsx(cP,{id:u.contentId,role:"tooltip",children:s||r})})]})})});lN.displayName=_a;var uN="TooltipArrow",cL=k.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=jy(n);return aL(uN,n).isInside?null:d.jsx(rN,{...s,...r,ref:e})});cL.displayName=uN;function uL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function fL(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function hL(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){const c=e[i].x,u=e[i].y,f=e[a].x,p=e[a].y;u>r!=p>r&&n<(f-c)*(r-u)/(p-u)+c&&(s=!s)}return s}function pL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mL(e)}function mL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var gL=oN,dN=lN;const xL=gL,yL=k.forwardRef(({className:t,sideOffset:e=4,...n},r)=>d.jsx(dN,{ref:r,sideOffset:e,className:Ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...n}));yL.displayName=dN.displayName;const ct=k.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:Ue("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",t),...e}));
8ct.displayName="Card";const vL=k.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:Ue("flex flex-col space-y-1.5 p-6",t),...e}));vL.displayName="CardHeader";const bL=k.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:Ue("text-2xl font-semibold leading-none tracking-tight",t),...e}));bL.displayName="CardTitle";const wL=k.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:Ue("text-sm text-muted-foreground",t),...e}));wL.displayName="CardDescription";const fN=k.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:Ue("p-6 pt-0",t),...e}));fN.displayName="CardContent";const kL=k.forwardRef(({className:t,...e},n)=>d.jsx("div",{ref:n,className:Ue("flex items-center p-6 pt-0",t),...e}));kL.displayName="CardFooter";function SL(){return d.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:d.jsx(ct,{className:"w-full max-w-md mx-4",children:d.jsxs(fN,{className:"pt-6",children:[d.jsxs("div",{className:"flex mb-4 gap-2",children:[d.jsx(LP,{className:"h-8 w-8 text-red-500"}),d.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),d.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}const hN=[{label:"Allgemeinmedizin",href:"/#allgemeinmedizin"},{label:"Prävention",href:"/praevention"},{label:"Diagnostik",href:"/diagnostik"}],pN=[{label:"Team",href:"/team"},{label:"Karriere",href:"/karriere"},{label:"Kontakt",href:"/kontakt"}],CL=[{label:"Startseite",href:"/"},...hN,...pN];function NL({hours:t}){const[e,n]=k.useState(!1),[r,s]=k.useState(!1),[i,a]=rh(),c=i==="/";k.useEffect(()=>{const m=()=>n(window.scrollY>100);return window.addEventListener("scroll",m,{passive:!0}),()=>window.removeEventListener("scroll",m)},[]);const u=m=>{if(s(!1),m==="/"){c?window.scrollTo({top:0,behavior:"smooth"}):(a("/"),window.scrollTo({top:0,behavior:"instant"}));return}if(m.startsWith("/#")){const x=m.slice(2);if(c){const y=document.getElementById(x);y&&y.scrollIntoView({behavior:"smooth"})}else sessionStorage.setItem("scrollToAnchor",x),a("/");return}},f=m=>!m.startsWith("/#")&&m!=="/",p=e||!c;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${p?"bg-[hsl(40,15%,96%)]/95 dark:bg-neutral-900/95 backdrop-blur-md shadow-sm":"bg-[hsl(40,15%,96%)]/60 backdrop-blur-sm"}`,"data-testid":"header",children:d.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 overflow-visible pt-1 pb-1",children:d.jsxs("div",{className:`flex items-center justify-between transition-all duration-500 ${p?"h-[72px] lg:h-24":"h-20 md:h-28 lg:h-36"}`,children:[d.jsx("nav",{className:"hidden lg:flex items-center gap-2 flex-1","data-testid":"nav-desktop-left",children:hN.map(m=>f(m.href)?d.jsx(Gr,{href:m.href,className:"text-base font-semibold tracking-wide uppercase transition-colors px-3 py-2 text-foreground/70 hover:text-foreground","data-testid":`nav-desktop-${m.href.replace("/","")}`,children:m.label},m.href):d.jsx("button",{onClick:()=>u(m.href),className:"text-base font-semibold tracking-wide uppercase transition-colors px-3 py-2 text-foreground/70 hover:text-foreground","data-testid":`nav-desktop-${m.href.replace("/#","")}`,children:m.label},m.href))}),d.jsxs("a",{href:"/",onClick:m=>{m.preventDefault(),u("/")},className:"flex flex-col items-center z-10 flex-shrink-0 mx-4 md:mx-8 cursor-pointer","data-testid":"link-home",children:[d.jsx("img",{src:"/images/logo.png",alt:"Praxis Dr. Jelden Logo",className:`transition-all duration-500 object-contain ${p?"h-8 w-8 lg:h-12 lg:w-12":"h-10 w-10 md:h-14 md:w-14 lg:h-16 lg:w-16"}`,"data-testid":"img-logo"}),d.jsxs("div",{className:"text-center mt-1.5",children:[d.jsx("p",{className:`font-bold uppercase tracking-[0.2em] leading-tight transition-all duration-300 text-foreground ${p?"text-xs lg:text-base":"text-sm md:text-base lg:text-xl"}`,children:"Dr. Jelden"}),d.jsx("p",{className:`tracking-[0.25em] uppercase transition-all duration-300 mt-0.5 text-muted-foreground ${p?"text-[9px] lg:text-[10px]":"text-[9px] md:text-[11px] lg:text-xs"}`,children:"Hausarztpraxis"})]})]}),d.jsx("nav",{className:"hidden lg:flex items-center gap-2 flex-1 justify-end","data-testid":"nav-desktop-right",children:pN.map(m=>d.jsx(Gr,{href:m.href,className:"text-base font-semibold tracking-wide uppercase transition-colors px-3 py-2 text-foreground
8/70 hover:text-foreground","data-testid":`nav-desktop-${m.href.replace("/","")}`,children:m.label},m.href))}),d.jsx("button",{onClick:()=>s(!r),className:`lg:hidden relative z-50 w-10 h-10 flex items-center justify-center rounded-full transition-all duration-300 ${r?"bg-primary text-primary-foreground":"bg-secondary text-foreground"}`,"data-testid":"button-mobile-menu",children:r?d.jsx(Uo,{className:"w-5 h-5"}):d.jsx(XP,{className:"w-5 h-5"})})]})})}),d.jsxs("div",{className:`fixed inset-0 z-40 lg:hidden transition-all duration-300 ${r?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,children:[d.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>s(!1),"data-testid":"overlay-mobile-menu"}),d.jsx("div",{className:`absolute top-0 right-0 w-full max-w-sm h-full bg-background shadow-2xl transition-transform duration-300 ${r?"translate-x-0":"translate-x-full"}`,"data-testid":"mobile-menu-panel",children:d.jsxs("div",{className:"pt-20 px-6 pb-8 h-full overflow-y-auto",children:[d.jsx("nav",{className:"space-y-1","data-testid":"nav-mobile",children:CL.map(m=>f(m.href)?d.jsxs(Gr,{href:m.href,onClick:()=>s(!1),className:"flex items-center justify-between w-full px-4 py-4 rounded-lg text-lg font-medium text-foreground/80 hover:text-foreground hover:bg-accent transition-colors","data-testid":`nav-mobile-${m.href.replace("/","")}`,children:[m.label,d.jsx(Yd,{className:"w-5 h-5 text-muted-foreground"})]},m.href):d.jsxs("button",{onClick:()=>u(m.href),className:"flex items-center justify-between w-full px-4 py-4 rounded-lg text-lg font-medium text-foreground/80 hover:text-foreground hover:bg-accent transition-colors","data-testid":`nav-mobile-${m.href.replace("/#","").replace("/","")}`,children:[m.label,d.jsx(Yd,{className:"w-5 h-5 text-muted-foreground"})]},m.href))}),t&&t.length>0&&d.jsxs("div",{className:"mt-8 p-5 rounded-xl bg-accent/50","data-testid":"card-hours-menu",children:[d.jsx("span",{className:"text-sm font-semibold block mb-3",children:"Sprechzeiten"}),d.jsx("div",{className:"space-y-2",children:t.map(m=>d.jsxs("div",{className:"grid grid-cols-[5.5rem_1fr] gap-x-2 text-sm items-start",children:[d.jsx("span",{className:"font-medium text-foreground/70 shrink-0",children:m.day}),d.jsxs("span",{className:"text-muted-foreground text-right leading-snug",children:[m.morning,m.afternoon?d.jsxs(d.Fragment,{children:[d.jsx("br",{}),m.afternoon]}):""]})]},m.id))})]})]})})]})]})}const{entries:mN,setPrototypeOf:Z1,isFrozen:EL,getPrototypeOf:TL,getOwnPropertyDescriptor:ML}=Object;let{freeze:Rn,seal:jr,create:Fd}=Object,{apply:rx,construct:sx}=typeof Reflect<"u"&&Reflect;Rn||(Rn=function(e){return e});jr||(jr=function(e){return e});rx||(rx=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];return e.apply(n,s)});sx||(sx=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const pd=On(Array.prototype.forEach),jL=On(Array.prototype.lastIndexOf),ew=On(Array.prototype.pop),Kl=On(Array.prototype.push),AL=On(Array.prototype.splice),$d=On(String.prototype.toLowerCase),Wm=On(String.prototype.toString),Km=On(String.prototype.match),ql=On(String.prototype.replace),RL=On(String.prototype.indexOf),OL=On(String.prototype.trim),nr=On(Object.prototype.hasOwnProperty),jn=On(RegExp.prototype.test),Gl=PL(TypeError);function On(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return rx(t,e,r)}}function PL(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sx(t,n)}}function He(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$d;Z1&&Z1(t,null);let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const i=n(s);i!==s&&(EL(e)||(e[r]=i),s=i)}t[s]=!0}return t}function DL(t){for(let e=0;e<t.length;e++)nr(t,e)||(t[e]=null);return t}function cs(t){const e=Fd(null);for(const[n,r]of mN(t))nr(t,n)&&(Array.isArray(r)?e[n]=DL(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=cs(r):e[n]=r);return e}function Ql(t,e){for(;t!==null;){const r=ML(t,e);if(r){if(r.get)return On(r.get);if(typeof r.value=="function")return On(r.value)}t=TL(t)}function n(){return null}return n}const tw=Rn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qm=Rn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gm=Rn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),IL=Rn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qm=Rn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),LL=Rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nw=Rn(["#text"]),rw=Rn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
8spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Jm=Rn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sw=Rn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),md=Rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_L=jr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zL=jr(/<%[\w\W]*|[\w\W]*%>/gm),FL=jr(/\$\{[\w\W]*/gm),$L=jr(/^data-[\-\w.\u00B7-\uFFFF]+$/),BL=jr(/^aria-[\-\w]+$/),gN=jr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),HL=jr(/^(?:\w+script|data):/i),VL=jr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xN=jr(/^html$/i),UL=jr(/^[a-z][.\w]*(-[.\w]+)+$/i);var iw=Object.freeze({__proto__:null,ARIA_ATTR:BL,ATTR_WHITESPACE:VL,CUSTOM_ELEMENT:UL,DATA_ATTR:$L,DOCTYPE_NAME:xN,ERB_EXPR:zL,IS_ALLOWED_URI:gN,IS_SCRIPT_OR_DATA:HL,MUSTACHE_EXPR:_L,TMPLIT_EXPR:FL});const Jl={element:1,text:3,progressingInstruction:7,comment:8,document:9},WL=function(){return typeof window>"u"?null:window},KL=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;
vendor: 13,128 bytes, line 8
8const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ow=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function yN(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WL();const e=Ce=>yN(Ce);if(e.version="3.3.2",e.removed=[],!t||!t.document||t.document.nodeType!==Jl.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,s=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:c,Element:u,NodeFilter:f,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:x,trustedTypes:y}=t,w=u.prototype,b=Ql(w,"cloneNode"),S=Ql(w,"remove"),N=Ql(w,"nextSibling"),E=Ql(w,"childNodes"),M=Ql(w,"parentNode");if(typeof a=="function"){const Ce=n.createElement("template");Ce.content&&Ce.content.ownerDocument&&(n=Ce.content.ownerDocument)}let j,A="";const{implementation:P,createNodeIterator:O,createDocumentFragment:z,getElementsByTagName:U}=n,{importNode:Y}=r;let Q=ow();e.isSupported=typeof mN=="function"&&typeof M=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:X,ERB_EXPR:le,TMPLIT_EXPR:W,DATA_ATTR:ce,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:H,CUSTOM_ELEMENT:J}=iw;let{IS_ALLOWED_URI:ee}=iw,D=null;const V=He({},[...tw,...qm,...Gm,...Qm,...nw]);let ae=null;const we=He({},[...rw,...Jm,...sw,...md]);let ge=Object.seal(Fd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,oe=null;const fe=Object.seal(Fd(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,ue=!0,Fe=!1,We=!0,Xe=!1,ot=!0,Mt=!1,nn=!1,In=!1,lr=!1,cr=!1,_t=!1,Ln=!0,Ar=!1;const no="user-content-";let Es=!0,es=!1,Rr={},jt=null;const Cn=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Or=null;const Pr=He({},["audio","video","img","source","image","track"]);let Wt=null;const ro=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ts="http://www.w3.org/1998/Math/MathML",Ms="http://www.w3.org/2000/svg",Nn="http://www.w3.org/1999/xhtml";let qn=Nn,js=!1,ts=null;const so=He({},[Ts,Ms,Nn],Wm);let ns=He({},["mi","mo","mn","ms","mtext"]),Gn=He({},["annotation-xml"]);const ut=He({},["title","style","font","a","script"]);let wt=null;const Kt=["application/xhtml+xml","text/html"],Qn="text/html";let qe=null,gt=null;const fn=n.createElement("form"),ur=function(L){return L instanceof RegExp||L instanceof Function},st=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(gt&>===L)){if((!L||typeof L!="object")&&(L={}),L=cs(L),wt=Kt.indexOf(L.PARSER_MEDIA_TYPE)===-1?Qn:L.PARSER_MEDIA_TYPE,qe=wt==="application/xhtml+xml"?Wm:$d,D=nr(L,"ALLOWED_TAGS")?He({},L.ALLOWED_TAGS,qe):V,ae=nr(L,"ALLOWED_ATTR")?He({},L.ALLOWED_ATTR,qe):we,ts=nr(L,"ALLOWED_NAMESPACES")?He({},L.ALLOWED_NAMESPACES,Wm):so,Wt=nr(L,"ADD_URI_SAFE_ATTR")?He(cs(ro),L.ADD_URI_SAFE_ATTR,qe):ro,Or=nr(L,"ADD_DATA_URI_TAGS")?He(cs(Pr),L.ADD_DATA_URI_TAGS,qe):Pr,jt=nr(L,"FORBID_CONTENTS")?He({},L.FORBID_CONTENTS,qe):Cn,Se=nr(L,"FORBID_TAGS")?He({},L.FORBID_TAGS,qe):cs({}),oe=nr(L,"FORBID_ATTR")?He({},L.FORBID_ATTR,qe):cs({}),Rr=nr(L,"USE_PROFILES")?L.USE_PROFILES:!1,Te=L.ALLOW_ARIA_ATTR!==!1,ue=L.ALLOW_DATA_ATTR!==!1,Fe=L.ALLOW_UNKNOWN_PROTOCOLS||!1,We=L.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xe=L.SAFE_FOR_TEMPLATES||!1,ot=L.SAFE_FOR_XML!==!1,Mt=L.WHOLE_DOCUMENT||!1,lr=L.RETURN_DOM||!1,cr=L.RETURN_DOM_FRAGMENT||!1,_t=L.RETURN_TRUSTED_TYPE||!1,In=L.FORCE_BODY||!1,Ln=L.SANITIZE_DOM!==!1,Ar=L.SANITIZE_NAMED_PROPS||!1,Es=L.KEEP_CONTENT!==!1,es=L.IN_PLACE||!1,ee=L.ALLOWED_URI_REGEXP||gN,qn=L.NAMESPACE||Nn,ns=L.MATHML_TEXT_INTEGRATION_POINTS||ns,Gn=L.HTML_INTEGRATION_POINTS||Gn,ge=L.CUSTOM_ELEMENT_HANDLING||{},L.CUSTOM_ELEMENT_HANDLING&&ur(L.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=L.CUSTOM_ELEMENT_HANDLING.tagNameCheck),L.CUSTOM_ELEMENT_HANDLING&&ur(L.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=L.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),L.CUSTOM_ELEMENT_HANDLING&&typeof L.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ge.allowCustomizedBuiltInElements=L.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xe&&(ue=!1),cr&&(lr=!0),Rr&&(D=He({},nw),ae=Fd(null),Rr.html===!0&&(He(D,tw),He(ae,rw)),Rr.svg===!0&&(He(D,qm),He(ae,Jm),He(ae,md)),Rr.svgFilters===!0&&(He(D,Gm),He(ae,Jm),He(ae,md)),Rr.mathMl===!0&&(He(D,Qm),He(ae,sw),He(ae,md))),nr(L,"ADD_TAGS")||(fe.tagCheck=null),nr(L,"ADD_ATTR")||(fe.attributeCheck=null),L.ADD_TAGS&&(typeof L.ADD_TAGS=="function"?fe.tagCheck=L.ADD_TAGS:(D===V&&(D=cs(D)),He(D,L.ADD_TAGS,qe))),L.ADD_ATTR&&(typeof L.ADD_ATTR=="function"?fe.attributeCheck=L.ADD_ATTR:(ae===we&&(ae=cs(ae)),He(ae,L.ADD_ATTR,qe))),L.ADD_URI_SAFE_ATTR&&He(Wt,L.ADD_URI_SAFE_ATTR,qe),L.FORBID_CONTENTS&&(jt===Cn&&(jt=cs(jt)),He(jt,L.FORBID_CONTENTS,qe)),L.ADD_FORBID_CONTENTS&&(jt===Cn&&(jt=cs(jt)),He(jt,L.ADD_FORBID_CONTENTS,qe)),Es&&(D["#text"]=!0),Mt&&He(D,["html","head","body"]),D.table&&(He(D,["tbody"]),delete Se.tbody),L.TRUSTED_TYPES_POLICY){if(typeof L.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof L.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=L.TRUSTED_TYPES_POLICY,A=j.createHTML("")}else j===void 0&&(j=KL(y,s)),j!==null&&typeof A=="string"&&(A=j.createHTML(""));Rn&&Rn(L),gt=L}},En=He({},[...qm,...Gm,...IL]),zt=He({},[...Qm,...LL]),Jn=function(L){let te=M(L);(!te||!te.tagName)&&(te={namespaceURI:qn,tagName:"template"});const ve=$d(L.tagName),at=$d(te.tagName);return ts[L.namespaceURI]?L.namespaceURI===Ms?te.namespaceURI===Nn?ve==="svg":te.namespaceURI===Ts?ve==="svg"&&(at==="annotation-xml"||ns[at]):!!En[ve]:L.namespaceURI===Ts?te.namespaceURI===Nn?ve==="math":te.namespaceURI===Ms?ve==="math"&&Gn[at]:!!zt[ve]:L.namespaceURI===Nn?te.namespaceURI===Ms&&!Gn[at]||te.namespaceURI===Ts&&!ns[at]?!1:!zt[ve]&&(ut[ve]||!En[ve]):!!(wt==="application/xhtml+xml"&&ts[L.namespaceURI]):!1},kt=function(L){Kl(e.removed,{element:L});try{M(L).removeChild(L)}catch{S(L)}},qt=function(L,te){try{Kl(e.removed,{attribute:te.getAttributeNode(L),from:te})}catch{Kl(e.removed,{attribute:null,from:te})}if(te.removeAttribute(L),L==="is")if(lr||cr)try{kt(te)}catch{}else try{te.setAttribute(L,"")}catch{}},hn=function(L){let te=null,ve=null;if(In)L="<remove></remove>"+L;else{const St=Km(L,/^[\r\n\t ]+/);ve=St&&St[0]}wt==="application/xhtml+xml"&&qn===Nn&&(L='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+L+"</body></html>");const at=j?j.createHTML(L):L;if(qn===Nn)try{te=new x().parseFromString(at,wt)}catch{}if(!te||!te.documentElement){te=P.createDocument(qn,"template",null);try{te.documentElement.innerHTML=js?A:at}catch{}}const $e=te.body||te.documentElement;return L&&ve&&$e.insertBefore(n.createTextNode(ve),$e.childNodes[0]||null),qn===Nn?U.call(te,Mt?"html":"body")[0]:Mt?te.documentElement:$e},dr=function(L){return O.call(L.ownerDocument||L,L,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},As=function(L){return L instanceof m&&(typeof L.nodeName!="string"||typeof L.textContent!="string"||typeof L.removeChild!="function"||!(L.attributes instanceof p)||typeof L.removeAttribute!="function"||typeof L.setAttribute!="function"||typeof L.namespaceURI!="string"||typeof L.insertBefore!="function"||typeof L.hasChildNodes!="function")},ru=function(L){return typeof c=="function"&&L instanceof c};function Dr(Ce,L,te){pd(Ce,ve=>{ve.call(e,L,te,gt)})}const rs=function(L){let te=null;if(Dr(Q.beforeSanitizeElements,L,null),As(L))return kt(L),!0;const ve=qe(L.nodeName);if(Dr(Q.uponSanitizeElement,L,{tagName:ve,allowedTags:D}),ot&&L.hasChildNodes()&&!ru(L.firstElementChild)&&jn(/<[/\w!]/g,L.innerHTML)&&jn(/<[/\w!]/g,L.textContent)||L.nodeType===Jl.progressingInstruction||ot&&L.nodeType===Jl.comment&&jn(/<[/\w]/g,L.data))return kt(L),!0;if(!(fe.tagCheck instanceof Function&&fe.tagCheck(ve))&&(!D[ve]||Se[ve])){if(!Se[ve]&&ll(ve)&&(ge.tagNameCheck instanceof RegExp&&jn(ge.tagNameCheck,ve)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(ve)))return!1;if(Es&&!jt[ve]){const at=M(L)||L.parentNode,$e=E(L)||L.childNodes;if($e&&at){const St=$e.length;for(let Gt=St-1;Gt>=0;--Gt){const fr=b($e[Gt],!0);fr.__removalCount=(L.__removalCount||0)+1,at.insertBefore(fr,N(L))}}}return kt(L),!0}return L instanceof u&&!Jn(L)||(ve==="noscript"||ve==="noembed"||ve==="noframes")&&jn(/<\/no(script|embed|frames)/i,L.innerHTML)?(kt(L),!0):(Xe&&L.nodeType===Jl.text&&(te=L.textContent,pd([X,le,W],at=>{te=ql(te,at," ")}),L.textContent!==te&&(Kl(e.removed,{element:L.cloneNode()}),L.textContent=te)),Dr(Q.afterSanitizeElements,L,null),!1)},al=function(L,te,ve){if(oe[te]||Ln&&(te==="id"||te==="name")&&(ve in n||ve in fn))return!1;if(!(ue&&!oe[te]&&jn(ce,te))){if(!(Te&&jn(se,te))){if(!(fe.attributeCheck instanceof Function&&fe.attributeCheck(te,L))){if(!ae[te]||oe[te]){if(!(ll(L)&&(ge.tagNameCheck instanceof RegExp&&jn(ge.tagNameCheck,L)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(L))&&(ge.attributeNameCheck instanceof RegExp&&jn(ge.attributeNameCheck,te)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck(te,L))||te==="is"&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&jn(ge.tagNameCheck,ve)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(ve))))return!1}else if(!Wt[te]){if(!jn(ee,ql(ve,H,""))){if(!((te==="src"||te==="xlink:href"||te==="href")&&L!=="script"&&RL(ve,"data:")===0&&Or[L])){if(!(Fe&&!jn(ie,ql(ve,H,"")))){if(ve)return!1}}}}}}}return!0},ll=function(L){return L!=="annotation-xml"&&Km(L,J)},su=function(L){Dr(Q.beforeSanitizeAttributes,L,null);const{attributes:te}=L;if(!te||As(L))return;const ve={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae,forceKeepAttr:void 0};let at=te.length;for(;at--;){const $e=te[at],{name:St,namespaceURI:Gt,value:fr}=$e,Ir=qe(St),cl=fr;let Ot=St==="value"?cl:OL(cl);if(ve.attrName=Ir,ve.attrValue=Ot,ve.keepAttr=!0,ve.forceKeepAttr=void 0,Dr(Q.uponSanitizeAttribute,L,ve),Ot=ve.attrValue,Ar&&(Ir==="id"||Ir==="name")&&(qt(St,L),Ot=no+Ot),ot&&jn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ot)){qt(St,L);continue}if(Ir==="attributename"&&Km(Ot,"href")){qt(St,L);continue}if(ve.forceKeepAttr)continue;if(!ve.keepAttr){qt(St,L);continue}if(!We&&jn(/\/>/i,Ot)){qt(St,L);continue}Xe&&pd([X,le,W],Yn=>{Ot=ql(Ot,Yn," ")});const io=qe(L.nodeName);if(!al(io,Ir,Ot)){qt(St,L);continue}if(j&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Gt)switch(y.getAttributeType(io,Ir)){case"TrustedHTML":{Ot=j.createHTML(Ot);break}case"TrustedScriptURL":{Ot=j.createScriptURL(Ot);break}}if(Ot!==cl)try{Gt?L.setAttributeNS(Gt,St,Ot):L.setAttribute(St,Ot),As(L)?kt(L):ew(e.removed)}catch{qt(St,L)}}Dr(Q.afterSanitizeAttributes,L,null)},iu=function Ce(L){let te=null;const ve=dr(L);for(Dr(Q.beforeSanitizeShadowDOM,L,null);te=ve.nextNode();)Dr(Q.uponSanitizeShadowNode,te,null),rs(te),su(te),te.content instanceof i&&Ce(te.content);Dr(Q.afterSanitizeShadowDOM,L,null)};return e.sanitize=function(Ce){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=null,ve=null,at=null,$e=null;if(js=!Ce,js&&(Ce="<!-->"),typeof Ce!="string"&&!ru(Ce))if(typeof Ce.toString=="function"){if(Ce=Ce.toString(),typeof Ce!="string")throw Gl("dirty is not a string, aborting")}else throw Gl("toString is not a function");if(!e.isSupported)return Ce;if(nn||st(L),e.removed=[],typeof Ce=="string"&&(es=!1),es){if(Ce.nodeName){const fr=qe(Ce.nodeName);if(!D[fr]||Se[fr])throw Gl("root node is forbidden and cannot be sanitized in-place")}}else if(Ce instanceof c)te=hn("<!---->"),ve=te.ownerDocument.importNode(Ce,!0),ve.nodeType===Jl.element&&ve.nodeName==="BODY"||ve.nodeName==="HTML"?te=ve:te.appendChild(ve);else{if(!lr&&!Xe&&!Mt&&Ce.indexOf("<")===-1)return j&&_t?j.createHTML(Ce):Ce;if(te=hn(Ce),!te)return lr?null:_t?A:""}te&&In&&kt(te.firstChild);const St=dr(es?Ce:te);for(;at=St.nextNode();)rs(at),su(at),at.content instanceof i&&iu(at.content);if(es)return Ce;if(lr){if(cr)for($e=z.call(te.ownerDocument);te.firstChild;)$e.appendChild(te.firstChild);else $e=te;return(ae.shadowroot||ae.shadowrootmode)&&($e=Y.call(r,$e,!0)),$e}
8let Gt=Mt?te.outerHTML:te.innerHTML;return Mt&&D["!doctype"]&&te.ownerDocument&&te.ownerDocument.doctype&&te.ownerDocument.doctype.name&&jn(xN,te.ownerDocument.doctype.name)&&(Gt="<!DOCTYPE "+te.ownerDocument.doctype.name+`> 9`+Gt),Xe&&pd([X,le,W],fr=>{Gt=ql(Gt,fr," ")}),j&&_t?j.createHTML(Gt):Gt},e.setConfig=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};st(Ce),nn=!0},e.clearConfig=function(){gt=null,nn=!1},e.isValidAttribute=function(Ce,L,te){gt||st({});const ve=qe(Ce),at=qe(L);return al(ve,at,te)},e.addHook=function(Ce,L){typeof L=="function"&&Kl(Q[Ce],L)},e.removeHook=function(Ce,L){if(L!==void 0){const te=jL(Q[Ce],L);return te===-1?void 0:AL(Q[Ce],te,1)[0]}return ew(Q[Ce])},e.removeHooks=function(Ce){Q[Ce]=[]},e.removeAllHooks=function(){Q=ow()},e}var qL=yN();const GL=["h1","h2","h3","p","br","strong","em","ul","ol","li","a"],QL=["href","target","rel"];function Vt(t){return qL.sanitize(t,{ALLOWED_TAGS:GL,ALLOWED_ATTR:QL})}const aw={vacation:{icon:ay,bgClass:"bg-amber-50 dark:bg-amber-950/30 border-amber-200 dark:border-amber-800",textClass:"text-amber-900 dark:text-amber-100"},warning:{icon:aD,bgClass:"bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800",textClass:"text-red-900 dark:text-red-100"},info:{icon:WP,bgClass:"bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800",textClass:"text-blue-900 dark:text-blue-100"}},Ym=new Set;function JL({notices:t}){const[e,n]=k.useState(()=>Array.from(Ym)),[r]=rh(),s=k.useRef(r);k.useEffect(()=>{s.current!==r&&(s.current=r,n(Array.from(Ym)))},[r]);const i=["vacation","warning"],a=u=>{i.includes(u.type)||Ym.add(u.id),n(f=>[...f,u.id])},c=t.filter(u=>!e.includes(u.id));return c.length===0?null:d.jsx("div",{className:"fixed top-[80px] md:top-[112px] lg:top-[144px] left-0 right-0 z-[45]","data-testid":"notice-banner",children:c.map(u=>{const f=aw[u.type]||aw.info,p=f.icon;return d.jsx("div",{className:`border-b ${f.bgClass} ${f.textClass}`,"data-testid":`notice-${u.id}`,children:d.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 flex items-start gap-3",children:[d.jsx(p,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"font-semibold text-sm",children:u.title}),d.jsx("div",{className:"text-sm opacity-90 mt-0.5 rich-content",dangerouslySetInnerHTML:{__html:Vt(u.content)}}),(u.startDate||u.endDate)&&d.jsx("p",{className:"text-xs opacity-70 mt-1",children:u.startDate&&u.endDate?`${u.startDate} - ${u.endDate}`:u.startDate||u.endDate})]}),d.jsx("button",{onClick:m=>{m.preventDefault(),m.stopPropagation(),a(u)},className:"flex-shrink-0 p-2 rounded-md opacity-60 hover:opacity-100 transition-opacity cursor-pointer relative z-[46]","data-testid":`button-dismiss-notice-${u.id}`,"aria-label":"Hinweis schlieÃen",children:d.jsx(Uo,{className:"w-5 h-5"})})]})},u.id)})})}function Xm(t=150){const[e,n]=k.useState(!1),r=k.useRef(null),s=k.useRef(null),i=k.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),r.current=setTimeout(()=>n(!0),t)},[t]),a=k.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),s.current=setTimeout(()=>n(!1),120)},[]),c=k.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),u=k.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),s.current&&(clearTimeout(s.current),s.current=null),n(!1)},[]),f=k.useCallback(()=>{n(p=>!p)},[]);return{open:e,onEnter:i,onLeave:a,cancelLeave:c,close:u,toggle:f}}function YL(t=768){const[e,n]=k.useState(!1);return k.useEffect(()=>{const r=()=>n(window.innerWidth<t);return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[t]),e}function XL({hours:t,contactContent:e}){const n=e?.title||"06841 172 130",r=n.replace(/\s+/g,""),s=YL(),[,i]=rh(),a=Xm(150),c=Xm(150),u=Xm(150),f=p=>{s&&!c.open?(p.preventDefault(),c.toggle(),a.close(),u.close()):s&&c.open&&(p.preventDefault(),i("/termin"))};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"fixed right-0 top-1/2 -translate-y-1/2 z-40 flex flex-col items-end gap-3","data-testid":"floating-cta",children:[d.jsx(Gr,{href:"/termin",onClick:f,onMouseEnter:s?void 0:c.onEnter,onMouseLeave:s?void 0:c.onLeave,className:"relative flex items-stretch","data-testid":"cta-termin",children:d.jsx("div",{className:"flex items-center bg-[hsl(2,55%,40%)] text-white shadow-lg overflow-hidden rounded-l-lg",children:d.jsxs("div",{className:"flex items-center gap-2.5 whitespace-nowrap",style:{width:c.open?190:48,paddingLeft:c.open?14:0,paddingRight:c.open?14:0,paddingTop:12,paddingBottom:12,justifyContent:c.open?"flex-start":"center",transition:"width 400ms cubic-bezier(0.4,0,0.2,1), padding 400ms cubic-bezier(0.4,0,0.2,1)"},children:[d.jsx(Oo,{className:"w-5 h-5 flex-shrink-0"}),d.jsx("span",{className:"text-sm font-semibold tracking-wide",style:{opacity:c.open?1:0,position:c.open?"static":"absolute",transition:"opacity 300ms ease"},children:"Termin buchen"})]})})}),d.jsx("a",{href:`tel:+49${r}`,onClick:p=>{s&&!a.open&&(p.preventDefault(),a.toggle(),c.close(),u.close())},onMouseEnter:s?void 0:a.onEnter,onMouseLeave:s?void 0:a.onLeave,className:"relative flex items-stretch","data-testid":"cta-phone",children:d.jsx("div",{className:"flex items-center bg-primary text-white shadow-lg overflow-hidden rounded-l-lg",children:d.jsxs("div",{className:"flex items-center gap-2.5 whitespace-nowrap",style:{width:a.open?200:48,paddingLeft:a.open?14:0,paddingRight:a.open?14:0,paddingTop:12,paddingBottom:12,justifyContent:a.open?"flex-start":"center",transition:"width 400ms cubic-bezier(0.4,0,0.2,1), padding 400ms cubic-bezier(0.4,0,0.2,1)"},children:[d.jsx(Gs,{className:"w-5 h-5 flex-shrink-0"}),d.jsx("span",{className:"text-sm font-semibold tracking-wide",style:{opacity:a.open?1:0,position:a.open?"static":"absolute",transition:"opacity 300ms ease"},children:n})]})})}),d.jsx("button",{onClick:()=>
9{s&&(u.toggle(),c.close(),a.close())},onMouseEnter:s?void 0:u.onEnter,onMouseLeave:s?void 0:u.onLeave,className:"relative flex items-stretch","data-testid":"cta-hours",children:d.jsx("div",{className:"flex items-center bg-[hsl(210,18%,52%)] text-white shadow-lg overflow-hidden rounded-l-lg",children:d.jsx("div",{className:"flex items-center justify-center",style:{width:48,paddingTop:12,paddingBottom:12},children:d.jsx(Po,{className:"w-5 h-5"})})})})]}),u.open&&t&&t.length>0&&d.jsx("div",{className:"fixed right-0 top-0 h-full z-50 w-full max-w-md",onMouseEnter:u.cancelLeave,onMouseLeave:u.onLeave,"data-testid":"hours-overlay",children:d.jsx("div",{className:"h-full bg-white dark:bg-neutral-900 shadow-2xl animate-in slide-in-from-right duration-300",children:d.jsxs("div",{className:"p-6 sm:p-8 h-full overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between mb-8",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:d.jsx(Po,{className:"w-5 h-5 text-primary"})}),d.jsx("h2",{className:"text-xl font-bold",children:"Sprechzeiten"})]}),d.jsx("button",{onClick:u.close,className:"w-10 h-10 rounded-full bg-accent flex items-center justify-center hover:bg-accent/80 transition-colors","data-testid":"button-close-hours",children:d.jsx(Uo,{className:"w-5 h-5"})})]}),d.jsx("div",{className:"space-y-0",children:t.map(p=>d.jsxs("div",{className:"flex justify-between items-center py-4 border-b border-border/30 last:border-0",children:[d.jsx("span",{className:"font-semibold text-base",children:p.day}),d.jsxs("div",{className:"text-sm text-muted-foreground text-right",children:[p.morning&&d.jsx("span",{children:p.morning}),p.morning&&p.afternoon&&d.jsx("span",{className:"mx-2 text-border",children:"|"}),p.afternoon&&d.jsx("span",{children:p.afternoon}),!p.morning&&!p.afternoon&&d.jsx("span",{className:"italic text-muted-foreground/50",children:"Geschlossen"})]})]},p.id))}),d.jsxs("div",{className:"mt-8 space-y-3",children:[d.jsxs(Gr,{href:"/termin",onClick:u.close,className:"flex items-center justify-center gap-2 w-full bg-primary text-white rounded-full py-3 text-sm font-semibold hover:bg-primary/90 transition-colors","data-testid":"button-hours-book-online",children:[d.jsx(Oo,{className:"w-4 h-4"}),"Online Termin buchen"]}),d.jsxs("a",{href:`tel:+49${r}`,className:"flex items-center justify-center gap-2 w-full bg-muted text-foreground rounded-full py-3 text-sm font-medium hover:bg-muted/80 transition-colors","data-testid":"button-hours-call",children:[d.jsx(Gs,{className:"w-4 h-4"}),n]})]})]})})})]})}function ZL({hours:t,content:e,contactContent:n}){const r=n?.title||"06841 172 130",s=n?.subtitle||"[email protected]";n?.content;const i=r.replace(/\s+/g,"");return d.jsx("footer",{className:"bg-stone-100 text-neutral-800 border-t border-stone-200","data-testid":"footer",children:d.jsxs("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 py-16 md:py-20",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-10 md:gap-14 items-start",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("img",{src:"/images/logo.png",alt:"Praxis Dr. Jelden Logo",className:"w-14 h-14 object-contain flex-shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-bold text-lg text-neutral-900 leading-tight",children:"Dr. med. Michael Jelden"}),d.jsx("p",{className:"text-sm text-neutral-600 font-medium mt-0.5",children:"Facharzt für Allgemeinmedizin"})]})]}),d.jsx("p",{className:"text-sm text-neutral-600 font-medium mb-4",children:"Arzt für Prävention & Gesundheitsvorsorge"}),d.jsxs("ul",{className:"text-xs text-neutral-500 leading-relaxed space-y-1","data-testid":"footer-qualifications",children:[d.jsx("li",{children:"Ultraschalldiagnostik (DEGUM I)"}),d.jsx("li",{children:"Humangenetische Beratung (fachgebunden)"}),d.jsx("li",{children:"Hypertensiologe (DHL)"}),d.jsx("li",{children:"Reisemedizin · Gelbfieberimpfstelle"}),d.jsx("li",{className:"pt-1 font-medium text-neutral-600",children:"Aka
9demische Lehrpraxis der Universität des Saarlandes"})]}),d.jsxs("div",{className:"mt-6 pt-5 border-t border-stone-200 space-y-3","data-testid":"footer-team",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-bold text-sm text-neutral-900",children:"Dr. med. Wolfgang Metz"}),d.jsx("p",{className:"text-xs text-neutral-500",children:"Hausärztlicher Internist"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"font-bold text-sm text-neutral-900",children:"Dr. med. Elisa Kunz"}),d.jsx("p",{className:"text-xs text-neutral-500",children:"Weiterbildungsassistentin Allgemeinmedizin"})]})]})]}),t&&t.length>0&&d.jsxs("div",{children:[d.jsxs("h4",{className:"font-semibold text-sm uppercase tracking-wider mb-5 text-neutral-700 flex items-center gap-2",children:[d.jsx(Po,{className:"w-4 h-4 text-primary"}),"Sprechzeiten"]}),d.jsx("table",{className:"text-sm w-full","data-testid":"footer-hours-table",children:d.jsx("tbody",{children:t.map(a=>d.jsxs("tr",{className:"align-top",children:[d.jsx("td",{className:"text-neutral-700 font-medium pr-3 py-1 whitespace-nowrap w-[6.5rem]",children:a.day}),d.jsxs("td",{className:"text-neutral-500 py-1 leading-snug",children:[d.jsx("span",{children:a.morning||"â"}),a.afternoon&&d.jsxs(d.Fragment,{children:[d.jsx("br",{}),d.jsx("span",{className:"text-neutral-400",children:a.afternoon})]})]})]},a.id))})}),d.jsx("div",{className:"mt-6",children:d.jsxs("a",{href:"/termin",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground font-semibold px-5 py-2.5 rounded-full text-sm hover:bg-primary/90 transition-colors","data-testid":"footer-termin",children:[d.jsx(Oo,{className:"w-4 h-4"}),"Online-Termin buchen"]})})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"font-semibold text-sm uppercase tracking-wider mb-5 text-neutral-700",children:"Kontakt"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(uy,{className:"w-4 h-4 text-primary mt-0.5 flex-shrink-0"}),d.jsxs("p",{className:"text-sm text-neutral-500",children:["Talstr. 21",d.jsx("br",{}),"66424 Homburg"]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Gs,{className:"w-4 h-4 text-primary flex-shrink-0"}),d.jsx("a",{href:`tel:+49${i}`,className:"text-sm text-neutral-500 hover:text-neutral-900 transition-colors","data-testid":"footer-phone",children:r})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(eD,{className:"w-4 h-4 text-primary flex-shrink-0"}),d.jsx("span",{className:"text-sm text-neutral-500","data-testid":"footer-fax",children:"06841 / 17 21 322"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(cy,{className:"w-4 h-4 text-primary flex-shrink-0"}),d.jsx("a",{href:`mailto:${s}`,className:"text-sm text-neutral-500 hover:text-neutral-900 transition-colors","data-testid":"footer-email",children:s})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(FP,{className:"w-4 h-4 text-primary flex-shrink-0"}),d.jsx("a",{href:"https://www.hausarzt-homburg.de",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-neutral-500 hover:text-neutral-900 transition-colors","data-testid":"footer-website",children:"www.hausarzt-homburg.de"})]})]})]})]}),d.jsxs("div",{className:"mt-14 pt-6 border-t border-stone-200 flex flex-col sm:flex-row justify-between items-center gap-3",children:[d.jsxs("p",{className:"text-xs text-neutral-400",children:["© ",new Date().getFullYear()," Praxis Dr. med. Michael Jelden. Alle Rechte vorbehalten."]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs text-neutral-400",children:[d.jsx("a",{href:"/admin",className:"hover:text-neutral-900 transition-colors","data-testid":"link-admin",children:"Admin"}),d.jsx("span",{className:"text-neutral-200",children:"|"}),d.jsx("a",{href:"/impressum",className:"hover:text-neutral-900 transition-colors","data-testid":"link-impressum",children:"Impressum"}),d.jsx("span",{className:"text-neutral-200",children:"|"}),d.jsx("a",{href:"/datenschutz",className:"hover:text-neutral-900 transition-colors","data-testid":"link-datenschutz",children:"Datenschutz"})]})]})]})})}function Cs({children:t}){const{data:e}=rt({queryKey:["/api/notices"]}),{data:n}=rt({queryKey:["/api/opening-hours"]}),{data:r}=rt({queryKey:["/api/content"]}),s=a=>r?.find(c=>c.sectionKey===a),i=e?.filter(a=>a.active)||[];return d.jsxs("div",{className:"min-h-screen bg-background","data-testid":"page-layout",children:[d.jsx(NL,{hours:n}),d.jsx(XL,{hours:n,contactContent:s("contact_details")}),i.length>0&&d.jsx(JL,{notices:i}),d.jsx("main",{children:t({content:r,hours:n,getContent:s})}),d.jsx(ZL,{hours:n,content:s("footer"),contactContent:s("contact_details")})]})}function e4({content:t}){const e=()=>{const n=document.querySelector("#section-philosophy")||document.querySelector("#unsere-staerken");n&&n.scrollIntoView({behavior:"smooth"})};return d.jsxs("section",{id:"home",className:"relative min-h-[100svh] flex items-end","data-testid":"hero-section",children:[d.jsxs("div",{className:"absolute inset-0 z-0",children:[d.jsx("img",{src:"/images/hero_1773269044021_slim_local.png",alt:"Praxis Dr. Jelden",className:"w-full h-full object-cover object-[70%_0%] md:object-[center_15%]"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-white/70 via-white/20 to-transparent"})]}),d.jsxs("div",{className:"relative z-10 w-full",children:[d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 pb-20 md:pb-28 pt-20 lg:pt-36",children:d.jsx("div",{className:"max-w-xl",children:d.jsxs("div",{children:[d.jsx("p",{className:"text-primary text-sm font-bold tracking-[0.15em] uppercase mb-4 md:mb-5 leading-snug",style:{textShadow:"0 0 18px rgba(255,255,255,1), 0 0 35px rgba(255,255,255,0.85), 0 0 60px rgba(255,255,255,0.5)"},"data-testid":"text-hero-label",children:(t?.content||`Allgemeinmedizin 10Präventionsmedizin`).split(` 11`).map((n,r,s)=>d.jsxs("span",{children:[n,r<s.length-1&&d.jsx("br",{})]},r))}),d.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-[3.5rem] font-bold text-foreground leading-[1.15] tracking-tight mb-5 md:mb-6","data-testid":"text-hero-title",children:(()=>{const n=t?.title||`Dr. med.
12Michael Jelden`;return(n.includes(` 13`)?n:n.replace(/^(Dr\.\s*med\.)\s+/,`$1 14`)).split(` 15`).map((s,i,a)=>d.jsxs("span",{children:[s,i<a.length-1&&d.jsx("br",{})]},i))})()}),d.jsx("div",{className:"text-base sm:text-lg md:text-xl text-foreground/60 leading-relaxed max-w-md rich-content mb-7 md:mb-8","data-testid":"text-hero-subtitle",dangerouslySetInnerHTML:{__html:Vt(t?.subtitle||"Mehr als Medizin. Ein Zusammenspiel aus Wissenschaft, Intuition und Menschlichkeit.")}}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[d.jsx(Gr,{href:"/termin",children:d.jsxs("button",{className:"flex items-center gap-2 bg-primary text-white rounded-full px-6 py-3 text-sm font-semibold shadow-md hover:bg-primary/90 transition-colors","data-testid":"button-hero-book-online",children:[d.jsx(Oo,{className:"w-4 h-4"}),"Jetzt Termin buchen"]})}),d.jsx("a",{href:"tel:+4906841172130",children:d.jsxs("button",{className:"flex items-center gap-2 bg-white/80 backdrop-blur-sm text-foreground rounded-full px-6 py-3 text-sm font-medium shadow hover:bg-white/95 transition-colors","data-testid":"button-hero-call",children:[d.jsx(Gs,{className:"w-4 h-4"}),"06841 / 172130"]})})]})]})})}),d.jsx("button",{onClick:e,className:"absolute bottom-6 left-1/2 -translate-x-1/2 text-foreground/30 hover:text-foreground/60 transition-colors","data-testid":"button-scroll-down",children:d.jsx(Wc,{className:"w-8 h-8 animate-bounce"})})]})]})}function t4({content:t}){const e=t?.subtitle||"Wir hören genauer hin â wie in der Musik, so in der Medizin.",n=t?.content||"Wir gehen immer einen Schritt mehr â wissenschaftlich fundiert, menschlich zugewandt und mit dem Anspruch, das Ganze zu sehen. Denn Gesundheit ist kein Solo, sondern ein Zusammenspiel.";return d.jsx("section",{"data-testid":"section-philosophy",className:"relative overflow-hidden",children:d.jsx("div",{className:"relative bg-primary py-16 md:py-24",children:d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[d.jsx("h2",{className:"text-white font-bold text-2xl sm:text-3xl md:text-4xl tracking-tight mb-6",dangerouslySetInnerHTML:{__html:Vt(t?.title||"Prävention auf höchstem Niveau")}}),d.jsx("div",{className:"text-white/80 text-sm sm:text-base italic leading-relaxed mb-4 rich-content","data-testid":"text-philosophy-quote",dangerouslySetInnerHTML:{__html:Vt(e)}}),d.jsx("div",{className:"text-white/70 text-sm sm:text-base leading-relaxed rich-content","data-testid":"text-philosophy-body",dangerouslySetInnerHTML:{__html:Vt(n)}})]})})})})}const n4=[{title:"Prävention & Gesundheitsvorsorge",desc:"Strukturierte Check-ups zur Früherkennung relevanter Risiken",image:"/images/praevention.png",href:"/praevention"},{title:"Klinische Diagnostik",desc:"Internistische, chirurgische, orthopädische und neurologische Abklärung.",image:"/images/diagnostik.png",href:"/diagnostik"},{title:"Allgemeinmedizin & persönliche Betreuung",desc:"Umfassende Betreuung bei akuten und chronischen Beschwerden",image:"/images/hero_1773269044021.png",href:"#allgemeinmedizin"},{title:"Innovative Angebote",desc:"Evidenzbasierte Therapien jenseits des Mainstreams â Ketamin-Infusion u.a.",image:"/images/innovativ-abstract.png",href:"/innovativ"}];function r4({services:t,content:e,strengthCards:n}){const r=i=>{if(i.startsWith("#")){const a=document.querySelector(i);a&&a.scrollIntoView({behavior:"smooth"})}},s=n4.map((i,a)=>{const c=n?.find(u=>u.sectionKey===`strength_${a}`);return{title:c?.title||i.title,desc:c?.subtitle||i.desc,image:c?.imageUrl||i.image,href:c?.content||i.href}});return d.jsxs("section",{id:"unsere-staerken",className:"relative py-16 md:py-28 bg-background-alt overflow-hidden","data-testid":"services-overview",children:[d.jsx("div",{className:"section-blob section-blob-green w-[600px] h-[600px] -top-40 left-1/2 -translate-x-1/2"}),d.jsxs("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:[d.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12 md:mb-20",children:[d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4","data-testid":"text-section-title",children:e?.title||"Unsere Stärken"}),d.jsx("p",{className:"text-muted-foreground text-sm sm:text-base md:text-lg leading-relaxed",children:e?.
15subtitle||"Kompetente Medizin im Takt des Lebens"})]}),d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-5 md:gap-6",children:s.map((i,a)=>{const c=!i.href.startsWith("#"),u=d.jsxs(d.Fragment,{children:[d.jsx("img",{src:i.image,alt:i.title,className:"absolute inset-0 w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent"}),d.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4 sm:p-5",children:[d.jsx("h3",{className:"text-white font-bold text-sm sm:text-base leading-snug mb-1.5",children:i.title}),d.jsx("p",{className:"text-white/70 text-[11px] sm:text-xs leading-relaxed mb-3 hidden sm:block",children:i.desc}),d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-primary-foreground bg-primary/90 backdrop-blur-sm px-3 py-1.5 rounded-full text-xs font-semibold transition-colors group-hover:bg-primary",children:["Mehr erfahren",d.jsx(Yg,{className:"w-3 h-3"})]})]})]});return c?d.jsx(Gr,{href:i.href,className:"group relative rounded-xl overflow-hidden aspect-[3/4] sm:aspect-[4/5] block","data-testid":`card-strength-${a}`,children:u},a):d.jsx("button",{onClick:()=>r(i.href),className:"group relative rounded-xl overflow-hidden aspect-[3/4] sm:aspect-[4/5] text-left","data-testid":`card-strength-${a}`,children:u},a)})})]})]})}const s4={stethoscope:Kc,heartpulse:uh,activity:oy,shield:dh,microscope:dy,brain:ly,syringe:gy,pill:hy,scan:my,monitor:fy,scale:py,weight:yy,trendingdown:xy};function vN({services:t,content:e}){if(!e&&(!t||t.length===0))return null;const n=e?.sectionKey==="allgemeinmedizin",r=e?.sectionKey==="diagnostik";return d.jsxs("div",{className:`relative py-16 md:py-28 overflow-hidden ${r?"bg-background-alt":"bg-background dark:bg-neutral-950"}`,"data-testid":`section-${e?.sectionKey||"diagnostics"}`,children:[n&&d.jsx("div",{className:"section-blob section-blob-warm w-[450px] h-[450px] -top-20 -right-32"}),r&&d.jsx("div",{className:"section-blob section-blob-sage w-[500px] h-[500px] -bottom-32 -left-32"}),d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:`grid grid-cols-1 gap-8 md:gap-16 items-start ${n?"":"lg:grid-cols-2"} ${r?"lg:flex-row-reverse":""}`,children:[d.jsxs("div",{className:r?"lg:order-2":"",children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-[0.2em] uppercase mb-3",children:n?"Allgemeinmedizin":"Klinische Diagnostik"}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4 leading-tight",children:n?e?.title||"Umfassende medizinische Betreuung":r?"Diagnostik über Fachgrenzen hinaus":e?.title||"Hochmoderne Diagnostik"}),d.jsx("div",{className:"text-muted-foreground text-sm sm:text-base leading-relaxed mb-3 rich-content",dangerouslySetInnerHTML:{__html:Vt(n?e?.subtitle||"Für Patient:innen, die einen festen ärztlichen Ansprechpartner suchen.":r?"Für Patient:innen, die schnell Klarheit wollen â auch bei fachübergreifenden Fragestellungen.":e?.subtitle||"Für Patient:innen, die schnell Klarheit statt langer Abklärungen wollen.")}}),r&&d.jsx("p",{className:"text-foreground/70 text-sm sm:text-base font-medium leading-relaxed mb-8","data-testid":"text-diagnostik-emphasis",children:"Hohe Sicherheit durch Erfahrung & Technik auf Spitzenniveau."}),!r&&d.jsx("div",{className:"mb-5"}),t&&t.length>0&&d.jsx("div",{className:"space-y-1",children:t.map(s=>{const i=s4[s.icon]||Kc;return d.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg hover:bg-accent/50 transition-colors group","data-testid":`service-item-${s.id}`,children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:d.jsx(i,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h3",{className:"font-semibold text-sm sm:text-base mb-0.5",children:s.title}),d.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground leading-relaxed",children:s.description})]})]},s.id)})})]}),!n&&d.jsx("div",{className:`${r?"lg:order-1":""}`,children:d.jsx("div",{className:"relative rounded-2xl overflow-hidden",children:d.jsx("img",{src:"/images/diagnostik.png",alt:"Diagnostik",className:"w-full object-cover aspect-[4/3]"})})})]})})]})}function gd(t,e,n){let r=document.querySelector(t);if(!r){r=document.createElement("meta");const s=e==="property";r.setAttribute(s?"property":"name",t.match(/"([^"]+)"/)?.[1]||""),document.head.appendChild(r)}r.setAttribute("content",n)}function Ns({title:t,description:e,keywords:n,canonical:r}){return k.useEffect(()=>{if(document.title=t,gd('meta[name="description"]',"name",e),gd('meta[property="og:title"]',"property",t),gd('meta[property="og:description"]',"property",e),n&&gd('meta[name="keywords"]',"name",n),r){let s=document.querySelector('link[rel="canonical"]');s||(s=document.createElement("link"),s.setAttribute("rel","canonical"),document.head.appendChild(s)),s.setAttribute("href",r)}},[t,e,n,r]),null}function i4(){const t=k.useRef(null);return k.useEffect(()=>{if(!t.current)return;const e=document.getElementById("trustindex-script");e&&e.remove();const n=document.createElement("script");n.src="https://cdn.trustindex.io/loader.js?ae3552867bed8497a29623f474f",n.id="trustindex-script",n.async=!0,n.defer=!0,t.current.appendChild(n)},[]),d.jsx("section",{className:"py-16 md:py-24 bg-stone-50","data-testid":"section-reviews",children:d.jsxs("div",{className:"max-w-7xl mx-auto px-5 sm:px-8",children:[d.jsxs("div",{className:"text-center mb-10",children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-[0.2em] uppercase mb-3",children:"Patientenstimmen"}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight",children:"Das sagen unsere Patient:innen"})]}),d.jsx("div",{ref:t,"data-testid":"trustindex-widget",className:"min-w-0 overflow-hidden"})]})})}var bN={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},lw=Oe.createContext&&Oe.createContext(bN),o4=["attr","size","title"];function a4(t,e){if(t==null)return{};var n=l4(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function l4(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function nf(){return nf=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},nf.apply(this,arguments)}function cw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function rf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
15e%2?cw(Object(n),!0).forEach(function(r){c4(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function c4(t,e,n){return e=u4(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u4(t){var e=d4(t,"string");return typeof e=="symbol"?e:e+""}function d4(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wN(t){return t&&t.map((e,n)=>Oe.createElement(e.tag,rf({key:n},e.attr),wN(e.child)))}function kN(t){return e=>Oe.createElement(f4,nf({attr:rf({},t.attr)},e),wN(t.child))}function f4(t){var e=n=>{var{attr:r,size:s,title:i}=t,a=a4(t,o4),c=s||n.size||"1em",u;return n.className&&(u=n.className),t.className&&(u=(u?u+" ":"")+t.className),Oe.createElement("svg",nf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:rf(rf({color:t.color||n.color},n.style),t.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),i&&Oe.createElement("title",null,i),t.children)};return lw!==void 0?Oe.createElement(lw.Consumer,null,n=>e(n)):e(bN)}function uw(t){return kN({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 01-10.951-.577 17.88 17.88 0 01-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.375.15-.63.045a6.062 6.062 0 01-.526-.496l-.31-.347a9.391 9.391 0 01-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.02zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 011.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.046-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.047-.02-.077 0-.017.006-.03.02-.063v-.06z"},child:[]}]})(t)}function h4(t){return kN({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"},child:[]}]})(t)}var Ay="Collapsible",[p4,SN]=Xr(Ay),[m4,Ry]=p4(Ay),CN=k.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:a,...c}=t,[u=!1,f]=ys({prop:r,defaultProp:s,onChange:a});return d.jsx(m4,{scope:n,disabled:i,contentId:gs(),open:u,onOpenToggle:k.useCallback(()=>f(p=>!p),[f]),children:d.jsx(Ie.div,{"data-state":Py(u),"data-disabled":i?"":void 0,...c,ref:e})})});CN.displayName=Ay;var NN="CollapsibleTrigger",EN=k.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=Ry(NN,n);return d.jsx(Ie.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Py(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:Me(t.onClick,s.onOpenToggle)})});EN.displayName=NN;var Oy="CollapsibleContent",TN=k.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Ry(Oy,t.__scopeCollapsible);return d.jsx(Qi,{present:n||s.open,children:({present:i})=>d.jsx(g4,{...r,ref:e,present:i})})});TN.displayName=Oy;var g4=k.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,a=Ry(Oy,n),[c,u]=k.useState(r),f=k.useRef(null),p=nt(e,f),m=k.useRef(0),x=m.current,y=k.useRef(0),w=y.current,b=a.open||c,S=k.useRef(b),N=k.useRef(void 0);return k.useEffect(()=>{const E=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(E)},[]),un(()=>{const E=f.current;if(E){N.current=N.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const M=E.getBoundingClientRect();m.current=M.height,y.current=M.width,S.current||(E.style.transitionDuration=N.current.transitionDuration,E.style.animationName=N.current.animationName),u(r)}},[a.open,r]),d.jsx(Ie.div,{"data-state":Py(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!b,...i,ref:p,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...t.style},children:b&&s})});function Py(t){return t?"open":"closed"}var x4=CN,y4=EN,v4=TN,b4=k.createContext(void 0);function yh(t){const e=k.useContext(b4);return t||e||"ltr"}var Zs="Accordion",w4=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Dy,k4,S4]=sh(Zs),[vh]=Xr(Zs,[S4,SN]
15),Iy=SN(),MN=Oe.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return d.jsx(Dy.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?d.jsx(T4,{...i,ref:e}):d.jsx(E4,{...s,ref:e})})});MN.displayName=Zs;var[jN,C4]=vh(Zs),[AN,N4]=vh(Zs,{collapsible:!1}),E4=Oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...a}=t,[c,u]=ys({prop:n,defaultProp:r,onChange:s});return d.jsx(jN,{scope:t.__scopeAccordion,value:c?[c]:[],onItemOpen:u,onItemClose:Oe.useCallback(()=>i&&u(""),[i,u]),children:d.jsx(AN,{scope:t.__scopeAccordion,collapsible:i,children:d.jsx(RN,{...a,ref:e})})})}),T4=Oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a=[],c]=ys({prop:n,defaultProp:r,onChange:s}),u=Oe.useCallback(p=>c((m=[])=>[...m,p]),[c]),f=Oe.useCallback(p=>c((m=[])=>m.filter(x=>x!==p)),[c]);return d.jsx(jN,{scope:t.__scopeAccordion,value:a,onItemOpen:u,onItemClose:f,children:d.jsx(AN,{scope:t.__scopeAccordion,collapsible:!0,children:d.jsx(RN,{...i,ref:e})})})}),[M4,bh]=vh(Zs),RN=Oe.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...a}=t,c=Oe.useRef(null),u=nt(c,e),f=k4(n),m=yh(s)==="ltr",x=Me(t.onKeyDown,y=>{if(!w4.includes(y.key))return;const w=y.target,b=f().filter(z=>!z.ref.current?.disabled),S=b.findIndex(z=>z.ref.current===w),N=b.length;if(S===-1)return;y.preventDefault();let E=S;const M=0,j=N-1,A=()=>{E=S+1,E>j&&(E=M)},P=()=>{E=S-1,E<M&&(E=j)};switch(y.key){case"Home":E=M;break;case"End":E=j;break;case"ArrowRight":i==="horizontal"&&(m?A():P());break;case"ArrowDown":i==="vertical"&&A();break;case"ArrowLeft":i==="horizontal"&&(m?P():A());break;case"ArrowUp":i==="vertical"&&P();break}const O=E%N;b[O].ref.current?.focus()});return d.jsx(M4,{scope:n,disabled:r,direction:s,orientation:i,children:d.jsx(Dy.Slot,{scope:n,children:d.jsx(Ie.div,{...a,"data-orientation":i,ref:u,onKeyDown:r?void 0:x})})})}),sf="AccordionItem",[j4,Ly]=vh(sf),ON=Oe.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...s}=t,i=bh(sf,n),a=C4(sf,n),c=Iy(n),u=gs(),f=r&&a.value.includes(r)||!1,p=i.disabled||t.disabled;return d.jsx(j4,{scope:n,open:f,disabled:p,triggerId:u,children:d.jsx(x4,{"data-orientation":i.orientation,"data-state":zN(f),...c,...s,ref:e,disabled:p,open:f,onOpenChange:m=>{m?a.onItemOpen(r):a.onItemClose(r)}})})});ON.displayName=sf;var PN="AccordionHeader",DN=Oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=bh(Zs,n),i=Ly(PN,n);return d.jsx(Ie.h3,{"data-orientation":s.orientation,"data-state":zN(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});DN.displayName=PN;var ix="AccordionTrigger",IN=Oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=bh(Zs,n),i=Ly(ix,n),a=N4(ix,n),c=Iy(n);return d.jsx(Dy.ItemSlot,{scope:n,children:d.jsx(y4,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...c,...r,ref:e})})});IN.displayName=ix;var LN="AccordionContent",_N=Oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=bh(Zs,n),i=Ly(LN,n),a=Iy(n);return d.jsx(v4,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...a,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});_N.displayName=LN;function zN(t){return t?"open":"closed"}var A4=MN,R4=ON,O4=DN,FN=IN,$N=_N;const P4=A4,BN=k.forwardRef(({className:t,...e},n)=>d.jsx(R4,{ref:n,className:Ue("border-b",t),...e}));BN.displayName="AccordionItem";const HN=k.forwardRef(({className:t,children:e,...n},r)=>d.jsx(O4,{className:"flex",children:d.jsxs(FN,{ref:r,className:Ue("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,d.jsx(Wc,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));HN.displayName=FN.displayName;const VN=k.forwardRef(({className:t,children:e,...n},r)=>d.jsx($N,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:d.jsx("div",{className:Ue("pb-4 pt-0",t),children:e})}));VN.displayName=$N.displayName;function Gc({faqs:t}){return!t||t.length===0?null:d.jsxs("div",{className:"relative py-16 md:py-28 bg-background-alt overflow-hidden","data-testid":"section-faq",children:[d.jsx("div",{className:"section-blob section-blob-warm w-[350px] h-[350px] -bottom-24 -right-20"}),d.jsxs("div",{className:"max-w-3xl mx-auto px-5 sm:px-8 relative z-[1]",children:[d.jsxs("div",{className:"text-center mb-10 md:mb-16",children:[d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4 leading-tight",children:"Wir beantworten Ihre Fragen"}),d.jsx("p",{className:"text-muted-foreground text-sm sm:text-base leading-relaxed",children:"Hier finden Sie Antworten auf die häufigsten Fragen zu unserer Praxis."})]}),d.jsx(P4,{type:"single",collapsible:!0,className:"space-y-2","data-testid":"faq-accordion",children:t.map(e=>d.jsxs(BN,{value:`faq-${e.id}`,className:"bg-white dark:bg-neutral-900 rounded-xl border-0 shadow-sm px-5 sm:px-6","data-testid":`faq-item-${e.id}`,children:[d.jsx(HN,{className:"text-left font-semibold text-sm sm:text-base py-4 sm:py-5 hover:no-underline",children:e.question}),d.jsx(VN,{className:"text-muted-foreground text-sm leading-relaxed pb-5",children:d.jsx("span",{className:"whitespace-pre-line",children:e.answer})})]},e.id))})]})]})}function D4(){const{data:t}=rt({queryKey:["/api/services"]}),{data:e}=rt({queryKey:["/api/team"]}),{data:n}=rt({queryKey:["/api/faqs"]}),r=n?.filter(s=>s.category==="general").sort((s,i)=>s.sortOrder-i.sortOrder);return k.useEffect(()=>{const s=sessionStorage.getItem("scrollToAnchor");if(s&&t){sessionStorage.removeItem("scrollToAnchor");const i=document.getElementById(s);i&&requestAnimationFrame(()=>{i.scrollIntoView({behavior:"smooth"})})}},[t]),d.jsx(Cs,{children:({getContent:s,hours:i,content:a})=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Dr. Jelden Homburg | Prävention, Allgemeinmedizin, Longevity",description:"Ihr Hausarzt in Homburg/Saar: Dr. med. Michael Jelden â Allgemeinmedizin, Prävention, Longevity und Anti-Aging. CM5 CardioMetabolische MultiMatrix, Ketamin-Infusionstherapie und Liquid Biopsy. Akademische Lehrpraxis der Universität des Saarlandes.",keywords:"Hausarzt Homburg, Allgemeinmedizin Homburg, Prävention, Longevity, Anti-Aging, CM5, Ketamin-Infusionstherapie, Ketamin Therapie, Liquid Biopsy, Dr. Jelden Homburg"}),d.jsx(e4,{content:s("hero")}),d.jsx(t4,{content:s("philosophy")}),d.jsx(r4,{services:t,content:s("services_overview"),strengthCards:a?.filter(c=>c.sectionKey.startsWith("strength_"))}),d.jsx("section",{id:"allgemeinmedizin",children:d.jsx(vN,{services:t?.filter(c=>
15c.category==="allgemeinmedizin"),content:s("allgemeinmedizin")})}),d.jsxs("section",{className:"relative py-16 md:py-28 bg-background-alt overflow-hidden","data-testid":"section-arzt-portrait",children:[d.jsx("div",{className:"section-blob section-blob-warm w-[400px] h-[400px] -bottom-20 -right-20"}),d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-[0.2em] uppercase mb-3",children:"Ãber mich"}),d.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold tracking-tight leading-snug mb-3",children:s("arzt_portrait")?.title||"Der Mensch hinter Ihrem Arzt"}),d.jsx("p",{className:"text-sm font-semibold text-muted-foreground/70 tracking-wide mb-6",children:s("arzt_portrait")?.content||"Arzt â Musiker â Podcaster"}),d.jsx("div",{className:"space-y-4 text-muted-foreground text-sm sm:text-base leading-relaxed mb-8",children:s("arzt_portrait")?.subtitle?d.jsx("p",{children:s("arzt_portrait")?.subtitle}):d.jsxs(d.Fragment,{children:[d.jsx("p",{children:"Medizin ist für mich mehr als ein Beruf â sie ist eine Haltung. Als Allgemeinmediziner und Präventionsmediziner in Homburg begleite ich meine Patientinnen und Patienten nicht nur in Zeiten der Krankheit, sondern auch auf dem Weg zu einem gesunden, erfüllten Leben."}),d.jsx("p",{children:"Als ehemaliger Konzertsolist (Violine), publizierter Sprachwissenschaftler sowie aktiver Lehrender und Forscher an der Universität bringe ich in meine ärztliche Arbeit ungewöhnliche Perspektiven mit â Ressourcen, die sich im Praxisalltag täglich als wertvoll erweisen."}),d.jsx("p",{children:"Ich glaube daran, dass echte medizinische Versorgung Zeit braucht: Zeit zum Zuhören, zum Nachdenken und zum gemeinsamen Entwickeln einer individuellen Strategie. Deshalb nehme ich mir diese Zeit â für jeden Einzelnen."})]})})]}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"rounded-2xl overflow-hidden shadow-lg relative",children:[d.jsx("img",{src:s("arzt_portrait")?.imageUrl||"/images/dr-jelden-munich.png",alt:"Dr. med. Michael Jelden",className:"w-full object-cover aspect-[4/3] scale-[1.05]","data-testid":"img-arzt-portrait"}),d.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/75 via-black/40 to-transparent pt-10 pb-4 px-4",children:d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs("a",{href:"https://open.spotify.com/intl-de/artist/0m2Zafja3wxwRlgY95ndJ2",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 bg-[#1DB954] text-white rounded-full px-3 py-1.5 text-xs font-semibold hover:bg-[#1DB954]/90 transition-colors","data-testid":"link-spotify",children:[d.jsx(h4,{className:"w-4 h-4"}),"Spotify"]}),d.jsxs("a",{href:"https://www.amazon.de/s?k=%22Michael+Jelden%22&i=popular&crid=3N2HSLK6U3T55&sprefix=michael+jelden%22%2Cpopular%2C70&ref=bnav_search_go",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 bg-[#FF9900] text-white rounded-full px-3 py-1.5 text-xs font-semibold hover:bg-[#FF9900]/90 transition-colors","data-testid":"link-amazon-music",children:[d.jsx(uw,{className:"w-4 h-4"}),"Amazon Music"]}),d.jsxs("a",{href:"https://www.amazon.de/s?k=%22Michael+Jelden%22&i=stripbooks",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 bg-[#232F3E] text-white rounded-full px-3 py-1.5 text-xs font-semibold hover:bg-[#232F3E]/80 transition-colors","data-testid":"link-amazon-books",children:[d.jsx(uw,{className:"w-4 h-4"}),"Amazon"]}),d.jsxs("a",{href:"https://www.nature.com/articles/s41598-025-10931-0",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 bg-[#1a6496] text-white rounded-full px-3 py-1.5 text-xs font-semibold hover:bg-[#1a6496]/90 transition-colors","data-testid":"link-nature",children:[d.jsx(DP,{className:"w-4 h-4"}),"nature.com"]}),d.jsxs("a",{href:"https://www.swr.de/kultur/musik/takt-und-therapie-die-krankheiten-der-star-komponisten-100.html",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 bg-[#c8232c] text-white rounded-full px-3 py-1.5 text-xs font-semibold hover:bg-[#c8232c]/90 transition-colors","data-testid":"link-swr-podcast",children:[d.jsx(nD,{className:"w-4 h-4"}),"SWR Podcast"]})]})})]}),d.jsx("div",{className:"absolute -bottom-4 -left-4 w-20 h-20 md:w-28 md:h-28 bg-primary/10 rounded-full -z-10"})]})]})})]}),d.jsxs("div",{className:"relative py-16 md:py-24 bg-background overflow-hidden","data-testid":"section-team-teaser",children:[d.jsx("div",{className:"section-blob section-blob-green w-[400px] h-[400px] -top-20 -left-20"}),d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 md:gap-12 items-center",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-widest uppercase mb-3",children:"Unser Team"}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight leading-tight mb-4",children:s("team")?.title||"Gemeinsam für das Wohl unserer Patient:innen"}),d.jsx("p",{className:"text-muted-foreground text-sm sm:text-base leading-relaxed mb-6",children:s("team")?.subtitle||"Unser Team ist unsere Stärke."}),d.jsxs(Gr,{href:"/team",className:"inline-flex items-center gap-2 text-primary font-semibold text-sm hover:gap-3 transition-all","data-testid":"link-team-page",children:["Team kennenlernen",d.jsx(Yg,{className:"w-4 h-4"})]})]}),d.jsx("div",{className:"rounded-2xl overflow-hidden aspect-[16/9]",style:(()=>{const c=s("team"),u=c?.imageUrl||"/images/team-group.png";let f={x:50,y:50,zoom:100};if(c?.imagePosition)try{const p=JSON.parse(c.imagePosition);f={x:p.x??50,y:p.y??50,zoom:p.zoom??100}}catch{}return{backgroundImage:`url(${u})`,backgroundSize:`${f.zoom}%`,backgroundPosition:`${f.x}% ${f.y}%`,backgroundRepeat:"no-repeat"}})(),"data-testid":"img-team-teaser",role:"img","aria-label":"Team der Praxis Dr. Jelden"})]})})]}),d.jsx(i4,{}),d.jsx(Gc,{faqs:r}),d.jsx("div",{className:"relative py-16 md:py-20 bg-primary text-primary-foreground overflow-hidden","data-testid":"section-contact-cta",children:d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold mb-2",children:s("booking_cta")?.title||"Termin vereinbaren"}
15),d.jsx("p",{className:"text-primary-foreground/80 text-sm sm:text-base",children:s("booking_cta")?.subtitle||"Online buchen â schnell, einfach, rund um die Uhr verfügbar."})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[d.jsxs(Gr,{href:"/termin",className:"inline-flex items-center gap-2 bg-white text-primary font-semibold px-6 py-3 rounded-full hover:bg-white/90 transition-colors","data-testid":"cta-book-online",children:[d.jsx(Yg,{className:"w-4 h-4"}),"Online Termin buchen"]}),d.jsxs("a",{href:`tel:+49${(s("contact_details")?.title||"06841 172 130").replace(/\s+/g,"")}`,className:"inline-flex items-center gap-2 bg-primary-foreground/15 text-white font-semibold px-6 py-3 rounded-full hover:bg-primary-foreground/25 transition-colors","data-testid":"cta-call",children:[d.jsx(Gs,{className:"w-4 h-4"}),"Anrufen"]})]})]})})})]})})}function I4(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return k.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const wh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ya(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function _y(t){return"nodeType"in t}function Kn(t){var e,n;return t?Ya(t)?t:_y(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function zy(t){const{Document:e}=Kn(t);return t instanceof e}function Qc(t){return Ya(t)?!1:t instanceof Kn(t).HTMLElement}function UN(t){return t instanceof Kn(t).SVGElement}function Xa(t){return t?Ya(t)?t.document:_y(t)?zy(t)?t:Qc(t)||UN(t)?t.ownerDocument:document:document:document}const bs=wh?k.useLayoutEffect:k.useEffect;function Fy(t){const e=k.useRef(t);return bs(()=>{e.current=t}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function L4(){const t=k.useRef(null),e=k.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=k.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function Ec(t,e){e===void 0&&(e=[t]);const n=k.useRef(t);return bs(()=>{n.current!==t&&(n.current=t)},e),n}function Jc(t,e){const n=k.useRef();return k.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function of(t){const e=Fy(t),n=k.useRef(null),r=k.useCallback(s=>{s!==n.current&&e?.(s,n.current),n.current=s},[]);return[n,r]}function ox(t){const e=k.useRef();return k.useEffect(()=>{e.current=t},[t]),e.current}let Zm={};function Yc(t,e){return k.useMemo(()=>{if(e)return e;const n=Zm[t]==null?0:Zm[t]+1;return Zm[t]=n,t+"-"+n},[t,e])}function WN(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((i,a)=>{const c=Object.entries(a);for(const[u,f]of c){const p=i[u];p!=null&&(i[u]=p+t*f)}return i},{...e})}}const Ra=WN(1),Tc=WN(-1);function _4(t){return"clientX"in t&&"clientY"in t}function $y(t){if(!t)return!1;const{KeyboardEvent:e}=Kn(t.target);return e&&t instanceof e}function z4(t){if(!t)return!1;const{TouchEvent:e}=Kn(t.target);return e&&t instanceof e}function ax(t){if(z4(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return _4(t)?{x:t.clientX,y:t.clientY}:null}const Vi=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Vi.Translate.toString(t),Vi.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),dw="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function F4(t){return t.matches(dw)?t:t.querySelector(dw)}const $4={display:"none"};function B4(t){let{id:e,value:n}=t;return Oe.createElement("div",{id:e,style:$4},n)}function H4(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Oe.createElement("div",{id:e,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function V4(){const[t,e]=k.useState("");return{announce:k.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const KN=k.createContext(null);function U4(t){const e=k.useContext(KN);k.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function W4(){const[t]=k.useState(()=>new Set),e=k.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[k.useCallback(r=>{let{type:s,event:i}=r;t.forEach(a=>{var c;return(c=a[s])==null?void 0:c.call(a,i)})},[t]),e]}const K4={draggable:` 16 To pick up a draggable item, press the space bar. 17 While dragging, use the arrow keys to move the item. 18 Press space again to drop the item in its new position, or press escape to cancel. 19 `},q4={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function G4(t){let{announcements:e=q4,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=K4}=t;const{announce:i,announcement:a}=V4(),c=Yc("DndLiveRegion"),[u,f]=k.useState(!1);if(k.useEffect(()=>{f(!0)},[]),U4(k.useMemo(()=>({onDragStart(m){let{active:x}=m;i(e.onDragStart({active:x}))},onDragMove(m){let{active:x,over:y}=m;e.onDragMove&&i(e.onDragMove({active:x,over:y}))},onDragOver(m){let{active:x,over:y}=m;i(e.onDragOver({active:x,over:y}))},onDragEnd(m){let{active:x,over:y}=m;i(e.onDragEnd({active:x,over:y}))},onDragCancel(m){let{active:x,over:y}=m;i(e.onDragCancel({active:x,over:y}))}}),[i,e])),!u)return null;const p=Oe.createElement(Oe.Fragment,null,Oe.createElement(B4,{id:r,value:s.draggable}),Oe.createElement(H4,{id:c,announcement:a}));return n?Kr.createPortal(p,n):p}var Bt;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Bt||(Bt={}));function af(){}function Ui(t,e){return k.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function kh(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return k.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const Yr=Object.freeze({x:0,y:0});function qN(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function GN(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function Q4(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function fw(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function QN(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function hw(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.to
19p),{x:e+t.width*.5,y:n+t.height*.5}}const Sh=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=hw(e,e.left,e.top),i=[];for(const a of r){const{id:c}=a,u=n.get(c);if(u){const f=qN(hw(u),s);i.push({id:c,data:{droppableContainer:a,value:f}})}}return i.sort(GN)},J4=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=fw(e),i=[];for(const a of r){const{id:c}=a,u=n.get(c);if(u){const f=fw(u),p=s.reduce((x,y,w)=>x+qN(f[w],y),0),m=Number((p/4).toFixed(4));i.push({id:c,data:{droppableContainer:a,value:m}})}}return i.sort(GN)};function Y4(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),a=s-r,c=i-n;if(r<s&&n<i){const u=e.width*e.height,f=t.width*t.height,p=a*c,m=p/(u+f-p);return Number(m.toFixed(4))}return 0}const X4=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const u=Y4(c,e);u>0&&s.push({id:a,data:{droppableContainer:i,value:u}})}}return s.sort(Q4)};function Z4(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function JN(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Yr}function e3(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];return s.reduce((a,c)=>({...a,top:a.top+t*c.y,bottom:a.bottom+t*c.y,left:a.left+t*c.x,right:a.right+t*c.x}),{...n})}}const t3=e3(1);function n3(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function r3(t,e,n){const r=n3(e);if(!r)return t;const{scaleX:s,scaleY:i,x:a,y:c}=r,u=t.left-a-(1-s)*parseFloat(n),f=t.top-c-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),p=s?t.width/s:t.width,m=i?t.height/i:t.height;return{width:p,height:m,top:f,right:u+p,bottom:f+m,left:u}}const s3={ignoreTransform:!1};function Za(t,e){e===void 0&&(e=s3);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:p}=Kn(t).getComputedStyle(t);f&&(n=r3(n,f,p))}const{top:r,left:s,width:i,height:a,bottom:c,right:u}=n;return{top:r,left:s,width:i,height:a,bottom:c,right:u}}function pw(t){return Za(t,{ignoreTransform:!0})}function i3(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function o3(t,e){return e===void 0&&(e=Kn(t).getComputedStyle(t)),e.position==="fixed"}function a3(t,e){e===void 0&&(e=Kn(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const i=e[s];return typeof i=="string"?n.test(i):!1})}function Ch(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(zy(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!Qc(s)||UN(s)||n.includes(s))return n;const i=Kn(t).getComputedStyle(s);return s!==t&&a3(s,i)&&n.push(s),o3(s,i)?n:r(s.parentNode)}return t?r(t):n}function YN(t){const[e]=Ch(t,1);return e??null}function eg(t){return!wh||!t?null:Ya(t)?t:_y(t)?zy(t)||t===Xa(t).scrollingElement?window:Qc(t)?t:null:null}function XN(t){return Ya(t)?t.scrollX:t.scrollLeft}function ZN(t){return Ya(t)?t.scrollY:t.scrollTop}function lx(t){return{x:XN(t),y:ZN(t)}}var Xt;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Xt||(Xt={}));function eE(t){return!wh||!t?!1:t===document.scrollingElement}function tE(t){const e={x:0,y:0},n=eE(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,i=t.scrollLeft<=e.x,a=t.scrollTop>=r.y,c=t.scrollLeft>=r.x;return{isTop:s,isLeft:i,isBottom:a,isRight:c,maxScroll:r,minScroll:e}}const l3={x:.2,y:.2};function c3(t,e,n,r,s){let{top:i,left:a,right:c,bottom:u}=n;r===void 0&&(r=10),s===void 0&&(s=l3);const{isTop:f,isBottom:p,isLeft:m,isRight:x}=tE(t),y={x:0,y:0},w={x:0,y:0},b={height:e.height*s.y,width:e.width*s.x};return!f&&i<=e.top+b.height?(y.y=Xt.Backward,w.y=r*Math.abs((e.top+b.height-i)/b.height)):!p&&u>=e.bottom-b.height&&(y.y=Xt.Forward,w.y=r*Math.abs((e.bottom-b.height-u)/b.height)),!x&&c>=e.right-b.width?(y.x=Xt.Forward,w.x=r*Math.abs((e.right-b.width-c)/b.width)):!m&&a<=e.left+b.width&&(y.x=Xt.Backward,w.x=r*Math.abs((e.left+b.width-a)/b.width)),{direction:y,speed:w}}function u3(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function nE(t){return t.reduce((e,n)=>Ra(e,lx(n)),Yr)}function d3(t){return t.reduce((e,n)=>e+XN(n),0)}function f3(t){return t.reduce((e,n)=>e+ZN(n),0)}function h3(t,e){if(e===void 0&&(e=Za),!t)return;const{top:n,left:r,bottom:s,right:i}=e(t);YN(t)&&(s<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const p3=[["x",["left","right"],d3],["y",["top","bottom"],f3]];class By{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Ch(n),s=nE(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,c]of p3)for(const u of a)Object.defineProperty(this,u,{get:()=>{const f=c(r),p=s[i]-f;return this.rect[u]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cc{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>
19{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function m3(t){const{EventTarget:e}=Kn(t);return t instanceof e?t:Xa(t)}function tg(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var Cr;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Cr||(Cr={}));function mw(t){t.preventDefault()}function g3(t){t.stopPropagation()}var Ge;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Ge||(Ge={}));const rE={start:[Ge.Space,Ge.Enter],cancel:[Ge.Esc],end:[Ge.Space,Ge.Enter,Ge.Tab]},x3=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case Ge.Right:return{...n,x:n.x+25};case Ge.Left:return{...n,x:n.x-25};case Ge.Down:return{...n,y:n.y+25};case Ge.Up:return{...n,y:n.y-25}}};class el{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new cc(Xa(n)),this.windowListeners=new cc(Kn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Cr.Resize,this.handleCancel),this.windowListeners.add(Cr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Cr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&h3(r),n(Yr)}handleKeyDown(e){if($y(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:i=rE,coordinateGetter:a=x3,scrollBehavior:c="smooth"}=s,{code:u}=e;if(i.end.includes(u)){this.handleEnd(e);return}if(i.cancel.includes(u)){this.handleCancel(e);return}const{collisionRect:f}=r.current,p=f?{x:f.left,y:f.top}:Yr;this.referenceCoordinates||(this.referenceCoordinates=p);const m=a(e,{active:n,context:r.current,currentCoordinates:p});if(m){const x=Tc(m,p),y={x:0,y:0},{scrollableAncestors:w}=r.current;for(const b of w){const S=e.code,{isTop:N,isRight:E,isLeft:M,isBottom:j,maxScroll:A,minScroll:P}=tE(b),O=u3(b),z={x:Math.min(S===Ge.Right?O.right-O.width/2:O.right,Math.max(S===Ge.Right?O.left:O.left+O.width/2,m.x)),y:Math.min(S===Ge.Down?O.bottom-O.height/2:O.bottom,Math.max(S===Ge.Down?O.top:O.top+O.height/2,m.y))},U=S===Ge.Right&&!E||S===Ge.Left&&!M,Y=S===Ge.Down&&!j||S===Ge.Up&&!N;if(U&&z.x!==m.x){const Q=b.scrollLeft+x.x,X=S===Ge.Right&&Q<=A.x||S===Ge.Left&&Q>=P.x;if(X&&!x.y){b.scrollTo({left:Q,behavior:c});return}X?y.x=b.scrollLeft-Q:y.x=S===Ge.Right?b.scrollLeft-A.x:b.scrollLeft-P.x,y.x&&b.scrollBy({left:-y.x,behavior:c});break}else if(Y&&z.y!==m.y){const Q=b.scrollTop+x.y,X=S===Ge.Down&&Q<=A.y||S===Ge.Up&&Q>=P.y;if(X&&!x.x){b.scrollTo({top:Q,behavior:c});return}X?y.y=b.scrollTop-Q:y.y=S===Ge.Down?b.scrollTop-A.y:b.scrollTop-P.y,y.y&&b.scrollBy({top:-y.y,behavior:c});break}}this.handleMove(e,Ra(Tc(m,this.referenceCoordinates),y))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}el.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=rE,onActivation:s}=e,{active:i}=n;const{code:a}=t.nativeEvent;if(r.start.includes(a)){const c=i.activatorNode.current;return c&&t.target!==c?!1:(t.preventDefault(),s?.({event:t.nativeEvent}),!0)}return!1}}];function gw(t){return!!(t&&"distance"in t)}function xw(t){return!!(t&&"delay"in t)}class Hy{constructor(e,n,r){var s;r===void 0&&(r=m3(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:a}=i;this.props=e,this.events=n,this.document=Xa(a),this.documentListeners=new cc(this.document),this.listeners=new cc(r),this.windowListeners=new cc(Kn(a)),this.initialCoordinates=(s=ax(i))!=null?s:Yr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Cr.Resize,this.handleCancel),this.windowListeners.add(Cr.DragStart,mw),this.windowListeners.add(Cr.VisibilityChange,this.handleCancel),this.windowListeners.add(Cr.ContextMenu,mw),this.documentListeners.add(Cr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xw(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(gw(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Cr.Click,g3,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Cr.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:i}=this,{onMove:a,options:{activationConstraint:c}}=i;if(!s)return;const u=(n=ax(e))!=null?n:Yr,f=Tc(s,u);
19if(!r&&c){if(gw(c)){if(c.tolerance!=null&&tg(f,c.tolerance))return this.handleCancel();if(tg(f,c.distance))return this.handleStart()}if(xw(c)&&tg(f,c.tolerance))return this.handleCancel();this.handlePending(c,f);return}e.cancelable&&e.preventDefault(),a(u)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===Ge.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const y3={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class tl extends Hy{constructor(e){const{event:n}=e,r=Xa(n.target);super(e,y3,r)}}tl.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const v3={move:{name:"mousemove"},end:{name:"mouseup"}};var cx;(function(t){t[t.RightClick=2]="RightClick"})(cx||(cx={}));class b3 extends Hy{constructor(e){super(e,v3,Xa(e.event.target))}}b3.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===cx.RightClick?!1:(r?.({event:n}),!0)}}];const ng={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class w3 extends Hy{constructor(e){super(e,ng)}static setup(){return window.addEventListener(ng.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ng.move.name,e)};function e(){}}}w3.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r?.({event:n}),!0)}}];var uc;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(uc||(uc={}));var lf;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(lf||(lf={}));function k3(t){let{acceleration:e,activator:n=uc.Pointer,canScroll:r,draggingRect:s,enabled:i,interval:a=5,order:c=lf.TreeOrder,pointerCoordinates:u,scrollableAncestors:f,scrollableAncestorRects:p,delta:m,threshold:x}=t;const y=C3({delta:m,disabled:!i}),[w,b]=L4(),S=k.useRef({x:0,y:0}),N=k.useRef({x:0,y:0}),E=k.useMemo(()=>{switch(n){case uc.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case uc.DraggableRect:return s}},[n,s,u]),M=k.useRef(null),j=k.useCallback(()=>{const P=M.current;if(!P)return;const O=S.current.x*N.current.x,z=S.current.y*N.current.y;P.scrollBy(O,z)},[]),A=k.useMemo(()=>c===lf.TreeOrder?[...f].reverse():f,[c,f]);k.useEffect(()=>{if(!i||!f.length||!E){b();return}for(const P of A){if(r?.(P)===!1)continue;const O=f.indexOf(P),z=p[O];if(!z)continue;const{direction:U,speed:Y}=c3(P,z,E,e,x);for(const Q of["x","y"])y[Q][U[Q]]||(Y[Q]=0,U[Q]=0);if(Y.x>0||Y.y>0){b(),M.current=P,w(j,a),S.current=Y,N.current=U;return}}S.current={x:0,y:0},N.current={x:0,y:0},b()},[e,j,r,b,i,a,JSON.stringify(E),JSON.stringify(y),w,f,A,p,JSON.stringify(x)])}const S3={x:{[Xt.Backward]:!1,[Xt.Forward]:!1},y:{[Xt.Backward]:!1,[Xt.Forward]:!1}};function C3(t){let{delta:e,disabled:n}=t;const r=ox(e);return Jc(s=>{if(n||!r||!s)return S3;const i={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[Xt.Backward]:s.x[Xt.Backward]||i.x===-1,[Xt.Forward]:s.x[Xt.Forward]||i.x===1},y:{[Xt.Backward]:s.y[Xt.Backward]||i.y===-1,[Xt.Forward]:s.y[Xt.Forward]||i.y===1}}},[n,e,r])}function N3(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return Jc(s=>{var i;return e==null?null:(i=r??s)!=null?i:null},[r,e])}function E3(t,e){return k.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,i=s.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,r)}));return[...n,...i]},[]),[t,e])}var Mc;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Mc||(Mc={}));var ux;(function(t){t.Optimized="optimized"})(ux||(ux={}));const yw=new Map;function T3(t,e){let{dragging:n,dependencies:r,config:s}=e;const[i,a]=k.useState(null),{frequency:c,measure:u,strategy:f}=s,p=k.useRef(t),m=S(),x=Ec(m),y=k.useCallback(function(N){N===void 0&&(N=[]),!x.current&&a(E=>E===null?N:E.concat(N.filter(M=>!E.includes(M))))},[x]),w=k.useRef(null),b=Jc(N=>{if(m&&!n)return yw;if(!N||N===yw||p.current!==t||i!=null){const E=new Map;for(let M of t){if(!M)continue;if(i&&i.length>0&&!i.includes(M.id)&&M.rect.current){E.set(M.id,M.rect.current);continue}const j=M.node.current,A=j?new By(u(j),j):null;M.rect.current=A,A&&E.set(M.id,A)}return E}return N},[t,i,n,m,u]);return k.useEffect(()=>{p.current=t},[t]),k.useEffect(()=>{m||y()},[n,m]),k.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),k.useEffect(()=>{m||typeof c!="number"||w.current!==null||(w.current=setTimeout(()=>{y(),w.current=null},c))},[c,m,y,...r]),{droppableRects:b,measureDroppableContainers:y,measuringScheduled:i!=null};function S(){switch(f){case Mc.Always:return!1;case Mc.BeforeDragging:return n;default:return!n}}}function sE(t,e){return Jc(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function M3(t,e){return sE(t,e)}function j3(t){let{callback:e,disabled:n}=t;const r=Fy(e),s=k.useMemo(()=>
19{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return k.useEffect(()=>()=>s?.disconnect(),[s]),s}function Nh(t){let{callback:e,disabled:n}=t;const r=Fy(e),s=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return k.useEffect(()=>()=>s?.disconnect(),[s]),s}function A3(t){return new By(Za(t),t)}function vw(t,e,n){e===void 0&&(e=A3);const[r,s]=k.useState(null);function i(){s(u=>{if(!t)return null;if(t.isConnected===!1){var f;return(f=u??n)!=null?f:null}const p=e(t);return JSON.stringify(u)===JSON.stringify(p)?u:p})}const a=j3({callback(u){if(t)for(const f of u){const{type:p,target:m}=f;if(p==="childList"&&m instanceof HTMLElement&&m.contains(t)){i();break}}}}),c=Nh({callback:i});return bs(()=>{i(),t?(c?.observe(t),a?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),a?.disconnect())},[t]),r}function R3(t){const e=sE(t);return JN(t,e)}const bw=[];function O3(t){const e=k.useRef(t),n=Jc(r=>t?r&&r!==bw&&t&&e.current&&t.parentNode===e.current.parentNode?r:Ch(t):bw,[t]);return k.useEffect(()=>{e.current=t},[t]),n}function P3(t){const[e,n]=k.useState(null),r=k.useRef(t),s=k.useCallback(i=>{const a=eg(i.target);a&&n(c=>c?(c.set(a,lx(a)),new Map(c)):null)},[]);return k.useEffect(()=>{const i=r.current;if(t!==i){a(i);const c=t.map(u=>{const f=eg(u);return f?(f.addEventListener("scroll",s,{passive:!0}),[f,lx(f)]):null}).filter(u=>u!=null);n(c.length?new Map(c):null),r.current=t}return()=>{a(t),a(i)};function a(c){c.forEach(u=>{const f=eg(u);f?.removeEventListener("scroll",s)})}},[s,t]),k.useMemo(()=>t.length?e?Array.from(e.values()).reduce((i,a)=>Ra(i,a),Yr):nE(t):Yr,[t,e])}function ww(t,e){e===void 0&&(e=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},e),k.useEffect(()=>{const r=t!==Yr;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?Tc(t,n.current):Yr}function D3(t){k.useEffect(()=>{if(!wh)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function I3(t,e){return k.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:i}=r;return n[s]=a=>{i(a,e)},n},{}),[t,e])}function iE(t){return k.useMemo(()=>t?i3(t):null,[t])}const kw=[];function L3(t,e){e===void 0&&(e=Za);const[n]=t,r=iE(n?Kn(n):null),[s,i]=k.useState(kw);function a(){i(()=>t.length?t.map(u=>eE(u)?r:new By(e(u),u)):kw)}const c=Nh({callback:a});return bs(()=>{c?.disconnect(),a(),t.forEach(u=>c?.observe(u))},[t]),s}function _3(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Qc(e)?e:t}function z3(t){let{measure:e}=t;const[n,r]=k.useState(null),s=k.useCallback(f=>{for(const{target:p}of f)if(Qc(p)){r(m=>{const x=e(p);return m?{...m,width:x.width,height:x.height}:x});break}},[e]),i=Nh({callback:s}),a=k.useCallback(f=>{const p=_3(f);i?.disconnect(),p&&i?.observe(p),r(p?e(p):null)},[e,i]),[c,u]=of(a);return k.useMemo(()=>({nodeRef:c,rect:n,setRef:u}),[n,c,u])}const F3=[{sensor:tl,options:{}},{sensor:el,options:{}}],$3={current:{}},Bd={draggable:{measure:pw},droppable:{measure:pw,strategy:Mc.WhileDragging,frequency:ux.Optimized},dragOverlay:{measure:Za}};class dc extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const B3={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:af},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Bd,measureDroppableContainers:af,windowRect:null,measuringScheduled:!1},H3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:af,draggableNodes:new Map,over:null,measureDroppableContainers:af},Eh=k.createContext(H3),oE=k.createContext(B3);function V3(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dc}}}function U3(t,e){switch(e.type){case Bt.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Bt.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case Bt.DragEnd:case Bt.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Bt.RegisterDroppable:{const{element:n}=e,{id:r}
19=n,s=new dc(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case Bt.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,i=t.droppable.containers.get(n);if(!i||r!==i.key)return t;const a=new dc(t.droppable.containers);return a.set(n,{...i,disabled:s}),{...t,droppable:{...t.droppable,containers:a}}}case Bt.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const i=new dc(t.droppable.containers);return i.delete(n),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function W3(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=k.useContext(Eh),i=ox(r),a=ox(n?.id);return k.useEffect(()=>{if(!e&&!r&&i&&a!=null){if(!$y(i)||document.activeElement===i.target)return;const c=s.get(a);if(!c)return;const{activatorNode:u,node:f}=c;if(!u.current&&!f.current)return;requestAnimationFrame(()=>{for(const p of[u.current,f.current]){if(!p)continue;const m=F4(p);if(m){m.focus();break}}})}},[r,e,s,a,i]),null}function K3(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,i)=>i({transform:s,...r}),n):n}function q3(t){return k.useMemo(()=>({draggable:{...Bd.draggable,...t?.draggable},droppable:{...Bd.droppable,...t?.droppable},dragOverlay:{...Bd.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function G3(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const i=k.useRef(!1),{x:a,y:c}=typeof s=="boolean"?{x:s,y:s}:s;bs(()=>{if(!a&&!c||!e){i.current=!1;return}if(i.current||!r)return;const f=e?.node.current;if(!f||f.isConnected===!1)return;const p=n(f),m=JN(p,r);if(a||(m.x=0),c||(m.y=0),i.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const x=YN(f);x&&x.scrollBy({top:m.y,left:m.x})}},[e,a,c,r,n])}const aE=k.createContext({...Yr,scaleX:1,scaleY:1});var Ni;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Ni||(Ni={}));const Th=k.memo(function(e){var n,r,s,i;let{id:a,accessibility:c,autoScroll:u=!0,children:f,sensors:p=F3,collisionDetection:m=X4,measuring:x,modifiers:y,...w}=e;const b=k.useReducer(U3,void 0,V3),[S,N]=b,[E,M]=W4(),[j,A]=k.useState(Ni.Uninitialized),P=j===Ni.Initialized,{draggable:{active:O,nodes:z,translate:U},droppable:{containers:Y}}=S,Q=O!=null?z.get(O):null,X=k.useRef({initial:null,translated:null}),le=k.useMemo(()=>{var ut;return O!=null?{id:O,data:(ut=Q?.data)!=null?ut:$3,rect:X}:null},[O,Q]),W=k.useRef(null),[ce,se]=k.useState(null),[ie,H]=k.useState(null),J=Ec(w,Object.values(w)),ee=Yc("DndDescribedBy",a),D=k.useMemo(()=>Y.getEnabled(),[Y]),V=q3(x),{droppableRects:ae,measureDroppableContainers:we,measuringScheduled:ge}=T3(D,{dragging:P,dependencies:[U.x,U.y],config:V.droppable}),Se=N3(z,O),oe=k.useMemo(()=>ie?ax(ie):null,[ie]),fe=Gn(),Te=M3(Se,V.draggable.measure);G3({activeNode:O!=null?z.get(O):null,config:fe.layoutShiftCompensation,initialRect:Te,measure:V.draggable.measure});const ue=vw(Se,V.draggable.measure,Te),Fe=vw(Se?Se.parentElement:null),We=k.useRef({activatorEvent:null,active:null,activeNode:Se,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:z,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Xe=Y.getNodeFor((n=We.current.over)==null?void 0:n.id),ot=z3({measure:V.dragOverlay.measure}),Mt=(r=ot.nodeRef.current)!=null?r:Se,nn=P?(s=ot.rect)!=null?s:ue:null,In=!!(ot.nodeRef.current&&ot.rect),lr=R3(In?null:ue),cr=iE(Mt?Kn(Mt):null),_t=O3(P?Xe??Se:null),Ln=L3(_t),Ar=K3(y,{transform:{x:U.x-lr.x,y:U.y-lr.y,scaleX:1,scaleY:1},activatorEvent:ie,active:le,activeNodeRect:ue,containerNodeRect:Fe,draggingNodeRect:nn,over:We.current.over,overlayNodeRect:ot.rect,scrollableAncestors:_t,scrollableAncestorRects:Ln,windowRect:cr}),no=oe?Ra(oe,U):null,Es=P3(_t),es=ww(Es),Rr=ww(Es,[ue]),jt=Ra(Ar,es),Cn=nn?t3(nn,Ar):null,Or=le&&Cn?m({active:le,collisionRect:Cn,droppableRects:ae,droppableContainers:D,pointerCoordinates:no}):null,Pr=QN(Or,"id"),[Wt,ro]=k.useState(null),Ts=In?Ar:Ra(Ar,Rr),Ms=Z4(Ts,(i=Wt?.rect)!=null?i:null,ue),Nn=k.useRef(null),qn=k.useCallback((ut,wt)=>{let{sensor:Kt,options:Qn}=wt;if(W.current==null)return;const qe=z.get(W.current);if(!qe)return;const gt=ut.nativeEvent,fn=new Kt({active:W.current,activeNode:qe,event:gt,options:Qn,context:We,onAbort(st){if(!z.get(st))return;const{onDragAbort:zt}=J.current,Jn={id:st};zt?.(Jn),E({type:"onDragAbort",event:Jn})},onPending(st,En,zt,Jn){if(!z.get(st))return;const{onDragPending:qt}=J.current,hn={id:st,constraint:En,initialCoordinates:zt,offset:Jn};qt?.(hn),E({type:"onDragPending",event:hn})},onStart(st){const En=W.current;if(En==null)return;
19const zt=z.get(En);if(!zt)return;const{onDragStart:Jn}=J.current,kt={activatorEvent:gt,active:{id:En,data:zt.data,rect:X}};Kr.unstable_batchedUpdates(()=>{Jn?.(kt),A(Ni.Initializing),N({type:Bt.DragStart,initialCoordinates:st,active:En}),E({type:"onDragStart",event:kt}),se(Nn.current),H(gt)})},onMove(st){N({type:Bt.DragMove,coordinates:st})},onEnd:ur(Bt.DragEnd),onCancel:ur(Bt.DragCancel)});Nn.current=fn;function ur(st){return async function(){const{active:zt,collisions:Jn,over:kt,scrollAdjustedTranslate:qt}=We.current;let hn=null;if(zt&&qt){const{cancelDrop:dr}=J.current;hn={activatorEvent:gt,active:zt,collisions:Jn,delta:qt,over:kt},st===Bt.DragEnd&&typeof dr=="function"&&await Promise.resolve(dr(hn))&&(st=Bt.DragCancel)}W.current=null,Kr.unstable_batchedUpdates(()=>{N({type:st}),A(Ni.Uninitialized),ro(null),se(null),H(null),Nn.current=null;const dr=st===Bt.DragEnd?"onDragEnd":"onDragCancel";if(hn){const As=J.current[dr];As?.(hn),E({type:dr,event:hn})}})}}},[z]),js=k.useCallback((ut,wt)=>(Kt,Qn)=>{const qe=Kt.nativeEvent,gt=z.get(Qn);if(W.current!==null||!gt||qe.dndKit||qe.defaultPrevented)return;const fn={active:gt};ut(Kt,wt.options,fn)===!0&&(qe.dndKit={capturedBy:wt.sensor},W.current=Qn,qn(Kt,wt))},[z,qn]),ts=E3(p,js);D3(p),bs(()=>{ue&&j===Ni.Initializing&&A(Ni.Initialized)},[ue,j]),k.useEffect(()=>{const{onDragMove:ut}=J.current,{active:wt,activatorEvent:Kt,collisions:Qn,over:qe}=We.current;if(!wt||!Kt)return;const gt={active:wt,activatorEvent:Kt,collisions:Qn,delta:{x:jt.x,y:jt.y},over:qe};Kr.unstable_batchedUpdates(()=>{ut?.(gt),E({type:"onDragMove",event:gt})})},[jt.x,jt.y]),k.useEffect(()=>{const{active:ut,activatorEvent:wt,collisions:Kt,droppableContainers:Qn,scrollAdjustedTranslate:qe}=We.current;if(!ut||W.current==null||!wt||!qe)return;const{onDragOver:gt}=J.current,fn=Qn.get(Pr),ur=fn&&fn.rect.current?{id:fn.id,rect:fn.rect.current,data:fn.data,disabled:fn.disabled}:null,st={active:ut,activatorEvent:wt,collisions:Kt,delta:{x:qe.x,y:qe.y},over:ur};Kr.unstable_batchedUpdates(()=>{ro(ur),gt?.(st),E({type:"onDragOver",event:st})})},[Pr]),bs(()=>{We.current={activatorEvent:ie,active:le,activeNode:Se,collisionRect:Cn,collisions:Or,droppableRects:ae,draggableNodes:z,draggingNode:Mt,draggingNodeRect:nn,droppableContainers:Y,over:Wt,scrollableAncestors:_t,scrollAdjustedTranslate:jt},X.current={initial:nn,translated:Cn}},[le,Se,Or,Cn,z,Mt,nn,ae,Y,Wt,_t,jt]),k3({...fe,delta:U,draggingRect:Cn,pointerCoordinates:no,scrollableAncestors:_t,scrollableAncestorRects:Ln});const so=k.useMemo(()=>({active:le,activeNode:Se,activeNodeRect:ue,activatorEvent:ie,collisions:Or,containerNodeRect:Fe,dragOverlay:ot,draggableNodes:z,droppableContainers:Y,droppableRects:ae,over:Wt,measureDroppableContainers:we,scrollableAncestors:_t,scrollableAncestorRects:Ln,measuringConfiguration:V,measuringScheduled:ge,windowRect:cr}),[le,Se,ue,ie,Or,Fe,ot,z,Y,ae,Wt,we,_t,Ln,V,ge,cr]),ns=k.useMemo(()=>({activatorEvent:ie,activators:ts,active:le,activeNodeRect:ue,ariaDescribedById:{draggable:ee},dispatch:N,draggableNodes:z,over:Wt,measureDroppableContainers:we}),[ie,ts,le,ue,N,ee,z,Wt,we]);return Oe.createElement(KN.Provider,{value:M},Oe.createElement(Eh.Provider,{value:ns},Oe.createElement(oE.Provider,{value:so},Oe.createElement(aE.Provider,{value:Ms},f)),Oe.createElement(W3,{disabled:c?.restoreFocus===!1})),Oe.createElement(G4,{...c,hiddenTextDescribedById:ee}));function Gn(){const ut=ce?.autoScrollEnabled===!1,wt=typeof u=="object"?u.enabled===!1:u===!1,Kt=P&&!ut&&!wt;return typeof u=="object"?{...u,enabled:Kt}:{enabled:Kt}}}),Q3=k.createContext(null),Sw="button",J3="Draggable";function Y3(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const i=Yc(J3),{activators:a,activatorEvent:c,active:u,activeNodeRect:f,ariaDescribedById:p,draggableNodes:m,over:x}=k.useContext(Eh),{role:y=Sw,roleDescription:w="draggable",tabIndex:b=0}=s??{},S=u?.id===e,N=k.useContext(S?aE:Q3),[E,M]=of(),[j,A]=of(),P=I3(a,e),O=Ec(n);bs(()=>(m.set(e,{id:e,key:i,node:E,activatorNode:j,data:O}),()=>{const U=m.get(e);U&&U.key===i&&m.delete(e)}),[m,e]);const z=k.useMemo(()=>({role:y,tabIndex:b,"aria-disabled":r,"aria-pressed":S&&y===Sw?!0:void 0,"aria-roledescription":w,"aria-describedby":p.draggable}),[r,y,b,S,w,p.draggable]);return{active:u,activatorEvent:c,activeNodeRect:f,attributes:z,isDragging:S,listeners:r?void 0:P,node:E,over:x,setNodeRef:M,setActivatorNodeRef:A,transform:N}}function X3(){return k.useContext(oE)}const Z3="Droppable",e_={timeout:25};function t_(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const i=Yc(Z3),{active:a,dispatch:c,over:u,measureDroppableContainers:f}=k.useContext(Eh),p=k.useRef({disabled:n}),m=k.useRef(!1),x=k.useRef(null),y=k.useRef(null),{disabled:w,updateMeasurementsFor:b,timeout:S}={...e_,...s},N=Ec(b??r),E=k.useCallback(()=>
19{if(!m.current){m.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{f(Array.isArray(N.current)?N.current:[N.current]),y.current=null},S)},[S]),M=Nh({callback:E,disabled:w||!a}),j=k.useCallback((z,U)=>{M&&(U&&(M.unobserve(U),m.current=!1),z&&M.observe(z))},[M]),[A,P]=of(j),O=Ec(e);return k.useEffect(()=>{!M||!A.current||(M.disconnect(),m.current=!1,M.observe(A.current))},[A,M]),k.useEffect(()=>(c({type:Bt.RegisterDroppable,element:{id:r,key:i,disabled:n,node:A,rect:x,data:O}}),()=>c({type:Bt.UnregisterDroppable,key:i,id:r})),[r]),k.useEffect(()=>{n!==p.current.disabled&&(c({type:Bt.SetDroppableDisabled,id:r,key:i,disabled:n}),p.current.disabled=n)},[r,i,n,c]),{active:a,rect:x,isOver:u?.id===r,node:A,over:u,setNodeRef:P}}function nl(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function n_(t,e){return t.reduce((n,r,s)=>{const i=e.get(r);return i&&(n[s]=i),n},Array(t.length))}function xd(t){return t!==null&&t>=0}function r_(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function s_(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const lE=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const i=nl(e,r,n),a=e[s],c=i[s];return!c||!a?null:{x:c.left-a.left,y:c.top-a.top,scaleX:c.width/a.width,scaleY:c.height/a.height}},yd={scaleX:1,scaleY:1},Mh=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:i,overIndex:a}=t;const c=(e=i[n])!=null?e:r;if(!c)return null;if(s===n){const f=i[a];return f?{x:0,y:n<a?f.top+f.height-(c.top+c.height):f.top-c.top,...yd}:null}const u=i_(i,s,n);return s>n&&s<=a?{x:0,y:-c.height-u,...yd}:s<n&&s>=a?{x:0,y:c.height+u,...yd}:{x:0,y:0,...yd}};function i_(t,e,n){const r=t[e],s=t[e-1],i=t[e+1];return r?n<e?s?r.top-(s.top+s.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const cE="Sortable",uE=Oe.createContext({activeIndex:-1,containerId:cE,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:lE,disabled:{draggable:!1,droppable:!1}});function jh(t){let{children:e,id:n,items:r,strategy:s=lE,disabled:i=!1}=t;const{active:a,dragOverlay:c,droppableRects:u,over:f,measureDroppableContainers:p}=X3(),m=Yc(cE,n),x=c.rect!==null,y=k.useMemo(()=>r.map(P=>typeof P=="object"&&"id"in P?P.id:P),[r]),w=a!=null,b=a?y.indexOf(a.id):-1,S=f?y.indexOf(f.id):-1,N=k.useRef(y),E=!r_(y,N.current),M=S!==-1&&b===-1||E,j=s_(i);bs(()=>{E&&w&&p(y)},[E,y,w,p]),k.useEffect(()=>{N.current=y},[y]);const A=k.useMemo(()=>({activeIndex:b,containerId:m,disabled:j,disableTransforms:M,items:y,overIndex:S,useDragOverlay:x,sortedRects:n_(y,u),strategy:s}),[b,m,j.draggable,j.droppable,M,y,S,u,x,s]);return Oe.createElement(uE.Provider,{value:A},e)}const o_=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return nl(n,r,s).indexOf(e)},a_=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:i,newIndex:a,previousItems:c,previousContainerId:u,transition:f}=t;return!f||!r||c!==i&&s===a?!1:n?!0:a!==s&&e===u},l_={duration:200,easing:"ease"},dE="transform",c_=Vi.Transition.toString({property:dE,duration:0,easing:"linear"}),u_={roleDescription:"sortable"};function d_(t){let{disabled:e,index:n,node:r,rect:s}=t;const[i,a]=k.useState(null),c=k.useRef(n);return bs(()=>{if(!e&&n!==c.current&&r.current){const u=s.current;if(u){const f=Za(r.current,{ignoreTransform:!0}),p={x:u.left-f.left,y:u.top-f.top,scaleX:u.width/f.width,scaleY:u.height/f.height};(p.x||p.y)&&a(p)}}n!==c.current&&(c.current=n)},[e,n,r,s]),k.useEffect(()=>{i&&a(null)},[i]),i}function Ah(t){let{animateLayoutChanges:e=a_,attributes:n,disabled:r,data:s,getNewIndex:i=o_,id:a,strategy:c,resizeObserverConfig:u,transition:f=l_}=t;const{items:p,containerId:m,activeIndex:x,disabled:y,disableTransforms:w,sortedRects:b,overIndex:S,useDragOverlay:N,strategy:E}=k.useContext(uE),M=f_(r,y),j=p.indexOf(a),A=k.useMemo(()=>({sortable:{containerId:m,index:j,items:p},...s}),[m,s,j,p]),P=k.useMemo(()=>p.slice(p.indexOf(a)),[p,a]),{rect:O,node:z,isOver:U,setNodeRef:Y}=t_({id:a,data:A,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...u}}),{active:Q,activatorEvent:X,activeNodeRect:le,attributes:W,setNodeRef:ce,listeners:se,isDragging:ie,over:H,setA
19ctivatorNodeRef:J,transform:ee}=Y3({id:a,data:A,attributes:{...u_,...n},disabled:M.draggable}),D=I4(Y,ce),V=!!Q,ae=V&&!w&&xd(x)&&xd(S),we=!N&&ie,ge=we&&ae?ee:null,oe=ae?ge??(c??E)({rects:b,activeNodeRect:le,activeIndex:x,overIndex:S,index:j}):null,fe=xd(x)&&xd(S)?i({id:a,items:p,activeIndex:x,overIndex:S}):j,Te=Q?.id,ue=k.useRef({activeId:Te,items:p,newIndex:fe,containerId:m}),Fe=p!==ue.current.items,We=e({active:Q,containerId:m,isDragging:ie,isSorting:V,id:a,index:j,items:p,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:f,wasDragging:ue.current.activeId!=null}),Xe=d_({disabled:!We,index:j,node:z,rect:O});return k.useEffect(()=>{V&&ue.current.newIndex!==fe&&(ue.current.newIndex=fe),m!==ue.current.containerId&&(ue.current.containerId=m),p!==ue.current.items&&(ue.current.items=p)},[V,fe,m,p]),k.useEffect(()=>{if(Te===ue.current.activeId)return;if(Te!=null&&ue.current.activeId==null){ue.current.activeId=Te;return}const Mt=setTimeout(()=>{ue.current.activeId=Te},50);return()=>clearTimeout(Mt)},[Te]),{active:Q,activeIndex:x,attributes:W,data:A,rect:O,index:j,newIndex:fe,items:p,isOver:U,isSorting:V,isDragging:ie,listeners:se,node:z,overIndex:S,over:H,setNodeRef:D,setActivatorNodeRef:J,setDroppableNodeRef:Y,setDraggableNodeRef:ce,transform:Xe??oe,transition:ot()};function ot(){if(Xe||Fe&&ue.current.newIndex===j)return c_;if(!(we&&!$y(X)||!f)&&(V||We))return Vi.Transition.toString({...f,property:dE})}}function f_(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function cf(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const h_=[Ge.Down,Ge.Right,Ge.Up,Ge.Left],Rh=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:i,over:a,scrollableAncestors:c}}=e;if(h_.includes(t.code)){if(t.preventDefault(),!n||!r)return;const u=[];i.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const x=s.get(m.id);if(x)switch(t.code){case Ge.Down:r.top<x.top&&u.push(m);break;case Ge.Up:r.top>x.top&&u.push(m);break;case Ge.Left:r.left>x.left&&u.push(m);break;case Ge.Right:r.left<x.left&&u.push(m);break}});const f=J4({collisionRect:r,droppableRects:s,droppableContainers:u});let p=QN(f,"id");if(p===a?.id&&f.length>1&&(p=f[1].id),p!=null){const m=i.get(n.id),x=i.get(p),y=x?s.get(x.id):null,w=x?.node.current;if(w&&y&&m&&x){const S=Ch(w).some((P,O)=>c[O]!==P),N=fE(m,x),E=p_(m,x),M=S||!N?{x:0,y:0}:{x:E?r.width-y.width:0,y:E?r.height-y.height:0},j={x:y.left,y:y.top};return M.x&&M.y?j:Tc(j,M)}}}};function fE(t,e){return!cf(t)||!cf(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function p_(t,e){return!cf(t)||!cf(e)||!fE(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const m_=iy("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground border border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Re=k.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const a=r?BO:"button";return d.jsx(a,{className:Ue(m_({variant:e,size:n,className:t})),ref:i,...s})});Re.displayName="Button";const Ke=k.forwardRef(({className:t,type:e,...n},r)=>d.jsx("input",{type:e,className:Ue("flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));Ke.displayName="Input";const uf=k.forwardRef(({className:t,...e},n)=>d.jsx("textarea",{className:Ue("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...e}));uf.displayName="Textarea";var g_="Label",hE=k.forwardRef((t,e)=>d.jsx(Ie.label,{...t,ref:e,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(t.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));hE.displayName=g_;var pE=hE;const x_=iy("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),me=k.forwardRef(({className:t,...e},n)=>d.jsx(pE,{ref:n,className:Ue(x_(),t),...e}));me.displayName=pE.displayName;function Cw(t,[e,n]){return Math.min(n,Math.max(e,t))}var rg=0;function mE(){k.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Nw()),document.body.insertAdjacentElement("beforeend",t[1]??Nw()),rg++,()=>{rg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
vendor: 8,538 bytes, line 19
19=>e.remove()),rg--}},[])}function Nw(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var sg="focusScope.autoFocusOnMount",ig="focusScope.autoFocusOnUnmount",Ew={bubbles:!1,cancelable:!0},y_="FocusScope",Vy=k.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[c,u]=k.useState(null),f=Wn(s),p=Wn(i),m=k.useRef(null),x=nt(e,b=>u(b)),y=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let b=function(M){if(y.paused||!c)return;const j=M.target;c.contains(j)?m.current=j:Si(m.current,{select:!0})},S=function(M){if(y.paused||!c)return;const j=M.relatedTarget;j!==null&&(c.contains(j)||Si(m.current,{select:!0}))},N=function(M){if(document.activeElement===document.body)for(const A of M)A.removedNodes.length>0&&Si(c)};document.addEventListener("focusin",b),document.addEventListener("focusout",S);const E=new MutationObserver(N);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",S),E.disconnect()}}},[r,c,y.paused]),k.useEffect(()=>{if(c){Mw.add(y);const b=document.activeElement;if(!c.contains(b)){const N=new CustomEvent(sg,Ew);c.addEventListener(sg,f),c.dispatchEvent(N),N.defaultPrevented||(v_(C_(gE(c)),{select:!0}),document.activeElement===b&&Si(c))}return()=>{c.removeEventListener(sg,f),setTimeout(()=>{const N=new CustomEvent(ig,Ew);c.addEventListener(ig,p),c.dispatchEvent(N),N.defaultPrevented||Si(b??document.body,{select:!0}),c.removeEventListener(ig,p),Mw.remove(y)},0)}}},[c,f,p,y]);const w=k.useCallback(b=>{if(!n&&!r||y.paused)return;const S=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,N=document.activeElement;if(S&&N){const E=b.currentTarget,[M,j]=b_(E);M&&j?!b.shiftKey&&N===j?(b.preventDefault(),n&&Si(M,{select:!0})):b.shiftKey&&N===M&&(b.preventDefault(),n&&Si(j,{select:!0})):N===E&&b.preventDefault()}},[n,r,y.paused]);return d.jsx(Ie.div,{tabIndex:-1,...a,ref:x,onKeyDown:w})});Vy.displayName=y_;function v_(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Si(r,{select:e}),document.activeElement!==n)return}function b_(t){const e=gE(t),n=Tw(e,t),r=Tw(e.reverse(),t);return[n,r]}function gE(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Tw(t,e){for(const n of t)if(!w_(n,{upTo:e}))return n}function w_(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function k_(t){return t instanceof HTMLInputElement&&"select"in t}function Si(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&k_(t)&&e&&t.select()}}var Mw=S_();function S_(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=jw(t,e),t.unshift(e)},remove(e){t=jw(t,e),t[0]?.resume()}}}function jw(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function C_(t){return t.filter(e=>e.tagName!=="A")}function xE(t){const e=k.useRef({value:t,previous:t});return k.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var N_=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},va=new WeakMap,vd=new WeakMap,bd={},og=0,yE=function(t){return t&&(t.host||yE(t.parentNode))},E_=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=yE(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},T_=function(t,e,n,r){var s=E_(e,Array.isArray(t)?t:[t]);bd[n]||(bd[n]=new WeakMap);var i=bd[n],a=[],c=new Set,u=new Set(s),f=function(m){!m||c.has(m)||(c.add(m),f(m.parentNode))};s.forEach(f);var p=function(m){!m||u.has(m)||Array.prototype.forEach.call(m.children,function(x){if(c.has(x))p(x);else try{var y=x.getAttribute(r),w=y!==null&&y!=="false",b=(va.get(x)||0)+1,S=(i.get(x)||0)+1;va.set(x,b),i.set(x,S),a.push(x),b===1&&w&&vd.set(x,!0),S===1&&x.setAttribute(n,"true"),w||x.setAttribute(r,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return p(e),c.clear(),og++,function(){a.forEach(function(m){var x=va.get(m)-1,y=i.get(m)-1;va.set(m,x),i.set(m,y),x||(vd.has(m)||m.removeAttribute(r),vd.delete(m)),y||m.removeAttribute(n)}),og--,og||(va=new WeakMap,va=new WeakMap,vd=new WeakMap,bd={})}},vE=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=N_(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),T_(r,s,n,"aria-hidden")):function(){return null}},ms=function(){return ms=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ms.apply(this,arguments)};function bE(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function M_(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var Hd="right-scroll-bar-position",Vd="width-before-scroll-bar",j_="with-scroll-bars-hidden",A_="--removed-body-scroll-bar-size";function ag(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function R_(t,e){var n=k.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var O_=typeof window<"u"?k.useLayoutEffect:k.useEffect,Aw=new WeakMap;function P_(t,e){var n=R_(null,function(r){return t.forEach(function(s){return ag(s,r)})});return O_(function(){var r=Aw.get(n);if(r){var s=new Set(r),i=new Set(t),a=n.current;s.forEach(function(c){i.has(c)||ag(c,null)}),i.forEach(function(c){s.has(c)||ag(c,a)})}Aw.set(n,t)},[t]),n}function D_(t){return t}function I_(t,e){e===void 0&&(e=D_);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var a=e(i,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var u=function(){var p=a;a=[],p.forEach(i)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(p){a.push(p),f()},filter:function(p){return a=a.filter(p),n}}}};return s}function L_(t){t===void 0&&(t={});var e=I_(null);return e.options=ms({async:!0,ssr:!1},t),e}var wE=function(t){var e=t.sideCar,n=bE(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,ms({},n))};wE.isSideCarExport=!0;function __(t,e){return t.useMedium(e),wE}var kE=L_(),lg=function(){},Oh=k.forwardRef(function(t,e){var n=k.useRef(null),r=k.useState({onScrollCapture:lg,onWheelCapture:lg,onTouchMoveCapture:lg}),s=r[0],i=r[1],a=t.forwardProps,c=t.children,u=t.className,f=t.removeScrollBar,p=t.enabled,m=t.shards,x=t.sideCar,y=t.noIsolation,w=t.inert,b=t.allowPinchZoom,S=t.as,N=S===void 0?"div":S,E=t.gapMode,M=bE(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=x,A=P_([n,e]),P=ms(ms({},M),s);return k.createElement(k.Fragment,null,p&&k.createElement(j,{sideCar:kE,removeScrollBar:f,shards:m,noIsolation:y,inert:w,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:E}),a?k.cloneElement(k.Children.only(c),ms(ms({},P),{ref:A})):k.createElement(N,ms({},P,{className:u,ref:A}
vendor: 5,046 bytes, lines 19-59
19),c))});Oh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oh.classNames={fullWidth:Vd,zeroRight:Hd};var z_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function F_(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=z_();return e&&t.setAttribute("nonce",e),t}function $_(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function B_(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var H_=function(){var t=0,e=null;return{add:function(n){t==0&&(e=F_())&&($_(e,n),B_(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},V_=function(){var t=H_();return function(e,n){k.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},SE=function(){var t=V_(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},U_={left:0,top:0,right:0,gap:0},cg=function(t){return parseInt(t||"",10)||0},W_=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[cg(n),cg(r),cg(s)]},K_=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return U_;var e=W_(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},q_=SE(),Oa="data-scroll-locked",G_=function(t,e,n,r){var s=t.left,i=t.top,a=t.right,c=t.gap;return n===void 0&&(n="margin"),` 20 .`.concat(j_,` { 21 overflow: hidden `).concat(r,`; 22 padding-right: `).concat(c,"px ").concat(r,`; 23 } 24 body[`).concat(Oa,`] { 25 overflow: hidden `).concat(r,`; 26 overscroll-behavior: contain; 27 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 28 padding-left: `.concat(s,`px; 29 padding-top: `).concat(i,`px; 30 padding-right: `).concat(a,`px; 31 margin-left:0; 32 margin-top:0; 33 margin-right: `).concat(c,"px ").concat(r,`; 34 `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),` 35 } 36 37 .`).concat(Hd,` { 38 right: `).concat(c,"px ").concat(r,`; 39 } 40 41 .`).concat(Vd,` { 42 margin-right: `).concat(c,"px ").concat(r,`; 43 } 44 45 .`).concat(Hd," .").concat(Hd,` { 46 right: 0 `).concat(r,`; 47 } 48 49 .`).concat(Vd," .").concat(Vd,` { 50 margin-right: 0 `).concat(r,`; 51 } 52 53 body[`).concat(Oa,`] { 54 `).concat(A_,": ").concat(c,`px; 55 } 56`)},Rw=function(){var t=parseInt(document.body.getAttribute(Oa)||"0",10);return isFinite(t)?t:0},Q_=function(){k.useEffect(function(){return document.body.setAttribute(Oa,(Rw()+1).toString()),function(){var t=Rw()-1;t<=0?document.body.removeAttribute(Oa):document.body.setAttribute(Oa,t.toString())}},[])},J_=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;Q_();var i=k.useMemo(function(){return K_(s)},[s]);return k.createElement(q_,{styles:G_(i,!e,s,n?"":"!important")})},dx=!1;if(typeof window<"u")try{var wd=Object.defineProperty({},"passive",{get:function(){return dx=!0,!0}});window.addEventListener("test",wd,wd),window.removeEventListener("test",wd,wd)}catch{dx=!1}var ba=dx?{passive:!1}:!1,Y_=function(t){return t.tagName==="TEXTAREA"},CE=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Y_(t)&&n[e]==="visible")},X_=function(t){return CE(t,"overflowY")},Z_=function(t){return CE(t,"overflowX")},Ow=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=NE(t,r);if(s){var i=EE(t,r),a=i[1],c=i[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},e5=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},t5=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},NE=function(t,e){return t==="v"?X_(e):Z_(e)},EE=function(t,e){return t==="v"?e5(e):t5(e)},n5=function(t,e){return t==="h"&&e==="rtl"?-1:1},r5=function(t,e,n,r,s){var i=n5(t,window.getComputedStyle(e).direction),a=i*r,c=n.target,u=e.contains(c),f=!1,p=a>0,m=0,x=0;do{var y=EE(t,c),w=y[0],b=y[1],S=y[2],N=b-S-i*w;(w||N)&&NE(t,c)&&(m+=N,x+=w),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!u&&c!==document.body||u&&(e.contains(c)||e===c));return(p&&Math.abs(m)<1||!p&&Math.abs(x)<1)&&(f=!0),f},kd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Pw=function(t){return[t.deltaX,t.deltaY]},Dw=function(t){return t&&"current"in t?t.current:t},s5=function(t,e){return t[0]===e[0]&&t[1]===e[1]},i5=function(t){return` 57 .block-interactivity-`.concat(t,` {pointer-events: none;} 58 .allow-interactivity-`).concat(t,` {pointer-events: all;} 59`)},o5=0,wa=[];function a5(t){var e=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),s=k.useState(o5++)[0],i=k.useState(SE)[0],a=k.useRef(t);k.useEffect(function(){a.current=t},[t]),k.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));
vendor: 4,833 bytes, line 59
59var b=M_([t.lockRef.current],(t.shards||[]).map(Dw),!0).filter(Boolean);return b.forEach(function(S){return S.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),b.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var c=k.useCallback(function(b,S){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var N=kd(b),E=n.current,M="deltaX"in b?b.deltaX:E[0]-N[0],j="deltaY"in b?b.deltaY:E[1]-N[1],A,P=b.target,O=Math.abs(M)>Math.abs(j)?"h":"v";if("touches"in b&&O==="h"&&P.type==="range")return!1;var z=Ow(O,P);if(!z)return!0;if(z?A=O:(A=O==="v"?"h":"v",z=Ow(O,P)),!z)return!1;if(!r.current&&"changedTouches"in b&&(M||j)&&(r.current=A),!A)return!0;var U=r.current||A;return r5(U,S,b,U==="h"?M:j)},[]),u=k.useCallback(function(b){var S=b;if(!(!wa.length||wa[wa.length-1]!==i)){var N="deltaY"in S?Pw(S):kd(S),E=e.current.filter(function(A){return A.name===S.type&&(A.target===S.target||S.target===A.shadowParent)&&s5(A.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var M=(a.current.shards||[]).map(Dw).filter(Boolean).filter(function(A){return A.contains(S.target)}),j=M.length>0?c(S,M[0]):!a.current.noIsolation;j&&S.cancelable&&S.preventDefault()}}},[]),f=k.useCallback(function(b,S,N,E){var M={name:b,delta:S,target:N,should:E,shadowParent:l5(N)};e.current.push(M),setTimeout(function(){e.current=e.current.filter(function(j){return j!==M})},1)},[]),p=k.useCallback(function(b){n.current=kd(b),r.current=void 0},[]),m=k.useCallback(function(b){f(b.type,Pw(b),b.target,c(b,t.lockRef.current))},[]),x=k.useCallback(function(b){f(b.type,kd(b),b.target,c(b,t.lockRef.current))},[]);k.useEffect(function(){return wa.push(i),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:x}),document.addEventListener("wheel",u,ba),document.addEventListener("touchmove",u,ba),document.addEventListener("touchstart",p,ba),function(){wa=wa.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,ba),document.removeEventListener("touchmove",u,ba),document.removeEventListener("touchstart",p,ba)}},[]);var y=t.removeScrollBar,w=t.inert;return k.createElement(k.Fragment,null,w?k.createElement(i,{styles:i5(s)}):null,y?k.createElement(J_,{gapMode:t.gapMode}):null)}function l5(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const c5=__(kE,a5);var Uy=k.forwardRef(function(t,e){return k.createElement(Oh,ms({},t,{ref:e,sideCar:c5}))});Uy.classNames=Oh.classNames;var u5=[" ","Enter","ArrowUp","ArrowDown"],d5=[" ","Enter"],Xc="Select",[Ph,Dh,f5]=sh(Xc),[rl]=Xr(Xc,[f5,mh]),Ih=mh(),[h5,Yi]=rl(Xc),[p5,m5]=rl(Xc),TE=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:a,defaultValue:c,onValueChange:u,dir:f,name:p,autoComplete:m,disabled:x,required:y,form:w}=t,b=Ih(e),[S,N]=k.useState(null),[E,M]=k.useState(null),[j,A]=k.useState(!1),P=yh(f),[O=!1,z]=ys({prop:r,defaultProp:s,onChange:i}),[U,Y]=ys({prop:a,defaultProp:c,onChange:u}),Q=k.useRef(null),X=S?w||!!S.closest("form"):!0,[le,W]=k.useState(new Set),ce=Array.from(le).map(se=>se.props.value).join(";");return d.jsx(ZI,{...b,children:d.jsxs(h5,{required:y,scope:e,trigger:S,onTriggerChange:N,valueNode:E,onValueNodeChange:M,valueNodeHasChildren:j,onValueNodeHasChildrenChange:A,contentId:gs(),value:U,onValueChange:Y,open:O,onOpenChange:z,dir:P,triggerPointerDownPosRef:Q,disabled:x,children:[d.jsx(Ph.Provider,{scope:e,children:d.jsx(p5,{scope:t.__scopeSelect,onNativeOptionAdd:k.useCallback(se=>{W(ie=>new Set(ie).add(se))},[]),onNativeOptionRemove:k.useCallback(se=>{W(ie=>{const H=new Set(ie);return H.delete(se),H})},[]),children:n})}),X?d.jsxs(XE,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:m,value:U,onChange:se=>Y(se.target.value),disabled:x,form:w,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(le)]},ce):null]})})};TE.displayName=Xc;var ME="SelectTrigger",jE=k.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=Ih(n),a=Yi(ME,n),c=a.disabled||r,u=nt(e,a.onTriggerChange),f=Dh(n),p=k.useRef("touch"),[m,x,y]=ZE(b=>{const S=f().filter(M=>!M.disabled),N=S.find(M=>M.value===a.value),E=eT(S,b,N);E!==void 0&&a.onValueChange(E.value)}),w=b=>{c||(a.onOpenChange(!0),y()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return d.jsx(tN,{asChild:!0,...i,children:d.jsx(Ie.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":YE(a.value)?"":void 0,...s,ref:u,onClick:Me(s.onClick,b=>
vendor: 14,847 bytes, line 59
59{b.currentTarget.focus(),p.current!=="mouse"&&w(b)}),onPointerDown:Me(s.onPointerDown,b=>{p.current=b.pointerType;const S=b.target;S.hasPointerCapture(b.pointerId)&&S.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(w(b),b.preventDefault())}),onKeyDown:Me(s.onKeyDown,b=>{const S=m.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&x(b.key),!(S&&b.key===" ")&&u5.includes(b.key)&&(w(),b.preventDefault())})})})});jE.displayName=ME;var AE="SelectValue",RE=k.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:a="",...c}=t,u=Yi(AE,n),{onValueNodeHasChildrenChange:f}=u,p=i!==void 0,m=nt(e,u.onValueNodeChange);return un(()=>{f(p)},[f,p]),d.jsx(Ie.span,{...c,ref:m,style:{pointerEvents:"none"},children:YE(u.value)?d.jsx(d.Fragment,{children:a}):i})});RE.displayName=AE;var g5="SelectIcon",OE=k.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return d.jsx(Ie.span,{"aria-hidden":!0,...s,ref:e,children:r||"â¼"})});OE.displayName=g5;var x5="SelectPortal",PE=t=>d.jsx(ih,{asChild:!0,...t});PE.displayName=x5;var Lo="SelectContent",DE=k.forwardRef((t,e)=>{const n=Yi(Lo,t.__scopeSelect),[r,s]=k.useState();if(un(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Kr.createPortal(d.jsx(IE,{scope:t.__scopeSelect,children:d.jsx(Ph.Slot,{scope:t.__scopeSelect,children:d.jsx("div",{children:t.children})})}),i):null}return d.jsx(LE,{...t,ref:e})});DE.displayName=Lo;var Vr=10,[IE,Xi]=rl(Lo),y5="SelectContentImpl",v5=Ia("SelectContent.RemoveScroll"),LE=k.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:a,side:c,sideOffset:u,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:x,collisionPadding:y,sticky:w,hideWhenDetached:b,avoidCollisions:S,...N}=t,E=Yi(Lo,n),[M,j]=k.useState(null),[A,P]=k.useState(null),O=nt(e,oe=>j(oe)),[z,U]=k.useState(null),[Y,Q]=k.useState(null),X=Dh(n),[le,W]=k.useState(!1),ce=k.useRef(!1);k.useEffect(()=>{if(M)return vE(M)},[M]),mE();const se=k.useCallback(oe=>{const[fe,...Te]=X().map(We=>We.ref.current),[ue]=Te.slice(-1),Fe=document.activeElement;for(const We of oe)if(We===Fe||(We?.scrollIntoView({block:"nearest"}),We===fe&&A&&(A.scrollTop=0),We===ue&&A&&(A.scrollTop=A.scrollHeight),We?.focus(),document.activeElement!==Fe))return},[X,A]),ie=k.useCallback(()=>se([z,M]),[se,z,M]);k.useEffect(()=>{le&&ie()},[le,ie]);const{onOpenChange:H,triggerPointerDownPosRef:J}=E;k.useEffect(()=>{if(M){let oe={x:0,y:0};const fe=ue=>{oe={x:Math.abs(Math.round(ue.pageX)-(J.current?.x??0)),y:Math.abs(Math.round(ue.pageY)-(J.current?.y??0))}},Te=ue=>{oe.x<=10&&oe.y<=10?ue.preventDefault():M.contains(ue.target)||H(!1),document.removeEventListener("pointermove",fe),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",Te,{capture:!0})}}},[M,H,J]),k.useEffect(()=>{const oe=()=>H(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[H]);const[ee,D]=ZE(oe=>{const fe=X().filter(Fe=>!Fe.disabled),Te=fe.find(Fe=>Fe.ref.current===document.activeElement),ue=eT(fe,oe,Te);ue&&setTimeout(()=>ue.ref.current.focus())}),V=k.useCallback((oe,fe,Te)=>{const ue=!ce.current&&!Te;(E.value!==void 0&&E.value===fe||ue)&&(U(oe),ue&&(ce.current=!0))},[E.value]),ae=k.useCallback(()=>M?.focus(),[M]),we=k.useCallback((oe,fe,Te)=>{const ue=!ce.current&&!Te;(E.value!==void 0&&E.value===fe||ue)&&Q(oe)},[E.value]),ge=r==="popper"?fx:_E,Se=ge===fx?{side:c,sideOffset:u,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:x,collisionPadding:y,sticky:w,hideWhenDetached:b,avoidCollisions:S}:{};return d.jsx(IE,{scope:n,content:M,viewport:A,onViewportChange:P,itemRefCallback:V,selectedItem:z,onItemLeave:ae,itemTextRefCallback:we,focusSelectedItem:ie,selectedItemText:Y,position:r,isPositioned:le,searchRef:ee,children:d.jsx(Uy,{as:v5,allowPinchZoom:!0,children:d.jsx(Vy,{asChild:!0,trapped:E.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Me(s,oe=>{E.trigger?.focus({preventScroll:!0}),oe.preventDefault()}),children:d.jsx(Vc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:d.jsx(ge,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:oe=>oe.preventDefault(),...N,...Se,onPlaced:()=>W(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Me(N.onKeyDown,oe=>{const fe=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!fe&&oe.key.length===1&&D(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let ue=X().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const Fe=oe.target,We=ue.indexOf(Fe);ue=ue.slice(We+1)}setTimeout(()=>se(ue)),oe.preventDefault()}})})})})})})});LE.displayName=y5;var b5="SelectItemAlignedPosition",_E=k.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=Yi(Lo,n),a=Xi(Lo,n),[c,u]=k.useState(null),[f,p]=k.useState(null),m=nt(e,O=>p(O)),x=Dh(n),y=k.useRef(!1),w=k.useRef(!0),{viewport:b,selectedItem:S,selectedItemText:N,focusSelectedItem:E}=a,M=k.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&f&&b&&S&&N){const O=i.trigger.getBoundingClientRect(),z=f.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),Y=N.getBoundingClientRect();if(i.dir!=="rtl"){const Fe=Y.left-z.left,We=U.left-Fe,Xe=O.left-We,ot=O.width+Xe,Mt=Math.max(ot,z.width),nn=window.innerWidth-Vr,In=Cw(We,[Vr,Math.max(Vr,nn-Mt)]);c.style.minWidth=ot+"px",c.style.left=In+"px"}else{const Fe=z.right-Y.right,We=window.innerWidth-U.right-Fe,Xe=window.innerWidth-O.right-We,ot=O.width+Xe,Mt=Math.max(ot,z.width),nn=window.innerWidth-Vr,In=Cw(We,[Vr,Math.max(Vr,nn-Mt)]);c.style.minWidth=ot+"px",c.style.right=In+"px"}const Q=x(),X=window.innerHeight-Vr*2,le=b.scrollHeight,W=window.getComputedStyle(f),ce=parseInt(W.borderTopWidth,10),se=parseInt(W.paddingTop,10),ie=parseInt(W.borderBottomWidth,10),H=parseInt(W.paddingBottom,10),J=ce+se+le+H+ie,ee=Math.min(S.offsetHeight*5,J),D=window.getComputedStyle(b),V=parseInt(D.paddingTop,10),ae=parseInt(D.paddingBottom,10),we=O.top+O.height/2-Vr,ge=X-we,Se=S.offsetHeight/2,oe=S.offsetTop+Se,fe=ce+se+oe,Te=J-fe;if(fe<=we){const Fe=Q.length>0&&S===Q[Q.length-1].ref.current;c.style.bottom="0px";const We=f.clientHeight-b.offsetTop-b.offsetHeight,Xe=Math.max(ge,Se+(Fe?ae:0)+We+ie),ot=fe+Xe;c.style.height=ot+"px"}else{const Fe=Q.length>0&&S===Q[0].ref.current;c.style.top="0px";const Xe=Math.max(we,ce+b.offsetTop+(Fe?V:0)+Se)+Te;c.style.height=Xe+"px",b.scrollTop=fe-we+b.offsetTop}c.style.margin=`${Vr}px 0`,c.style.minHeight=ee+"px",c.style.maxHeight=X+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[x,i.trigger,i.valueNode,c,f,b,S,N,i.dir,r]);un(()=>M(),[M]);const[j,A]=k.useState();un(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const P=k.useCallback(O=>{O&&w.current===!0&&(M(),E?.(),w.current=!1)},[M,E]);return d.jsx(k5,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:P,children:d.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:d.jsx(Ie.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_E.displayName=b5;var w5="SelectPopperPosition",fx=k.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Vr,...i}=t,a=Ih(n);return d.jsx(nN,{...a,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fx.displayName=w5;var[k5,Wy]=rl(Lo,{}),hx="SelectViewport",zE=k.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=Xi(hx,n),a=Wy(hx,n),c=nt(e,i.onViewportChange),u=k.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(Ph.Slot,{scope:n,children:d.jsx(Ie.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Me(s.onScroll,f=>{const p=f.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:x}=a;if(x?.current&&m){const y=Math.abs(u.current-p.scrollTop);if(y>0){const w=window.innerHeight-Vr*2,b=parseFloat(m.style.minHeight),S=parseFloat(m.style.height),N=Math.max(b,S);if(N<w){const E=N+y,M=Math.min(w,E),j=E-M;m.style.height=M+"px",m.style.bottom==="0px"&&(p.scrollTop=j>0?j:0,m.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});zE.displayName=hx;var FE="SelectGroup",[S5,C5]=rl(FE),N5=k.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=gs();return d.jsx(S5,{scope:n,id:s,children:d.jsx(Ie.div,{role:"group","aria-labelledby":s,...r,ref:e})})});N5.displayName=FE;var $E="SelectLabel",BE=k.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=C5($E,n);return d.jsx(Ie.div,{id:s.id,...r,ref:e})});BE.displayName=$E;var df="SelectItem",[E5,HE]=rl(df),VE=k.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...a}=t,c=Yi(df,n),u=Xi(df,n),f=c.value===r,[p,m]=k.useState(i??""),[x,y]=k.useState(!1),w=nt(e,E=>u.itemRefCallback?.(E,r,s)),b=gs(),S=k.useRef("touch"),N=()=>{s||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(E5,{scope:n,value:r,disabled:s,textId:b,isSelected:f,onItemTextChange:k.useCallback(E=>{m(M=>M||(E?.textContent??"").trim())},[]),children:d.jsx(Ph.ItemSlot,{scope:n,value:r,disabled:s,textValue:p,children:d.jsx(Ie.div,{role:"option","aria-labelledby":b,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:w,onFocus:Me(a.onFocus,()=>y(!0)),onBlur:Me(a.onBlur,()=>y(!1)),onClick:Me(a.onClick,()=>{S.current!=="mouse"&&N()}),onPointerUp:Me(a.onPointerUp,()=>{S.current==="mouse"&&N()}),onPointerDown:Me(a.onPointerDown,E=>{S.current=E.pointerType}),onPointerMove:Me(a.onPointerMove,E=>{S.current=E.pointerType,s?u.onItemLeave?.():S.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Me(a.onPointerLeave,E=>{E.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Me(a.onKeyDown,E=>{u.searchRef?.current!==""&&E.key===" "||(d5.includes(E.key)&&N(),E.key===" "&&E.preventDefault())})})})})});VE.displayName=df;var tc="SelectItemText",UE=k.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,a=Yi(tc,n),c=Xi(tc,n),u=HE(tc,n),f=m5(tc,n),[p,m]=k.useState(null),x=nt(e,N=>m(N),u.onItemTextChange,N=>c.itemTextRefCallback?.(N,u.value,u.disabled)),y=p?.textContent,w=k.useMemo(()=>d.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value),[u.disabled,u.value,y]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=f;return un(()=>(b(w),()=>S(w)),[b,S,w]),d.jsxs(d.Fragment,{children:[d.jsx(Ie.span,{id:u.textId,...i,ref:x}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Kr.createPortal(i.children,a.valueNode):null]})});UE.displayName=tc;var WE="SelectItemIndicator",KE=k.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return HE(WE,n).isSelected?d.jsx(Ie.span,{"aria-hidden":!0,...r,ref:e}):null});KE.displayName=WE;var px="SelectScrollUpButton",qE=k.forwardRef((t,e)=>{const n=Xi(px,t.__scopeSelect),r=Wy(px,t.__scopeSelect),[s,i]=k.useState(!1),a=nt(e,r.onScrollButtonChange);return un(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=u.scrollTop>0;i(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?d.jsx(QE,{...t,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});qE.displayName=px;var mx="SelectScrollDownButton",GE=k.forwardRef((t,e)=>{const n=Xi(mx,t.__scopeSelect),r=Wy(mx,t.__scopeSelect),[s,i]=k.useState(!1),a=nt(e,r.onScrollButtonChange);return un(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<f;i(p)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?d.jsx(QE,{...t,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});GE.displayName=mx;var QE=k.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=Xi("SelectScrollButton",n),a=k.useRef(null),c=Dh(n),u=k.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return k.useEffect(()=>()=>u(),[u]),un(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),d.jsx(Ie.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:Me(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Me(s.onPointerMove,()=>{i.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Me(s.onPointerLeave,()=>{u()})})}),T5="SelectSeparator",JE=k.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return d.jsx(Ie.div,{"aria-hidden":!0,...r,ref:e})});JE.displayName=T5;var gx="SelectArrow",M5=k.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Ih(n),i=Yi(gx,n),a=Xi(gx,n);return i.open&&a.position==="popper"?d.jsx(rN,{...s,...r,ref:e}):null});M5.displayName=gx;function YE(t){return t===""||t===void 0}var XE=k.forwardRef((t,e)=>{const{value:n,...r}=t,s=k.useRef(null),i=nt(e,s),a=xE(n);return k.useEffect(()=>{const c=s.current,u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&p){const m=new Event("change",{bubbles:!0});p.call(c,n),c.dispatchEvent(m)}},[a,n]),d.jsx(Uc,{asChild:!0,children:d.jsx("select",{...r,ref:i,defaultValue:n})})});XE.displayName="BubbleSelect";function ZE(t){const e=Wn(t),n=k.useRef(""),r=k.useRef(0),s=k.useCallback(a=>
59{const c=n.current+a;e(c),(function u(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[e]),i=k.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function eT(t,e,n){const s=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let a=j5(t,Math.max(i,0));s.length===1&&(a=a.filter(f=>f!==n));const u=a.find(f=>f.textValue.toLowerCase().startsWith(s.toLowerCase()));return u!==n?u:void 0}function j5(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var A5=TE,tT=jE,R5=RE,O5=OE,P5=PE,nT=DE,D5=zE,rT=BE,sT=VE,I5=UE,L5=KE,iT=qE,oT=GE,aT=JE;const Wi=A5,Ki=R5,Ys=k.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(tT,{ref:r,className:Ue("flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,d.jsx(O5,{asChild:!0,children:d.jsx(Wc,{className:"h-4 w-4 opacity-50"})})]}));Ys.displayName=tT.displayName;const lT=k.forwardRef(({className:t,...e},n)=>d.jsx(iT,{ref:n,className:Ue("flex cursor-default items-center justify-center py-1",t),...e,children:d.jsx(IP,{className:"h-4 w-4"})}));lT.displayName=iT.displayName;const cT=k.forwardRef(({className:t,...e},n)=>d.jsx(oT,{ref:n,className:Ue("flex cursor-default items-center justify-center py-1",t),...e,children:d.jsx(Wc,{className:"h-4 w-4"})}));cT.displayName=oT.displayName;const Xs=k.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>d.jsx(P5,{children:d.jsxs(nT,{ref:s,className:Ue("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[d.jsx(lT,{}),d.jsx(D5,{className:Ue("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),d.jsx(cT,{})]})}));Xs.displayName=nT.displayName;const _5=k.forwardRef(({className:t,...e},n)=>d.jsx(rT,{ref:n,className:Ue("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));_5.displayName=rT.displayName;const tt=k.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(sT,{ref:r,className:Ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(L5,{children:d.jsx(Vo,{className:"h-4 w-4"})})}),d.jsx(I5,{children:e})]}));tt.displayName=sT.displayName;const z5=k.forwardRef(({className:t,...e},n)=>d.jsx(aT,{ref:n,className:Ue("-mx-1 my-1 h-px bg-muted",t),...e}));z5.displayName=aT.displayName;var Ky="Switch",[F5]=Xr(Ky),[$5,B5]=F5(Ky),uT=k.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:a,disabled:c,value:u="on",onCheckedChange:f,form:p,...m}=t,[x,y]=k.useState(null),w=nt(e,M=>y(M)),b=k.useRef(!1),S=x?p||!!x.closest("form"):!0,[N=!1,E]=ys({prop:s,defaultProp:i,onChange:f});return d.jsxs($5,{scope:n,checked:N,disabled:c,children:[d.jsx(Ie.button,{type:"button",role:"switch","aria-checked":N,"aria-required":a,"data-state":hT(N),"data-disabled":c?"":void 0,disabled:c,value:u,...m,ref:w,onClick:Me(t.onClick,M=>{E(j=>!j),S&&(b.current=M.isPropagationStopped(),b.current||M.stopPropagation())})}),S&&d.jsx(H5,{control:x,bubbles:!b.current,name:r,value:u,checked:N,required:a,disabled:c,form:p,style:{transform:"translateX(-100%)"}})]})});uT.displayName=Ky;var dT="SwitchThumb",fT=k.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=B5(dT,n);return d.jsx(Ie.span,{"data-state":hT(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});fT.displayName=dT;var H5=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=k.useRef(null),a=xE(n),c=WC(e);return k.useEffect(()=>{const u=i.current,f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(a!==n&&m){const x=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(x)}},[a,n,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function hT(t){return t?"checked":"unchecked"}var pT=uT,V5=fT;const jc=k.forwardRef(({className:t,...e},n)=>d.jsx(pT,{className:Ue("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:d.jsx(V5,{className:Ue("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
vendor: 1,919 bytes, line 59
59));jc.displayName=pT.displayName;var ug="rovingFocusGroup.onEntryFocus",U5={bubbles:!1,cancelable:!0},Lh="RovingFocusGroup",[xx,mT,W5]=sh(Lh),[K5,gT]=Xr(Lh,[W5]),[q5,G5]=K5(Lh),xT=k.forwardRef((t,e)=>d.jsx(xx.Provider,{scope:t.__scopeRovingFocusGroup,children:d.jsx(xx.Slot,{scope:t.__scopeRovingFocusGroup,children:d.jsx(Q5,{...t,ref:e})})}));xT.displayName=Lh;var Q5=k.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...m}=t,x=k.useRef(null),y=nt(e,x),w=yh(i),[b=null,S]=ys({prop:a,defaultProp:c,onChange:u}),[N,E]=k.useState(!1),M=Wn(f),j=mT(n),A=k.useRef(!1),[P,O]=k.useState(0);return k.useEffect(()=>{const z=x.current;if(z)return z.addEventListener(ug,M),()=>z.removeEventListener(ug,M)},[M]),d.jsx(q5,{scope:n,orientation:r,dir:w,loop:s,currentTabStopId:b,onItemFocus:k.useCallback(z=>S(z),[S]),onItemShiftTab:k.useCallback(()=>E(!0),[]),onFocusableItemAdd:k.useCallback(()=>O(z=>z+1),[]),onFocusableItemRemove:k.useCallback(()=>O(z=>z-1),[]),children:d.jsx(Ie.div,{tabIndex:N||P===0?-1:0,"data-orientation":r,...m,ref:y,style:{outline:"none",...t.style},onMouseDown:Me(t.onMouseDown,()=>{A.current=!0}),onFocus:Me(t.onFocus,z=>{const U=!A.current;if(z.target===z.currentTarget&&U&&!N){const Y=new CustomEvent(ug,U5);if(z.currentTarget.dispatchEvent(Y),!Y.defaultPrevented){const Q=j().filter(se=>se.focusable),X=Q.find(se=>se.active),le=Q.find(se=>se.id===b),ce=[X,le,...Q].filter(Boolean).map(se=>se.ref.current);bT(ce,p)}}A.current=!1}),onBlur:Me(t.onBlur,()=>E(!1))})})}),yT="RovingFocusGroupItem",vT=k.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...a}=t,c=gs(),u=i||c,f=G5(yT,n),p=f.currentTabStopId===u,m=mT(n),{onFocusableItemAdd:x,onFocusableItemRemove:y}=f;return k.useEffect(()=>{if(r)return x(),()=>y()}
vendor: 10,320 bytes, lines 59-63
59,[r,x,y]),d.jsx(xx.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:d.jsx(Ie.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...a,ref:e,onMouseDown:Me(t.onMouseDown,w=>{r?f.onItemFocus(u):w.preventDefault()}),onFocus:Me(t.onFocus,()=>f.onItemFocus(u)),onKeyDown:Me(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const b=X5(w,f.orientation,f.dir);if(b!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let N=m().filter(E=>E.focusable).map(E=>E.ref.current);if(b==="last")N.reverse();else if(b==="prev"||b==="next"){b==="prev"&&N.reverse();const E=N.indexOf(w.currentTarget);N=f.loop?Z5(N,E+1):N.slice(E+1)}setTimeout(()=>bT(N))}})})})});vT.displayName=yT;var J5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y5(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function X5(t,e,n){const r=Y5(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return J5[r]}function bT(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Z5(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var ez=xT,tz=vT,qy="Tabs",[nz]=Xr(qy,[gT]),wT=gT(),[rz,Gy]=nz(qy),kT=k.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:a="horizontal",dir:c,activationMode:u="automatic",...f}=t,p=yh(c),[m,x]=ys({prop:r,onChange:s,defaultProp:i});return d.jsx(rz,{scope:n,baseId:gs(),value:m,onValueChange:x,orientation:a,dir:p,activationMode:u,children:d.jsx(Ie.div,{dir:p,"data-orientation":a,...f,ref:e})})});kT.displayName=qy;var ST="TabsList",CT=k.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=Gy(ST,n),a=wT(n);return d.jsx(ez,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:d.jsx(Ie.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});CT.displayName=ST;var NT="TabsTrigger",ET=k.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,a=Gy(NT,n),c=wT(n),u=jT(a.baseId,r),f=AT(a.baseId,r),p=r===a.value;return d.jsx(tz,{asChild:!0,...c,focusable:!s,active:p,children:d.jsx(Ie.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:u,...i,ref:e,onMouseDown:Me(t.onMouseDown,m=>{!s&&m.button===0&&m.ctrlKey===!1?a.onValueChange(r):m.preventDefault()}),onKeyDown:Me(t.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(r)}),onFocus:Me(t.onFocus,()=>{const m=a.activationMode!=="manual";!p&&!s&&m&&a.onValueChange(r)})})})});ET.displayName=NT;var TT="TabsContent",MT=k.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...a}=t,c=Gy(TT,n),u=jT(c.baseId,r),f=AT(c.baseId,r),p=r===c.value,m=k.useRef(p);return k.useEffect(()=>{const x=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(x)},[]),d.jsx(Qi,{present:s||p,children:({present:x})=>d.jsx(Ie.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!x,id:f,tabIndex:0,...a,ref:e,style:{...t.style,animationDuration:m.current?"0s":void 0},children:x&&i})})});MT.displayName=TT;function jT(t,e){return`${t}-trigger-${e}`}function AT(t,e){return`${t}-content-${e}`}var sz=kT,RT=CT,OT=ET,PT=MT;const iz=sz,DT=k.forwardRef(({className:t,...e},n)=>d.jsx(RT,{ref:n,className:Ue("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));DT.displayName=RT.displayName;const us=k.forwardRef(({className:t,...e},n)=>d.jsx(OT,{ref:n,className:Ue("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));us.displayName=OT.displayName;const ds=k.forwardRef(({className:t,...e},n)=>d.jsx(PT,{ref:n,className:Ue("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));ds.displayName=PT.displayName;var Qy="Dialog",[IT]=Xr(Qy),[oz,Zr]=IT(Qy),LT=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,c=k.useRef(null),u=k.useRef(null),[f=!1,p]=ys({prop:r,defaultProp:s,onChange:i});return d.jsx(oz,{scope:e,triggerRef:c,contentRef:u,contentId:gs(),titleId:gs(),descriptionId:gs(),open:f,onOpenChange:p,onOpenToggle:k.useCallback(()=>p(m=>!m),[p]),modal:a,children:n})};LT.displayName=Qy;var _T="DialogTrigger",zT=k.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Zr(_T,n),i=nt(e,s.triggerRef);return d.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Xy(s.open),...r,ref:i,onClick:Me(t.onClick,s.onOpenToggle)})});zT.displayName=_T;var Jy="DialogPortal",[az,FT]=IT(Jy,{forceMount:void 0}),$T=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Zr(Jy,e);return d.jsx(az,{scope:e,forceMount:n,children:k.Children.map(r,a=>d.jsx(Qi,{present:n||i.open,children:d.jsx(ih,{asChild:!0,container:s,children:a})}))})};$T.displayName=Jy;var ff="DialogOverlay",BT=k.forwardRef((t,e)=>{const n=FT(ff,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Zr(ff,t.__scopeDialog);return i.modal?d.jsx(Qi,{present:r||i.open,children:d.jsx(cz,{...s,ref:e})}):null});BT.displayName=ff;var lz=Ia("DialogOverlay.RemoveScroll"),cz=k.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Zr(ff,n);return d.jsx(Uy,{as:lz,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(Ie.div,{"data-state":Xy(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),_o="DialogContent",HT=k.forwardRef((t,e)=>{const n=FT(_o,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Zr(_o,t.__scopeDialog);return d.jsx(Qi,{present:r||i.open,children:i.modal?d.jsx(uz,{...s,ref:e}):d.jsx(dz,{...s,ref:e})})});HT.displayName=_o;var uz=k.forwardRef((t,e)=>{const n=Zr(_o,t.__scopeDialog),r=k.useRef(null),s=nt(e,n.contentRef,r);return k.useEffect(()=>{const i=r.current;if(i)return vE(i)},[]),d.jsx(VT,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Me(t.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Me(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:Me(t.onFocusOutside,i=>i.preventDefault())})}),dz=k.forwardRef((t,e)=>{const n=Zr(_o,t.__scopeDialog),r=k.useRef(!1),s=k.useRef(!1);return d.jsx(VT,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),VT=k.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,c=Zr(_o,n),u=k.useRef(null),f=nt(e,u);return mE(),d.jsxs(d.Fragment,{children:[d.jsx(Vy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:d.jsx(Vc,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Xy(c.open),...a,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(fz,{titleId:c.titleId}),d.jsx(pz,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Yy="DialogTitle",UT=k.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Zr(Yy,n);return d.jsx(Ie.h2,{id:s.titleId,...r,ref:e})});UT.displayName=Yy;var WT="DialogDescription",KT=k.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Zr(WT,n);return d.jsx(Ie.p,{id:s.descriptionId,...r,ref:e})});KT.displayName=WT;var qT="DialogClose",GT=k.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Zr(qT,n);return d.jsx(Ie.button,{type:"button",...r,ref:e,onClick:Me(t.onClick,()=>s.onOpenChange(!1))})});GT.displayName=qT;function Xy(t){return t?"open":"closed"}var QT="DialogTitleWarning",[hU,JT]=FO(QT,{contentName:_o,titleName:Yy,docsSlug:"dialog"}),fz=({titleId:t})=>{const e=JT(QT),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 60 61If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 62 63For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return k.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},hz="DialogDescriptionWarning",pz=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${JT(hz).contentName}}.`;return k.useEffect(()=>{const s=t.current?.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},mz=LT,gz=zT,xz=$T,YT=BT,XT=HT,ZT=UT,e2=KT,yz=GT;const sl=mz,il=gz,vz=xz,t2=k.forwardRef(({className:t,...e},n)=>d.jsx(YT,{ref:n,className:Ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));t2.displayName=YT.displayName;const Wo=k.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(vz,{children:[d.jsx(t2,{}),d.jsxs(XT,{ref:r,className:Ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
63nded-lg",t),...n,children:[e,d.jsxs(yz,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(Uo,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Wo.displayName=XT.displayName;const Ko=({className:t,...e})=>d.jsx("div",{className:Ue("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Ko.displayName="DialogHeader";const qo=k.forwardRef(({className:t,...e},n)=>d.jsx(ZT,{ref:n,className:Ue("text-lg font-semibold leading-none tracking-tight",t),...e}));qo.displayName=ZT.displayName;const bz=k.forwardRef(({className:t,...e},n)=>d.jsx(e2,{ref:n,className:Ue("text-sm text-muted-foreground",t),...e}));bz.displayName=e2.displayName;function on(t){this.content=t}on.prototype={constructor:on,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,s=r.find(t),i=r.content.slice();return s==-1?i.push(n||t,e):(i[s+1]=e,n&&(i[s]=n)),new on(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new on(n)},addToStart:function(t,e){return new on([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new on(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),i=r.find(t);return s.splice(i==-1?s.length:i,0,e,n),new on(s)},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=on.from(t),t.size?new on(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=on.from(t),t.size?new on(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=on.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}};on.from=function(t){if(t instanceof on)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new on(e)};function n2(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),i=e.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){for(let a=0;s.text[a]==i.text[a];a++)n++;return n}if(s.content.size||i.content.size){let a=n2(s.content,i.content,n+1);if(a!=null)return a}n+=s.nodeSize}}function r2(t,e,n,r){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let a=t.child(--s),c=e.child(--i),u=a.nodeSize;if(a==c){n-=u,r-=u;continue}if(!a.sameMarkup(c))return{a:n,b:r};if(a.isText&&a.text!=c.text){let f=0,p=Math.min(a.text.length,c.text.length);for(;f<p&&a.text[a.text.length-f-1]==c.text[c.text.length-f-1];)f++,n--,r--;return{a:n,b:r}}if(a.content.size||c.content.size){let f=r2(a.content,c.content,n-1,r-1);if(f)return f}n-=u,r-=u}}class G{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,s=0,i){for(let a=0,c=0;c<n;a++){let u=this.content[a],f=c+u.nodeSize;if(f>e&&r(u,s+c,i||null,a)!==!1&&u.content.size){let p=c+1;u.nodesBetween(Math.max(0,e-p),Math.min(u.content.size,n-p),r,s+p)}c=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let i="",a=!0;return this.nodesBetween(e,n,(c,u)=>{let f=c.isText?c.text.slice(Math.max(e,u)-u,n-u):c.isLeaf?s?typeof s=="function"?s(c):s:c.type.spec.leafText?c.type.spec.leafText(c):"":"";c.isBlock&&(c.isLeaf&&f||c.isTextblock)&&r&&(a?a=!1:i+=r),i+=f},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new G(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let i=0,a=0;a<n;i++){let c=this.content[i],u=a+c.nodeSize;u>e&&((a<e||u>n)&&(c.isText?c=c.cut(Math.max(0,e-a),Math.min(c.text.length,n-a)):c=c.cut(Math.max(0,e-a-1),Math.min(c.content.size,n-a-1))),r.push(c),s+=c.nodeSize),a=u}return new G(r,s)}cutByIndex(e,n){return e==n?G.empty:e==0&&n==this.content.length?this:new G(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new G(s,i)}addToStart(e){return new G([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new G(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 s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return n2(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return r2(this,e,n,r)}findIndex(e){if(e==0)return Sd(0,e);if(e==this.size)return Sd(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=e)return i==e?Sd(n+1,i):Sd(n,r);r=i}}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 G.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new G(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return G.empty;let n,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(n||(n=e.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new G(n||e,r)}static from(e){if(!e)return G.empty;if(e instanceof G)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new G([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}G.empty=new G([],0);const dg={index:0,offset:0};
vendor: 4,163 bytes, line 63
63function Sd(t,e){return dg.index=t,dg.offset=e,dg}function hf(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(!hf(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!hf(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let it=class yx{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(i)}}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&&hf(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}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 yx.none;if(e instanceof yx)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};it.none=[];class pf extends Error{}class pe{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=i2(this.content,e+this.openStart,n);return r&&new pe(r,this.openStart,this.openEnd)}removeBetween(e,n){return new pe(s2(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 pe.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new pe(G.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new pe(e,r,s)}}pe.empty=new pe(G.empty,0,0);function s2(t,e,n){let{index:r,offset:s}=t.findIndex(e),i=t.maybeChild(r),{index:a,offset:c}=t.findIndex(n);if(s==e||i.isText){if(c!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(s2(i.content,e-s-1,n-s-1)))}function i2(t,e,n,r){let{index:s,offset:i}=t.findIndex(e),a=t.maybeChild(s);if(i==e||a.isText)return r&&!r.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=i2(a.content,e-i-1,n,a);return c&&t.replaceChild(s,a.copy(c))}function wz(t,e,n){if(n.openStart>t.depth)throw new pf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new pf("Inconsistent open depths");return o2(t,e,n,0)}function o2(t,e,n,r){let s=t.index(r),i=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let a=o2(t,e,n,r+1);return i.copy(i.content.replaceChild(s,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,c=a.content;return Eo(a,c.cut(0,t.parentOffset).append(n.content).append(c.cut(e.parentOffset)))}else{let{start:a,end:c}=kz(n,t);return Eo(i,l2(t,a,c,e,r))}else return Eo(i,mf(t,e,r))}function a2(t,e){if(!e.type.compatibleContent(t.type))throw new pf("Cannot join "+e.type.n
vendor: 9,478 bytes, line 63
63ame+" onto "+t.type.name)}function vx(t,e,n){let r=t.node(n);return a2(r,e.node(n)),r}function No(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 fc(t,e,n,r){let s=(e||t).node(n),i=0,a=e?e.index(n):s.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(No(t.nodeAfter,r),i++));for(let c=i;c<a;c++)No(s.child(c),r);e&&e.depth==n&&e.textOffset&&No(e.nodeBefore,r)}function Eo(t,e){return t.type.checkContent(e),t.copy(e)}function l2(t,e,n,r,s){let i=t.depth>s&&vx(t,e,s+1),a=r.depth>s&&vx(n,r,s+1),c=[];return fc(null,t,s,c),i&&a&&e.index(s)==n.index(s)?(a2(i,a),No(Eo(i,l2(t,e,n,r,s+1)),c)):(i&&No(Eo(i,mf(t,e,s+1)),c),fc(e,n,s,c),a&&No(Eo(a,mf(n,r,s+1)),c)),fc(r,null,s,c),new G(c)}function mf(t,e,n){let r=[];if(fc(null,t,n,r),t.depth>n){let s=vx(t,e,n+1);No(Eo(s,mf(t,e,n+1)),r)}return fc(e,null,n,r),new G(r)}function kz(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)s=e.node(i).copy(G.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class Ac{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],s=e.child(n);return r?e.child(n).cut(r):s}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],s=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return it.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let c=r;r=s,s=c}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!s||!i[a].isInSet(s.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].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 gf(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=[],s=0,i=n;for(let a=e;;){let{index:c,offset:u}=a.content.findIndex(i),f=i-u;if(r.push(a,c,s+u),!f||(a=a.child(c),a.isText))break;i=f-1,s+=u+1}return new Ac(n,r,i)}static resolveCached(e,n){let r=Iw.get(e);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else Iw.set(e,r=new Sz);let s=r.elts[r.i]=Ac.resolve(e,n);return r.i=(r.i+1)%Cz,s}}class Sz{constructor(){this.elts=[],this.i=0}}const Cz=12,Iw=new WeakMap;class gf{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 Nz=Object.create(null);let Ii=class bx{constructor(e,n,r,s=it.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||G.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,s=0){this.content.nodesBetween(e,n,r,s,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,s){return this.content.textBetween(e,n,r,s)}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&&hf(this.attrs,n||e.defaultAttrs||Nz)&&it.sameSet(this.marks,r||it.none)}copy(e=null){return e==this.content?this:new bx(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new bx(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 pe.empty;let s=this.resolve(e),i=this.resolve(n),a=r?0:s.sharedDepth(n),c=s.start(a),f=s.node(a).content.cut(s.pos-c,i.pos-c);return new pe(f,s.depth-a,i.depth-a)}replace(e,n,r){return wz(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+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 s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return Ac.resolveCached(this,e)}resolveNoCache(e){return Ac.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),c2(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=G.empty,s=0,i=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,s,i),c=a&&a.matchFragment(this.content,n);if(!c||!c.validEnd)return!1;for(let u=s;u<i;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=it.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!it.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let s=G.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Ii.prototype.text=void 0;class xf extends Ii{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):c2(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}
vendor: 12,519 bytes, lines 63-64
63mark(e){return e==this.marks?this:new xf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new xf(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 c2(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class zo{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Ez(e,n);if(r.next==null)return zo.empty;let s=u2(r);r.next&&r.err("Unexpected trailing text");let i=Pz(Oz(s));return Dz(i,r),i}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 s=this;for(let i=n;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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 s=[this];function i(a,c){let u=a.matchFragment(e,r);if(u&&(!n||u.validEnd))return G.from(c.map(f=>f.createAndFill()));for(let f=0;f<a.next.length;f++){let{type:p,next:m}=a.next[f];if(!(p.isText||p.hasRequiredAttrs())&&s.indexOf(m)==-1){s.push(m);let x=i(m,c.concat(p));if(x)return x}}return null}return i(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 s=r.shift(),i=s.match;if(i.matchType(e)){let a=[];for(let c=s;c.type;c=c.via)a.push(c.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:c,next:u}=i.next[a];!c.isLeaf&&!c.hasRequiredAttrs()&&!(c.name in n)&&(!s.type||u.validEnd)&&(r.push({match:c.contentMatch,type:c,via:s}),n[c.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 s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return i}).join(` 64`)}}zo.empty=new zo(!0);class Ez{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 u2(t){let e=[];do e.push(Tz(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Tz(t){let e=[];do e.push(Mz(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Mz(t){let e=Rz(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=jz(t,e);else break;return e}function Lw(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function jz(t,e){let n=Lw(t),r=n;return t.eat(",")&&(t.next!="}"?r=Lw(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Az(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let i in n){let a=n[i];a.isInGroup(e)&&s.push(a)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function Rz(t){if(t.eat("(")){let e=u2(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=Az(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 Oz(t){let e=[[]];return s(i(t,0),n()),e;function n(){return e.push([])-1}function r(a,c,u){let f={term:u,to:c};return e[a].push(f),f}function s(a,c){a.forEach(u=>u.to=c)}function i(a,c){if(a.type=="choice")return a.exprs.reduce((u,f)=>u.concat(i(f,c)),[]);if(a.type=="seq")for(let u=0;;u++){let f=i(a.exprs[u],c);if(u==a.exprs.length-1)return f;s(f,c=n())}else if(a.type=="star"){let u=n();return r(c,u),s(i(a.expr,u),u),[r(u)]}else if(a.type=="plus"){let u=n();return s(i(a.expr,c),u),s(i(a.expr,u),u),[r(u)]}else{if(a.type=="opt")return[r(c)].concat(i(a.expr,c));if(a.type=="range"){let u=c;for(let f=0;f<a.min;f++){let p=n();s(i(a.expr,u),p),u=p}if(a.max==-1)s(i(a.expr,u),u);else for(let f=a.min;f<a.max;f++){let p=n();r(u,p),s(i(a.expr,u),p),u=p}return[r(u)]}else{if(a.type=="name")return[r(c,void 0,a.value)];throw new Error("Unknown expr type")}}}}function d2(t,e){return e-t}function _w(t,e){let n=[];return r(e),n.sort(d2);function r(s){let i=t[s];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(s);for(let a=0;a<i.length;a++){let{term:c,to:u}=i[a];!c&&n.indexOf(u)==-1&&r(u)}}}function Pz(t){let e=Object.create(null);return n(_w(t,0));function n(r){let s=[];r.forEach(a=>{t[a].forEach(({term:c,to:u})=>{if(!c)return;let f;for(let p=0;p<s.length;p++)s[p][0]==c&&(f=s[p][1]);_w(t,u).forEach(p=>{f||s.push([c,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let i=e[r.join(",")]=new zo(r.indexOf(t.length-1)>-1);for(let a=0;a<s.length;a++){let c=s[a][1].sort(d2);i.next.push({type:s[a][0],next:e[c.join(",")]||n(c)})}return i}}function Dz(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],i=!s.validEnd,a=[];for(let c=0;c<s.next.length;c++){let{type:u,next:f}=s.next[c];a.push(u.name),i&&!(u.isText||u.hasRequiredAttrs())&&(i=!1),r.indexOf(f)==-1&&r.push(f)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function f2(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 h2(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let i=t[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function p2(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let i=t[s];i.validate&&i.validate(e[s])}}function m2(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Lz(t,r,e[r]);return n}let zw=class g2{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=m2(e,r.attrs),this.defaultAttrs=f2(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==zo.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:h2(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ii(this,this.computeAttrs(e),G.from(n),it.setFrom(r))}createChecked(e=null,n,r){return n=G.from(n),this.checkContent(n),new Ii(this,this.computeAttrs(e),n,it.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=G.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let s=this.contentMatch.matchFragment(n),i=s&&s.fillBefore(G.empty,!0);return i?new Ii(this,e,n.append(i),it.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){p2(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:it.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,a)=>r[i]=new g2(i,n,a));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Iz(t,e,n){let r=n.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class Lz{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Iz(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class _h{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=m2(e,s.attrs),this.excluded=null;let i=f2(this.attrs);this.instance=i?new it(this,i):null}create(e=null){return!e&&this.instance?this.instance:new it(this,h2(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((i,a)=>r[i]=new _h(i,s++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){p2(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class x2{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=on.from(e.nodes),n.marks=on.from(e.marks||{}),this.nodes=zw.compile(this.spec.nodes,this),this.marks=_h.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],a=i.spec.content||"",c=i.spec.marks;if(i.contentMatch=r[a]||(r[a]=zo.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=c=="_"?null:c?Fw(this,c.split(" ")):c==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:Fw(this,a.split(" "))}this.nodeFromJSON=s=>Ii.fromJSON(this,s),this.markFromJSON=s=>it.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof zw){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,s)}text(e,n){let r=this.nodes.text;return new xf(r,r.defaultAttrs,e,it.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Fw(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],i=t.marks[s],a=i;if(i)n.push(i);else for(let c in t.marks){let u=t.marks[c];(s=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(s)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function _z(t){return t.tag!=null}function zz(t){return t.style!=null}class Li{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];
vendor: 9,903 bytes, lines 64-66
64n.forEach(s=>{if(_z(s))this.tags.push(s);else if(zz(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Bw(this,n,!1);return r.addAll(e,it.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Bw(this,n,!0);return r.addAll(e,it.none,n.from,n.to),pe.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Bz(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(e);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(e,n,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let a=this.styles[i],c=a.style;if(!(c.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||c.length>e.length&&(c.charCodeAt(e.length)!=61||c.slice(e.length+1)!=n))){if(a.getAttrs){let u=a.getAttrs(n);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(e){let n=[];function r(s){let i=s.priority==null?50:s.priority,a=0;for(;a<n.length;a++){let c=n[a];if((c.priority==null?50:c.priority)<i)break}n.splice(a,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(a=>{r(a=Hw(a)),a.mark||a.ignore||a.clearMark||(a.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(a=>{r(a=Hw(a)),a.node||a.ignore||a.mark||(a.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Li(e,Li.schemaRules(e)))}}const y2={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},Fz={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},v2={ol:!0,ul:!0},Rc=1,wx=2,hc=4;function $w(t,e,n){return e!=null?(e?Rc:0)|(e==="full"?wx:0):t&&t.whitespace=="pre"?Rc|wx:n&~hc}class Cd{constructor(e,n,r,s,i,a){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=a,this.content=[],this.activeMarks=it.none,this.match=i||(a&hc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(G.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rc)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let n=G.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(G.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!y2.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Bw{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,i,a=$w(null,n.preserveWhitespace,0)|(r?hc:0);s?i=new Cd(s.type,s.attrs,it.none,!0,n.topMatch||s.type.contentMatch,a):r?i=new Cd(null,null,it.none,!0,null,a):i=new Cd(e.schema.topNodeType,null,it.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,s=this.top,i=s.options&wx?"full":this.localPreserveWS||(s.options&Rc)>0,{schema:a}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` 65`);else if(a.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(a.linebreakReplacement.create())){let c=r.split(/\r?\n|\r/);for(let u=0;u<c.length;u++)u&&this.insertNode(a.linebreakReplacement.create(),n,!0),c[u]&&this.insertNode(a.text(c[u]),n,!/\S/.test(c[u]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let c=s.content[s.content.length-1],u=e.previousSibling;(!c||u&&u.nodeName=="BR"||c.isText&&/[ \t\r\n\u000c]$/.test(c.text))&&(r=r.slice(1))}r&&this.insertNode(a.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),c;v2.hasOwnProperty(a)&&this.parser.normalizeLists&&$z(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(c=this.parser.matchTag(e,this,r));e:if(u?u.ignore:Fz.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!u||u.skip||u.closeParent){u&&u.closeParent?this.open=Math.max(0,this.open-1):u&&u.skip.nodeType&&(e=u.skip);let f,p=this.needsBlock;if(y2.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),f=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let m=u&&u.skip?n:this.readStyles(e,n);m&&this.addAll(e,m),f&&this.sync(i),this.needsBlock=p}else{let f=this.readStyles(e,n);f&&this.addElementByRule(e,u,f,u.consuming===!1?c:void 0)}this.localPreserveWS=s}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` 66`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],a=r.getPropertyValue(i);if(a)for(let c=void 0;;){let u=this.parser.matchStyle(i,a,this,c);if(!u)break;if(u.ignore)return null;if(u.clearMark?n=n.filter(f=>!u.clearMark(f)):n=n.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)c=u;else break}}return n}addElementByRule(e,n,r,s){let i,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let u=this.enter(a,n.attrs||null,r,n.preserveWhitespace);u&&(i=!0,r=u)}else{let u=this.parser.schema.marks[n.mark];r=r.concat(u.create(n.attrs))}let c=this.top;if(a&&a.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(u=>this.insertNode(u,r,!1));else{let u=e;typeof n.contentElement=="string"?u=e.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(e):n.contentElement&&(u=n.contentElement),this.findAround(e,u,!0),this.addAll(u,r),this.findAround(e,u,!1)}i&&this.sync(c)&&this.open--}addAll(e,n,r,s){let i=r||0;for(let a=r?e.childNodes[r]:e.firstChild,c=s==null?null:e.childNodes[s];a!=c;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,n);this.findAtPoint(e,i)}findPlace(e,n,r){let s,i;for(let a=this.open,c=0;a>=0;a--){let u=this.nodes[a],f=u.findWrapping(e);if(f&&(!s||s.length>f.length+c)&&(s=f,i=u,!f.length))break;if(u.solid){if(r)break;c+=2}}if(!s)return null;this.sync(i);for(let a=0;a<s.length;a++)n=this.enterInner(s[a],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let a=it.none;for(let c of s.concat(e.marks))(i.type?i.type.allowsMarkType(c.type):Vw(c.type,e.type))&&(a=c.addToSet(a));return i.content.push(e.mark(a)),!0}return!1}enter(e,n,r,s){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,s)),i}enterInner(e,n,r,s=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let c=$w(e,i,a.options);a.options&hc&&a.content.length==0&&(c|=hc);let u=it.none;return r=r.filter(f=>(a.type?a.type.allowsMarkType(f.type):Vw(f.type,e))?(u=f.addToSet(u),!1):!0),this.nodes.push(new Cd(e,n,u,s,null,c)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Rc)}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 s=r.length-1;s>=0;s--)e+=r[s].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 s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].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,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),a=(c,u)=>{for(;c>=0;c--){let f=n[c];if(f==""){if(c==n.length-1||c==0)continue;for(;u>=i;
vendor: 10,125 bytes, line 66
66u--)if(a(c-1,u))return!0;return!1}else{let p=u>0||u==0&&s?this.nodes[u].type:r&&u>=i?r.node(u-i).type:null;if(!p||p.name!=f&&!p.isInGroup(f))return!1;u--}}return!0};return a(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}}}function $z(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&v2.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Bz(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Hw(t){let e={};for(let n in t)e[n]=t[n];return e}function Vw(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let i=[],a=c=>{i.push(c);for(let u=0;u<c.edgeCount;u++){let{type:f,next:p}=c.edge(u);if(f==e||i.indexOf(p)<0&&a(p))return!0}};if(a(s.contentMatch))return!0}}class Go{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=fg(n).createDocumentFragment());let s=r,i=[];return e.forEach(a=>{if(i.length||a.marks.length){let c=0,u=0;for(;c<i.length&&u<a.marks.length;){let f=a.marks[u];if(!this.marks[f.type.name]){u++;continue}if(!f.eq(i[c][0])||f.type.spec.spanning===!1)break;c++,u++}for(;c<i.length;)s=i.pop()[1];for(;u<a.marks.length;){let f=a.marks[u++],p=this.serializeMark(f,a.isInline,n);p&&(i.push([f,s]),s.appendChild(p.dom),s=p.contentDOM||p.dom)}}s.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:s}=Ud(fg(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&Ud(fg(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return Ud(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Go(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Uw(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Uw(e.marks)}}function Uw(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function fg(t){return t.document||window.document}const Ww=new WeakMap;function Hz(t){let e=Ww.get(t);return e===void 0&&Ww.set(t,e=Vz(t)),e}function Vz(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function Ud(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Hz(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=s.indexOf(" ");a>0&&(n=s.slice(0,a),s=s.slice(a+1));let c,u=n?t.createElementNS(n,s):t.createElement(s),f=e[1],p=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){p=2;for(let m in f)if(f[m]!=null){let x=m.indexOf(" ");x>0?u.setAttributeNS(m.slice(0,x),m.slice(x+1),f[m]):m=="style"&&u.style?u.style.cssText=f[m]:u.setAttribute(m,f[m])}}for(let m=p;m<e.length;m++){let x=e[m];if(x===0){if(m<e.length-1||m>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:y,contentDOM:w}=Ud(t,x,n,r);if(u.appendChild(y),w){if(c)throw new RangeError("Multiple content holes");c=w}}}return{dom:u,contentDOM:c}}const b2=65535,w2=Math.pow(2,16);function Uz(t,e){return t+e*w2}function Kw(t){return t&b2}function Wz(t){return(t-(t&b2))/w2}const k2=1,S2=2,Wd=4,C2=8;class kx{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&C2)>0}get deletedBefore(){return(this.delInfo&(k2|Wd))>0}get deletedAfter(){return(this.delInfo&(S2|Wd))>0}get deletedAcross(){return(this.delInfo&Wd)>0}}class sr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&sr.empty)return sr.empty}recover(e){let n=0,r=Kw(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+Wz(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 s=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?s:0);if(u>e)break;let f=this.ranges[c+i],p=this.ranges[c+a],m=u+f;if(e<=m){let x=f?e==u?-1:e==m?1:n:n,y=u+s+(x<0?0:p);if(r)return y;let w=e==(n<0?u:m)?null:Uz(c/3,e-u),b=e==u?S2:e==m?k2:Wd;return(n<0?e!=u:e!=m)&&(b|=C2),new kx(y,b,w)}s+=p-f}return r?e+s:new kx(e+s,0,null)}touches(e,n){let r=0,s=Kw(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?r:0);if(u>e)break;let f=this.ranges[c+i],p=u+f;if(e<=p&&c==s*3)return!0;r+=this.ranges[c+a]-f}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let a=this.ranges[s],c=a-(this.inverted?i:0),u=a+(this.inverted?0:i),f=this.ranges[s+n],p=this.ranges[s+r];e(c,c+f,u,u+p),i+=p-f}}invert(){return new sr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?sr.empty:new sr(e<0?[0,-e,0]:[0,0,e])}}sr.empty=new sr([]);class Oc{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Oc(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s: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 s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new Oc;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 s=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],c=a.mapResult(e,n);if(c.recover!=null){let u=this.getMirror(i);if(u!=null&&u>i&&u<this.to){i=u,e=this._maps[u].recover(c.recover);continue}}s|=c.delInfo,e=c.pos}return r?e:new kx(e,s,null)}}const hg=Object.create(null);class Sn{getMap(){return sr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=hg[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 hg)throw new RangeError("Duplicate use of step JSON ID "+e);return hg[e]=n,n.prototype.jsonID=e,n}}class Dt{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Dt(e,null)}static fail(e){return new Dt(null,e)}static fromReplace(e,n,r,s){try{return Dt.ok(e.replace(n,r,s))}catch(i){if(i instanceof pf)return Dt.fail(i.message);throw i}}}function Zy(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(Zy(i.content,e,i))),i.isInline&&(i=e(i,n,s)),r.push(i)}return G.fromArray(r)}class Oi extends Sn{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),s=r.node(r.sharedDepth(this.to)),i=new pe(Zy(n.content,(a,c)=>!a.isAtom||!c.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),s),n.openStart,n.openEnd);return Dt.fromReplace(e,this.from,this.to,i)}invert(){return new qr(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 Oi(n.pos,r.pos,this.mark)}merge(e){return e instanceof Oi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Oi(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 Oi(n.from,n.to,e.markFromJSON(n.mark))}}Sn.jsonID("addMark",Oi);class qr extends Sn{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 pe(Zy(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Dt.fromReplace(e,this.from,this.to,r)}invert(){return new Oi(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 qr(n.pos,r.pos,this.mark)}merge(e){return e instanceof qr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new qr(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 qr(n.from,n.to,e.markFromJSON(n.mark))}}Sn.jsonID("removeMark",qr);class Pi extends Sn{constructor(e,n){super(),this.pos=e,this.mark=n}
vendor: 5,284 bytes, line 66
66apply(e){let n=e.nodeAt(this.pos);if(!n)return Dt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Dt.fromReplace(e,this.pos,this.pos+1,new pe(G.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 s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new Pi(this.pos,n.marks[s]);return new Pi(this.pos,this.mark)}}return new Fo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Pi(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 Pi(n.pos,e.markFromJSON(n.mark))}}Sn.jsonID("addNodeMark",Pi);class Fo extends Sn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Dt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Dt.fromReplace(e,this.pos,this.pos+1,new pe(G.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Pi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Fo(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 Fo(n.pos,e.markFromJSON(n.mark))}}Sn.jsonID("removeNodeMark",Fo);class Zt extends Sn{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&Sx(e,this.from,this.to)?Dt.fail("Structure replace would overwrite content"):Dt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new sr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Zt(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 Zt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Zt)||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?pe.empty:new pe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Zt(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?pe.empty:new pe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Zt(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 Zt(n.from,n.to,pe.fromJSON(e,n.slice),!!n.structure)}}Sn.jsonID("replace",Zt);class en extends Sn{constructor(e,n,r,s,i,a,c=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=a,this.structure=c}apply(e){if(this.structure&&(Sx(e,this.from,this.gapFrom)||Sx(e,this.gapTo,this.to)))return Dt.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Dt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Dt.fromReplace(e,this.from,this.to,r):Dt.fail("Content does not fit in gap")}getMap(){return new sr([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 en(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),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new en(n.pos,r.pos,s,i,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 en(n.from,n.to,n.gapFrom,n.gapTo,pe.fromJSON(e,n.slice),n.insert,!!n.structure)}}Sn.jsonID("replaceAround",en);function Sx(t,e,n){let r=t.resolve(e),s=n-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,s--}}return!1}function Kz(t,e,n,r){let s=[],i=[],a,c;t.doc.nodesBetween(e,n,(u,f,p)=>
vendor: 7,947 bytes, lines 66-67
66{if(!u.isInline)return;let m=u.marks;if(!r.isInSet(m)&&p.type.allowsMarkType(r.type)){let x=Math.max(f,e),y=Math.min(f+u.nodeSize,n),w=r.addToSet(m);for(let b=0;b<m.length;b++)m[b].isInSet(w)||(a&&a.to==x&&a.mark.eq(m[b])?a.to=y:s.push(a=new qr(x,y,m[b])));c&&c.to==x?c.to=y:i.push(c=new Oi(x,y,r))}}),s.forEach(u=>t.step(u)),i.forEach(u=>t.step(u))}function qz(t,e,n,r){let s=[],i=0;t.doc.nodesBetween(e,n,(a,c)=>{if(!a.isInline)return;i++;let u=null;if(r instanceof _h){let f=a.marks,p;for(;p=r.isInSet(f);)(u||(u=[])).push(p),f=p.removeFromSet(f)}else r?r.isInSet(a.marks)&&(u=[r]):u=a.marks;if(u&&u.length){let f=Math.min(c+a.nodeSize,n);for(let p=0;p<u.length;p++){let m=u[p],x;for(let y=0;y<s.length;y++){let w=s[y];w.step==i-1&&m.eq(s[y].style)&&(x=w)}x?(x.to=f,x.step=i):s.push({style:m,from:Math.max(c,e),to:f,step:i})}}}),s.forEach(a=>t.step(new qr(a.from,a.to,a.style)))}function ev(t,e,n,r=n.contentMatch,s=!0){let i=t.doc.nodeAt(e),a=[],c=e+1;for(let u=0;u<i.childCount;u++){let f=i.child(u),p=c+f.nodeSize,m=r.matchType(f.type);if(!m)a.push(new Zt(c,p,pe.empty));else{r=m;for(let x=0;x<f.marks.length;x++)n.allowsMarkType(f.marks[x].type)||t.step(new qr(c,p,f.marks[x]));if(s&&f.isText&&n.whitespace!="pre"){let x,y=/\r?\n|\r/g,w;for(;x=y.exec(f.text);)w||(w=new pe(G.from(n.schema.text(" ",n.allowedMarks(f.marks))),0,0)),a.push(new Zt(c+x.index,c+x.index+x[0].length,w))}}c=p}if(!r.validEnd){let u=r.fillBefore(G.empty,!0);t.replace(c,c,new pe(u,0,0))}for(let u=a.length-1;u>=0;u--)t.step(a[u])}function Gz(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function ol(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,i=0;;--r){let a=t.$from.node(r),c=t.$from.index(r)+s,u=t.$to.indexAfter(r)-i;if(r<t.depth&&a.canReplace(c,u,n))return r;if(r==0||a.type.spec.isolating||!Gz(a,c,u))break;c&&(s=1),u<a.childCount&&(i=1)}return null}function Qz(t,e,n){let{$from:r,$to:s,depth:i}=e,a=r.before(i+1),c=s.after(i+1),u=a,f=c,p=G.empty,m=0;for(let w=i,b=!1;w>n;w--)b||r.index(w)>0?(b=!0,p=G.from(r.node(w).copy(p)),m++):u--;let x=G.empty,y=0;for(let w=i,b=!1;w>n;w--)b||s.after(w+1)<s.end(w)?(b=!0,x=G.from(s.node(w).copy(x)),y++):f++;t.step(new en(u,f,a,c,new pe(p.append(x),m,y),p.size-m,!0))}function tv(t,e,n=null,r=t){let s=Jz(t,e),i=s&&Yz(r,e);return i?s.map(qw).concat({type:e,attrs:n}).concat(i.map(qw)):null}function qw(t){return{type:t,attrs:null}}function Jz(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let a=i.length?i[0]:e;return n.canReplaceWith(r,s,a)?i:null}function Yz(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.child(r),a=e.contentMatch.findWrapping(i.type);if(!a)return null;let u=(a.length?a[a.length-1]:e).contentMatch;for(let f=r;u&&f<s;f++)u=u.matchType(n.child(f).type);return!u||!u.validEnd?null:a}function Xz(t,e,n){let r=G.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let c=n[a].type.contentMatch.matchFragment(r);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=G.from(n[a].type.create(n[a].attrs,r))}let s=e.start,i=e.end;t.step(new en(s,i,s,i,new pe(r,0,0),n.length,!0))}function Zz(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(a,c)=>{let u=typeof s=="function"?s(a):s;if(a.isTextblock&&!a.hasMarkup(r,u)&&eF(t.doc,t.mapping.slice(i).map(c),r)){let f=null;if(r.schema.linebreakReplacement){let y=r.whitespace=="pre",w=!!r.contentMatch.matchType(r.schema.linebreakReplacement);y&&!w?f=!1:!y&&w&&(f=!0)}f===!1&&E2(t,a,c,i),ev(t,t.mapping.slice(i).map(c,1),r,void 0,f===null);let p=t.mapping.slice(i),m=p.map(c,1),x=p.map(c+a.nodeSize,1);return t.step(new en(m,x,m+1,x-1,new pe(G.from(r.create(u,null,a.marks)),0,0),1,!0)),f===!0&&N2(t,a,c,i),!1}})}function N2(t,e,n,r){e.forEach((s,i)=>{if(s.isText){let a,c=/\r?\n|\r/g;for(;a=c.exec(s.text);){let u=t.mapping.slice(r).map(n+1+i+a.index);t.replaceWith(u,u+1,e.type.schema.linebreakReplacement.create())}}})}function E2(t,e,n,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+i);t.replaceWith(a,a+1,e.type.schema.text(` 67`))}})}function eF(t,e,n){let r=t.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function tF(t,e,n,r,s){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,s||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new en(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new pe(G.from(a),0,0),1,!0))}function Ks(t,e,n=1,r){let s=t.resolve(e),i=s.depth-n,a=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!a.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let f=s.depth-1,p=n-2;f>i;f--,p--){let m=s.node(f),x=s.index(f);if(m.type.spec.isolating)return!1;let y=m.content.cutByIndex(x,m.childCount),w=r&&r[p+1];w&&(y=y.replaceChild(0,w.type.create(w.attrs)));let b=r&&r[p]||m;if(!m.canReplace(x+1,m.childCount)||!b.type.validContent(y))return!1}let c=s.indexAfter(i),u=r&&r[0];return s.node(i).canReplaceWith(c,c,u?u.type:s.node(i+1).type)}function nF(t,e,n=1,r){let s=t.doc.resolve(e),i=G.empty,a=G.empty;for(let c=s.depth,u=s.depth-n,f=n-1;c>u;c--,f--){i=G.from(s.node(c).copy(i));let p=r&&r[f];a=G.from(p?p.type.create(p.attrs,a):s.node(c).copy(a))}t.step(new Zt(e,e,new pe(i.append(a),n,n),!0))}function Zi(t,e){let n=t.resolve(e),r=n.index();return T2(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function rF(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),a=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function T2(t,e){return!!(t&&e&&!t.isLeaf&&rF(t,e))}function zh(t,e,n=-1){let r=t.resolve(e);for(let s=r.depth;;s--){let i,a,c=r.index(s);if(s==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(s+1),c++,a=r.node(s).maybeChild(c)):(i=r.node(s).maybeChild(c-1),a=r.node(s+1)),i&&!i.isTextblock&&T2(i,a)&&r.node(s).canReplace(c,c+1))return e;if(s==0)break;e=n<0?r.before(s):r.after(s)}}function sF(t,e,n){let r=null,{linebreakReplacement:s}=t.doc.type.schema,i=t.doc.resolve(e-n),a=i.node().type;if(s&&a.inlineContent){let p=a.whitespace=="pre",m=!!a.contentMatch.matchType(s);p&&!m?r=!1:!p&&m&&(r=!0)}let c=t.steps.length;if(r===!1){let p=t.doc.resolve(e+n);E2(t,p.node(),p.before(),c)}a.inlineContent&&ev(t,e+n-1,a,i.node().contentMatchAt(i.index()),r==null);let u=t.mapping.slice(c),f=u.map(e-n);if(t.step(new Zt(f,u.map(e+n,-1),pe.empty,!0)),r===!0){let p=t.doc.resolve(f);N2(t,p.node(),p.before(),t.steps.length)}return t}function iF(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 s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,n))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,n))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function M2(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let i=0;i<n.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let c=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,u=r.index(a)+(c>0?1:0),f=r.node(a),p=!1;if(i==1)p=f.canReplace(u,u,s);else{let m=f.contentMatchAt(u).findWrapping(s.firstChild.type);p=m&&f.canReplaceWith(u,u,m[0])}if(p)return c==0?r.pos:c<0?r.before(a+1):r.after(a+1)}return null}
vendor: 10,059 bytes, line 67
67function Fh(t,e,n=e,r=pe.empty){if(e==n&&!r.size)return null;let s=t.resolve(e),i=t.resolve(n);return j2(s,i,r)?new Zt(e,n,r):new oF(s,i,r).fit()}function j2(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class oF{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=G.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=G.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,a=r.depth,c=s.depth;for(;a&&c&&i.childCount==1;)i=i.firstChild.content,a--,c--;let u=new pe(i,a,c);return e>-1?new en(r.pos,e,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Zt(r.pos,s.pos,u):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=pg(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let a=s.firstChild;for(let c=this.depth;c>=0;c--){let{type:u,match:f}=this.frontier[c],p,m=null;if(n==1&&(a?f.matchType(a.type)||(m=f.fillBefore(G.from(a),!1)):i&&u.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:c,parent:i,inject:m};if(n==2&&a&&(p=f.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:c,parent:i,wrap:p};if(i&&f.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=pg(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new pe(e,n+1,Math.max(r,s.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=pg(e,n);if(s.childCount<=1&&n>0){let i=e.size-n<=n+s.size;this.unplaced=new pe(nc(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new pe(nc(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:s,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let b=0;b<i.length;b++)this.openFrontierNode(i[b]);let a=this.unplaced,c=r?r.content:a.content,u=a.openStart-e,f=0,p=[],{match:m,type:x}=this.frontier[n];if(s){for(let b=0;b<s.childCount;b++)p.push(s.child(b));m=m.matchFragment(s)}let y=c.size+e-(a.content.size-a.openEnd);for(;f<c.childCount;){let b=c.child(f),S=m.matchType(b.type);if(!S)break;f++,(f>1||u==0||b.content.size)&&(m=S,p.push(A2(b.mark(x.allowedMarks(b.marks)),f==1?u:0,f==c.childCount?y:-1)))}let w=f==c.childCount;w||(y=-1),this.placed=rc(this.placed,n,G.from(p)),this.frontier[n].match=m,w&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,S=c;b<y;b++){let N=S.lastChild;this.frontier.push({type:N.type,match:N.contentMatchAt(N.childCount)}),S=N.content}this.unplaced=w?e==0?pe.empty:new pe(nc(a.content,e-1,1),e-1,y<0?a.openEnd:e-1):new pe(nc(a.content,e,f),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!mg(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,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=mg(e,n,s,r,i);if(a){for(let c=n-1;c>=0;c--){let{match:u,type:f}=this.frontier[c],p=mg(e,c,f,u,!0);if(!p||p.childCount)continue e}return{depth:n,fit:a,move:i?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=rc(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=rc(this.placed,this.depth,G.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(G.empty,!0);n.childCount&&(this.placed=rc(this.placed,this.frontier.length,n))}}function nc(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(nc(t.firstChild.content,e-1,n)))}function rc(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(rc(t.lastChild.content,e-1,n)))}function pg(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function A2(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,A2(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(G.empty,!0)))),t.copy(r)}function mg(t,e,n,r,s){let i=t.node(e),a=s?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let c=r.fillBefore(i.content,!0,a);return c&&!aF(n,i.content,a)?c:null}function aF(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function lF(t){return t.spec.defining||t.spec.definingForContent}function cF(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),i=t.doc.resolve(n);if(j2(s,i,r))return t.step(new Zt(e,n,r));let a=O2(s,i);a[a.length-1]==0&&a.pop();let c=-(s.depth+1);a.unshift(c);for(let x=s.depth,y=s.pos-1;x>0;x--,y--){let w=s.node(x).type.spec;if(w.defining||w.definingAsContext||w.isolating)break;a.indexOf(x)>-1?c=x:s.before(x)==y&&a.splice(1,0,-x)}let u=a.indexOf(c),f=[],p=r.openStart;for(let x=r.content,y=0;;y++){let w=x.firstChild;if(f.push(w),y==r.openStart)break;x=w.content}for(let x=p-1;x>=0;x--){let y=f[x],w=lF(y.type);if(w&&!y.sameMarkup(s.node(Math.abs(c)-1)))p=x;else if(w||!y.type.isTextblock)break}for(let x=r.openStart;x>=0;x--){let y=(x+p+1)%(r.openStart+1),w=f[y];if(w)for(let b=0;b<a.length;b++){let S=a[(b+u)%a.length],N=!0;S<0&&(N=!1,S=-S);let E=s.node(S-1),M=s.index(S-1);if(E.canReplaceWith(M,M,w.type,w.marks))return t.replace(s.before(S),N?i.after(S):n,new pe(R2(r.content,0,r.openStart,y),y,r.openEnd))}}let m=t.steps.length;for(let x=a.length-1;x>=0&&(t.replace(e,n,r),!(t.steps.length>m));x--){let y=a[x];y<0||(e=s.before(y),n=i.after(y))}}function R2(t,e,n,r,s){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(R2(i.content,e+1,n,r,i)))}if(e>r){let i=s.contentMatchAt(0),a=i.fillBefore(t).append(t);t=a.append(i.matchFragment(a).fillBefore(G.empty,!0))}return t}function uF(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=iF(t.doc,e,r.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new pe(G.from(r),0,0))}function dF(t,e,n){let r=t.doc.resolve(e),s=t.doc.resolve(n),i=O2(r,s);for(let a=0;a<i.length;a++){let c=i[a],u=a==i.length-1;if(u&&c==0||r.node(c).type.contentMatch.validEnd)return t.delete(r.start(c),s.end(c));if(c>0&&(u||r.node(c-1).canReplace(r.index(c-1),s.indexAfter(c-1))))return t.delete(r.before(c),s.after(c))}for(let a=1;a<=r.depth&&a<=s.depth;a++)if(e-r.start(a)==r.depth-a&&n>r.end(a)&&s.end(a)-n!=s.depth-a&&r.start(a-1)==s.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),s.index(a-1)))return t.delete(r.before(a),n);t.delete(e,n)}function O2(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let s=r;s>=0;s--){let i=t.start(s);if(i<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&n.push(s)}return n}class Pa extends Sn{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 Dt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return Dt.fromReplace(e,this.pos,this.pos+1,new pe(G.from(s),0,n.isLeaf?0:1))}getMap(){return sr.empty}invert(e){return new Pa(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 Pa(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 Pa(n.pos,n.attr,n.value)}}Sn.jsonID("attr",Pa);class Pc extends Sn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Dt.ok(r)}getMap(){return sr.empty}invert(e){return new Pc(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 Pc(n.attr,n.value)}}Sn.jsonID("docAttr",Pc);let za=class extends Error{};za=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};za.prototype=Object.create(Error.prototype);za.prototype.constructor=za;za.prototype.name="TransformError";class P2{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Oc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new za(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let s=this.mapping.maps[r];
vendor: 9,995 bytes, line 67
67r&&(e=s.map(e,1),n=s.map(n,-1)),s.forEach((i,a,c,u)=>{e=Math.min(e,c),n=Math.max(n,u)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=pe.empty){let s=Fh(this.doc,e,n,r);return s&&this.step(s),this}replaceWith(e,n,r){return this.replace(e,n,new pe(G.from(r),0,0))}delete(e,n){return this.replace(e,n,pe.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return cF(this,e,n,r),this}replaceRangeWith(e,n,r){return uF(this,e,n,r),this}deleteRange(e,n){return dF(this,e,n),this}lift(e,n){return Qz(this,e,n),this}join(e,n=1){return sF(this,e,n),this}wrap(e,n){return Xz(this,e,n),this}setBlockType(e,n=e,r,s=null){return Zz(this,e,n,r,s),this}setNodeMarkup(e,n,r=null,s){return tF(this,e,n,r,s),this}setNodeAttribute(e,n,r){return this.step(new Pa(e,n,r)),this}setDocAttribute(e,n){return this.step(new Pc(e,n)),this}addNodeMark(e,n){return this.step(new Pi(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof it)n.isInSet(r.marks)&&this.step(new Fo(e,n));else{let s=r.marks,i,a=[];for(;i=n.isInSet(s);)a.push(new Fo(e,i)),s=i.removeFromSet(s);for(let c=a.length-1;c>=0;c--)this.step(a[c])}return this}split(e,n=1,r){return nF(this,e,n,r),this}addMark(e,n,r){return Kz(this,e,n,r),this}removeMark(e,n,r){return qz(this,e,n,r),this}clearIncompatible(e,n,r){return ev(this,e,n,r),this}}const gg=Object.create(null);class ze{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new fF(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=pe.empty){let r=n.content.lastChild,s=null;for(let c=0;c<n.openEnd;c++)s=r,r=r.lastChild;let i=e.steps.length,a=this.ranges;for(let c=0;c<a.length;c++){let{$from:u,$to:f}=a[c],p=e.mapping.slice(i);e.replaceRange(p.map(u.pos),p.map(f.pos),c?pe.empty:n),c==0&&Jw(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:a,$to:c}=s[i],u=e.mapping.slice(r),f=u.map(a.pos),p=u.map(c.pos);i?e.deleteRange(f,p):(e.replaceRangeWith(f,p,n),Jw(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let s=e.parent.inlineContent?new De(e):Ca(e.node(0),e.parent,e.pos,e.index(),n,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let a=n<0?Ca(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Ca(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new or(e.node(0))}static atStart(e){return Ca(e,e,0,0,1)||new or(e)}static atEnd(e){return Ca(e,e,e.content.size,e.childCount,-1)||new or(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=gg[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 gg)throw new RangeError("Duplicate use of selection JSON ID "+e);return gg[e]=n,n.prototype.jsonID=e,n}getBookmark(){return De.between(this.$anchor,this.$head).getBookmark()}}ze.prototype.visible=!0;class fF{constructor(e,n){this.$from=e,this.$to=n}}let Gw=!1;function Qw(t){!Gw&&!t.parent.inlineContent&&(Gw=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class De extends ze{constructor(e,n=e){Qw(e),Qw(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 ze.near(r);let s=e.resolve(n.map(this.anchor));return new De(s.parent.inlineContent?s:r,r)}replace(e,n=pe.empty){if(super.replace(e,n),n==pe.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof De&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new $h(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 De(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=ze.findFrom(n,r,!0)||ze.findFrom(n,-r,!0);if(i)n=i.$head;else return ze.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(ze.findFrom(e,-r,!0)||ze.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new De(e,n)}}ze.jsonID("text",De);class $h{constructor(e,n){this.anchor=e,this.head=n}map(e){return new $h(e.map(this.anchor),e.map(this.head))}resolve(e){return De.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ee extends ze{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:s}=n.mapResult(this.anchor),i=e.resolve(s);return r?ze.near(i):new Ee(i)}content(){return new pe(G.from(this.node),0,0)}eq(e){return e instanceof Ee&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new nv(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ee(e.resolve(n.anchor))}static create(e,n){return new Ee(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ee.prototype.visible=!1;ze.jsonID("node",Ee);class nv{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new $h(r,r):new nv(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Ee.isSelectable(r)?new Ee(n):ze.near(n)}}class or extends ze{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=pe.empty){if(n==pe.empty){e.delete(0,e.doc.content.size);let r=ze.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new or(e)}map(e){return new or(e)}eq(e){return e instanceof or}getBookmark(){return hF}}ze.jsonID("all",or);const hF={map(){return this},resolve(t){return new or(t)}};function Ca(t,e,n,r,s,i=!1){if(e.inlineContent)return De.create(t,n);for(let a=r-(s>0?0:1);s>0?a<e.childCount:a>=0;a+=s){let c=e.child(a);if(c.isAtom){if(!i&&Ee.isSelectable(c))return Ee.create(t,n-(s<0?c.nodeSize:0))}else{let u=Ca(t,c,n+s,s<0?c.childCount:0,s,i);if(u)return u}n+=c.nodeSize*s}return null}function Jw(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof Zt||s instanceof en))return;let i=t.mapping.maps[r],a;i.forEach((c,u,f,p)=>{a==null&&(a=p)}),t.setSelection(ze.near(t.doc.resolve(a),n))}const Yw=1,Nd=2,Xw=4;class pF extends P2{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|Yw)&~Nd,this.storedMarks=null,this}get selectionSet(){return(this.updated&Yw)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Nd,this}ensureMarks(e){return it.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&Nd)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Nd,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)||it.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(ze.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|=Xw,this}get scrolledIntoView(){return(this.updated&Xw)>0}}function Zw(t,e){return!e||!t?t:t.bind(e)}class sc{constructor(e,n,r){this.name=e,this.init=Zw(n.init,r),this.apply=Zw(n.apply,r)}}const mF=[new sc("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new sc("selection",{init(t,e){return t.selection||ze.atStart(e.doc)},apply(t){return t.selection}}),new sc("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new sc("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class xg{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=mF.slice(),n&&n.forEac
vendor: 4,483 bytes, line 67
67h(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 sc(r.key,r.spec.state,r))})}}class Ta{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 s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let c=this.config.plugins[a];if(c.spec.appendTransaction){let u=s?s[a].n:0,f=s?s[a].state:this,p=u<n.length&&c.spec.appendTransaction.call(c,u?n.slice(u):n,f,r);if(p&&r.filterTransaction(p,a)){if(p.setMeta("appendedTransaction",e),!s){s=[];for(let m=0;m<this.config.plugins.length;m++)s.push(m<a?{state:r,n:n.length}:{state:this,n:0})}n.push(p),r=r.applyInner(p),i=!0}s&&(s[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Ta(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new pF(this)}static create(e){let n=new xg(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Ta(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(e,r);return r}reconfigure(e){let n=new xg(this.schema,e.plugins),r=n.fields,s=new Ta(n);for(let i=0;i<r.length;i++){let a=r[i].name;s[a]=this.hasOwnProperty(a)?this[a]:r[i].init(e,s)}return s}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 s=e[r],i=s.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(s,this[s.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 s=new xg(e.schema,e.plugins),i=new Ta(s);return s.fields.forEach(a=>{if(a.name=="doc")i.doc=Ii.fromJSON(e.schema,n.doc);else if(a.name=="selection")i.selection=ze.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let c in r){let u=r[c],f=u.spec.state;if(u.key==a.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(n,c)){i[a.name]=f.fromJSON.call(u,e,n[c],i);return}}i[a.name]=a.init(e,i)}}),i}}function D2(t,e,n){for(let r in t){let s=t[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=D2(s,e,{})),n[r]=s}return n}class bt{constructor(e){this.spec=e,this.props={},e.props&&D2(e.props,this,this.props),this.key=e.key?e.key.key:I2("plugin")}getState(e){return e[this.key]}}const yg=Object.create(null);function I2(t){return t in yg?t+"$"+ ++yg[t]:(yg[t]=0,t+"$")}class Ut{constructor(e="key"){this.key=I2(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const rv=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function L2(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const _2=(t,e,n)=>{let r=L2(t,n);if(!r)return!1;let s=sv(r);if(!s){let a=r.blockRange(),c=a&&ol(a);return c==null?!1:(e&&e(t.tr.lift(a,c).scrollIntoView()),!0)}let i=s.nodeBefore;if(K2(t,s,e,-1))return!0;if(r.parent.content.size==0&&(Fa(i,"end")||Ee.isSelectable(i)))for(let a=r.depth;;a--){let c=Fh(t.doc,r.before(a),r.after(a),pe.empty);if(c&&c.slice.size<c.to-c.from){if(e){let u=t.tr.step(c);u.setSelection(Fa(i,"end")?ze.findFrom(u.doc.resolve(u.mapping.map(s.pos,-1)),-1):Ee.create(u.doc,s.pos-i.nodeSize)),e(u.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},gF=(t,e,n)=>{let r=L2(t,n);if(!r)return!1;let s=sv(r);return s?z2(t,s,e):!1},xF=(t,e,n)=>{let r=$2(t,n);if(!r)return!1;let s=iv(r);return s?z2(t,s,e):!1};function z2(t,e,n){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;
vendor: 11,052 bytes, lines 67-68
67i--){if(s.type.spec.isolating)return!1;let p=s.lastChild;if(!p)return!1;s=p}let a=e.nodeAfter,c=a,u=e.pos+1;for(;!c.isTextblock;u++){if(c.type.spec.isolating)return!1;let p=c.firstChild;if(!p)return!1;c=p}let f=Fh(t.doc,i,u,pe.empty);if(!f||f.from!=i||f instanceof Zt&&f.slice.size>=u-i)return!1;if(n){let p=t.tr.step(f);p.setSelection(De.create(p.doc,i)),n(p.scrollIntoView())}return!0}function Fa(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 F2=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=sv(r)}let a=i&&i.nodeBefore;return!a||!Ee.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Ee.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function sv(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 $2(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const B2=(t,e,n)=>{let r=$2(t,n);if(!r)return!1;let s=iv(r);if(!s)return!1;let i=s.nodeAfter;if(K2(t,s,e,1))return!0;if(r.parent.content.size==0&&(Fa(i,"start")||Ee.isSelectable(i))){let a=Fh(t.doc,r.before(),r.after(),pe.empty);if(a&&a.slice.size<a.to-a.from){if(e){let c=t.tr.step(a);c.setSelection(Fa(i,"start")?ze.findFrom(c.doc.resolve(c.mapping.map(s.pos)),1):Ee.create(c.doc,c.mapping.map(s.pos))),e(c.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},H2=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=iv(r)}let a=i&&i.nodeAfter;return!a||!Ee.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Ee.create(t.doc,i.pos)).scrollIntoView()),!0)};function iv(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 yF=(t,e)=>{let n=t.selection,r=n instanceof Ee,s;if(r){if(n.node.isTextblock||!Zi(t.doc,n.from))return!1;s=n.from}else if(s=zh(t.doc,n.from,-1),s==null)return!1;if(e){let i=t.tr.join(s);r&&i.setSelection(Ee.create(i.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},vF=(t,e)=>{let n=t.selection,r;if(n instanceof Ee){if(n.node.isTextblock||!Zi(t.doc,n.to))return!1;r=n.to}else if(r=zh(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},bF=(t,e)=>{let{$from:n,$to:r}=t.selection,s=n.blockRange(r),i=s&&ol(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)},V2=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` 68`).scrollIntoView()),!0)};function ov(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 wF=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),i=n.indexAfter(-1),a=ov(s.contentMatchAt(i));if(!a||!s.canReplaceWith(i,i,a))return!1;if(e){let c=n.after(),u=t.tr.replaceWith(c,c,a.createAndFill());u.setSelection(ze.near(u.doc.resolve(c),1)),e(u.scrollIntoView())}return!0},U2=(t,e)=>{let n=t.selection,{$from:r,$to:s}=n;if(n instanceof or||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=ov(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let a=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,c=t.tr.insert(a,i.createAndFill());c.setSelection(De.create(c.doc,a+1)),e(c.scrollIntoView())}return!0},W2=(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 i=n.before();if(Ks(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),s=r&&ol(r);return s==null?!1:(e&&e(t.tr.lift(r,s).scrollIntoView()),!0)};function kF(t){return(e,n)=>{let{$from:r,$to:s}=e.selection;if(e.selection instanceof Ee&&e.selection.node.isBlock)return!r.parentOffset||!Ks(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,c,u=!1,f=!1;for(let y=r.depth;;y--)if(r.node(y).isBlock){u=r.end(y)==r.pos+(r.depth-y),f=r.start(y)==r.pos-(r.depth-y),c=ov(r.node(y-1).contentMatchAt(r.indexAfter(y-1))),i.unshift(u&&c?{type:c}:null),a=y;break}else{if(y==1)return!1;i.unshift(null)}let p=e.tr;(e.selection instanceof De||e.selection instanceof or)&&p.deleteSelection();let m=p.mapping.map(r.pos),x=Ks(p.doc,m,i.length,i);if(x||(i[0]=c?{type:c}:null,x=Ks(p.doc,m,i.length,i)),!x)return!1;if(p.split(m,i.length,i),!u&&f&&r.node(a).type!=c){let y=p.mapping.map(r.before(a)),w=p.doc.resolve(y);c&&r.node(a-1).canReplaceWith(w.index(),w.index()+1,c)&&p.setNodeMarkup(p.mapping.map(r.before(a)),c)}return n&&n(p.scrollIntoView()),!0}}const SF=kF(),CF=(t,e)=>{let{$from:n,to:r}=t.selection,s,i=n.sharedDepth(r);return i==0?!1:(s=n.before(i),e&&e(t.tr.setSelection(Ee.create(t.doc,s))),!0)};function NF(t,e,n){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||Zi(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function K2(t,e,n,r){let s=e.nodeBefore,i=e.nodeAfter,a,c,u=s.type.spec.isolating||i.type.spec.isolating;if(!u&&NF(t,e,n))return!0;let f=!u&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(a=(c=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&c.matchType(a[0]||i.type).validEnd){if(n){let y=e.pos+i.nodeSize,w=G.empty;for(let N=a.length-1;N>=0;N--)w=G.from(a[N].create(null,w));w=G.from(s.copy(w));let b=t.tr.step(new en(e.pos-1,y,e.pos,y,new pe(w,1,0),a.length,!0)),S=b.doc.resolve(y+2*a.length);S.nodeAfter&&S.nodeAfter.type==s.type&&Zi(b.doc,S.pos)&&b.join(S.pos),n(b.scrollIntoView())}return!0}let p=i.type.spec.isolating||r>0&&u?null:ze.findFrom(e,1),m=p&&p.$from.blockRange(p.$to),x=m&&ol(m);if(x!=null&&x>=e.depth)return n&&n(t.tr.lift(m,x).scrollIntoView()),!0;if(f&&Fa(i,"start",!0)&&Fa(s,"end")){let y=s,w=[];for(;w.push(y),!y.isTextblock;)y=y.lastChild;let b=i,S=1;for(;!b.isTextblock;b=b.firstChild)S++;if(y.canReplace(y.childCount,y.childCount,b.content)){if(n){let N=G.empty;for(let M=w.length-1;M>=0;M--)N=G.from(w[M].copy(N));let E=t.tr.step(new en(e.pos-w.length,e.pos+i.nodeSize,e.pos+S,e.pos+i.nodeSize-S,new pe(N,w.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function q2(t){return function(e,n){let r=e.selection,s=t<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(n&&n(e.tr.setSelection(De.create(e.doc,t<0?s.start(i):s.end(i)))),!0):!1}}const EF=q2(-1),TF=q2(1);function MF(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,a=s.blockRange(i),c=a&&tv(a,t,e);return c?(r&&r(n.tr.wrap(a,c).scrollIntoView()),!0):!1}}function ek(t,e=null){return function(n,r){let s=!1;for(let i=0;i<n.selection.ranges.length&&!s;i++){let{$from:{pos:a},$to:{pos:c}}=n.selection.ranges[i];n.doc.nodesBetween(a,c,(u,f)=>{if(s)return!1;if(!(!u.isTextblock||u.hasMarkup(t,e)))if(u.type==t)s=!0;else{let p=n.doc.resolve(f),m=p.index();s=p.parent.canReplaceWith(m,m+1,t)}})}if(!s)return!1;if(r){let i=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:c},$to:{pos:u}}=n.selection.ranges[a];i.setBlockType(c,u,t,e)}r(i.scrollIntoView())}return!0}}function av(...t){return function(e,n,r){for(let s=0;s<t.length;s++)if(t[s](e,n,r))return!0;return!1}}av(rv,_2,F2);av(rv,B2,H2);av(V2,U2,W2,SF);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function jF(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,a=s.blockRange(i);if(!a)return!1;let c=r?n.tr:null;return AF(c,a,t,e)?(r&&r(c.scrollIntoView()),!0):!1}}function AF(t,e,n,r=null){let s=!1,i=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let u=a.resolve(e.start-2);i=new gf(u,u,e.depth),e.endIndex<e.parent.childCount&&(e=new gf(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let c=tv(i,n,r,e);return c?(t&&RF(t,e,c,s,n),!0):!1}function RF(t,e,n,r,s){let i=G.empty;for(let p=n.length-1;p>=0;p--)i=G.from(n[p].type.create(n[p].attrs,i));t.step(new en(e.start-(r?2:0),e.end,e.start,e.end,new pe(i,0,0),n.length,!0));let a=0;for(let p=0;p<n.length;p++)n[p].type==s&&(a=p+1);let c=n.length-a,u=e.start+n.length-(r?2:0),f=e.parent;for(let p=e.startIndex,m=e.endIndex,x=!0;p<m;p++,x=!1)!x&&Ks(t.doc,u,c)&&(t.split(u,c),u+=2*c),u+=f.child(p).nodeSize;return t}function OF(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,a=>a.childCount>0&&a.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?PF(e,n,t,i):DF(e,n,i):!0:!1}}function PF(t,e,n,r){let s=t.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(s.step(new en(i-1,a,i,a,new pe(G.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new gf(s.doc.resolve(r.$from.pos),s.doc.resolve(a),r.depth));const c=ol(r);if(c==null)return!1;s.lift(r,c);let u=s.doc.resolve(s.mapping.map(i,-1)-1);return Zi(s.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&s.join(u.pos),e(s.scrollIntoView()),!0}function DF(t,e,n){let r=t.tr,s=n.parent;for(let y=n.end,w=n.endIndex-1,b=n.startIndex;w>b;w--)y-=s.child(w).nodeSize,r.delete(y-1,y+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let c=n.startIndex==0,u=n.endIndex==s.childCount,f=i.node(-1),p=i.index(-1);if(!f.canReplace(p+(c?0:1),p+1,a.content.append(u?G.empty:G.from(s))))return!1;let m=i.pos,x=m+a.nodeSize;return r.step(new en(m-(c?1:0),x+(u?1:0),m+1,x-1,new pe((c?G.empty:G.from(s.copy(G.empty))).append(u?G.empty:G.from(s.copy(G.empty))),c?0:1,u?0:1),c?0:1)),e(r.scrollIntoView()),!0}function IF(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,f=>f.childCount>0&&f.firstChild.type==t);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let c=i.parent,u=c.child(a-1);if(u.type!=t)return!1;if(n){let f=u.lastChild&&u.lastChild.type==c.type,p=G.from(f?t.create():null),m=new pe(G.from(t.create(null,G.from(c.type.create(null,p)))),f?3:1,0),x=i.start,y=i.end;n(e.tr.step(new en(x-(f?3:1),y,x,y,m,1,!0)).scrollIntoView())}return!0}}const an=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},$a=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Cx=null;const Us=function(t,e,n){let r=Cx||(Cx=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},LF=function(){Cx=null},$o=function(t,e,n,r){return n&&(tk(t,e,n,r,-1)||tk(t,e,n,r,1))},_F=/^(img|br|input|textarea|hr)$/i;function tk(t,e,n,r,s){for(var i;;){if(t==n&&e==r)return!0;
vendor: 6,613 bytes, line 68
68if(e==(s<0?0:Er(t))){let a=t.parentNode;if(!a||a.nodeType!=1||Zc(t)||_F.test(t.nodeName)||t.contentEditable=="false")return!1;e=an(t)+(s<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(s<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((i=a.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=s;else return!1;else t=a,e=s<0?Er(t):0}else return!1}}function Er(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function zF(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=Er(t)}else if(t.parentNode&&!Zc(t))e=an(t),t=t.parentNode;else return null}}function FF(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&&!Zc(t))e=an(t)+1,t=t.parentNode;else return null}}function $F(t,e,n){for(let r=e==0,s=e==Er(t);r||s;){if(t==n)return!0;let i=an(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,s=s&&i==Er(t)}}function Zc(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 Bh=function(t){return t.focusNode&&$o(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function bo(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function BF(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function HF(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Er(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Er(r.startContainer),r.startOffset)}}}const ws=typeof navigator<"u"?navigator:null,nk=typeof document<"u"?document:null,eo=ws&&ws.userAgent||"",Nx=/Edge\/(\d+)/.exec(eo),G2=/MSIE \d/.exec(eo),Ex=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(eo),Un=!!(G2||Ex||Nx),_i=G2?document.documentMode:Ex?+Ex[1]:Nx?+Nx[1]:0,Tr=!Un&&/gecko\/(\d+)/i.test(eo);Tr&&+(/Firefox\/(\d+)/.exec(eo)||[0,0])[1];const Tx=!Un&&/Chrome\/(\d+)/.exec(eo),cn=!!Tx,Q2=Tx?+Tx[1]:0,kn=!Un&&!!ws&&/Apple Computer/.test(ws.vendor),Ba=kn&&(/Mobile\/\w+/.test(eo)||!!ws&&ws.maxTouchPoints>2),Nr=Ba||(ws?/Mac/.test(ws.platform):!1),J2=ws?/Win/.test(ws.platform):!1,Ws=/Android \d/.test(eo),eu=!!nk&&"webkitFontSmoothing"in nk.documentElement.style,VF=eu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function UF(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 $s(t,e){return typeof t=="number"?t:t[e]}function WF(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 rk(t,e,n){let r=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=$a(a);continue}let c=a,u=c==i.body,f=u?UF(i):WF(c),p=0,m=0;if(e.top<f.top+$s(r,"top")?m=-(f.top-e.top+$s(s,"top")):e.bottom>f.bottom-$s(r,"bottom")&&(m=e.bottom-e.top>f.bottom-f.top?e.top+$s(s,"top")-f.top:e.bottom-f.bottom+$s(s,"bottom")),e.left<f.left+$s(r,"left")?p=-(f.left-e.left+$s(s,"left")):e.right>f.right-$s(r,"right")&&(p=e.right-f.right+$s(s,"right")),p||m)if(u)i.defaultView.scrollBy(p,m);else{let y=c.scrollLeft,w=c.scrollTop;m&&(c.scrollTop+=m),p&&(c.scrollLeft+=p);let b=c.scrollLeft-y,S=c.scrollTop-w;e={left:e.left-b,top:e.top-S,right:e.right-b,bottom:e.bottom-S}}let x=u?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(x))break;a=x=="absolute"?a.offsetParent:$a(a)}}function KF(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let c=t.root.elementFromPoint(i,a);if(!c||c==t.dom||!t.dom.contains(c))continue;let u=c.getBoundingClientRect();if(u.top>=n-20){r=c,s=u.top;break}}return{refDOM:r,refTop:s,stack:Y2(t.dom)}}function Y2(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=$a(r));return e}function qF({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;X2(n,r==0?0:r-e)}function X2(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:s,left:i}=t[n];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ka=null;function GF(t){if(t.setActive)return t.setActive();if(ka)return t.focus(ka);let e=Y2(t);t.focus(ka==null?{get preventScroll(){return ka={preventScroll:!0},!0}}:void 0),ka||(ka=!1,X2(e,0))}function Z2(t,e){let n,r=2e8,s,i=0,a=e.top,c=e.top,u,f;for(let p=t.firstChild,m=0;p;p=p.nextSibling,m++){let x;if(p.nodeType==1)x=p.getClientRects();else if(p.nodeType==3)x=Us(p).getClientRects();else continue;for(let y=0;y<x.length;y++){let w=x[y];if(w.top<=a&&w.bottom>=c){a=Math.max(w.bottom,a),c=Math.min(w.top,c);let b=w.left>e.left?w.left-e.left:w.right<e.left?e.left-w.right:0;if(b<r){n=p,r=b,s=b&&n.nodeType==3?{left:w.right<e.left?w.right:w.left,top:e.top}:e,p.nodeType==1&&b&&(i=m+(e.left>=(w.left+w.right)/2?1:0));continue}}else w.top>e.top&&!u&&w.left<=e.left&&w.right>=e.left&&(u=p,f={left:Math.max(w.left,Math.min(w.right,e.left)),top:w.top});!n&&(e.left>=w.right&&e.top>=w.top||e.left>=w.left&&e.top>=w.bottom)&&(i=m+1)}}return!n&&u&&(n=u,s=f,r=0),n&&n.nodeType==3?QF(n,s):!n||r&&n.nodeType==1?{node:t,offset:i}:Z2(n,s)}function QF(t,e){let n=t.nodeValue.length,r=document.createRange(),s;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let a=Ci(r,1);if(a.top!=a.bottom&&lv(e,a)){s={node:t,offset:i+(e.left>=(a.left+a.right)/2?1:0)};break}}return r.detach(),s||{node:t,offset:0}}function lv(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function JF(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function YF(t,e,n){let{node:r,offset:s}=Z2(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,s,i)}function XF(t,e,n,r){let s=-1;for(let i=e,a=!1;i!=t.dom;){let c=t.docView.nearestDesc(i,!0),u;if(!c)return null;if(c.dom.nodeType==1&&(c.node.isBlock&&c.parent||!c.contentDOM)&&((u=c.dom.getBoundingClientRect()).width||u.height)&&(c.node.isBlock&&c.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(c.dom.nodeName)&&(!a&&u.left>r.left||u.top>
vendor: 7,467 bytes, line 68
68r.top?s=c.posBefore:(!a&&u.right<r.left||u.bottom<r.top)&&(s=c.posAfter),a=!0),!c.contentDOM&&s<0&&!c.node.isText))return(c.node.isBlock?r.top<(u.top+u.bottom)/2:r.left<(u.left+u.right)/2)?c.posBefore:c.posAfter;i=c.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function eM(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=s;;){let a=t.childNodes[i];if(a.nodeType==1){let c=a.getClientRects();for(let u=0;u<c.length;u++){let f=c[u];if(lv(e,f))return eM(a,e,f)}}if((i=(i+1)%r)==s)break}return t}function ZF(t,e){let n=t.dom.ownerDocument,r,s=0,i=HF(n,e.left,e.top);i&&({node:r,offset:s}=i);let a=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),c;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let f=t.dom.getBoundingClientRect();if(!lv(e,f)||(a=eM(t.dom,e,f),!a))return null}if(kn)for(let f=a;r&&f;f=$a(f))f.draggable&&(r=void 0);if(a=JF(a,e),r){if(Tr&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let p=r.childNodes[s],m;p.nodeName=="IMG"&&(m=p.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&s++}let f;eu&&s&&r.nodeType==1&&(f=r.childNodes[s-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&s--,r==t.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?c=t.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(c=XF(t,r,s,e))}c==null&&(c=YF(t,a,e));let u=t.docView.nearestDesc(a,!0);return{pos:c,inside:u?u.posAtStart-u.border:-1}}function sk(t){return t.top<t.bottom||t.left<t.right}function Ci(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(sk(r))return r}return Array.prototype.find.call(n,sk)||t.getBoundingClientRect()}const e6=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function tM(t,e,n){let{node:r,offset:s,atom:i}=t.docView.domFromPos(e,n<0?-1:1),a=eu||Tr;if(r.nodeType==3)if(a&&(e6.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let u=Ci(Us(r,s,s),n);if(Tr&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let f=Ci(Us(r,s-1,s-1),-1);if(f.top==u.top){let p=Ci(Us(r,s,s+1),-1);if(p.top!=u.top)return Yl(p,p.left<f.left)}}return u}else{let u=s,f=s,p=n<0?1:-1;return n<0&&!s?(f++,p=-1):n>=0&&s==r.nodeValue.length?(u--,p=1):n<0?u--:f++,Yl(Ci(Us(r,u,f),p),p<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(n<0||s==Er(r))){let u=r.childNodes[s-1];if(u.nodeType==1)return vg(u.getBoundingClientRect(),!1)}if(i==null&&s<Er(r)){let u=r.childNodes[s];if(u.nodeType==1)return vg(u.getBoundingClientRect(),!0)}return vg(r.getBoundingClientRect(),n>=0)}if(i==null&&s&&(n<0||s==Er(r))){let u=r.childNodes[s-1],f=u.nodeType==3?Us(u,Er(u)-(a?0:1)):u.nodeType==1&&(u.nodeName!="BR"||!u.nextSibling)?u:null;if(f)return Yl(Ci(f,1),!1)}if(i==null&&s<Er(r)){let u=r.childNodes[s];for(;u.pmViewDesc&&u.pmViewDesc.ignoreForCoords;)u=u.nextSibling;let f=u?u.nodeType==3?Us(u,0,a?0:1):u.nodeType==1?u:null:null;if(f)return Yl(Ci(f,-1),!0)}return Yl(Ci(r.nodeType==3?Us(r):r,-n),n>=0)}function Yl(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 vg(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 nM(t,e,n){let r=t.state,s=t.root.activeElement;r!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),s!=t.dom&&s&&s.focus()}}function t6(t,e,n){let r=e.selection,s=n=="up"?r.$from:r.$to;return nM(t,e,()=>{let{node:i}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let c=t.docView.nearestDesc(i,!0);if(!c)break;if(c.node.isBlock){i=c.contentDOM||c.dom;break}i=c.dom.parentNode}let a=tM(t,s.pos,1);for(let c=i.firstChild;c;c=c.nextSibling){let u;if(c.nodeType==1)u=c.getClientRects();else if(c.nodeType==3)u=Us(c,0,c.nodeValue.length).getClientRects();else continue;for(let f=0;f<u.length;f++){let p=u[f];if(p.bottom>p.top+1&&(n=="up"?a.top-p.top>(p.bottom-a.top)*2:p.bottom-a.bottom>(a.bottom-p.top)*2))return!1}}return!0})}const n6=/[\u0590-\u08ac]/;function r6(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,a=s==r.parent.content.size,c=t.domSelection();return c?!n6.test(r.parent.textContent)||!c.modify?n=="left"||n=="backward"?i:a:nM(t,e,()=>{let{focusNode:u,focusOffset:f,anchorNode:p,anchorOffset:m}=t.domSelectionRange(),x=c.caretBidiLevel;c.modify("move",n,"character");let y=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:w,focusOffset:b}=t.domSelectionRange(),S=w&&!y.contains(w.nodeType==1?w:w.parentNode)||u==w&&f==b;try{c.collapse(p,m),u&&(u!=p||f!=m)&&c.extend&&c.extend(u,f)}catch{}return x!=null&&(c.caretBidiLevel=x),S}):r.pos==r.start()||r.pos==r.end()}let ik=null,ok=null,ak=!1;function s6(t,e,n){return ik==e&&ok==n?ak:(ik=e,ok=n,ak=n=="up"||n=="down"?t6(t,e,n):r6(t,e,n))}const Mr=0,lk=1,wo=2,ks=3;class tu{constructor(e,n,r,s){this.parent=e,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=Mr,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 s=this.children[n];if(s==e)return r;r+=s.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 i,a;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>an(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return i}}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 s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)for(let a=0;a<s.children.length;
vendor: 6,476 bytes, lines 68-69
68a++){let c=s.children[a];if(c.size){s=c;break}}return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],c=i+a.size;if(c>e||a instanceof sM){s=e-i;break}i=c}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof rM&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?an(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?an(i.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 s=-1,i=-1;for(let a=r,c=0;;c++){let u=this.children[c],f=a+u.size;if(s==-1&&e<=f){let p=a+u.border;if(e>=p&&n<=f-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(e,n,p);e=a;for(let m=c;m>0;m--){let x=this.children[m-1];if(x.size&&x.dom.parentNode==this.contentDOM&&!x.emptyChildAt(1)){s=an(x.dom)+1;break}e-=x.size}s==-1&&(s=0)}if(s>-1&&(f>n||c==this.children.length-1)){n=f;for(let p=c+1;p<this.children.length;p++){let m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=an(m.dom);break}n+=m.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:i}}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,s=!1){let i=Math.min(e,n),a=Math.max(e,n);for(let y=0,w=0;y<this.children.length;y++){let b=this.children[y],S=w+b.size;if(i>w&&a<S)return b.setSelection(e-w-b.border,n-w-b.border,r,s);w=S}let c=this.domFromPos(e,e?-1:1),u=n==e?c:this.domFromPos(n,n?-1:1),f=r.root.getSelection(),p=r.domSelectionRange(),m=!1;if((Tr||kn)&&e==n){let{node:y,offset:w}=c;if(y.nodeType==3){if(m=!!(w&&y.nodeValue[w-1]==` 69`),m&&w==y.nodeValue.length)for(let b=y,S;b;b=b.parentNode){if(S=b.nextSibling){S.nodeName=="BR"&&(c=u={node:S.parentNode,offset:an(S)+1});break}let N=b.pmViewDesc;if(N&&N.node&&N.node.isBlock)break}}else{let b=y.childNodes[w-1];m=b&&(b.nodeName=="BR"||b.contentEditable=="false")}}if(Tr&&p.focusNode&&p.focusNode!=u.node&&p.focusNode.nodeType==1){let y=p.focusNode.childNodes[p.focusOffset];y&&y.contentEditable=="false"&&(s=!0)}if(!(s||m&&kn)&&$o(c.node,c.offset,p.anchorNode,p.anchorOffset)&&$o(u.node,u.offset,p.focusNode,p.focusOffset))return;let x=!1;if((f.extend||e==n)&&!(m&&Tr)){f.collapse(c.node,c.offset);try{e!=n&&f.extend(u.node,u.offset),x=!0}catch{}}if(!x){if(e>n){let w=c;c=u,u=w}let y=document.createRange();y.setEnd(u.node,u.offset),y.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(y)}}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,s=0;s<this.children.length;s++){let i=this.children[s],a=r+i.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let c=r+i.border,u=a-i.border;if(e>=c&&n<=u){this.dirty=e==r||n==a?wo:lk,e==c&&n==u&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ks:i.markDirty(e-c,n-c);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?wo:ks}r=a}this.dirty=wo}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?wo:lk;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class rM extends tu{constructor(e,n,r,s){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let c=document.createElement("span");c.appendChild(a),a=c}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Mr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class i6 extends tu{constructor(e,n,r,s){super(e,[],n,null),this.textDOM=r,this.text=s}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 Bo extends tu{constructor(e,n,r,s,i){super(e,[],r,s),this.mark=n,this.spec=i}static create(e,n,r,s){let i=s.nodeViews[n.type.name],a=i&&i(n,s,r);return(!a||!a.dom)&&(a=Go.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Bo(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&ks||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ks&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Mr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Mr}}slice(e,n,r){let s=Bo.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=jx(i,n,a,r)),e>0&&(i=jx(i,0,e,r));for(let c=0;c<i.length;c++)i[c].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class zi extends tu{constructor(e,n,r,s,i,a,c,u,f){super(e,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=c}static create(e,n,r,s,i,a){let c=i.nodeViews[n.type.name],u,f=c&&c(n,i,()=>{if(!u)return a;
vendor: 1,260 bytes, line 69
69if(u.parent)return u.parent.posBeforeChild(u)},r,s),p=f&&f.dom,m=f&&f.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:m}=Go.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!m&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let x=p;return p=aM(p,r,n),f?u=new o6(e,n,r,s,p,m||null,x,f,i,a+1):n.isText?new Hh(e,n,r,s,p,x,i):new zi(e,n,r,s,p,m||null,x,i,a+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=()=>G.empty)}return e}matchesNode(e,n,r){return this.dirty==Mr&&e.eq(this.node)&&yf(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}
vendor: 8,556 bytes, line 69
69updateChildren(e,n){let r=this.node.inlineContent,s=n,i=e.composing?this.localCompositionInfo(e,n):null,a=i&&i.pos>-1?i:null,c=i&&i.pos<0,u=new l6(this,a&&a.node,e);d6(this.node,this.innerDeco,(f,p,m)=>{f.spec.marks?u.syncToMarks(f.spec.marks,r,e,p):f.type.side>=0&&!m&&u.syncToMarks(p==this.node.childCount?it.none:this.node.child(p).marks,r,e,p),u.placeWidget(f,e,s)},(f,p,m,x)=>{u.syncToMarks(f.marks,r,e,x);let y;u.findNodeMatch(f,p,m,x)||c&&e.state.selection.from>s&&e.state.selection.to<s+f.nodeSize&&(y=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(f,p,m,y,e)||u.updateNextNode(f,p,m,e,x,s)||u.addNode(f,p,m,e,s),s+=f.nodeSize}),u.syncToMarks([],r,e,0),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||this.dirty==wo)&&(a&&this.protectLocalComposition(e,a),iM(this.contentDOM,this.children,e),Ba&&f6(this.dom))}localCompositionInfo(e,n){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof De)||r<n||s>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,c=h6(this.node.content,a,r-n,s-n);return c<0?null:{node:i,pos:c,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new i6(this,i,n,s);e.input.compositionNodes.push(a),this.children=jx(this.children,r,r+s.length,e,a)}update(e,n,r,s){return this.dirty==ks||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,s),!0)}updateInner(e,n,r,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=Mr}updateOuterDeco(e){if(yf(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=oM(this.dom,this.nodeDOM,Mx(this.outerDeco,this.node,n),Mx(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function ck(t,e,n,r,s){aM(r,e,t);let i=new zi(void 0,t,e,n,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class Hh extends zi{constructor(e,n,r,s,i,a,c){super(e,n,r,s,i,null,a,c,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,s){return this.dirty==ks||this.dirty!=Mr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Mr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=Mr,!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 s=this.node.cut(e,n),i=document.createTextNode(s.text);return new Hh(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ks)}get domAtom(){return!1}isText(e){return this.node.text==e}}class sM extends tu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Mr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class o6 extends zi{constructor(e,n,r,s,i,a,c,u,f,p){super(e,n,r,s,i,a,c,f,p),this.spec=u}update(e,n,r,s){if(this.dirty==ks)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,s){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,s)}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 iM(t,e,n){let r=t.firstChild,s=!1;for(let i=0;i<e.length;i++){let a=e[i],c=a.dom;if(c.parentNode==t){for(;c!=r;)r=uk(r),s=!0;r=r.nextSibling}else s=!0,t.insertBefore(c,r);if(a instanceof Bo){let u=r?r.previousSibling:t.lastChild;iM(a.contentDOM,a.children,n),r=u?u.nextSibling:t.firstChild}}for(;r;)r=uk(r),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const pc=function(t){t&&(this.nodeName=t)};pc.prototype=Object.create(null);const ko=[new pc];function Mx(t,e,n){if(t.length==0)return ko;let r=n?ko[0]:new pc,s=[r];for(let i=0;i<t.length;i++){let a=t[i].type.attrs;if(a){a.nodeName&&s.push(r=new pc(a.nodeName));for(let c in a){let u=a[c];u!=null&&(n&&s.length==1&&s.push(r=new pc(e.isInline?"span":"div")),c=="class"?r.class=(r.class?r.class+" ":"")+u:c=="style"?r.style=(r.style?r.style+";":"")+u:c!="nodeName"&&(r[c]=u))}}}return s}function oM(t,e,n,r){if(n==ko&&r==ko)return e;let s=e;for(let i=0;i<r.length;i++){let a=r[i],c=n[i];if(i){let u;c&&c.nodeName==a.nodeName&&s!=t&&(u=s.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||(u=document.createElement(a.nodeName),u.pmIsDeco=!0,u.appendChild(s),c=ko[0]),s=u}a6(s,c||ko[0],a)}return s}function a6(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):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&t.classList.add(s[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function aM(t,e,n){return oM(t,t,ko,Mx(e,n,t.nodeType!=1))}function yf(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 uk(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class l6{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=c6(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,s){let i=0,a=this.stack.length>>1,c=Math.min(a,e.length);for(;i<c&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=Mr,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let u=-1,f=this.top.children.length;s<this.preMatch.index&&(f=Math.min(this.index+3,f));for(let p=this.index;p<f;p++){let m=this.top.children[p];if(m.matchesMark(e[a])&&!this.isLocked(m.dom)){u=p;break}}if(u>-1)u>this.index&&(this.changed=!0,this.destroyBetween(this.index,u)),this.top=this.top.children[this.index];else{let p=Bo.create(this.top,e[a],n,r);this.top.children.splice(this.index,0,p),this.top=p,this.changed=!0}this.index=0,a++}}findNodeMatch(e,n,r,s){let i=-1,a;if(s>=this.preMatch.index&&(a=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))i=this.top.children.indexOf(a,this.index);else for(let c=this.index,u=Math.min(this.top.children.length,c+5);c<u;c++){let f=this.top.children[c];if(f.matchesNode(e,n,r)&&!this.preMatch.matched.has(f)){i=c;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,s,i){let a=this.top.children[s];
vendor: 13,365 bytes, line 69
69return a.dirty==ks&&a.dom==a.contentDOM&&(a.dirty=wo),a.update(e,n,r,i)?(this.destroyBetween(this.index,s),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 s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=n}}updateNextNode(e,n,r,s,i,a){for(let c=this.index;c<this.top.children.length;c++){let u=this.top.children[c];if(u instanceof zi){let f=this.preMatch.matched.get(u);if(f!=null&&f!=i)return!1;let p=u.dom,m,x=this.isLocked(p)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=ks&&yf(n,u.outerDeco));if(!x&&u.update(e,n,r,s))return this.destroyBetween(this.index,c),u.dom!=p&&(this.changed=!0),this.index++,!0;if(!x&&(m=this.recreateWrapper(u,e,n,r,s,a)))return this.destroyBetween(this.index,c),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=wo,m.updateChildren(s,a+1),m.dirty=Mr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,s,i,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!yf(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let c=zi.create(this.top,n,r,s,i,a);if(c.contentDOM){c.children=e.children,e.children=[];for(let u of c.children)u.parent=c}return e.destroy(),c}addNode(e,n,r,s,i){let a=zi.create(this.top,e,n,r,s,i);a.contentDOM&&a.updateChildren(s,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new rM(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Bo;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Hh)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((kn||cn)&&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 s=new sM(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function c6(t,e){let n=e,r=n.children.length,s=t.childCount,i=new Map,a=[];e:for(;s>0;){let c;for(;;)if(r){let f=n.children[r-1];if(f instanceof Bo)n=f,r=f.children.length;else{c=f,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let u=c.node;if(u){if(u!=t.child(s-1))break;--s,i.set(c,s),a.push(c)}}return{index:s,matched:i,matches:a.reverse()}}function u6(t,e){return t.type.side-e.type.side}function d6(t,e,n,r){let s=e.locals(t),i=0;if(s.length==0){for(let f=0;f<t.childCount;f++){let p=t.child(f);r(p,s,e.forChild(i,p),f),i+=p.nodeSize}return}let a=0,c=[],u=null;for(let f=0;;){let p,m;for(;a<s.length&&s[a].to==i;){let S=s[a++];S.widget&&(p?(m||(m=[p])).push(S):p=S)}if(p)if(m){m.sort(u6);for(let S=0;S<m.length;S++)n(m[S],f,!!u)}else n(p,f,!!u);let x,y;if(u)y=-1,x=u,u=null;else if(f<t.childCount)y=f,x=t.child(f++);else break;for(let S=0;S<c.length;S++)c[S].to<=i&&c.splice(S--,1);for(;a<s.length&&s[a].from<=i&&s[a].to>i;)c.push(s[a++]);let w=i+x.nodeSize;if(x.isText){let S=w;a<s.length&&s[a].from<S&&(S=s[a].from);for(let N=0;N<c.length;N++)c[N].to<S&&(S=c[N].to);S<w&&(u=x.cut(S-i),x=x.cut(0,S-i),w=S,y=-1)}else for(;a<s.length&&s[a].to<w;)a++;let b=x.isInline&&!x.isLeaf?c.filter(S=>!S.inline):c.slice();r(x,b,e.forChild(i,x),y),i=w}}function f6(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 h6(t,e,n,r){for(let s=0,i=0;s<t.childCount&&i<=r;){let a=t.child(s++),c=i;if(i+=a.nodeSize,!a.isText)continue;let u=a.text;for(;s<t.childCount;){let f=t.child(s++);if(i+=f.nodeSize,!f.isText)break;u+=f.text}if(i>=n){if(i>=r&&u.slice(r-e.length-c,r-c)==e)return r-e.length;let f=c<r?u.lastIndexOf(e,r-c-1):-1;if(f>=0&&f+e.length+c>=n)return c+f;if(n==r&&u.length>=r+e.length-c&&u.slice(r-c,r-c+e.length)==e)return r}}return-1}function jx(t,e,n,r,s){let i=[];for(let a=0,c=0;a<t.length;a++){let u=t[a],f=c,p=c+=u.size;f>=n||p<=e?i.push(u):(f<e&&i.push(u.slice(0,e-f,r)),s&&(i.push(s),s=void 0),p>n&&i.push(u.slice(n-f,u.size,r)))}return i}function cv(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),i=s&&s.size==0,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let c=r.resolve(a),u,f;if(Bh(n)){for(u=a;s&&!s.node;)s=s.parent;let m=s.node;if(s&&m.isAtom&&Ee.isSelectable(m)&&s.parent&&!(m.isInline&&$F(n.focusNode,n.focusOffset,s.dom))){let x=s.posBefore;f=new Ee(a==x?c:r.resolve(x))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let m=a,x=a;for(let y=0;y<n.rangeCount;y++){let w=n.getRangeAt(y);m=Math.min(m,t.docView.posFromDOM(w.startContainer,w.startOffset,1)),x=Math.max(x,t.docView.posFromDOM(w.endContainer,w.endOffset,-1))}if(m<0)return null;[u,a]=x==t.state.selection.anchor?[x,m]:[m,x],c=r.resolve(a)}else u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null}let p=r.resolve(u);if(!f){let m=e=="pointer"||t.state.selection.head<c.pos&&!i?1:-1;f=uv(t,p,c,m)}return f}function lM(t){return t.editable?t.hasFocus():uM(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function qs(t,e=!1){let n=t.state.selection;if(cM(t,n),!!lM(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&cn){let r=t.domSelectionRange(),s=t.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&$o(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)m6(t);else{let{anchor:r,head:s}=n,i,a;dk&&!(n instanceof De)&&(n.$from.parent.inlineContent||(i=fk(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=fk(t,n.to))),t.docView.setSelection(r,s,t,e),dk&&(i&&hk(i),a&&hk(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&p6(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const dk=kn||cn&&Q2<63;function fk(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),s=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(kn&&s&&s.contentEditable=="false")return bg(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return bg(s);if(i)return bg(i)}}function bg(t){return t.contentEditable="true",kn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function hk(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function p6(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!lM(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function m6(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,an(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Un&&_i<=11&&(n.disabled=!0,n.disabled=!1)}function cM(t,e){if(e instanceof Ee){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(pk(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else pk(t)}function pk(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function uv(t,e,n,r){return t.someProp("createSelectionBetween",s=>s(t,e,n))||De.between(e,n,r)}function mk(t){return t.editable&&!t.hasFocus()?!1:uM(t)}function uM(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 g6(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return $o(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Ax(t,e){let{$anchor:n,$head:r}=t.selection,s=e>0?n.max(r):n.min(r),i=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return i&&ze.findFrom(i,e)}function Ei(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function gk(t,e,n){let r=t.state.selection;if(r instanceof De)if(n.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=t.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return Ei(t,new De(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=Ax(t.state,e);return s&&s instanceof Ee?Ei(t,s):!1}else if(!(Nr&&n.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,a;if(!i||i.isText)return!1;let c=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(a=t.docView.descAt(c))&&!a.contentDOM?Ee.isSelectable(i)?Ei(t,new Ee(e<0?t.state.doc.resolve(s.pos-i.nodeSize):s)):eu?Ei(t,new De(t.state.doc.resolve(e<0?c:c+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Ee&&r.node.isInline)return Ei(t,new De(e>0?r.$to:r.$from));{let s=Ax(t.state,e);return s?Ei(t,s):!1}}}function vf(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Sa(t,e){return e<0?x6(t):y6(t)}function x6(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s,i,a=!1;for(Tr&&n.nodeType==1&&r<vf(n)&&mc(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let c=n.childNodes[r-1];if(mc(c,-1))s=n,i=--r;else if(c.nodeType==3)n=c,r=n.nodeValue.length;else break}}else{if(dM(n))break;{let c=n.previousSibling;for(;c&&mc(c,-1);)s=n.parentNode,i=an(c),c=c.previousSibling;if(c)n=c,r=vf(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?Rx(t,n,r):s&&Rx(t,s,i)}function y6(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s=vf(n),i,a;for(;;)if(r<s){if(n.nodeType!=1)break;let c=n.childNodes[r];if(mc(c,1))i=n,a=++r;else break}else{if(dM(n))break;{let c=n.nextSibling;for(;c&&mc(c,1);)i=c.parentNode,a=an(c)+1,c=c.nextSibling;if(c)n=c,r=0,s=vf(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&Rx(t,i,a)}function dM(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function v6(t,e){for(;t&&e==t.childNodes.length&&!Zc(t);)e=an(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 b6(t,e){for(;t&&!e&&!Zc(t);)e=an(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 Rx(t,e,n){if(e.nodeType!=3){let i,a;(a=v6(e,n))?(e=a,n=0):(i=b6(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Bh(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&qs(t)},50)}function xk(t,e){let n=t.state.doc.resolve(e);if(!(cn||J2)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),a=(i.top+i.bottom)/2;if(a>s.top&&a<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),a=(i.top+i.bottom)/2;if(a>s.top&&a<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function yk(t,e,n){let r=t.state.selection;if(r instanceof De&&!r.empty||n.indexOf("s")>-1||Nr&&n.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=Ax(t.state,e);if(a&&a instanceof Ee)return Ei(t,a)}if(!s.parent.inlineContent){let a=e<0?s:i,c=r instanceof or?ze.near(a,e):ze.findFrom(a,e);return c?Ei(t,c):!1}return!1}function vk(t,e){if(!(t.state.selection instanceof De))return!0;let{$head:n,$anchor:r,empty:s}=t.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=t.state.tr;return e<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),t.dispatch(a),!0}return!1}function bk(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function w6(t){if(!kn||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;bk(t,r,"true"),setTimeout(()=>bk(t,r,"false"),20)}return!1}function k6(t){let e="";
vendor: 2,520 bytes, lines 69-72
69return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function S6(t,e){let n=e.keyCode,r=k6(e);if(n==8||Nr&&n==72&&r=="c")return vk(t,-1)||Sa(t,-1);if(n==46&&!e.shiftKey||Nr&&n==68&&r=="c")return vk(t,1)||Sa(t,1);if(n==13||n==27)return!0;if(n==37||Nr&&n==66&&r=="c"){let s=n==37?xk(t,t.state.selection.from)=="ltr"?-1:1:-1;return gk(t,s,r)||Sa(t,s)}else if(n==39||Nr&&n==70&&r=="c"){let s=n==39?xk(t,t.state.selection.from)=="ltr"?1:-1:1;return gk(t,s,r)||Sa(t,s)}else{if(n==38||Nr&&n==80&&r=="c")return yk(t,-1,r)||Sa(t,-1);if(n==40||Nr&&n==78&&r=="c")return w6(t)||yk(t,1,r)||Sa(t,1);if(r==(Nr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function dv(t,e){t.someProp("transformCopied",y=>{e=y(e,t)});let n=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let y=r.firstChild;n.push(y.type.name,y.attrs!=y.type.defaultAttrs?y.attrs:null),r=y.content}let a=t.someProp("clipboardSerializer")||Go.fromSchema(t.state.schema),c=xM(),u=c.createElement("div");u.appendChild(a.serializeFragment(r,{document:c}));let f=u.firstChild,p,m=0;for(;f&&f.nodeType==1&&(p=gM[f.nodeName.toLowerCase()]);){for(let y=p.length-1;y>=0;y--){let w=c.createElement(p[y]);for(;u.firstChild;)w.appendChild(u.firstChild);u.appendChild(w),m++}f=u.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${s} ${i}${m?` -${m}`:""} ${JSON.stringify(n)}`);let x=t.someProp("clipboardTextSerializer",y=>y(e,t))||e.content.textBetween(0,e.content.size,` 70 71`);return{dom:u,text:x,slice:e}}function fM(t,e,n,r,s){let i=s.parent.type.spec.code,a,c;if(!n&&!e)return null;let u=!!e&&(r||i||!n);if(u){if(t.someProp("transformPastedText",x=>{e=x(e,i||r,t)}),i)return c=new pe(G.from(t.state.schema.text(e.replace(/\r\n?/g,` 72`))),0,0),t.someProp("transformPasted",x=>{c=x(c,t,!0)}),c;let m=t.someProp("clipboardTextParser",x=>x(e,s,r,t));if(m)c=m;else{let x=s.marks(),{schema:y}=t.state,w=Go.fromSchema(y);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let S=a.appendChild(document.createElement("p"));b&&S.appendChild(w.serializeNode(y.text(b,x)))})}}else t.someProp("transformPastedHTML",m=>{n=m(n,t)}),a=T6(n),eu&&M6(a);let f=a&&a.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let m=+p[3];m>0;m--){let x=a.firstChild;for(;x&&x.nodeType!=1;)x=x.nextSibling;if(!x)break;a=x}if(c||(c=(t.someProp("clipboardParser")||t.someProp("domParser")||Li.fromSc
vendor: 13,217 bytes, line 72
72hema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(u||p),context:s,ruleFromNode(x){return x.nodeName=="BR"&&!x.nextSibling&&x.parentNode&&!C6.test(x.parentNode.nodeName)?{ignore:!0}:null}})),p)c=j6(wk(c,+p[1],+p[2]),p[4]);else if(c=pe.maxOpen(N6(c.content,s),!0),c.openStart||c.openEnd){let m=0,x=0;for(let y=c.content.firstChild;m<c.openStart&&!y.type.spec.isolating;m++,y=y.firstChild);for(let y=c.content.lastChild;x<c.openEnd&&!y.type.spec.isolating;x++,y=y.lastChild);c=wk(c,m,x)}return t.someProp("transformPasted",m=>{c=m(c,t,u)}),c}const C6=/^(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 N6(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),i,a=[];if(t.forEach(c=>{if(!a)return;let u=s.findWrapping(c.type),f;if(!u)return a=null;if(f=a.length&&i.length&&pM(u,i,c,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=mM(a[a.length-1],i.length));let p=hM(c,u);a.push(p),s=s.matchType(p.type),i=u}}),a)return G.from(a)}return t}function hM(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,G.from(t));return t}function pM(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=pM(t,e,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(G.from(hM(n,t,s+1))))}}function mM(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,mM(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(G.empty,!0);return t.copy(n.append(r))}function Ox(t,e,n,r,s,i){let a=e<0?t.firstChild:t.lastChild,c=a.content;return t.childCount>1&&(i=0),s<r-1&&(c=Ox(c,e,n,r,s+1,i)),s>=n&&(c=e<0?a.contentMatchAt(0).fillBefore(c,i<=s).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(G.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(c))}function wk(t,e,n){return e<t.openStart&&(t=new pe(Ox(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new pe(Ox(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const gM={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 kk=null;function xM(){return kk||(kk=document.implementation.createHTMLDocument("title"))}let wg=null;function E6(t){let e=window.trustedTypes;return e?(wg||(wg=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),wg.createHTML(t)):t}function T6(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=xM().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),s;if((s=r&&gM[r[1].toLowerCase()])&&(t=s.map(i=>"<"+i+">").join("")+t+s.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=E6(t),s)for(let i=0;i<s.length;i++)n=n.querySelector(s[i])||n;return n}function M6(t){let e=t.querySelectorAll(cn?"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 j6(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:s,openStart:i,openEnd:a}=t;for(let c=r.length-2;c>=0;c-=2){let u=n.nodes[r[c]];if(!u||u.hasRequiredAttrs())break;s=G.from(u.create(r[c+1],s)),i++,a++}return new pe(s,i,a)}const Pn={},Dn={},A6={touchstart:!0,touchmove:!0};class R6{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function O6(t){for(let e in Pn){let n=Pn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{D6(t,r)&&!fv(t,r)&&(t.editable||!(r.type in Dn))&&n(t,r)},A6[e]?{passive:!0}:void 0)}kn&&t.dom.addEventListener("input",()=>null),Px(t)}function Di(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function P6(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 Px(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>fv(t,r))})}function fv(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function D6(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 I6(t,e){!fv(t,e)&&Pn[e.type]&&(t.editable||!(e.type in Dn))&&Pn[e.type](t,e)}Dn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!vM(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ws&&cn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Ba&&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",s=>s(t,bo(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||S6(t,n)?n.preventDefault():Di(t,"key")};Dn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Dn.keypress=(t,e)=>{let n=e;if(vM(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Nr&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof De)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",a=>a(t,r.$from.pos,r.$to.pos,s,i))&&t.dispatch(i()),n.preventDefault()}};function Vh(t){return{left:t.clientX,top:t.clientY}}function L6(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function hv(t,e,n,r,s){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(t.someProp(e,c=>a>i.depth?c(t,n,i.nodeAfter,i.before(a),s,!0):c(t,n,i.node(a),i.before(a),s,!1)))return!0;return!1}function Da(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function _6(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Ee.isSelectable(r)?(Da(t,new Ee(n)),!0):!1}function z6(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof Ee&&(r=n.node);let i=t.state.doc.resolve(e);for(let a=i.depth+1;a>0;a--){let c=a>i.depth?i.nodeAfter:i.node(a);if(Ee.isSelectable(c)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(a);break}}return s!=null?(Da(t,Ee.create(t.state.doc,s)),!0):!1}function F6(t,e,n,r,s){return hv(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(s?z6(t,n):_6(t,n))}function $6(t,e,n,r){return hv(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function B6(t,e,n,r){return hv(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||H6(t,n,r)}function H6(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Da(t,De.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let a=i>s.depth?s.nodeAfter:s.node(i),c=s.before(i);if(a.inlineContent)Da(t,De.create(r,c+1,c+1+a.content.size));else if(Ee.isSelectable(a))Da(t,Ee.create(r,c));else continue;return!0}}function pv(t){return bf(t)}const yM=Nr?"metaKey":"ctrlKey";Pn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=pv(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&L6(n,t.input.lastClick)&&!n[yM]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button};let a=t.posAtCoords(Vh(n));a&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new V6(t,a,n,!!r)):(i=="doubleClick"?$6:B6)(t,a.pos,a.inside,n)?n.preventDefault():Di(t,"pointer"))};class V6{constructor(e,n,r,s){this.view=e,this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[yM],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),a=n.inside;else{let p=e.state.doc.resolve(n.pos);i=p.parent,a=p.depth?p.before():0}const c=s?null:r.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u&&u.nodeDOM.nodeType==1?u.nodeDOM:null;let{selection:f}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof Ee&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Tr&&!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)),Di(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(()=>qs(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(Vh(e))),this.updateAllowDefault(e),this.allowDefault||!n?Di(this.view,"pointer"):F6(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||kn&&this.mightDrag&&!this.mightDrag.node.isAtom||cn&&!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)?(Da(this.view,ze.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Di(this.view,"pointer")}move(e){this.updateAllowDefault(e),Di(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)}}Pn.touchstart=t=>{t.input.lastTouch=Date.now(),pv(t),Di(t,"pointer")};Pn.touchmove=t=>{t.input.lastTouch=Date.now(),Di(t,"pointer")};Pn.contextmenu=t=>pv(t);function vM(t,e){return t.composing?!0:kn&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const U6=Ws?5e3:-1;Dn.compositionstart=Dn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof De&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||cn&&J2&&W6(t)))t.markCursor=t.state.storedMarks||n.marks(),bf(t,!0),t.markCursor=null;else if(bf(t,!e.selection.empty),Tr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let a=i<0?s.lastChild:s.childNodes[i-1];if(!a)break;if(a.nodeType==3){let c=t.domSelection();c&&c.collapse(a,a.nodeValue.length);break}else s=a,i=-1}}t.input.composing=!0}bM(t,U6)};function W6(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Dn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,bM(t,20))};function bM(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>bf(t),e))}function wM(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=q6());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function K6(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=zF(e.focusNode,e.focusOffset),r=FF(e.focusNode,e.focusOffset);
vendor: 12,532 bytes, line 72
72if(n&&r&&n!=r){let s=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function q6(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function bf(t,e=!1){if(!(Ws&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),wM(t),e||t.docView&&t.docView.dirty){let n=cv(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function G6(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(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Dc=Un&&_i<15||Ba&&VF<604;Pn.copy=Dn.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let i=Dc?null:n.clipboardData,a=r.content(),{dom:c,text:u}=dv(t,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",c.innerHTML),i.setData("text/plain",u)):G6(t,c),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Q6(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function J6(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 s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ic(t,r.value,null,s,e):Ic(t,r.textContent,r.innerHTML,s,e)},50)}function Ic(t,e,n,r,s){let i=fM(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",u=>u(t,s,i||pe.empty)))return!0;if(!i)return!1;let a=Q6(i),c=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(i);return t.dispatch(c.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function kM(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," "):""}Dn.paste=(t,e)=>{let n=e;if(t.composing&&!Ws)return;let r=Dc?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Ic(t,kM(r),r.getData("text/html"),s,n)?n.preventDefault():J6(t,n)};class SM{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Y6=Nr?"altKey":"ctrlKey";function CM(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[Y6]}Pn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(Vh(n)),a;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof Ee?s.to-1:s.to))){if(r&&r.mightDrag)a=Ee.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let m=t.docView.nearestDesc(n.target,!0);m&&m.node.type.spec.draggable&&m!=t.docView&&(a=Ee.create(t.state.doc,m.posBefore))}}let c=(a||t.state.selection).content(),{dom:u,text:f,slice:p}=dv(t,c);(!n.dataTransfer.files.length||!cn||Q2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Dc?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",Dc||n.dataTransfer.setData("text/plain",f),t.dragging=new SM(p,CM(t,n),a)};Pn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Dn.dragover=Dn.dragenter=(t,e)=>e.preventDefault();Dn.drop=(t,e)=>{try{X6(t,e,t.dragging)}finally{t.dragging=null}};function X6(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Vh(e));if(!r)return;let s=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",y=>{i=y(i,t,!1)}):i=fM(t,kM(e.dataTransfer),Dc?null:e.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&CM(t,e));if(t.someProp("handleDrop",y=>y(t,e,i||pe.empty,a))){e.preventDefault();return}if(!i)return;e.preventDefault();let c=i?M2(t.state.doc,s.pos,i):s.pos;c==null&&(c=s.pos);let u=t.state.tr;if(a){let{node:y}=n;y?y.replace(u):u.deleteSelection()}let f=u.mapping.map(c),p=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,m=u.doc;if(p?u.replaceRangeWith(f,f,i.content.firstChild):u.replaceRange(f,f,i),u.doc.eq(m))return;let x=u.doc.resolve(f);if(p&&Ee.isSelectable(i.content.firstChild)&&x.nodeAfter&&x.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new Ee(x));else{let y=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((w,b,S,N)=>y=N),u.setSelection(uv(t,x,u.doc.resolve(y)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))}Pn.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())&&qs(t)},20))};Pn.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)};Pn.beforeinput=(t,e)=>{if(cn&&Ws&&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",i=>i(t,bo(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Dn)Pn[t]=Dn[t];function Lc(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class wf{constructor(e,n){this.toDOM=e,this.spec=n||To,this.side=this.spec.side||0}map(e,n,r,s){let{pos:i,deleted:a}=e.mapResult(n.from+s,this.side<0?-1:1);return a?null:new An(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof wf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Lc(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Fi{constructor(e,n){this.attrs=e,this.spec=n||To}map(e,n,r,s){let i=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new An(i,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Fi&&Lc(this.attrs,e.attrs)&&Lc(this.spec,e.spec)}static is(e){return e.type instanceof Fi}destroy(){}}class mv{constructor(e,n){this.attrs=e,this.spec=n||To}map(e,n,r,s){let i=e.mapResult(n.from+s,1);if(i.deleted)return null;let a=e.mapResult(n.to+s,-1);return a.deleted||a.pos<=i.pos?null:new An(i.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),i;return s==n.from&&!(i=e.child(r)).isText&&s+i.nodeSize==n.to}eq(e){return this==e||e instanceof mv&&Lc(this.attrs,e.attrs)&&Lc(this.spec,e.spec)}destroy(){}}class An{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new An(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 An(e,e,new wf(n,r))}static inline(e,n,r,s){return new An(e,n,new Fi(r,s))}static node(e,n,r,s){return new An(e,n,new mv(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Fi}get widget(){return this.type instanceof wf}}const Na=[],To={};class vt{constructor(e,n){this.local=e.length?e:Na,this.children=n.length?n:Na}static create(e,n){return n.length?kf(n,e,0,To):yn}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,i){for(let a=0;a<this.local.length;a++){let c=this.local[a];c.from<=n&&c.to>=e&&(!i||i(c.spec))&&r.push(c.copy(c.from+s,c.to+s))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>e){let c=this.children[a]+1;this.children[a+2].findInner(e-c,n-c,r,s+c,i)}}map(e,n,r){return this==yn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||To)}mapInner(e,n,r,s,i){let a;for(let c=0;c<this.local.length;c++){let u=this.local[c].map(e,r,s);u&&u.type.valid(n,u)?(a||(a=[])).push(u):i.onRemove&&i.onRemove(this.local[c].spec)}return this.children.length?Z6(this.children,a||[],e,n,r,s,i):a?new vt(a.sort(Mo),Na):yn}add(e,n){return n.length?this==yn?vt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,i=0;e.forEach((c,u)=>{let f=u+r,p;if(p=EM(n,c,f)){for(s||(s=this.children.slice());i<s.length&&s[i]<u;)i+=3;s[i]==u?s[i+2]=s[i+2].addInner(c,p,f+1):s.splice(i,0,u,u+c.nodeSize,kf(p,c,f+1,To)),i+=3}});let a=NM(i?TM(n):n,-r);for(let c=0;c<a.length;c++)a[c].type.valid(e,a[c])||a.splice(c--,1);return new vt(a.length?this.local.concat(a).sort(Mo):this.local,s||this.children)}remove(e){return e.length==0||this==yn?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let a,c=r[i]+n,u=r[i+1]+n;for(let p=0,m;p<e.length;p++)(m=e[p])&&m.from>c&&m.to<u&&(e[p]=null,(a||(a=[])).push(m));if(!a)continue;r==this.children&&(r=this.children.slice());let f=r[i+2].removeInner(a,c+1);f!=yn?r[i+2]=f:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,a;i<e.length;i++)if(a=e[i])for(let c=0;c<s.length;c++)s[c].eq(a,n)&&(s==this.local&&(s=this.local.slice()),s.splice(c--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new vt(s,r):yn}forChild(e,n){if(this==yn)return this;if(n.isLeaf)return vt.empty;let r,s;for(let c=0;c<this.children.length;c+=3)if(this.children[c]>=e){this.children[c]==e&&(r=this.children[c+2]);break}let i=e+1,a=i+n.content.size;for(let c=0;c<this.local.length;c++){let u=this.local[c];if(u.from<a&&u.to>i&&u.type instanceof Fi){let f=Math.max(i,u.from)-i,p=Math.min(a,u.to)-i;f<p&&(s||(s=[])).push(u.copy(f,p))}}if(s){let c=new vt(s.sort(Mo),Na);return r?new Ai([c,r]):c}return r||yn}eq(e){if(this==e)return!0;if(!(e instanceof vt)||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 gv(this.localsInner(e))}localsInner(e){if(this==yn)return Na;if(e.inlineContent||!this.local.some(Fi.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Fi||n.push(this.local[r]);return n}forEachSet(e){e(this)}}vt.empty=new vt([],[]);vt.removeOverlap=gv;const yn=vt.empty;class Ai{constructor(e){this.members=e}map(e,n){const r=this.members.map(s=>s.map(e,n,To));return Ai.from(r)}forChild(e,n){if(n.isLeaf)return vt.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,n);i!=yn&&(i instanceof Ai?r=r.concat(i.members):r.push(i))}return Ai.from(r)}eq(e){if(!(e instanceof Ai)||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 s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?gv(r?n:n.sort(Mo)):Na}static from(e){switch(e.length){case 0:return yn;case 1:return e[0];default:return new Ai(e.every(n=>n instanceof vt)?e:e.reduce((n,r)=>n.concat(r instanceof vt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Z6(t,e,n,r,s,i,a){let c=t.slice();for(let f=0,p=i;f<n.maps.length;f++){let m=0;n.maps[f].forEach((x,y,w,b)=>{let S=b-w-(y-x);for(let N=0;N<c.length;N+=3){let E=c[N+1];if(E<0||x>E+p-m)continue;let M=c[N]+p-m;y>=M?c[N+1]=x<=M?-2:-1:x>=p&&S&&(c[N]+=S,c[N+1]+=S)}m+=S}),p=n.maps[f].map(p,-1)}let u=!1;for(let f=0;f<c.length;f+=3)if(c[f+1]<0){if(c[f+1]==-2){u=!0,c[f+1]=-1;continue}let p=n.map(t[f]+i),m=p-s;if(m<0||m>=r.content.size){u=!0;continue}let x=n.map(t[f+1]+i,-1),y=x-s,{index:w,offset:b}=r.content.findIndex(m),S=r.maybeChild(w);if(S&&b==m&&b+S.nodeSize==y){let N=c[f+2].mapInner(n,S,p+1,t[f]+i+1,a);N!=yn?(c[f]=m,c[f+1]=y,c[f+2]=N):(c[f+1]=-2,u=!0)}else u=!0}if(u){let f=e$(c,t,e,n,s,i,a),p=kf(f,r,0,a);e=p.local;for(let m=0;m<c.length;m+=3)c[m+1]<0&&(c.splice(m,3),m-=3);for(let m=0,x=0;m<p.children.length;m+=3){let y=p.children[m];for(;x<c.length&&c[x]<y;)x+=3;
vendor: 9,471 bytes, line 72
72c.splice(x,0,p.children[m],p.children[m+1],p.children[m+2])}}return new vt(e.sort(Mo),c)}function NM(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new An(s.from+e,s.to+e,s.type))}return n}function e$(t,e,n,r,s,i,a){function c(u,f){for(let p=0;p<u.local.length;p++){let m=u.local[p].map(r,s,f);m?n.push(m):a.onRemove&&a.onRemove(u.local[p].spec)}for(let p=0;p<u.children.length;p+=3)c(u.children[p+2],u.children[p]+f+1)}for(let u=0;u<t.length;u+=3)t[u+1]==-1&&c(t[u+2],e[u]+i+1);return n}function EM(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let i=0,a;i<t.length;i++)(a=t[i])&&a.from>n&&a.to<r&&((s||(s=[])).push(a),t[i]=null);return s}function TM(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function kf(t,e,n,r){let s=[],i=!1;e.forEach((c,u)=>{let f=EM(t,c,u+n);if(f){i=!0;let p=kf(f,c,n+u+1,r);p!=yn&&s.push(u,u+c.nodeSize,p)}});let a=NM(i?TM(t):t,-n).sort(Mo);for(let c=0;c<a.length;c++)a[c].type.valid(e,a[c])||(r.onRemove&&r.onRemove(a[c].spec),a.splice(c--,1));return a.length||s.length?new vt(a,s):yn}function Mo(t,e){return t.from-e.from||t.to-e.to}function gv(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,r.to),Sk(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Sk(e,s,r.copy(i.from,r.to)));break}}}return e}function Sk(t,e,n){for(;e<t.length&&Mo(n,t[e])>0;)e++;t.splice(e,0,n)}function kg(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=yn&&e.push(r)}),t.cursorWrapper&&e.push(vt.create(t.state.doc,[t.cursorWrapper.deco])),Ai.from(e)}const t$={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},n$=Un&&_i<=11;class r${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 s${constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new r$,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);Un&&_i<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():kn&&e.composing&&r.some(s=>s.type=="childList"&&s.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),n$&&(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,t$)),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(mk(this.view)){if(this.suppressingSelectionUpdates)return qs(this.view);if(Un&&_i<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&$o(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 i=e.focusNode;i;i=$a(i))n.add(i);for(let i=e.anchorNode;i;i=$a(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.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(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&mk(e)&&!this.ignoreSelectionChange(r),i=-1,a=-1,c=!1,u=[];if(e.editable)for(let p=0;p<n.length;p++){let m=this.registerMutation(n[p],u);m&&(i=i<0?m.from:Math.min(m.from,i),a=a<0?m.to:Math.max(m.to,a),m.typeOver&&(c=!0))}if(u.some(p=>p.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let p of u)if(p.nodeName=="BR"&&p.parentNode){let m=p.nextSibling;m&&m.nodeType==1&&m.contentEditable=="false"&&p.parentNode.removeChild(p)}}else if(Tr&&u.length){let p=u.filter(m=>m.nodeName=="BR");if(p.length==2){let[m,x]=p;m.parentNode&&m.parentNode.parentNode==x.parentNode?x.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let x of p){let y=x.parentNode;y&&y.nodeName=="LI"&&(!m||a$(e,m)!=y)&&x.remove()}}}let f=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Bh(r)&&(f=cv(e))&&f.eq(ze.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,qs(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,a),i$(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,l$(e,u)),this.handleDOMChange(i,a,c,u),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||qs(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 p=0;p<e.addedNodes.length;p++){let m=e.addedNodes[p];n.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(Un&&_i<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:m,nextSibling:x}=e.addedNodes[p];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(s=m),(!x||Array.prototype.indexOf.call(e.addedNodes,x)<0)&&(i=x)}let a=s&&s.parentNode==e.target?an(s)+1:0,c=r.localPosFromDOM(e.target,a,-1),u=i&&i.parentNode==e.target?an(i):e.target.childNodes.length,f=r.localPosFromDOM(e.target,u,1);return{from:c,to:f}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Ck=new WeakMap,Nk=!1;function i$(t){if(!Ck.has(t)&&(Ck.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Tr,Nk)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."),Nk=!0}}function Ek(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return $o(a.node,a.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function o$(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return Ek(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Ek(t,n):null}function a$(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function l$(t,e){var n;let{focusNode:r,focusOffset:s}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let a=i.nextSibling;for(;a&&a.nodeName!="TD"&&a.nodeName!="TH";)a=a.nextSibling;if(a){let c=a;for(;;){let u=c.firstChild;if(!u||u.nodeType!=1||u.contentEditable=="false"||/^(BR|IMG)$/.test(u.nodeName))break;c=u}c.insertBefore(i,c.firstChild),r==i&&t.domSelection().collapse(i,s)}else i.parentNode.removeChild(i)}}function c$(t,e,n){let{node:r,fromOffset:s,toOffset:i,from:a,to:c}=t.docView.parseRange(e,n),u=t.domSelectionRange(),f,p=u.anchorNode;if(p&&t.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:u.anchorOffset}
vendor: 4,154 bytes, line 72
72],Bh(u)||f.push({node:u.focusNode,offset:u.focusOffset})),cn&&t.input.lastKeyCode===8)for(let S=i;S>s;S--){let N=r.childNodes[S-1],E=N.pmViewDesc;if(N.nodeName=="BR"&&!E){i=S;break}if(!E||E.size)break}let m=t.state.doc,x=t.someProp("domParser")||Li.fromSchema(t.state.schema),y=m.resolve(a),w=null,b=x.parse(r,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:s,to:i,preserveWhitespace:y.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:u$,context:y});if(f&&f[0].pos!=null){let S=f[0].pos,N=f[1]&&f[1].pos;N==null&&(N=S),w={anchor:S+a,head:N+a}}return{doc:b,sel:w,from:a,to:c}}function u$(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(kn&&/^(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||kn&&/^(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 d$=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function f$(t,e,n,r,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let O=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,z=cv(t,O);if(z&&!t.state.selection.eq(z)){if(cn&&Ws&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",Y=>Y(t,bo(13,"Enter"))))return;let U=t.state.tr.setSelection(z);O=="pointer"?U.setMeta("pointer",!0):O=="key"&&U.scrollIntoView(),i&&U.setMeta("composition",i),t.dispatch(U)}return}let a=t.state.doc.resolve(e),c=a.sharedDepth(n);e=a.before(c+1),n=t.state.doc.resolve(n).after(c+1);let u=t.state.selection,f=c$(t,e,n),p=t.state.doc,m=p.slice(f.from,f.to),x,y;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(x=t.state.selection.to,y="end"):(x=t.state.selection.from,y="start"),t.input.lastKeyCode=null;let w=m$(m.content,f.doc.content,f.from,x,y);if(w&&t.input.domChangeCount++,(Ba&&t.input.lastIOSEnter>Date.now()-225||Ws)&&s.some(O=>O.nodeType==1&&!d$.test(O.nodeName))&&(!w||w.endA>=w.endB)&&t.someProp("handleKeyDown",O=>O(t,bo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!w)if(r&&u instanceof De&&!u.empty&&u.$head.sameParent(u.$anchor)&&!t.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))w={start:u.from,endA:u.to,endB:u.to};else{if(f.sel){let O=Tk(t,t.state.doc,f.sel);if(O&&!O.eq(t.state.selection)){let z=t.state.tr.setSelection(O);i&&z.setMeta("composition",i),t.dispatch(z)}}return}t.state.selection.from<t.state.selection.to&&w.start==w.endB&&t.state.selection instanceof De&&(w.start>t.state.selection.from&&w.start<=t.state.selection.from+2&&t.state.selection.from>=f.from?w.start=t.state.selection.from:w.endA<t.state.selection.to&&w.endA>=t.state.selection.to-2&&t.state.selection.to<=f.to&&(w.endB+=t.state.selection.to-w.endA,w.endA=t.state.selection.to)),Un&&_i<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>f.from&&f.doc.textBetween(w.start-f.from-1,w.start-f.from+1)==" Â "&&(w.start--,w.endA--,w.endB--);let b=f.doc.resolveNoCache(w.start-f.from),S=f.doc.resolveNoCache(w.endB-f.from),N=p.resolve(w.start),E=b.sameParent(S)&&b.parent.inlineContent&&N.end()>=w.endA;if((Ba&&t.input.lastIOSEnter>Date.now()-225&&(!E||s.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!E&&b.pos<f.doc.content.size&&(!b.sameParent(S)||!b.parent.inlineContent)&&b.pos<S.pos&&!/\S/.test(f.doc.textBetween(b.pos,S.pos,"","")))&&t.someProp("handleKeyDown",O=>O(t,bo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>w.start&&p$(p,w.start,w.endA,b,S)&&t.someProp("handleKeyDown",O=>O(t,bo(8,"Backspace")))){Ws&&cn&&t.domObserver.suppressSelectionUpdates();return}cn&&w.endB==w.start&&(t.input.lastChromeDelete=Date.now()),Ws&&!E&&b.start()!=S.start()&&S.parentOffset==0&&b.depth==S.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==w.endA&&(w.endB-=2,S=f.doc.resolveNoCache(w.endB-f.from),setTimeout(()=>
vendor: 12,941 bytes, line 72
72{t.someProp("handleKeyDown",function(O){return O(t,bo(13,"Enter"))})},20));let M=w.start,j=w.endA,A=O=>{let z=O||t.state.tr.replace(M,j,f.doc.slice(w.start-f.from,w.endB-f.from));if(f.sel){let U=Tk(t,z.doc,f.sel);U&&!(cn&&t.composing&&U.empty&&(w.start!=w.endB||t.input.lastChromeDelete<Date.now()-100)&&(U.head==M||U.head==z.mapping.map(j)-1)||Un&&U.empty&&U.head==M)&&z.setSelection(U)}return i&&z.setMeta("composition",i),z.scrollIntoView()},P;if(E)if(b.pos==S.pos){Un&&_i<=11&&b.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>qs(t),20));let O=A(t.state.tr.delete(M,j)),z=p.resolve(w.start).marksAcross(p.resolve(w.endA));z&&O.ensureMarks(z),t.dispatch(O)}else if(w.endA==w.endB&&(P=h$(b.parent.content.cut(b.parentOffset,S.parentOffset),N.parent.content.cut(N.parentOffset,w.endA-N.start())))){let O=A(t.state.tr);P.type=="add"?O.addMark(M,j,P.mark):O.removeMark(M,j,P.mark),t.dispatch(O)}else if(b.parent.child(b.index()).isText&&b.index()==S.index()-(S.textOffset?0:1)){let O=b.parent.textBetween(b.parentOffset,S.parentOffset),z=()=>A(t.state.tr.insertText(O,M,j));t.someProp("handleTextInput",U=>U(t,M,j,O,z))||t.dispatch(z())}else t.dispatch(A());else t.dispatch(A())}function Tk(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:uv(t,e.resolve(n.anchor),e.resolve(n.head))}function h$(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,i=r,a,c,u;for(let p=0;p<r.length;p++)s=r[p].removeFromSet(s);for(let p=0;p<n.length;p++)i=n[p].removeFromSet(i);if(s.length==1&&i.length==0)c=s[0],a="add",u=p=>p.mark(c.addToSet(p.marks));else if(s.length==0&&i.length==1)c=i[0],a="remove",u=p=>p.mark(c.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<e.childCount;p++)f.push(u(e.child(p)));if(G.from(f).eq(t))return{mark:c,type:a}}function p$(t,e,n,r,s){if(n-e<=s.pos-r.pos||Sg(r,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let c=i.nodeAfter;return c!=null&&n==e+c.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=t.resolve(Sg(i,!0,!0));return!a.parent.isTextblock||a.pos>n||Sg(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function Sg(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function m$(t,e,n,r,s){let i=t.findDiffStart(e,n);if(i==null)return null;let{a,b:c}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let u=Math.max(0,i-Math.min(a,c));r-=a+u-i}if(a<i&&t.size<e.size){let u=r<=i&&r>=a?i-r:0;i-=u,i&&i<e.size&&Mk(e.textBetween(i-1,i+1))&&(i+=u?1:-1),c=i+(c-a),a=i}else if(c<i){let u=r<=i&&r>=c?i-r:0;i-=u,i&&i<t.size&&Mk(t.textBetween(i-1,i+1))&&(i+=u?1:-1),a=i+(a-c),c=i}return{start:i,endA:a,endB:c}}function Mk(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 MM{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 R6,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Pk),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=Rk(this),Ak(this),this.nodeViews=Ok(this),this.docView=ck(this.state.doc,jk(this),kg(this),this.dom,this),this.domObserver=new s$(this,(r,s,i,a)=>f$(this,r,s,i,a)),this.domObserver.start(),O6(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&&Px(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Pk),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 s=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(wM(this),a=!0),this.state=e;let c=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(c||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let y=Ok(this);x$(y,this.nodeViews)&&(this.nodeViews=y,i=!0)}(c||n.handleDOMEvents!=this._props.handleDOMEvents)&&Px(this),this.editable=Rk(this),Ak(this);let u=kg(this),f=jk(this),p=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(e.doc,f,u);(m||!e.selection.eq(s.selection))&&(a=!0);let x=p=="preserve"&&a&&this.dom.style.overflowAnchor==null&&KF(this);if(a){this.domObserver.stop();let y=m&&(Un||cn)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&g$(s.selection,e.selection);if(m){let w=cn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=K6(this)),(i||!this.docView.update(e.doc,f,u,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=ck(e.doc,f,u,this.dom,this)),w&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(y=!0)}y||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&g6(this))?qs(this,y):(cM(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():x&&qF(x)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Ee){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&rk(this,n.getBoundingClientRect(),e)}else rk(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,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new SM(e.slice,e.move,s<0?void 0:Ee.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let a=0;a<this.directPlugins.length;a++){let c=this.directPlugins[a].props[e];if(c!=null&&(s=n?n(c):c))return s}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let c=i[a].props[e];if(c!=null&&(s=n?n(c):c))return s}}hasFocus(){if(Un){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&&GF(this.dom),qs(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 ZF(this,e)}coordsAtPos(e,n=1){return tM(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 s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return s6(this,n||this.state,e)}pasteHTML(e,n){return Ic(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Ic(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return dv(this,e)}destroy(){this.docView&&(P6(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],kg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,LF())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return I6(this,e)}domSelectionRange(){let e=this.domSelection();return e?kn&&this.root.nodeType===11&&BF(this.dom.ownerDocument)==this.dom&&o$(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}MM.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function jk(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"),[An.node(0,t.state.doc.content.size,e)]}function Ak(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:An.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Rk(t){return!t.someProp("editable",e=>e(t.state)===!1)}function g$(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 Ok(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function x$(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function Pk(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 qi={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:"'"},Sf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},y$=typeof navigator<"u"&&/Mac/.test(navigator.platform),v$=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ln=0;ln<10;ln++)qi[48+ln]=qi[96+ln]=String(ln);for(var ln=1;ln<=24;ln++)qi[ln+111]="F"+ln;for(var ln=65;ln<=90;ln++)qi[ln]=String.fromCharCode(ln+32),Sf[ln]=String.fromCharCode(ln);for(var Cg in qi)Sf.hasOwnProperty(Cg)||(Sf[Cg]=qi[Cg]);function b$(t){var e=y$&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||v$&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Sf:qi)[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 w$=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),k$=typeof navigator<"u"&&/Win/.test(navigator.platform);function S$(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,i,a;for(let c=0;c<e.length-1;c++){let u=e[c];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))s=!0;else if(/^s(hift)?$/i.test(u))i=!0;else if(/^mod$/i.test(u))w$?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+u)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function C$(t){let e=Object.create(null);for(let n in t)e[S$(n)]=t[n];return e}
vendor: 17,863 bytes, line 72
72function Ng(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 N$(t){return new bt({props:{handleKeyDown:jM(t)}})}function jM(t){let e=C$(t);return function(n,r){let s=b$(r),i,a=e[Ng(s,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let c=e[Ng(s,r,!1)];if(c&&c(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(k$&&r.ctrlKey&&r.altKey)&&(i=qi[r.keyCode])&&i!=s){let c=e[Ng(i,r)];if(c&&c(n.state,n.dispatch,n))return!0}}return!1}}var E$=Object.defineProperty,xv=(t,e)=>{for(var n in e)E$(t,n,{get:e[n],enumerable:!0})};function Uh(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:s}=n,{storedMarks:i}=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 i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var Wh=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:s}=n,i=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...f)=>{const p=c(...f)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,a=[],c=!!t,u=t||s.tr,f=()=>(!c&&e&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),a.every(m=>m===!0)),p={...Object.fromEntries(Object.entries(n).map(([m,x])=>[m,(...w)=>{const b=this.buildProps(u,e),S=x(...w)(b);return a.push(S),p}])),run:f};return p}createCan(t){const{rawCommands:e,state:n}=this,r=!1,s=t||n.tr,i=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(e).map(([c,u])=>[c,(...f)=>u(...f)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,a={tr:t,editor:r,view:i,state:Uh({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}},AM={};xv(AM,{blur:()=>T$,clearContent:()=>M$,clearNodes:()=>j$,command:()=>A$,createParagraphNear:()=>R$,cut:()=>O$,deleteCurrentNode:()=>P$,deleteNode:()=>D$,deleteRange:()=>I$,deleteSelection:()=>L$,enter:()=>_$,exitCode:()=>z$,extendMarkRange:()=>F$,first:()=>$$,focus:()=>H$,forEach:()=>V$,insertContent:()=>U$,insertContentAt:()=>q$,joinBackward:()=>J$,joinDown:()=>Q$,joinForward:()=>Y$,joinItemBackward:()=>X$,joinItemForward:()=>Z$,joinTextblockBackward:()=>eB,joinTextblockForward:()=>tB,joinUp:()=>G$,keyboardShortcut:()=>rB,lift:()=>sB,liftEmptyBlock:()=>iB,liftListItem:()=>oB,newlineInCode:()=>aB,resetAttributes:()=>lB,scrollIntoView:()=>cB,selectAll:()=>uB,selectNodeBackward:()=>dB,selectNodeForward:()=>fB,selectParentNode:()=>hB,selectTextblockEnd:()=>pB,selectTextblockStart:()=>mB,setContent:()=>gB,setMark:()=>_B,setMeta:()=>zB,setNode:()=>FB,setNodeSelection:()=>$B,setTextDirection:()=>BB,setTextSelection:()=>HB,sinkListItem:()=>VB,splitBlock:()=>UB,splitListItem:()=>WB,toggleList:()=>KB,toggleMark:()=>qB,toggleNode:()=>GB,toggleWrap:()=>QB,undoInputRule:()=>JB,unsetAllMarks:()=>YB,unsetMark:()=>XB,unsetTextDirection:()=>ZB,updateAttributes:()=>eH,wrapIn:()=>tH,wrapInList:()=>nH});var T$=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),M$=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),j$=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:a})=>{t.doc.nodesBetween(i.pos,a.pos,(c,u)=>{if(c.type.isText)return;const{doc:f,mapping:p}=e,m=f.resolve(p.map(u)),x=f.resolve(p.map(u+c.nodeSize)),y=m.blockRange(x);if(!y)return;const w=ol(y);if(c.type.isTextblock){const{defaultType:b}=m.parent.contentMatchAt(m.index());e.setNodeMarkup(y.start,b)}(w||w===0)&&e.lift(y,w)})}),!0},A$=t=>e=>t(e),R$=()=>({state:t,dispatch:e})=>U2(t,e),O$=(t,e)=>({editor:n,tr:r})=>{const{state:s}=n,i=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,i.content),r.setSelection(new De(r.doc.resolve(Math.max(a-1,0)))),!0},P$=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const c=s.before(i),u=s.after(i);t.delete(c,u).scrollIntoView()}return!0}return!1};function It(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var D$=t=>({tr:e,state:n,dispatch:r})=>{const s=It(t,n.schema),i=e.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===s){if(r){const u=i.before(a),f=i.after(a);e.delete(u,f).scrollIntoView()}return!0}return!1},I$=t=>({tr:e,dispatch:n})=>{const{from:r,to:s}=t;return n&&e.delete(r,s),!0},L$=()=>({state:t,dispatch:e})=>rv(t,e),_$=()=>({commands:t})=>t.keyboardShortcut("Enter"),z$=()=>({state:t,dispatch:e})=>wF(t,e);function yv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Cf(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:yv(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function RM(t,e,n={}){return t.find(r=>r.type===e&&Cf(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function Dk(t,e,n={}){return!!RM(t,e,n)}function vv(t,e,n){var r;if(!t||!e)return;let s=t.parent.childAfter(t.parentOffset);if((!s.node||!s.node.marks.some(p=>p.type===e))&&(s=t.parent.childBefore(t.parentOffset)),!s.node||!s.node.marks.some(p=>p.type===e)||(n=n||((r=s.node.marks[0])==null?void 0:r.attrs),!RM([...s.node.marks],e,n)))return;let a=s.index,c=t.start()+s.offset,u=a+1,f=c+s.node.nodeSize;for(;a>0&&Dk([...t.parent.child(a-1).marks],e,n);)a-=1,c-=t.parent.child(a).nodeSize;for(;u<t.parent.childCount&&Dk([...t.parent.child(u).marks],e,n);)f+=t.parent.child(u).nodeSize,u+=1;return{from:c,to:f}}function ei(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var F$=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const i=ei(t,r.schema),{doc:a,selection:c}=n,{$from:u,from:f,to:p}=c;if(s){const m=vv(u,i,e);if(m&&m.from<=f&&m.to>=p){const x=De.create(a,m.from,m.to);n.setSelection(x)}}return!0},$$=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 OM(t){return t instanceof De}function So(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function PM(t,e=null){if(!e)return null;const n=ze.atStart(t),r=ze.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const s=n.from,i=r.to;return e==="all"?De.create(t,So(0,s,i),So(t.content.size,s,i)):De.create(t,So(e,s,i),So(e,s,i))}function Ik(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Nf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function B$(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var H$=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(Nf()||Ik())&&r.dom.focus(),B$()&&!Nf()&&!Ik()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!OM(n.state.selection))return a(),!0;const c=PM(s.doc,t)||n.state.selection,u=n.state.selection.eq(c);return i&&(u||s.setSelection(c),u&&s.storedMarks&&s.setStoredMarks(s.storedMarks),a()),!0},V$=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),U$=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),DM=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&&DM(r)}return t};function Ed(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return DM(n)}function _c(t,e,n){if(t instanceof Ii||t instanceof G)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return G.fromArray(t.map(c=>e.nodeFromJSON(c)));const a=e.nodeFromJSON(t);return n.errorOnInvalidContent&&a.check(),a}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),_c("",e,n)}if(s){if(n.errorOnInvalidContent){let a=!1,c="";const u=new x2({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:f=>(a=!0,c=typeof f=="string"?f:f.outerHTML,null)}]}})});if(n.slice?Li.fromSchema(u).parseSlice(Ed(t),n.parseOptions):Li.fromSchema(u).parse(Ed(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${c}`)})}const i=Li.fromSchema(e);return n.slice?i.parseSlice(Ed(t),n.parseOptions).content:i.parse(Ed(t),n.parseOptions)}return _c("",e,n)}function W$(t,e,n){const r=t.steps.length-1;if(r<e)return;const s=t.steps[r];if(!(s instanceof Zt||s instanceof en))return;const i=t.mapping.maps[r];let a=0;i.forEach((c,u,f,p)=>{a===0&&(a=p)}),t.setSelection(ze.near(t.doc.resolve(a),n))}var K$=t=>!("type"in t),q$=(t,e,n)=>({tr:r,dispatch:s,editor:i})=>{var a;if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let c;const u=S=>{i.emit("contentError",{editor:i,error:S,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},f={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{_c(e,i.schema,{parseOptions:f,errorOnInvalidContent:!0})}catch(S){u(S)}try{c=_c(e,i.schema,{parseOptions:f,errorOnInvalidContent:(a=n.errorOnInvalidContent)!=null?a:i.options.enableContentCheck})}catch(S){return u(S),!1}let{from:p,to:m}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},x=!0,y=!0;if((K$(c)?c:[c]).forEach(S=>{S.check(),x=x?S.isText&&S.marks.length===0:!1,y=y?S.isBlock:!1}),p===m&&y){const{parent:S}=r.doc.resolve(p);S.isTextblock&&!S.type.spec.code&&!S.childCount&&(p-=1,m+=1)}let b;if(x){if(Array.isArray(e))b=e.map(S=>S.text||"").join("");else if(e instanceof G){let S="";e.forEach(N=>{N.text&&(S+=N.text)}),b=S}else typeof e=="object"&&e&&e.text?b=e.text:b=e;r.insertText(b,p,m)}else{b=c;const S=r.doc.resolve(p),N=S.node(),E=S.parentOffset===0,M=N.isText||N.isTextblock,j=N.content.size>0;E&&M&&j&&(p=Math.max(0,p-1)),r.replaceWith(p,m,b)}n.updateSelection&&W$(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:p,text:b}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:p,text:b})}return!0},G$=()=>({state:t,dispatch:e})=>yF(t,e),Q$=()=>({state:t,dispatch:e})=>vF(t,e),J$=()=>({state:t,dispatch:e})=>_2(t,e),Y$=()=>({state:t,dispatch:e})=>B2(t,e),X$=()=>({state:t,dispatch:e,tr:n})=>{try{const r=zh(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Z$=()=>({state:t,dispatch:e,tr:n})=>{try{const r=zh(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},eB=()=>({state:t,dispatch:e})=>gF(t,e),tB=()=>({state:t,dispatch:e})=>xF(t,e);function IM(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function nB(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,s,i,a;for(let c=0;c<e.length-1;c+=1){const u=e[c];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))s=!0;else if(/^s(hift)?$/i.test(u))i=!0;else if(/^mod$/i.test(u))Nf()||IM()?a=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${u}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var rB=t=>({editor:e,view:n,tr:r,dispatch:s})=>{const i=nB(t).split(/-(?!$)/),a=i.find(f=>!["Alt","Ctrl","Meta","Shift"].includes(f)),c=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),u=e.captureTransaction(()=>{n.someProp("handleKeyDown",f=>f(n,c))});return u?.steps.forEach(f=>{const p=f.map(r.mapping);p&&s&&r.maybeStep(p)}),!0};function Gi(t,e,n={}){const{from:r,to:s,empty:i}=t.selection,a=e?It(e,t.schema):null,c=[];t.doc.nodesBetween(r,s,(m,x)=>{if(m.isText)return;const y=Math.max(r,x),w=Math.min(s,x+m.nodeSize);c.push({node:m,from:y,to:w})});const u=s-r,f=c.filter(m=>a?a.name===m.node.type.name:!0).filter(m=>Cf(m.node.attrs,n,{strict:!1}));return i?!!f.length:f.reduce((m,x)=>m+x.to-x.from,0)>=u}var sB=(t,e={})=>({state:n,dispatch:r})=>{const s=It(t,n.schema);return Gi(n,s,e)?bF(n,r):!1},iB=()=>({state:t,dispatch:e})=>W2(t,e),oB=t=>({state:e,dispatch:n})=>{const r=It(t,e.schema);return OF(r)(e,n)},aB=()=>({state:t,dispatch:e})=>V2(t,e);function Kh(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Lk(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var lB=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=null,a=null;const c=Kh(typeof t=="string"?t:t.name,r.schema);if(!c)return!1;c==="node"&&(i=It(t,r.schema)),c==="mark"&&(a=ei(t,r.schema));let u=!1;return n.selection.ranges.forEach(f=>{r.doc.nodesBetween(f.$from.pos,f.$to.pos,(p,m)=>{i&&i===p.type&&(u=!0,s&&n.setNodeMarkup(m,void 0,Lk(p.attrs,e))),a&&p.marks.length&&p.marks.forEach(x=>{a===x.type&&(u=!0,s&&n.addMark(m,m+p.nodeSize,a.create(Lk(x.attrs,e))))})})}),u},cB=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),uB=()=>({tr:t,dispatch:e})=>{if(e){const n=new or(t.doc);t.setSelection(n)}return!0},dB=()=>({state:t,dispatch:e})=>F2(t,e),fB=()=>({state:t,dispatch:e})=>H2(t,e),hB=()=>({state:t,dispatch:e})=>CF(t,e),pB=()=>({state:t,dispatch:e})=>TF(t,e),mB=()=>({state:t,dispatch:e})=>EF(t,e);function Dx(t,e,n={},r={}){return _c(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var gB=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:a,commands:c})=>{const{doc:u}=i;if(r.preserveWhitespace!=="full"){const f=Dx(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});return a&&i.replaceWith(0,u.content.size,f).setMeta("preventUpdate",!n),!0}return a&&i.setMeta("preventUpdate",!n),c.insertContentAt({from:0,to:u.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function LM(t,e){const n=ei(e,t.schema),{from:r,to:s,empty:i}=t.selection,a=[];i?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,u=>{a.push(...u.marks)});const c=a.find(u=>u.type.name===n.name);return c?{...c.attrs}:{}}function _M(t,e){const n=new P2(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function xB(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 yB(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function vB(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 qh(t){return e=>vB(e.$from,t)}function Ne(t,e,n){return t.config[e]===void 0&&t.parent?Ne(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ne(t.parent,e,n):null}):t.config[e]}function bv(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=Ne(e,"addExtensions",n);return r?[e,...bv(r())]:e}).flat(10)}function wv(t,e){const n=Go.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function zM(t){return typeof t=="function"}function et(t,e=void 0,...n){return zM(t)?e?t.bind(e)(...n):t(...n):t}function bB(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Ha(t){const e=t.filter(s=>s.type==="extension"),n=t.filter(s=>s.type==="node"),r=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function FM(t){const e=[],{nodeExtensions:n,markExtensions:r}=Ha(t),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},a=n.filter(f=>f.name!=="text").map(f=>f.name),c=r.map(f=>f.name),u=[...a,...c];return t.forEach(f=>{const p={name:f.name,options:f.options,storage:f.storage,extensions:s},m=Ne(f,"addGlobalAttributes",p);if(!m)return;m().forEach(y=>{let w;Array.isArray(y.types)?w=y.types:y.types==="*"?w=u:y.types==="nodes"?w=a:y.types==="marks"?w=c:w=[],w.forEach(b=>{Object.entries(y.attributes).forEach(([S,N])=>{e.push({type:b,name:S,attribute:{...i,...N}})})})})}),s.forEach(f=>
72{const p={name:f.name,options:f.options,storage:f.storage},m=Ne(f,"addAttributes",p);if(!m)return;const x=m();Object.entries(x).forEach(([y,w])=>{const b={...i,...w};typeof b?.default=="function"&&(b.default=b.default()),b?.isRequired&&b?.default===void 0&&delete b.default,e.push({type:f.name,name:y,attribute:b})})}),e}function wB(t){const e=[];let n="",r=!1,s=!1,i=0;const a=t.length;for(let c=0;c<a;c+=1){const u=t[c];if(u==="'"&&!s){r=!r,n+=u;continue}if(u==='"'&&!r){s=!s,n+=u;continue}if(!r&&!s){if(u==="("){i+=1,n+=u;continue}if(u===")"&&i>0){i-=1,n+=u;continue}if(u===";"&&i===0){e.push(n),n="";continue}}n+=u}return n&&e.push(n),e}function _k(t){const e=[],n=wB(t||""),r=n.length;for(let s=0;s<r;s+=1){const i=n[s],a=i.indexOf(":");if(a===-1)continue;const c=i.slice(0,a).trim(),u=i.slice(a+1).trim();c&&u&&e.push([c,u])}return e}function Lt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const c=i?String(i).split(" "):[],u=r[s]?r[s].split(" "):[],f=c.filter(p=>!u.includes(p));r[s]=[...u,...f].join(" ")}else if(s==="style"){const c=new Map([..._k(r[s]),..._k(i)]);r[s]=Array.from(c.entries()).map(([u,f])=>`${u}: ${f}`).join("; ")}else r[s]=i}),r},{})}function zc(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Lt(n,r),{})}function kB(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function zk(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const s=e.reduce((i,a)=>{const c=a.attribute.parseHTML?a.attribute.parseHTML(n):kB(n.getAttribute(a.name));return c==null?i:{...i,[a.name]:c}},{});return{...r,...s}}}}function Fk(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&bB(n)?!1:n!=null))}function $k(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function SB(t,e){var n;const r=FM(t),{nodeExtensions:s,markExtensions:i}=Ha(t),a=(n=s.find(f=>Ne(f,"topNode")))==null?void 0:n.name,c=Object.fromEntries(s.map(f=>{const p=r.filter(N=>N.type===f.name),m={name:f.name,options:f.options,storage:f.storage,editor:e},x=t.reduce((N,E)=>{const M=Ne(E,"extendNodeSchema",m);return{...N,...M?M(f):{}}},{}),y=Fk({...x,content:et(Ne(f,"content",m)),marks:et(Ne(f,"marks",m)),group:et(Ne(f,"group",m)),inline:et(Ne(f,"inline",m)),atom:et(Ne(f,"atom",m)),selectable:et(Ne(f,"selectable",m)),draggable:et(Ne(f,"draggable",m)),code:et(Ne(f,"code",m)),whitespace:et(Ne(f,"whitespace",m)),linebreakReplacement:et(Ne(f,"linebreakReplacement",m)),defining:et(Ne(f,"defining",m)),isolating:et(Ne(f,"isolating",m)),attrs:Object.fromEntries(p.map($k))}),w=et(Ne(f,"parseHTML",m));w&&(y.parseDOM=w.map(N=>zk(N,p)));const b=Ne(f,"renderHTML",m);b&&(y.toDOM=N=>b({node:N,HTMLAttributes:zc(N,p)}));const S=Ne(f,"renderText",m);return S&&(y.toText=S),[f.name,y]})),u=Object.fromEntries(i.map(f=>{const p=r.filter(S=>S.type===f.name),m={name:f.name,options:f.options,storage:f.storage,editor:e},x=t.reduce((S,N)=>{const E=Ne(N,"extendMarkSchema",m);return{...S,...E?E(f):{}}},{}),y=Fk({...x,inclusive:et(Ne(f,"inclusive",m)),excludes:et(Ne(f,"excludes",m)),group:et(Ne(f,"group",m)),spanning:et(Ne(f,"spanning",m)),code:et(Ne(f,"code",m)),attrs:Object.fromEntries(p.map($k))}),w=et(Ne(f,"parseHTML",m));w&&(y.parseDOM=w.map(S=>zk(S,p)));const b=Ne(f,"renderHTML",m);return b&&(y.toDOM=S=>b({mark:S,HTMLAttributes:zc(S,p)})),[f.name,y]}));return new x2({topNode:a,nodes:c,marks:u})}function CB(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function gc(t){return t.sort((n,r)=>{const s=Ne(n,"priority")||100,i=Ne(r,"priority")||100;return s>i?-1:s<i?1:0})}function $M(t){const e=gc(bv(t)),n=CB(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function BM(t,e,n){const{from:r,to:s}=e,{blockSeparator:i=` 73
74`,textSerializers:a={}}=n||{};let c="";return t.nodesBetween(r,s,(u,f,p,m)=>{var x;u.isBlock&&f>r&&(c+=i);const y=a?.[u.type.name];if(y)return p&&(c+=y({node:u,pos:f,parent:p,index:m,range:e})),!1;u.isText&&(c+=(x=u?.text)==null?void 0:x.slice(Math.max(r,f)-f,s-f))}),c}function NB(t,e){const n={from:0,to:t.content.size};return BM(t,n,e)}function HM(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function EB(t,e){const n=It(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,c=>{i.push(c)});const a=i.reverse().find(c=>c.type.name===n.name);return a?{...a.attrs}:{}}function VM(t,e){const n=Kh(typeof e=="string"?e:e.name,t.schema);return n==="node"?EB(t,e):n==="mark"?LM(t,e):{}}function TB(t,e=JSON.stringify){const n={};return t.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function MB(t){const e=TB(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,a)=>a!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function UM(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{const a=[];if(s.ranges.length)s.forEach((c,u)=>{a.push({from:c,to:u})});else{const{from:c,to:u}=n[i];if(c===void 0||u===void 0)return;a.push({from:c,to:u})}a.forEach(({from:c,to:u})=>{const f=e.slice(i).map(c,-1),p=e.slice(i).map(u),m=e.invert().map(f,-1),x=e.invert().map(p);r.push({oldRange:{from:m,to:x},newRange:{from:f,to:p}})})}),MB(r)}function kv(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(s=>{const i=n.resolve(t),a=vv(i,s.type);a&&r.push({mark:s,...a})}):n.nodesBetween(t,e,(s,i)=>{!s||s?.nodeSize===void 0||r.push(...s.marks.map(a=>({from:i,to:i+s.nodeSize,mark:a})))}),r}var jB=(t,e,n,r=20)=>{const s=t.doc.resolve(n);let i=r,a=null;for(;i>0&&a===null;){const c=s.node(i);c?.type.name===e?a=c:i-=1}return[a,i]};function Xl(t,e){return e.nodes[t]||e.marks[t]||null}function Kd(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var AB=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,a,c)=>{var u,f;const p=((f=(u=s.type.spec).toText)==null?void 0:f.call(u,{node:s,pos:i,parent:a,index:c}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?p:p.slice(0,Math.max(0,r-i))}),n};function Ix(t,e,n={}){const{empty:r,ranges:s}=t.selection,i=e?ei(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(m=>i?i.name===m.type.name:!0).find(m=>Cf(m.attrs,n,{strict:!1}));let a=0;const c=[];if(s.forEach(({$from:m,$to:x})=>{const y=m.pos,w=x.pos;t.doc.nodesBetween(y,w,(b,S)=>{if(i&&b.inlineContent&&!b.type.allowsMarkType(i))return!1;if(!b.isText&&!b.marks.length)return;const N=Math.max(y,S),E=Math.min(w,S+b.nodeSize),M=E-N;a+=M,c.push(...b.marks.map(j=>({mark:j,from:N,to:E})))})}),a===0)return!1;const u=c.filter(m=>i?i.name===m.mark.type.name:!0).filter(m=>Cf(m.mark.attrs,n,{strict:!1})).reduce((m,x)=>m+x.to-x.from,0),f=c.filter(m=>i?m.mark.type!==i&&m.mark.type.excludes(i):!0).reduce((m,x)=>m+x.to-x.from,0);return(u>0?u+f:u)>=a}function RB(t,e,n={}){if(!e)return Gi(t,null,n)||Ix(t,null,n);const r=Kh(e,t.schema);return r==="node"?Gi(t,e,n):r==="mark"?Ix(t,e,n):!1}var OB=(t,e)=>{const{$from:n,$to:r,$anchor:s}=t.selection;if(e){const i=qh(c=>c.type.name===e)(t.selection);if(!i)return!1;const a=t.doc.resolve(i.pos+1);return s.pos+1===a.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},PB=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Bk(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Hk(t,e){const{nodeExtensions:n}=Ha(e),r=n.find(a=>a.name===t);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=et(Ne(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function Gh(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;
vendor: 29,955 bytes, lines 74-115
74if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(Gh(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function WM(t){return t instanceof Ee}var KM=class qM{constructor(e){this.position=e}static fromJSON(e){return new qM(e.position)}toJSON(){return{position:this.position}}};function DB(t,e){const n=e.mapping.mapResult(t.position);return{position:new KM(n.pos),mapResult:n}}function IB(t){return new KM(t)}function LB(t,e,n){var r;const{selection:s}=e;let i=null;if(OM(s)&&(i=s.$cursor),i){const c=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(c)||!c.some(f=>f.type.excludes(n)))}const{ranges:a}=s;return a.some(({$from:c,$to:u})=>{let f=c.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(c.pos,u.pos,(p,m,x)=>{if(f)return!1;if(p.isInline){const y=!x||x.type.allowsMarkType(n),w=!!n.isInSet(p.marks)||!p.marks.some(b=>b.type.excludes(n));f=y&&w}return!f}),f})}var _B=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=n,{empty:a,ranges:c}=i,u=ei(t,r.schema);if(s)if(a){const f=LM(r,u);n.addStoredMark(u.create({...f,...e}))}else c.forEach(f=>{const p=f.$from.pos,m=f.$to.pos;r.doc.nodesBetween(p,m,(x,y)=>{const w=Math.max(y,p),b=Math.min(y+x.nodeSize,m);x.marks.find(N=>N.type===u)?x.marks.forEach(N=>{u===N.type&&n.addMark(w,b,u.create({...N.attrs,...e}))}):n.addMark(w,b,u.create(e))})});return LB(r,n,u)},zB=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),FB=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const i=It(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:c})=>ek(i,{...a,...e})(n)?!0:c.clearNodes()).command(({state:c})=>ek(i,{...a,...e})(c,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},$B=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,s=So(t,0,r.content.size),i=Ee.create(r,s);e.setSelection(i)}return!0},BB=(t,e)=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=r;let a,c;return typeof e=="number"?(a=e,c=e):e&&"from"in e&&"to"in e?(a=e.from,c=e.to):(a=i.from,c=i.to),s&&n.doc.nodesBetween(a,c,(u,f)=>{u.isText||n.setNodeMarkup(f,void 0,{...u.attrs,dir:t})}),!0},HB=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,a=De.atStart(r).from,c=De.atEnd(r).to,u=So(s,a,c),f=So(i,a,c),p=De.create(r,u,f);e.setSelection(p)}return!0},VB=t=>({state:e,dispatch:n})=>{const r=It(t,e.schema);return IF(r)(e,n)};function Vk(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(s=>e?.includes(s.type.name));t.tr.ensureMarks(r)}}var UB=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:i,doc:a}=e,{$from:c,$to:u}=i,f=s.extensionManager.attributes,p=Kd(f,c.node().type.name,c.node().attrs);if(i instanceof Ee&&i.node.isBlock)return!c.parentOffset||!Ks(a,c.pos)?!1:(r&&(t&&Vk(n,s.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;const m=u.parentOffset===u.parent.content.size,x=c.depth===0?void 0:xB(c.node(-1).contentMatchAt(c.indexAfter(-1)));let y=m&&x?[{type:x,attrs:p}]:void 0,w=Ks(e.doc,e.mapping.map(c.pos),1,y);if(!y&&!w&&Ks(e.doc,e.mapping.map(c.pos),1,x?[{type:x}]:void 0)&&(w=!0,y=x?[{type:x,attrs:p}]:void 0),r){if(w&&(i instanceof De&&e.deleteSelection(),e.split(e.mapping.map(c.pos),1,y),x&&!m&&!c.parentOffset&&c.parent.type!==x)){const b=e.mapping.map(c.before()),S=e.doc.resolve(b);c.node(-1).canReplaceWith(S.index(),S.index()+1,x)&&e.setNodeMarkup(e.mapping.map(c.before()),x)}t&&Vk(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return w},WB=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{var a;const c=It(t,r.schema),{$from:u,$to:f}=r.selection,p=r.selection.node;if(p&&p.isBlock||u.depth<2||!u.sameParent(f))return!1;const m=u.node(-1);if(m.type!==c)return!1;const x=i.extensionManager.attributes;if(u.parent.content.size===0&&u.node(-1).childCount===u.indexAfter(-1)){if(u.depth===2||u.node(-3).type!==c||u.index(-2)!==u.node(-2).childCount-1)return!1;if(s){let N=G.empty;const E=u.index(-1)?1:u.index(-2)?2:3;for(let z=u.depth-E;z>=u.depth-3;z-=1)N=G.from(u.node(z).copy(N));const M=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,j={...Kd(x,u.node().type.name,u.node().attrs),...e},A=((a=c.contentMatch.defaultType)==null?void 0:a.createAndFill(j))||void 0;N=N.append(G.from(c.createAndFill(null,A)||void 0));const P=u.before(u.depth-(E-1));n.replace(P,u.after(-M),new pe(N,4-E,0));let O=-1;n.doc.nodesBetween(P,n.doc.content.size,(z,U)=>{if(O>-1)return!1;z.isTextblock&&z.content.size===0&&(O=U+1)}),O>-1&&n.setSelection(De.near(n.doc.resolve(O))),n.scrollIntoView()}return!0}const y=f.pos===u.end()?m.contentMatchAt(0).defaultType:null,w={...Kd(x,m.type.name,m.attrs),...e},b={...Kd(x,u.node().type.name,u.node().attrs),...e};n.delete(u.pos,f.pos);const S=y?[{type:c,attrs:w},{type:y,attrs:b}]:[{type:c,attrs:w}];if(!Ks(n.doc,u.pos,2))return!1;if(s){const{selection:N,storedMarks:E}=r,{splittableMarks:M}=i.extensionManager,j=E||N.$to.parentOffset&&N.$from.marks();if(n.split(u.pos,2,S).scrollIntoView(),!j||!s)return!0;const A=j.filter(P=>M.includes(P.type.name));n.ensureMarks(A)}return!0},Eg=(t,e)=>{const n=qh(a=>a.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 s=t.doc.nodeAt(r);return n.node.type===s?.type&&Zi(t.doc,n.pos)&&t.join(n.pos),!0},Tg=(t,e)=>{const n=qh(a=>a.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 s=t.doc.nodeAt(r);return n.node.type===s?.type&&Zi(t.doc,r)&&t.join(r),!0},KB=(t,e,n,r={})=>({editor:s,tr:i,state:a,dispatch:c,chain:u,commands:f,can:p})=>{const{extensions:m,splittableMarks:x}=s.extensionManager,y=It(t,a.schema),w=It(e,a.schema),{selection:b,storedMarks:S}=a,{$from:N,$to:E}=b,M=N.blockRange(E),j=S||b.$to.parentOffset&&b.$from.marks();if(!M)return!1;const A=qh(P=>Hk(P.type.name,m))(b);if(M.depth>=1&&A&&M.depth-A.depth<=1){if(A.node.type===y)return f.liftListItem(w);if(Hk(A.node.type.name,m)&&y.validContent(A.node.content)&&c)return u().command(()=>(i.setNodeMarkup(A.pos,y),!0)).command(()=>Eg(i,y)).command(()=>Tg(i,y)).run()}return!n||!j||!c?u().command(()=>p().wrapInList(y,r)?!0:f.clearNodes()).wrapInList(y,r).command(()=>Eg(i,y)).command(()=>Tg(i,y)).run():u().command(()=>{const P=p().wrapInList(y,r),O=j.filter(z=>x.includes(z.type.name));return i.ensureMarks(O),P?!0:f.clearNodes()}).wrapInList(y,r).command(()=>Eg(i,y)).command(()=>Tg(i,y)).run()},qB=(t,e={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=n,a=ei(t,r.schema);return Ix(r,a,e)?s.unsetMark(a,{extendEmptyMarkRange:i}):s.setMark(a,e)},GB=(t,e,n={})=>({state:r,commands:s})=>{const i=It(t,r.schema),a=It(e,r.schema),c=Gi(r,i,n);let u;return r.selection.$anchor.sameParent(r.selection.$head)&&(u=r.selection.$anchor.parent.attrs),c?s.setNode(a,u):s.setNode(i,{...u,...n})},QB=(t,e={})=>({state:n,commands:r})=>{const s=It(t,n.schema);return Gi(n,s,e)?r.lift(s):r.wrapIn(s,e)},JB=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){const a=t.tr,c=i.transform;for(let u=c.steps.length-1;u>=0;u-=1)a.step(c.steps[u].invert(c.docs[u]));if(i.text){const u=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,u))}else a.delete(i.from,i.to)}return!0}}return!1},YB=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:s}=n;return r||e&&s.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},XB=(t,e={})=>({tr:n,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:c}=n,u=ei(t,r.schema),{$from:f,empty:p,ranges:m}=c;if(!s)return!0;if(p&&a){let{from:x,to:y}=c;const w=(i=f.marks().find(S=>S.type===u))==null?void 0:i.attrs,b=vv(f,u,w);b&&(x=b.from,y=b.to),n.removeMark(x,y,u)}else m.forEach(x=>{n.removeMark(x.$from.pos,x.$to.pos,u)});return n.removeStoredMark(u),!0},ZB=t=>({tr:e,state:n,dispatch:r})=>{const{selection:s}=n;let i,a;return typeof t=="number"?(i=t,a=t):t&&"from"in t&&"to"in t?(i=t.from,a=t.to):(i=s.from,a=s.to),r&&e.doc.nodesBetween(i,a,(c,u)=>{if(c.isText)return;const f={...c.attrs};delete f.dir,e.setNodeMarkup(u,void 0,f)}),!0},eH=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,a=null;const c=Kh(typeof t=="string"?t:t.name,r.schema);if(!c)return!1;c==="node"&&(i=It(t,r.schema)),c==="mark"&&(a=ei(t,r.schema));let u=!1;return n.selection.ranges.forEach(f=>{const p=f.$from.pos,m=f.$to.pos;let x,y,w,b;n.selection.empty?r.doc.nodesBetween(p,m,(S,N)=>{i&&i===S.type&&(u=!0,w=Math.max(N,p),b=Math.min(N+S.nodeSize,m),x=N,y=S)}):r.doc.nodesBetween(p,m,(S,N)=>{N<p&&i&&i===S.type&&(u=!0,w=Math.max(N,p),b=Math.min(N+S.nodeSize,m),x=N,y=S),N>=p&&N<=m&&(i&&i===S.type&&(u=!0,s&&n.setNodeMarkup(N,void 0,{...S.attrs,...e})),a&&S.marks.length&&S.marks.forEach(E=>{if(a===E.type&&(u=!0,s)){const M=Math.max(N,p),j=Math.min(N+S.nodeSize,m);n.addMark(M,j,a.create({...E.attrs,...e}))}}))}),y&&(x!==void 0&&s&&n.setNodeMarkup(x,void 0,{...y.attrs,...e}),a&&y.marks.length&&y.marks.forEach(S=>{a===S.type&&s&&n.addMark(w,b,a.create({...S.attrs,...e}))}))}),u},tH=(t,e={})=>({state:n,dispatch:r})=>{const s=It(t,n.schema);return MF(s,e)(n,r)},nH=(t,e={})=>({state:n,dispatch:r})=>{const s=It(t,n.schema);return jF(s,e)(n,r)},rH=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},Qh=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},sH=(t,e)=>{if(yv(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 Td(t){var e;const{editor:n,from:r,to:s,text:i,rules:a,plugin:c}=t,{view:u}=n;if(u.composing)return!1;const f=u.state.doc.resolve(r);if(f.parent.type.spec.code||(e=f.nodeBefore||f.nodeAfter)!=null&&e.marks.find(x=>x.type.spec.code))return!1;let p=!1;const m=AB(f)+i;return a.forEach(x=>{if(p)return;const y=sH(m,x.find);if(!y)return;const w=u.state.tr,b=Uh({state:u.state,transaction:w}),S={from:r-(y[0].length-i.length),to:s},{commands:N,chain:E,can:M}=new Wh({editor:n,state:b});x.handler({state:b,range:S,match:y,commands:N,chain:E,can:M})===null||!w.steps.length||(x.undoable&&w.setMeta(c,{transform:w,from:r,to:s,text:i}),u.dispatch(w),p=!0)}),p}function iH(t){const{editor:e,rules:n}=t,r=new bt({state:{init(){return null},apply(s,i,a){const c=s.getMeta(r);if(c)return c;const u=s.getMeta("applyInputRules");return u&&setTimeout(()=>{let{text:p}=u;typeof p=="string"?p=p:p=wv(G.from(p),a.schema);const{from:m}=u,x=m+p.length;Td({editor:e,from:m,to:x,text:p,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,a,c){return Td({editor:e,from:i,to:a,text:c,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&Td({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:a}=s.state.selection;return a?Td({editor:e,from:a.pos,to:a.pos,text:` 75`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function oH(t){return Object.prototype.toString.call(t).slice(8,-1)}function Md(t){return oH(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function GM(t,e){const n={...t};return Md(t)&&Md(e)&&Object.keys(e).forEach(r=>{Md(e[r])&&Md(t[r])?n[r]=GM(t[r],e[r]):n[r]=e[r]}),n}var Sv=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...et(Ne(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...et(Ne(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>GM(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Qo=class QM extends Sv{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new QM(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const a=s.marks();if(!!!a.find(f=>f?.type.name===n.name))return!1;const u=a.find(f=>f?.type.name===n.name);return u&&r.removeStoredMark(u),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function aH(t){return typeof t=="number"}var lH=class{constructor(t){this.find=t.find,this.handler=t.handler}},cH=(t,e,n)=>{if(yv(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function uH(t){const{editor:e,state:n,from:r,to:s,rule:i,pasteEvent:a,dropEvent:c}=t,{commands:u,chain:f,can:p}=new Wh({editor:e,state:n}),m=[];return n.doc.nodesBetween(r,s,(y,w)=>{var b,S,N,E,M;if((S=(b=y.type)==null?void 0:b.spec)!=null&&S.code||!(y.isText||y.isTextblock||y.isInline))return;const j=(M=(E=(N=y.content)==null?void 0:N.size)!=null?E:y.nodeSize)!=null?M:0,A=Math.max(r,w),P=Math.min(s,w+j);if(A>=P)return;const O=y.isText?y.text||"":y.textBetween(A-w,P-w,void 0,"");cH(O,i.find,a).forEach(U=>{if(U.index===void 0)return;const Y=A+U.index+1,Q=Y+U[0].length,X={from:n.tr.mapping.map(Y),to:n.tr.mapping.map(Q)},le=i.handler({state:n,range:X,match:U,commands:u,chain:f,can:p,pasteEvent:a,dropEvent:c});m.push(le)})}),m.every(y=>y!==null)}var jd=null,dH=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function fH(t){const{editor:e,rules:n}=t;let r=null,s=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,c;try{c=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{c=null}const u=({state:p,from:m,to:x,rule:y,pasteEvt:w})=>{const b=p.tr,S=Uh({state:p,transaction:b});if(!(!uH({editor:e,state:S,from:Math.max(m-1,0),to:x.b-1,rule:y,pasteEvent:w,dropEvent:c})||!b.steps.length)){try{c=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{c=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return n.map(p=>new bt({view(m){const x=w=>{var b;r=(b=m.dom.parentElement)!=null&&b.contains(w.target)?m.dom.parentElement:null,r&&(jd=e)},y=()=>{jd&&(jd=null)};return window.addEventListener("dragstart",x),window.addEventListener("dragend",y),{destroy(){window.removeEventListener("dragstart",x),window.removeEventListener("dragend",y)}}},props:{handleDOMEvents:{drop:(m,x)=>{if(i=r===m.dom.parentElement,c=x,!i){const y=jd;y?.isEditable&&setTimeout(()=>{const w=y.state.selection;w&&y.commands.deleteRange({from:w.from,to:w.to})},10)}return!1},paste:(m,x)=>{var y;const w=(y=x.clipboardData)==null?void 0:y.getData("text/html");return a=x,s=!!w?.includes("data-pm-slice"),!1}}},appendTransaction:(m,x,y)=>{const w=m[0],b=w.getMeta("uiEvent")==="paste"&&!s,S=w.getMeta("uiEvent")==="drop"&&!i,N=w.getMeta("applyPasteRules"),E=!!N;if(!b&&!S&&!E)return;if(E){let{text:A}=N;typeof A=="string"?A=A:A=wv(G.from(A),y.schema);const{from:P}=N,O=P+A.length,z=dH(A);return u({rule:p,state:y,from:P,to:{b:O},pasteEvt:z})}const M=x.doc.content.findDiffStart(y.doc.content),j=x.doc.content.findDiffEnd(y.doc.content);if(!(!aH(M)||!j||M===j.b))return u({rule:p,state:y,from:M,to:j,pasteEvt:a})}}))}var Jh=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=$M(t),this.schema=SB(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Xl(e.name,this.schema)},r=Ne(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return gc([...this.extensions].reverse()).flatMap(r=>{const s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:Xl(r.name,this.schema)},i=[],a=Ne(r,"addKeyboardShortcuts",s);let c={};if(r.type==="mark"&&Ne(r,"exitable",s)&&(c.ArrowRight=()=>Qo.handleExit({editor:t,mark:r})),a){const x=Object.fromEntries(Object.entries(a()).map(([y,w])=>[y,()=>w({editor:t})]));c={...c,...x}}const u=N$(c);i.push(u);const f=Ne(r,"addInputRules",s);if(Bk(r,t.options.enableInputRules)&&f){const x=f();if(x&&x.length){const y=iH({editor:t,rules:x}),w=Array.isArray(y)?y:[y];i.push(...w)}}const p=Ne(r,"addPasteRules",s);if(Bk(r,t.options.enablePasteRules)&&p){const x=p();if(x&&x.length){const y=fH({editor:t,rules:x});i.push(...y)}}const m=Ne(r,"addProseMirrorPlugins",s);if(m){const x=m();i.push(...x)}return i})}get attributes(){return FM(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Ha(this.extensions);return Object.fromEntries(e.filter(n=>!!Ne(n,"addNodeView")).map(n=>{const r=this.attributes.filter(u=>u.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:It(n.name,this.schema)},i=Ne(n,"addNodeView",s);if(!i)return[];const a=i();if(!a)return[];const c=(u,f,p,m,x)=>{const y=zc(u,r);return a({node:u,view:f,getPos:p,decorations:m,innerDecorations:x,editor:t,extension:n,HTMLAttributes:y})};return[n.name,c]}))}dispatchTransaction(t){const{editor:e}=this;return gc([...this.extensions].reverse()).reduceRight((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:Xl(s.name,this.schema)},a=Ne(s,"dispatchTransaction",i);return a?c=>{a.call(i,{transaction:c,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return gc([...this.extensions]).reduce((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:Xl(s.name,this.schema)},a=Ne(s,"transformPastedHTML",i);return a?(c,u)=>{const f=r(c,u);return a.call(i,f)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Ha(this.extensions);return Object.fromEntries(e.filter(n=>!!Ne(n,"addMarkView")).map(n=>{const r=this.attributes.filter(c=>c.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ei(n.name,this.schema)},i=Ne(n,"addMarkView",s);if(!i)return[];const a=(c,u,f)=>{const p=zc(c,r);return i()({mark:c,view:u,inline:f,editor:t,extension:n,HTMLAttributes:p,updateAttributes:m=>{EH(c,t,m)}})};return[n.name,a]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Xl(e.name,this.schema)};e.type==="mark"&&((n=et(Ne(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const s=Ne(e,"onBeforeCreate",r),i=Ne(e,"onCreate",r),a=Ne(e,"onUpdate",r),c=Ne(e,"onSelectionUpdate",r),u=Ne(e,"onTransaction",r),f=Ne(e,"onFocus",r),p=Ne(e,"onBlur",r),m=Ne(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),a&&this.editor.on("update",a),c&&this.editor.on("selectionUpdate",c),u&&this.editor.on("transaction",u),f&&this.editor.on("focus",f),p&&this.editor.on("blur",p),m&&this.editor.on("destroy",m)})}};Jh.resolve=$M;Jh.sort=gc;Jh.flatten=bv;var hH={};xv(hH,{ClipboardTextSerializer:()=>YM,Commands:()=>XM,Delete:()=>ZM,Drop:()=>ej,Editable:()=>tj,FocusEvents:()=>rj,Keymap:()=>sj,Paste:()=>ij,Tabindex:()=>oj,TextDirection:()=>aj,focusEventsPluginKey:()=>nj});var Rt=class JM extends Sv{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new JM(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},YM=Rt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new bt({key:new Ut("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,{ranges:i}=s,a=Math.min(...i.map(p=>p.$from.pos)),c=Math.max(...i.map(p=>p.$to.pos)),u=HM(n);return BM(r,{from:a,to:c},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:u})}}})]}}),XM=Rt.create({name:"commands",addCommands(){return{...AM}}}),ZM=Rt.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,s;const i=()=>{var a,c,u,f;if((f=(u=(c=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:c.filterTransaction)==null?void 0:u.call(c,t))!=null?f:t.getMeta("y-sync$"))return;const p=_M(t.before,[t,...e]);UM(p).forEach(y=>{p.mapping.mapResult(y.oldRange.from).deletedAfter&&p.mapping.mapResult(y.oldRange.to).deletedBefore&&p.before.nodesBetween(y.oldRange.from,y.oldRange.to,(w,b)=>{const S=b+w.nodeSize-2,N=y.oldRange.from<=b&&S<=y.oldRange.to;this.editor.emit("delete",{type:"node",node:w,from:b,to:S,newFrom:p.mapping.map(b),newTo:p.mapping.map(S),deletedRange:y.oldRange,newRange:y.newRange,partial:!N,editor:this.editor,transaction:t,combinedTransform:p})})});const x=p.mapping;p.steps.forEach((y,w)=>{var b,S;if(y instanceof qr){const N=x.slice(w).map(y.from,-1),E=x.slice(w).map(y.to),M=x.invert().map(N,-1),j=x.invert().map(E),A=(b=p.doc.nodeAt(N-1))==null?void 0:b.marks.some(O=>O.eq(y.mark)),P=(S=p.doc.nodeAt(E))==null?void 0:S.marks.some(O=>O.eq(y.mark));this.editor.emit("delete",{type:"mark",mark:y.mark,from:y.from,to:y.to,deletedRange:{from:M,to:j},newRange:{from:N,to:E},partial:!!(P||A),editor:this.editor,transaction:t,combinedTransform:p})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(i,0):i()}}),ej=Rt.create({name:"drop",addProseMirrorPlugins(){return[new bt({key:new Ut("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),tj=Rt.create({name:"editable",addProseMirrorPlugins(){return[new bt({key:new Ut("editable"),props:{editable:()=>this.editor.options.editable}})]}}),nj=new Ut("focusEvents"),rj=Rt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new bt({key:nj,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}}}})]}}),sj=Rt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:c})=>{const{selection:u,doc:f}=c,{empty:p,$anchor:m}=u,{pos:x,parent:y}=m,w=m.parent.isTextblock&&x>0?c.doc.resolve(x-1):m,b=w.parent.type.spec.isolating,S=m.pos-m.parentOffset,N=b&&w.parent.childCount===1?S===m.pos:ze.atStart(f).from===x;return!p||!y.type.isTextblock||y.textContent.length||!N||N&&m.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.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()},s={...r},i={...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 Nf()||IM()?i:s},addProseMirrorPlugins(){return[new bt({key:new Ut("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(b=>b.getMeta("composition")))return;const r=t.some(b=>b.docChanged)&&!e.doc.eq(n.doc),s=t.some(b=>b.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:a,to:c}=e.selection,u=ze.atStart(e.doc).from,f=ze.atEnd(e.doc).to;if(i||!(a===u&&c===f)||!Gh(n.doc))return;const x=n.tr,y=Uh({state:n,transaction:x}),{commands:w}=new Wh({editor:this.editor,state:y});if(w.clearNodes(),!!x.steps.length)return x}})]}}),ij=Rt.create({name:"paste",addProseMirrorPlugins(){return[new bt({key:new Ut("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),oj=Rt.create({name:"tabindex",addProseMirrorPlugins(){return[new bt({key:new Ut("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),aj=Rt.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Ha(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new bt({key:new Ut("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),pH=class ic{constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You canât set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ic(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 ic(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 ic(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,a=n.isInline,c=this.pos+r+(i?0:1);if(c<0||c>this.resolvedPos.doc.nodeSize-2)return;const u=this.resolvedPos.doc.resolve(c);if(!s&&!a&&u.depth<=this.depth)return;const f=new ic(u,this.editor,s,s||a?n:null);s&&(f.actualDepth=this.depth+1),e.push(f)}),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,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){const i=s.node.attrs,a=Object.keys(n);for(let c=0;c<a.length;c+=1){const u=a[c];if(i[u]!==n[u])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(n);return this.children.forEach(a=>{r&&s.length>0||(a.node.type.name===e&&i.every(u=>n[u]===a.node.attrs[u])&&s.push(a),!(r&&s.length>0)&&(s=s.concat(a.querySelectorAll(e,n,r))))}),s}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},mH=`.ProseMirror { 76 position: relative; 77} 78 79.ProseMirror { 80 word-wrap: break-word; 81 white-space: pre-wrap; 82 white-space: break-spaces; 83 -webkit-font-variant-ligatures: none; 84 font-variant-ligatures: none; 85 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 86} 87 88.ProseMirror [contenteditable="false"] { 89 white-space: normal; 90} 91 92.ProseMirror [contenteditable="false"] [contenteditable="true"] { 93 white-space: pre-wrap; 94} 95 96.ProseMirror pre { 97 white-space: pre-wrap; 98} 99 100img.ProseMirror-separator { 101 display: inline !important; 102 border: none !important; 103 margin: 0 !important; 104 width: 0 !important; 105 height: 0 !important; 106} 107 108.ProseMirror-gapcursor { 109 display: none; 110 pointer-events: none; 111 position: absolute; 112 margin: 0; 113} 114 115.ProseMirror-gapcursor:after {
116 content: ""; 117 display: block; 118 position: absolute; 119 top: -2px; 120 width: 20px; 121 border-top: 1px solid black; 122 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 123} 124 125@keyframes ProseMirror-cursor-blink { 126 to { 127 visibility: hidden; 128 } 129} 130 131.ProseMirror-hideselection *::selection { 132 background: transparent; 133} 134 135.ProseMirror-hideselection *::-moz-selection { 136 background: transparent; 137} 138 139.ProseMirror-hideselection * { 140 caret-color: transparent; 141} 142 143.ProseMirror-focused .ProseMirror-gapcursor { 144 display: block; 145}`;function gH(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}var xH=class extends rH{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:DB,createMappablePosition:IB},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:s,moved:i})=>this.options.onDrop(r,s,i)),this.on("paste",({event:r,slice:s})=>this.options.onPaste(r,s)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=PM(e,this.options.autofocus);this.editorState=Ta.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=gH(mH,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}
vendor: 8,213 bytes, lines 145-147
145),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=zM(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(s=>{const i=typeof s=="string"?`${s}$`:s.key;n=n.filter(a=>!a.key.startsWith(i))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[tj,YM.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),XM,rj,sj,oj,ej,ij,ZM,aj.configure({direction:this.options.textDirection})].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s?.type));this.extensionManager=new Jh(r,this)}createCommandManager(){this.commandManager=new Wh({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=Dx(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=Dx(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),s=n?this.extensionManager.dispatchTransaction(r):r,i=e.transformPastedHTML,a=this.extensionManager.transformPastedHTML(i);this.editorView=new MM(t,{...e,attributes:{role:"textbox",...e?.attributes},dispatchTransaction:s,transformPastedHTML:a,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const c=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(c),this.prependClass(),this.injectCSS();const u=this.view.dom;u.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(f=>{var p;return(p=this.capturedTransaction)==null?void 0:p.step(f)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),s=n.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const a=n.findLast(f=>f.getMeta("focus")||f.getMeta("blur")),c=a?.getMeta("focus"),u=a?.getMeta("blur");c&&this.emit("focus",{editor:this,event:c.event,transaction:a}),u&&this.emit("blur",{editor:this,event:u.event,transaction:a}),!(t.getMeta("preventUpdate")||!n.some(f=>f.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return VM(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return RB(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return wv(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=` 146 147`,textSerializers:n={}}=t||{};return NB(this.state.doc,{blockSeparator:e,textSerializers:{...HM(this.schema),...n}})}get isEmpty(){return Gh(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new pH(e,this)}get $doc(){return this.$pos(0)}};function Va(t){return new Qh({find:t.find,handler:({state:e,range:n,match:r})=>{const s=et(t.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,a=r[r.length-1],c=r[0];if(a){const u=c.search(/\S/),f=n.from+c.indexOf(a),p=f+a.length;if(kv(n.from,n.to,e.doc).filter(y=>y.mark.type.excluded.find(b=>b===t.type&&b!==y.mark.type)).filter(y=>y.to>f).length)return null;p<n.to&&i.delete(p,n.to),f>n.from&&i.delete(n.from+u,f);const x=n.from+u+a.length;i.addMark(n.from+u,x,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function yH(t){return new Qh({find:t.find,handler:({state:e,range:n,match:r})=>{const s=et(t.getAttributes,void 0,r)||{},{tr:i}=e,a=n.from;let c=n.to;const u=t.type.create(s);if(r[1]){const f=r[0].lastIndexOf(r[1]);let p=a+f;p>c?p=c:c=p+r[1].length;const m=r[0][r[0].length-1];i.insertText(m,a+r[0].length-1),i.replaceWith(p,c,u)}else if(r[0]){const f=t.type.isInline?a:a-1;i.insert(f,t.type.create(s)).delete(i.mapping.map(a),i.mapping.map(c))}i.scrollIntoView()},undoable:t.undoable})}function Lx(t){return new Qh({find:t.find,handler:({state:e,range:n,match:r})=>{const s=e.doc.resolve(n.from),i=et(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Ua(t){return new Qh({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{const i=et(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),u=a.doc.resolve(n.from).blockRange(),f=u&&tv(u,t.type,i);if(!f)return null;if(a.wrap(u,f),t.keepMarks&&t.editor){const{selection:m,storedMarks:x}=e,{splittableMarks:y}=t.editor.extensionManager,w=x||m.$to.parentOffset&&m.$from.marks();if(w){const b=w.filter(S=>y.includes(S.type.name));a.ensureMarks(b)}}if(t.keepAttributes){const m=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(m,i).run()}const p=a.doc.resolve(n.from-1).nodeBefore;p&&p.type===t.type&&Zi(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,p))&&a.join(n.from-1)},undoable:t.undoable})}function vH(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Ee){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){const i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}var bH={};xv(bH,{createAtomBlockMarkdownSpec:()=>wH,createBlockMarkdownSpec:()=>kH,createInlineMarkdownSpec:()=>NH,parseAttributes:()=>Cv,parseIndentedBlocks:()=>_x,renderNestedMarkdownContent:()=>Ev,serializeAttributes:()=>Nv});function Cv(t){if(!t?.trim())return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,f=>(n.push(f),`__QUOTED_${n.length-1}
147__`)),s=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(s){const f=s.map(p=>p.trim().slice(1));e.class=f.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(a)).forEach(([,f,p])=>{var m;const x=parseInt(((m=p.match(/__QUOTED_(\d+)__/))==null?void 0:m[1])||"0",10),y=n[x];y&&(e[f]=y.slice(1,-1))});const u=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return u&&u.split(/\s+/).filter(Boolean).forEach(p=>{p.match(/^[a-zA-Z][\w-]*$/)&&(e[p]=!0)}),e}function Nv(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function wH(t){const{nodeName:e,name:n,parseAttributes:r=Cv,serializeAttributes:s=Nv,defaultAttributes:i={},requiredAttributes:a=[],allowedAttributes:c}=t,u=n||e,f=p=>{if(!c)return p;const m={};return c.forEach(x=>{x in p&&(m[x]=p[x])}),m};return{parseMarkdown:(p,m)=>{const x={...i,...p.attributes};return m.createNode(e,x,[])},markdownTokenizer:{name:e,level:"block",start(p){var m;const x=new RegExp(`^:::${u}(?:\\s|$)`,"m"),y=(m=p.match(x))==null?void 0:m.index;return y!==void 0?y:-1},tokenize(p,m,x){const y=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),w=p.match(y);if(!w)return;const b=w[1]||"",S=r(b);if(!a.find(E=>!(E in S)))return{type:e,raw:w[0],attributes:S}}},renderMarkdown:p=>{const m=f(p.attrs||{}),x=s(m),y=x?` {${x}}`:"";return`:::${u}${y} :::`}}}function kH(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=Cv,serializeAttributes:i=Nv,defaultAttributes:a={},content:c="block",allowedAttributes:u}=t,f=n||e,p=m=>{if(!u)return m;const x={};return u.forEach(y=>{y in m&&(x[y]=m[y])}),x};return{parseMarkdown:(m,x)=>{let y;if(r){const b=r(m);y=typeof b=="string"?[{type:"text",text:b}]:b}else c==="block"?y=x.parseChildren(m.tokens||[]):y=x.parseInline(m.tokens||[]);const w={...a,...m.attributes};return x.createNode(e,w,y)},markdownTokenizer:{name:e,level:"block",start(m){var x;const y=new RegExp(`^:::${f}`,"m"),w=(x=m.match(y))==null?void 0:x.index;return w!==void 0?w:-1},tokenize(m,x,y){var w;const b=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),S=m.match(b);if(!S)return;const[N,E=""]=S,M=s(E);let j=1;const A=N.length;let P="";const O=/^:::([\w-]*)(\s.*)?/gm,z=m.slice(A);for(O.lastIndex=0;;){const U=O.exec(z);if(U===null)break;const Y=U.index,Q=U[1];if(!((w=U[2])!=null&&w.endsWith(":::"))){if(Q)j+=1;else if(j-=1,j===0){const X=z.slice(0,Y);P=X.trim();const le=m.slice(0,A+Y+U[0].length);let W=[];if(P)if(c==="block")for(W=y.blockTokens(X),W.forEach(ce=>{ce.text&&(!ce.tokens||ce.tokens.length===0)&&(ce.tokens=y.inlineTokens(ce.text))});W.length>0;){const ce=W[W.length-1];if(ce.type==="paragraph"&&(!ce.text||ce.text.trim()===""))W.pop();else break}else W=y.inlineTokens(P);return{type:e,raw:le,attributes:M,content:P,tokens:W}}}}}},renderMarkdown:(m,x)=>{const y=p(m.attrs||{}),w=i(y),b=w?` {${w}}`:"",S=x.renderChildren(m.content||[],` 148 149`);return`:::${f}${b} 150 151${S} 152 153:::`}}}function SH(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,s,i,a]=r;e[s]=i||a,r=n.exec(t)}return e}function CH(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function NH(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=SH,serializeAttributes:i=CH,defaultAttributes:a={},selfClosing:c=!1,allowedAttributes:u}=t,f=n||e,p=x=>
153{if(!u)return x;const y={};return u.forEach(w=>{const b=typeof w=="string"?w:w.name,S=typeof w=="string"?void 0:w.skipIfDefault;if(b in x){const N=x[b];if(S!==void 0&&N===S)return;y[b]=N}}),y},m=f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(x,y)=>{const w={...a,...x.attributes};if(c)return y.createNode(e,w);const b=r?r(x):x.content||"";return b?y.createNode(e,w,[y.createTextNode(b)]):y.createNode(e,w,[])},markdownTokenizer:{name:e,level:"inline",start(x){const y=c?new RegExp(`\\[${m}\\s*[^\\]]*\\]`):new RegExp(`\\[${m}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${m}\\]`),w=x.match(y),b=w?.index;return b!==void 0?b:-1},tokenize(x,y,w){const b=c?new RegExp(`^\\[${m}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${m}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${m}\\]`),S=x.match(b);if(!S)return;let N="",E="";if(c){const[,j]=S;E=j}else{const[,j,A]=S;E=j,N=A||""}const M=s(E.trim());return{type:e,raw:S[0],content:N.trim(),attributes:M}}},renderMarkdown:x=>{let y="";r?y=r(x):x.content&&x.content.length>0&&(y=x.content.filter(N=>N.type==="text").map(N=>N.text).join(""));const w=p(x.attrs||{}),b=i(w),S=b?` ${b}`:"";return c?`[${f}${S}]`:`[${f}${S}]${y}[/${f}]`}}}function _x(t,e,n){var r,s,i,a;const c=t.split(` 154`),u=[];let f="",p=0;const m=e.baseIndentSize||2;for(;p<c.length;){const x=c[p],y=x.match(e.itemPattern);if(!y){if(u.length>0)break;if(x.trim()===""){p+=1,f=`${f}${x} 155`;continue}else return}const w=e.extractItemData(y),{indentLevel:b,mainContent:S}=w;f=`${f}${x} 156`;const N=[S];for(p+=1;p<c.length;){const A=c[p];if(A.trim()===""){const O=c.slice(p+1).findIndex(Y=>Y.trim()!=="");if(O===-1)break;if((((s=(r=c[p+1+O].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:s.length)||0)>b){N.push(A),f=`${f}${A} 157`,p+=1;continue}else break}if((((a=(i=A.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:a.length)||0)>b)N.push(A),f=`${f}${A} 158`,p+=1;else break}let E;const M=N.slice(1);if(M.length>0){const A=M.map(P=>P.slice(b+m)).join(` 159`);A.trim()&&(e.customNestedParser?E=e.customNestedParser(A):E=n.blockTokens(A))}const j=e.createToken(w,E);u.push(j)}if(u.length!==0)return{items:u,raw:f}}function Ev(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const s=typeof n=="function"?n(r):n,[i,...a]=t.content,c=e.renderChildren([i]),u=[`${s}${c}`];return a&&a.length>0&&a.forEach(f=>{const p=e.renderChildren([f]);if(p){const m=p.split(` 160`).map(x=>x?e.indent(x):"").join(` 161`);u.push(m)}}),u.join(` 162`)}function EH(t,e,n={}){const{state:r}=e,{doc:s,tr:i}=r,a=t;s.descendants((c,u)=>{const f=i.mapping.map(u),p=i.mapping.map(u)+c.nodeSize;let m=null;if(c.marks.forEach(y=>{if(y!==a)return!1;m=y}),!m)return;let x=!1;if(Object.keys(n).forEach(y=>{n[y]!==m.attrs[y]&&(x=!0)}),x){const y=t.type.create({...t.attrs,...n});i.removeMark(f,p,t.type),i.addMark(f,p,y)}}),i.docChanged&&e.view.dispatch(i)}var ar=class lj extends Sv{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new lj(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Ho(t){return new lH({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{const i=et(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:a}=e,c=r[r.length-1],u=r[0];let f=n.to;if(c){const p=u.search(/\S/),m=n.from+u.indexOf(c),x=m+c.length;if(kv(n.from,n.to,e.doc).filter(w=>w.mark.type.excluded.find(S=>S===t.type&&S!==w.mark.type)).filter(w=>w.to>m).length)return null;x<n.to&&a.delete(x,n.to),m>n.from&&a.delete(n.from+p,m),f=n.from+p+c.length,a.addMark(n.from+p,f,t.type.create(i||{})),a.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:TH,getOwnPropertySymbols:MH}=Object,{hasOwnProperty:jH}=Object.prototype;function Mg(t,e){return function(r,s,i){return t(r,s,i)&&e(r,s,i)}}function Ad(t){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,s);const{cache:i}=s,a=i.get(n),c=i.get(r);if(a&&c)return a===r&&c===n;i.set(n,r),i.set(r,n);const u=t(n,r,s);return i.delete(n),i.delete(r),u}}function AH(t){return t?.[Symbol.toStringTag]}function Uk(t){return TH(t).concat(MH(t))}const RH=Object.hasOwn||((t,e)=>jH.call(t,e));function Jo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const OH="__v",PH="__o",DH="_owner",{getOwnPropertyDescriptor:Wk,keys:Kk}=Object;function IH(t,e){return t.byteLength===e.byteLength&&Ef(new Uint8Array(t),new Uint8Array(e))}function LH(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function _H(t,e){return t.byteLength===e.byteLength&&Ef(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function zH(t,e){return Jo(t.getTime(),e.getTime())}function FH(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function $H(t,e){return t===e}function qk(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.entries();let a,c,u=0;for(;(a=i.next())&&!a.done;){const f=e.entries();let p=!1,m=0;for(;(c=f.next())&&!c.done;){if(s[m]){m++;continue}const x=a.value,y=c.value;if(n.equals(x[0],y[0],u,m,t,e,n)&&n.equals(x[1],y[1],x[0],y[0],t,e,n)){p=s[m]=!0;break}m++}if(!p)return!1;u++}return!0}const BH=Jo;function HH(t,e,n){const r=Kk(t);let s=r.length;if(Kk(e).length!==s)return!1;for(;s-- >0;)if(!cj(t,e,n,r[s]))return!1;return!0}function Zl(t,e,n){const r=Uk(t);let s=r.length;if(Uk(e).length!==s)return!1;let i,a,c;for(;s-- >0;)if(i=r[s],!cj(t,e,n,i)||(a=Wk(t,i),c=Wk(e,i),(a||c)&&(!a||!c||a.configurable!==c.configurable||a.enumerable!==c.enumerable||a.writable!==c.writable)))return!1;return!0}function VH(t,e){return Jo(t.valueOf(),e.valueOf())}function UH(t,e){return t.source===e.source&&t.flags===e.flags}function Gk(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.values();let a,c;for(;(a=i.next())&&!a.done;){const u=e.values();let f=!1,p=0;for(;(c=u.next())&&!c.done;){if(!s[p]&&n.equals(a.value,c.value,a.value,c.value,t,e,n)){f=s[p]=!0;break}p++}if(!f)return!1}return!0}function Ef(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function WH(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function cj(t,e,n,r){return(r===DH||r===PH||r===OH)&&(t.$$typeof||e.$$typeof)?!0:RH(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const KH="[object ArrayBuffer]",qH="[object Arguments]",GH="[object Boolean]",QH="[object DataView]",JH="[object Date]",YH="[object Error]",XH="[object Map]",ZH="[object Number]",e8="[object Object]",t8="[object RegExp]",n8="[object Set]",r8="[object String]",s8={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
162]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},i8="[object URL]",o8=Object.prototype.toString;function a8({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:c,areObjectsEqual:u,arePrimitiveWrappersEqual:f,areRegExpsEqual:p,areSetsEqual:m,areTypedArraysEqual:x,areUrlsEqual:y,unknownTagComparators:w}){return function(S,N,E){if(S===N)return!0;if(S==null||N==null)return!1;const M=typeof S;if(M!==typeof N)return!1;if(M!=="object")return M==="number"?c(S,N,E):M==="function"?i(S,N,E):!1;const j=S.constructor;if(j!==N.constructor)return!1;if(j===Object)return u(S,N,E);if(Array.isArray(S))return e(S,N,E);if(j===Date)return r(S,N,E);if(j===RegExp)return p(S,N,E);if(j===Map)return a(S,N,E);if(j===Set)return m(S,N,E);const A=o8.call(S);if(A===JH)return r(S,N,E);if(A===t8)return p(S,N,E);if(A===XH)return a(S,N,E);if(A===n8)return m(S,N,E);if(A===e8)return typeof S.then!="function"&&typeof N.then!="function"&&u(S,N,E);if(A===i8)return y(S,N,E);if(A===YH)return s(S,N,E);if(A===qH)return u(S,N,E);if(s8[A])return x(S,N,E);if(A===KH)return t(S,N,E);if(A===QH)return n(S,N,E);if(A===GH||A===ZH||A===r8)return f(S,N,E);if(w){let P=w[A];if(!P){const O=AH(S);O&&(P=w[O])}if(P)return P(S,N,E)}return!1}}function l8({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:IH,areArraysEqual:n?Zl:LH,areDataViewsEqual:_H,areDatesEqual:zH,areErrorsEqual:FH,areFunctionsEqual:$H,areMapsEqual:n?Mg(qk,Zl):qk,areNumbersEqual:BH,areObjectsEqual:n?Zl:HH,arePrimitiveWrappersEqual:VH,areRegExpsEqual:UH,areSetsEqual:n?Mg(Gk,Zl):Gk,areTypedArraysEqual:n?Mg(Ef,Zl):Ef,areUrlsEqual:WH,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const s=Ad(r.areArraysEqual),i=Ad(r.areMapsEqual),a=Ad(r.areObjectsEqual),c=Ad(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:a,areSetsEqual:c})}return r}function c8(t){return function(e,n,r,s,i,a,c){return t(e,n,c)}}function u8({circular:t,comparator:e,createState:n,equals:r,strict:s}){if(n)return function(c,u){const{cache:f=t?new WeakMap:void 0,meta:p}=n();return e(c,u,{cache:f,equals:r,meta:p,strict:s})};if(t)return function(c,u){return e(c,u,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const i={cache:void 0,equals:r,meta:void 0,strict:s};return function(c,u){return e(c,u,i)}}const d8=to();to({strict:!0});to({circular:!0});to({circular:!0,strict:!0});to({createInternalComparator:()=>Jo});to({strict:!0,createInternalComparator:()=>Jo});to({circular:!0,createInternalComparator:()=>Jo});to({circular:!0,createInternalComparator:()=>Jo,strict:!0});function to(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:s=!1}=t,i=l8(t),a=a8(i),c=n?n(a):c8(a);return u8({circular:e,comparator:a,createState:r,equals:c,strict:s})}var jg={exports:{}},Ag={};var Qk;function f8(){if(Qk)return Ag;Qk=1;var t=Bc(),e=yS();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,c=t.useMemo,u=t.useDebugValue;return Ag.useSyncExternalStoreWithSelector=function(f,p,m,x,y){var w=i(null);if(w.current===null){var b={hasValue:!1,value:null};w.current=b}else b=w.current;w=c(function(){function N(P){if(!E){if(E=!0,M=P,P=x(P),y!==void 0&&b.hasValue){var O=b.value;if(y(O,P))return j=O}return j=P}if(O=j,r(M,P))return O;var z=x(P);return y!==void 0&&y(O,z)?(M=P,O):(M=P,j=z)}var E=!1,M,j,A=m===void 0?null:m;return[function(){return N(p())},A===null?void 0:function(){return N(A())}]},[p,m,x,y]);var S=s(f,w[0],w[1]);return a(function(){b.hasValue=!0,b.value=S},[S]),u(S),S},Ag}var Jk;function h8(){return Jk||(Jk=1,jg.exports=f8()),jg.exports}var p8=h8(),m8=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},g8=({contentComponent:t})=>{const e=Qx.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return d.jsx(d.Fragment,{children:Object.values(e)})};function x8(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:HS.createPortal(r.reactElement,r.element,n)},t.forEach(s=>s())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(s=>s())}}}var y8=class extends Oe.Component{constructor(t){var e;super(t),this.editorContentRef=Oe.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=x8(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:m8(e,this.editorContentRef),...n}),t?.contentComponent&&d.jsx(g8,{contentComponent:t.contentComponent})]})}},v8=k.forwardRef((t,e)=>{const n=Oe.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Oe.createElement(y8,{key:n,innerRef:e,...t})}),uj=Oe.memo(v8),b8=typeof window<"u"?k.useLayoutEffect:k.useEffect,w8=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0}
162,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function k8(t){var e;const[n]=k.useState(()=>new w8(t.editor)),r=p8.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:d8);return b8(()=>n.watch(t.editor),[t.editor,n]),k.useDebugValue(r),r}var S8=!1,zx=typeof window>"u",C8=zx||!!(typeof window<"u"&&window.next),N8=class dj{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?zx||C8?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...r)},onBlur:(...r)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...r)},onCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...r)},onDestroy:(...r)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...r)},onFocus:(...r)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...r)},onSelectionUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...r)},onTransaction:(...r)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...r)},onUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...r)},onContentError:(...r)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...r)},onDrop:(...r)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...r)},onPaste:(...r)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...r)},onDelete:(...r)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...r)}};return new xH(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((s,i)=>{var a;return s===((a=n.extensions)==null?void 0:a[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?dj.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}
162):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,s)=>r===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function E8(t={},e=[]){const n=k.useRef(t);n.current=t;const[r]=k.useState(()=>new N8(n)),s=Qx.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return k.useDebugValue(s),k.useEffect(r.onRender(e)),k8({editor:s,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),s}var fj=k.createContext({editor:null});fj.Consumer;var T8=k.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),M8=()=>k.useContext(T8);Oe.forwardRef((t,e)=>{const{onDragStart:n}=M8(),r=t.as||"div";return d.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});Oe.createContext({markViewContentRef:()=>{}});var Tv=k.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});Tv.displayName="TiptapContext";var j8=()=>k.useContext(Tv);function hj({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const s=k.useMemo(()=>({editor:r}),[r]),i=k.useMemo(()=>({editor:r}),[r]);return d.jsx(fj.Provider,{value:i,children:d.jsx(Tv.Provider,{value:s,children:n})})}hj.displayName="Tiptap";function pj({...t}){const{editor:e}=j8();return d.jsx(uj,{editor:e,...t})}pj.displayName="Tiptap.Content";Object.assign(hj,{Content:pj});var Tf=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},A8=/^\s*>\s$/,R8=ar.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Tf("blockquote",{...Lt(this.options.HTMLAttributes,t),children:Tf("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(s=>{const c=e.renderChildren([s]).split(` 163`).map(u=>u.trim()===""?n:`${n} ${u}`);r.push(c.join(` 164`))}),r.join(` 165${n} 166`)},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[Ua({find:A8,type:this.type})]}}),O8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,P8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,D8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,I8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,L8=Qo.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Tf("strong",{...Lt(this.options.HTMLAttributes,t),children:Tf("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}}
vendor: 7,783 bytes, lines 166-187
166,addInputRules(){return[Va({find:O8,type:this.type}),Va({find:D8,type:this.type})]},addPasteRules(){return[Ho({find:P8,type:this.type}),Ho({find:I8,type:this.type})]}}),_8=/(^|[^`])`([^`]+)`(?!`)$/,z8=/(^|[^`])`([^`]+)`(?!`)/g,F8=Qo.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Lt(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Va({find:_8,type:this.type})]},addPasteRules(){return[Ho({find:z8,type:this.type})]}}),Rg=4,$8=/^```([a-z]+)?[\s\n]$/,B8=/^~~~([a-z]+)?[\s\n]$/,H8=ar.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Rg,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Lt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(` 167`):r=`\`\`\`${s} 168 169\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:Rg,{state:r}=t,{selection:s}=r,{$from:i,empty:a}=s;if(i.parent.type!==this.type)return!1;const c=" ".repeat(n);return a?t.commands.insertContent(c):t.commands.command(({tr:u})=>{const{from:f,to:p}=s,y=r.doc.textBetween(f,p,` 170`,` 171`).split(` 172`).map(w=>c+w).join(` 173`);return u.replaceWith(f,p,r.schema.text(y)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:Rg,{state:r}=t,{selection:s}=r,{$from:i,empty:a}=s;return i.parent.type!==this.type?!1:a?t.commands.command(({tr:c})=>{var u;const{pos:f}=i,p=i.start(),m=i.end(),y=r.doc.textBetween(p,m,` 174`,` 175`).split(` 176`);let w=0,b=0;const S=f-p;for(let P=0;P<y.length;P+=1){if(b+y[P].length>=S){w=P;break}b+=y[P].length+1}const E=((u=y[w].match(/^ */))==null?void 0:u[0])||"",M=Math.min(E.length,n);if(M===0)return!0;let j=p;for(let P=0;P<w;P+=1)j+=y[P].length+1;return c.delete(j,j+M),f-j<=M&&c.setSelection(De.create(c.doc,j)),!0}):t.commands.command(({tr:c})=>{const{from:u,to:f}=s,x=r.doc.textBetween(u,f,` 177`,` 178`).split(` 179`).map(y=>{var w;const b=((w=y.match(/^ */))==null?void 0:w[0])||"",S=Math.min(b.length,n);return y.slice(S)}).join(` 180`);return c.replaceWith(u,f,r.schema.text(x)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(` 181 182`);return!i||!a?!1:t.chain().command(({tr:c})=>(c.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:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const c=s.after();return c===void 0?!1:r.nodeAt(c)?t.commands.command(({tr:f})=>(f.setSelection(ze.near(r.resolve(c))),!0)):t.commands.exitCode()}}},addInputRules(){return[Lx({find:$8,type:this.type,getAttributes:t=>({language:t[1]})}),Lx({find:B8,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new bt({key:new Ut("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"),s=r?JSON.parse(r):void 0,i=s?.mode;if(!n||!i)return!1;const{tr:a,schema:c}=t.state,u=c.text(n.replace(/\r\n?/g,` 183`));return a.replaceSelectionWith(this.type.create({language:i},u)),a.selection.$from.parent.type!==this.type&&a.setSelection(De.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),V8=ar.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 184 185`):""}),U8=ar.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Lt(this.options.HTMLAttributes,t)]},renderText(){return` 186`},renderMarkdown:()=>` 187`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:c}=r.extensionManager,u=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:f,dispatch:p})=>{if(p&&u&&a){const m=u.filter(x=>c.includes(x.type.name));f.ensureMarks(m)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),W8=ar.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]}`,Lt(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Lx({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
187)\\s$`),type:this.type,getAttributes:{level:t}}))}}),K8=ar.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Lt(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!vH(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return WM(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:a,dispatch:c})=>{if(c){const{$to:u}=a.selection,f=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?a.setSelection(De.create(a.doc,u.pos+1)):u.nodeAfter.isBlock?a.setSelection(Ee.create(a.doc,u.pos)):a.setSelection(De.create(a.doc,u.pos));else{const p=i.schema.nodes[this.options.nextNodeType]||u.parent.type.contentMatch.defaultType,m=p?.create();m&&(a.insert(f,m),a.setSelection(De.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[yH({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 1,036 bytes, line 187
187ype})]}}),q8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,G8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Q8=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,J8=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Y8=Qo.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Lt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Va({find:q8,type:this.t
187ype}),Va({find:Q8,type:this.type})]},addPasteRules(){return[Ho({find:G8,type:this.type}),Ho({find:J8,type:this.type})]}});const X8="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yac
187hts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Z8="ελ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",Fx="numeric",$x="ascii",Bx="alpha",xc="asciinumeric",oc="alphanumeric",Hx="domain",mj="emoji",eV="scheme",tV="slashscheme",Og="whitespace";function nV(t,e){return t in e||(e[t]=[]),e[t]}function Co(t,e,n){e[Fx]&&(e[xc]=!0,e[oc]=!0),e[$x]&&(e[xc]=!0,e[Bx]=!0),e[xc]&&(e[oc]=!0),e[Bx]&&(e[oc]=!0),e[oc]&&(e[Hx]=!0),e[mj]&&(e[Hx]=!0);for(const r in e){const s=nV(r,n);s.indexOf(t)<0&&s.push(t)}}function rV(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Vn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Vn.groups={};Vn.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 s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||Vn.groups;let s;return e&&e.j?s=e:(s=new Vn(e),n&&r&&Co(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const i=t.length;if(!i)return s;for(let a=0;a<i-1;a++)s=s.tt(t[a]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||Vn.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let a,c=s.go(t);if(c?(a=new Vn,Object.assign(a.j,c.j),a.jr.push.apply(a.jr,c.jr),a.jd=c.jd,a.t=c.t):a=new Vn,i){if(r)if(a.t&&typeof a.t=="string"){const u=Object.assign(rV(a.t,r),n);Co(i,u,r)}else n&&Co(i,n,r);a.t=i}return s.j[t]=a,a}};const _e=(t,e,n,r,s)=>t.ta(e,n,r,s),Nt=(t,e,n,r,s)=>t.tr(e,n,r,s),Yk=(t,e,n,r,s)=>t.ts(e,n,r,s),ne=(t,e,n,r,s)=>t.tt(e,n,r,s),Vs="WORD",Vx="UWORD",gj="ASCIINUMERICAL",xj="ALPHANUMERICAL",Fc="LOCALHOST",Ux="TLD",Wx="UTLD",qd="SCHEME",Ea="SLASH_SCHEME",Mv="NUM",Kx="WS",jv="NL",yc="OPENBRACE",vc="CLOSEBRACE",Mf="OPENBRACKET",jf="CLOSEBRACKET",Af="OPENPAREN",Rf="CLOSEPAREN",Of="OPENANGLEBRACKET",Pf="CLOSEANGLEBRACKET",Df="FULLWIDTHLEFTPAREN",If="FULLWIDTHRIGHTPAREN",Lf="LEFTCORNERBRACKET",_f="RIGHTCORNERBRACKET",zf="LEFTWHITECORNERBRACKET",Ff="RIGHTWHITECORNERBRACKET",$f="FULLWIDTHLESSTHAN",Bf="FULLWIDTHGREATERTHAN",Hf="AMPERSAND",Vf="APOSTROPHE",Uf="ASTERISK",Ti="AT",Wf="BACKSLASH",Kf="BACKTICK",qf="CARET",Ri="COLON",Av="COMMA",Gf="DOLLAR",fs="DOT",Qf="EQUALS",Rv="EXCLAMATION",kr="HYPHEN",bc="PERCENT",Jf="PIPE",Yf="PLUS",Xf="POUND",wc="QUERY",Ov="QUOTE",yj="FULLWIDTHMIDDLEDOT",Pv="SEMI",hs="SLASH",kc="TILDE",Zf="UNDERSCORE",vj="EMOJI",eh="SYM";var bj=Object.freeze({__proto__:null,ALPHANUMERICAL:xj,AMPERSAND:Hf,APOSTROPHE:Vf,ASCIINUMERICAL:gj,ASTERISK:Uf,AT:Ti,BACKSLASH:Wf,BACKTICK:Kf,CARET:qf,CLOSEANGLEBRACKET:Pf,CLOSEBRACE:vc,CLOSEBRACKET:jf,CLOSEPAREN:Rf,COLON:Ri,COMMA:Av,DOLLAR:Gf,DOT:fs,EMOJI:vj,EQUALS:Qf,EXCLAMATION:Rv,FULLWIDTHGREATERTHAN:Bf,FULLWIDTHLEFTPAREN:Df,FULLWIDTHLESSTHAN:$f,FULLWIDTHMIDDLEDOT:yj,FULLWIDTHRIGHTPAREN:If,HYPHEN:kr,LEFTCORNERBRACKET:Lf,LEFTWHITECORNERBRACKET:zf,LOCALHOST:Fc,NL:jv,NUM:Mv,OPENANGLEBRACKET:Of,OPENBRACE:yc,OPENBRACKET:Mf,OPENPAREN:Af,PERCENT:bc,PIPE:Jf,PLUS:Yf,POUND:Xf,QUERY:wc,QUOTE:Ov,RIGHTCORNERBRACKET:_f,RIGHTWHITECORNERBRACKET:Ff,SCHEME:qd,SEMI:Pv,SLASH:hs,SLASH_SCHEME:Ea,SYM:eh,TILDE:kc,TLD:Ux,UNDERSCORE:Zf,UTLD:Wx,UWORD:Vx,WORD:Vs,WS:Kx});const Bs=/[a-z]/,ec=new RegExp("\\p{L}","u"),Pg=new RegExp("\\p{Emoji}","u"),Hs=/\d/,Dg=/\s/,Xk="\r",Ig=` 188`,sV="ï¸",iV="â",Lg="";let Rd=null,Od=null;function oV(t=[]){const e={};Vn.groups=e;const n=new Vn;Rd==null&&(Rd=Zk(X8)),Od==null&&(Od=Zk(Z8)),ne(n,"'",Vf),ne(n,"{",yc),ne(n,"}",vc),ne(n,"[",Mf),ne(n,"]",jf),ne(n,"(",Af),ne(n,")",Rf),ne(n,"<",Of),ne(n,">",Pf),ne(n,"ï¼",Df),ne(n,"ï¼",If),ne(n,"ã",Lf),ne(n,"ã",_f),ne(n,"ã",zf),ne(n,"ã",Ff),ne(n,"ï¼",$f),ne(n,"ï¼",Bf),ne(n,"&",Hf),ne(n,"*",Uf),ne(n,"@",Ti),ne(n,"`",Kf),ne(n,"^",qf),ne(n,":",Ri),ne(n,",",Av),ne(n,"$",Gf),ne(n,".",fs),ne(n,"=",Qf),ne(n,"!",Rv),ne(n,"-",kr),ne(n,"%",bc),ne(n,"|",Jf),ne(n,"+",Yf),ne(n,"#",Xf),ne(n,"?",wc),ne(n,'"',Ov),ne(n,"/",hs),ne(n,";",Pv),ne(n,"~",kc),ne(n,"_",Zf),ne(n,"\\",Wf),ne(n,"ã»",yj);const r=Nt(n,Hs,Mv,{[Fx]:!0});Nt(r,Hs,r);const s=Nt(r,Bs,gj,{[xc]:!0}),i=Nt(r,ec,xj,{[oc]:!0}),a=Nt(n,Bs,Vs,{[$x]:!0});Nt(a,Hs,s),Nt(a,Bs,a),Nt(s,Hs,s),Nt(s,Bs,s);const c=Nt(n,ec,Vx,{[Bx]:!0});Nt(c,Bs),Nt(c,Hs,i),Nt(c,ec,c),Nt(i,Hs,i),Nt(i,Bs),Nt(i,ec,i);
vendor: 9,145 bytes, lines 188-191
188const u=ne(n,Ig,jv,{[Og]:!0}),f=ne(n,Xk,Kx,{[Og]:!0}),p=Nt(n,Dg,Kx,{[Og]:!0});ne(n,Lg,p),ne(f,Ig,u),ne(f,Lg,p),Nt(f,Dg,p),ne(p,Xk),ne(p,Ig),Nt(p,Dg,p),ne(p,Lg,p);const m=Nt(n,Pg,vj,{[mj]:!0});ne(m,"#"),Nt(m,Pg,m),ne(m,sV,m);const x=ne(m,iV);ne(x,"#"),Nt(x,Pg,m);const y=[[Bs,a],[Hs,s]],w=[[Bs,null],[ec,c],[Hs,i]];for(let b=0;b<Rd.length;b++)ki(n,Rd[b],Ux,Vs,y);for(let b=0;b<Od.length;b++)ki(n,Od[b],Wx,Vx,w);Co(Ux,{tld:!0,ascii:!0},e),Co(Wx,{utld:!0,alpha:!0},e),ki(n,"file",qd,Vs,y),ki(n,"mailto",qd,Vs,y),ki(n,"http",Ea,Vs,y),ki(n,"https",Ea,Vs,y),ki(n,"ftp",Ea,Vs,y),ki(n,"ftps",Ea,Vs,y),Co(qd,{scheme:!0,ascii:!0},e),Co(Ea,{slashscheme:!0,ascii:!0},e),t=t.sort((b,S)=>b[0]>S[0]?1:-1);for(let b=0;b<t.length;b++){const S=t[b][0],E=t[b][1]?{[eV]:!0}:{[tV]:!0};S.indexOf("-")>=0?E[Hx]=!0:Bs.test(S)?Hs.test(S)?E[xc]=!0:E[$x]=!0:E[Fx]=!0,Yk(n,S,S,E)}return Yk(n,"localhost",Fc,{ascii:!0}),n.jd=new Vn(eh),{start:n,tokens:Object.assign({groups:e},bj)}}function wj(t,e){const n=aV(e.replace(/[A-Z]/g,c=>c.toLowerCase())),r=n.length,s=[];let i=0,a=0;for(;a<r;){let c=t,u=null,f=0,p=null,m=-1,x=-1;for(;a<r&&(u=c.go(n[a]));)c=u,c.accepts()?(m=0,x=0,p=c):m>=0&&(m+=n[a].length,x++),f+=n[a].length,i+=n[a].length,a++;i-=m,a-=x,f-=m,s.push({t:p.t,v:e.slice(i-f,i),s:i-f,e:i})}return s}function aV(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),i,a=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function ki(t,e,n,r,s){let i;const a=e.length;for(let c=0;c<a-1;c++){const u=e[c];t.j[u]?i=t.j[u]:(i=new Vn(r),i.jr=s.slice(),t.j[u]=i),t=i}return i=new Vn(n),i.jr=s.slice(),t.j[e[a-1]]=i,i}function Zk(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+i),10);a>0;a--)n.pop();r+=i}else n.push(t[r]),r++}return e}const $c={defaultProtocol:"http",events:null,format:eS,formatHref:eS,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Dv(t,e=null){let n=Object.assign({},$c);t&&(n=Object.assign(n,t instanceof Dv?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}Dv.prototype={o:$c,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:$c[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},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 eS(t){return t}function kj(t,e){this.t="token",this.v=t,this.tk=e}kj.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=$c.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),a={},c=t.get("className",n,e),u=t.get("target",n,e),f=t.get("rel",n,e),p=t.getObj("attributes",n,e),m=t.getObj("events",n,e);return a.href=r,c&&(a.class=c),u&&(a.target=u),f&&(a.rel=f),p&&Object.assign(a,p),{tagName:s,attributes:a,content:i,eventListeners:m}}};function Yh(t,e){class n extends kj{constructor(s,i){super(s,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const tS=Yh("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),nS=Yh("text"),lV=Yh("nl"),Pd=Yh("url",{isLink:!0,toHref(t=$c.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Fc&&t[1].t===Ri}}),br=t=>new Vn(t);function cV({groups:t}){const e=t.domain.concat([Hf,Uf,Ti,Wf,Kf,qf,Gf,Qf,kr,Mv,bc,Jf,Yf,Xf,hs,eh,kc,Zf]),n=[Vf,Ri,Av,fs,Rv,bc,wc,Ov,Pv,Of,Pf,yc,vc,jf,Mf,Af,Rf,Df,If,Lf,_f,zf,Ff,$f,Bf],r=[Hf,Vf,Uf,Wf,Kf,qf,Gf,Qf,kr,yc,vc,bc,Jf,Yf,Xf,wc,hs,eh,kc,Zf],s=br(),i=ne(s,kc);_e(i,r,i),_e(i,t.domain,i);const a=br(),c=br(),u=br();_e(s,t.domain,a),_e(s,t.scheme,c),_e(s,t.slashscheme,u),_e(a,r,i),_e(a,t.domain,a);const f=ne(a,Ti);ne(i,Ti,f),ne(c,Ti,f),ne(u,Ti,f);const p=ne(i,fs);_e(p,r,i),_e(p,t.domain,i);const m=br();_e(f,t.domain,m),_e(m,t.domain,m);const x=ne(m,fs);_e(x,t.domain,m);const y=br(tS);_e(x,t.tld,y),_e(x,t.utld,y),ne(f,Fc,y);const w=ne(m,kr);ne(w,kr,w),_e(w,t.domain,m),_e(y,t.domain,m),ne(y,fs,x),ne(y,kr,w);const b=ne(y,Ri);_e(b,t.numeric,tS);const S=ne(a,kr),N=ne(a,fs);ne(S,kr,S),_e(S,t.domain,a),_e(N,r,i),_e(N,t.domain,a);const E=br(Pd);_e(N,t.tld,E),_e(N,t.utld,E),_e(E,t.domain,a),_e(E,r,i),ne(E,fs,N),ne(E,kr,S),ne(E,Ti,f);const M=ne(E,Ri),j=br(Pd);_e(M,t.numeric,j);const A=br(Pd),P=br();_e(A,e,A),_e(A,n,P),_e(P,e,A),_e(P,n,P),ne(E,hs,A),ne(j,hs,A);const O=ne(c,Ri),z=ne(u,Ri),U=ne(z,hs),Y=ne(U,hs);_e(c,t.domain,a),ne(c,fs,N),ne(c,kr,S),_e(u,t.domain,a),ne(u,fs,N),ne(u,kr,S),_e(O,t.domain,A),ne(O,hs,A),ne(O,wc,A),_e(Y,t.domain,A),_e(Y,e,A),ne(Y,hs,A);const Q=[[yc,vc],[Mf,jf],[Af,Rf],[Of,Pf],[Df,If],[Lf,_f],[zf,Ff],[$f,Bf]];for(let X=0;X<Q.length;X++){const[le,W]=Q[X],ce=ne(A,le);ne(P,le,ce),ne(ce,W,A);const se=br(Pd);_e(ce,e,se);const ie=br();_e(ce,n),_e(se,e,se),_e(se,n,ie),_e(ie,e,se),_e(ie,n,ie),ne(se,W,A),ne(ie,W,A)}return ne(s,Fc,E),ne(s,jv,lV),{start:s,tokens:bj}}function uV(t,e,n){let r=n.length,s=0,i=[],a=[];for(;s<r;){let c=t,u=null,f=null,p=0,m=null,x=-1;for(;s<r&&!(u=c.go(n[s].t));)a.push(n[s++]);for(;s<r&&(f=u||c.go(n[s].t));)u=null,c=f,c.accepts()?(x=0,m=c):x>=0&&x++,s++,p++;if(x<0)s-=p,s<r&&(a.push(n[s]),s++);else{a.length>0&&(i.push(_g(nS,e,a)),a=[]),s-=x,p-=x;const y=m.t,w=n.slice(s-p,s);i.push(_g(y,e,w))}}return a.length>0&&i.push(_g(nS,e,a)),i}function _g(t,e,n){const r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}const dV=typeof console<"u"&&console&&console.warn||(()=>{}),fV="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",pt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function hV(){return Vn.groups={},pt.scanner=null,pt.parser=null,pt.tokenQueue=[],pt.pluginQueue=[],pt.customSchemes=[],pt.initialized=!1,pt}function rS(t,e=!1){if(pt.initialized&&dV(`linkifyjs: already initialized - will not register custom scheme "${t}" ${fV}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. 1891. Must only contain digits, lowercase ASCII letters or "-" 1902. Cannot start or end with "-" 1913. "-" cannot repeat`);pt.customSchemes.push([t,e])}function pV(){pt.scanner=oV(pt.customSchemes);for(let t=0;t<pt.tokenQueue.length;t++)pt.tokenQueue[t][1]({scanner:pt.scanner});pt.parser=cV(pt.scanner.tokens);for(let t=0;t<pt.pluginQueue.length;t++)pt.pluginQueue[t][1]({scanner:pt.scanner,parser:pt.parser});return pt.initialized=!0,pt}function Iv(t){return pt.initialized||pV(),uV(pt.parser.start,t,wj(pt.scanner.start,t))}Iv.scan=wj;function Sj(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Dv(n),s=Iv(t),i=[];for(let a=0;a<s.length;a++){const c=s[a];c.isLink&&(!e||c.t===e)&&r.check(c)&&i.push(c.toFormattedObject(r))}return i}var Lv="[\0-  áá â-\u2029âã]",mV=new RegExp(Lv),gV=new RegExp(`${Lv}$`),xV=new RegExp(Lv,"g");function yV(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function vV(t){return new bt({key:new Ut("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(f=>f.docChanged)&&!n.doc.eq(r.doc),i=e.some(f=>f.getMeta("preventAutolink"));if(!s||i)return;const{tr:a}=r,c=_M(n.doc,[...e]);if(UM(c).forEach(({newRange:f})=>{const p=yB(r.doc,f,y=>y.isTextblock);let m,x;if(p.length>1)m=p[0],x=r.doc.textBetween(m.pos,m.pos+m.node.nodeSize,void 0," ");else if(p.length){const y=r.doc.textBetween(f.from,f.to," "," ");if(!gV.test(y))return;m=p[0],x=r.doc.textBetween(m.pos,f.to,void 0," ")}if(m&&x){const y=x.split(mV).filter(Boolean);if(y.length<=0)return!1;const w=y[y.length-1],b=m.pos+x.lastIndexOf(w);if(!w)return!1;const S=Iv(w).map(N=>N.toObject(t.defaultProtocol));if(!yV(S))return!1;S.filter(N=>N.isLink).map(N=>({...N,from:b+N.start+1,to:b+N.end+1})).filter(N=>r.schema.marks.code?!r.doc.rangeHasMark(N.from,N.to,r.schema.marks.code):!0).filter(N=>t.validate(N.value)).filter(N=>
191t.shouldAutoLink(N.value)).forEach(N=>{kv(N.from,N.to,r.doc).some(E=>E.mark.type===t.type)||a.addMark(N.from,N.to,t.type.create({href:N.href}))})}}),!!a.steps.length)return a}})}function bV(t){return new bt({key:new Ut("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const u=r.target;if(!u)return!1;const f=t.editor.view.dom;a=u.closest("a"),a&&!f.contains(a)&&(a=null)}if(!a)return!1;let c=!1;if(t.enableClickSelection&&(c=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const u=VM(e.state,t.type.name),f=(s=a.href)!=null?s:u.href,p=(i=a.target)!=null?i:u.target;f&&(window.open(f,p),c=!0)}return c}}})}function wV(t){return new bt({key:new Ut("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:a}=i,{empty:c}=a;if(c)return!1;let u="";r.content.forEach(p=>{u+=p.textContent});const f=Sj(u,{defaultProtocol:t.defaultProtocol}).find(p=>p.isLink&&p.value===u);return!u||!f||s!==void 0&&!s(f.value)?!1:t.editor.commands.setMark(t.type,{href:f.href})}}})}function vo(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(xV,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Cj=Qo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){rS(t);return}rS(t.scheme,t.optionalSlashes)})},onDestroy(){hV()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!vo(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const s=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!vo(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!vo(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Lt(this.options.HTMLAttributes,t),0]:["a",Lt(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,i;const a=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",c=(i=(s=t.attrs)==null?void 0:s.title)!=null?i:"",u=e.renderChildren(t);return c?`[${u}](${a} "${c}")`:`[${u}](${a})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!vo(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!vo(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ho({find:t=>{const e=[];
vendor: 9,940 bytes, lines 191-201
191if(t){const{protocols:n,defaultProtocol:r}=this.options,s=Sj(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!vo(a,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(vV({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!vo(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(bV({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(wV({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),kV=Cj,SV=Object.defineProperty,CV=(t,e)=>{for(var n in e)SV(t,n,{get:e[n],enumerable:!0})},NV="listItem",sS="textStyle",iS=/^\s*([-+*])\s$/,Nj=ar.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",Lt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 192`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(NV,this.editor.getAttributes(sS)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Ua({find:iS,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ua({find:iS,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(sS),editor:this.editor})),[t]}}),Ej=ar.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Lt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(s=>s.type==="paragraph"))n=e.parseChildren(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const a=t.tokens.slice(1),c=e.parseChildren(a);n.push(...c)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>Ev(t,e,r=>{var s,i;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((i=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:i.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),EV={};CV(EV,{findListItemPos:()=>nu,getNextListDepth:()=>_v,handleBackspace:()=>qx,handleDelete:()=>Gx,hasListBefore:()=>Tj,hasListItemAfter:()=>TV,hasListItemBefore:()=>Mj,listItemHasSubList:()=>jj,nextListIsDeeper:()=>Aj,nextListIsHigher:()=>Rj});var nu=(t,e)=>{const{$from:n}=e.selection,r=It(t,e.schema);let s=null,i=n.depth,a=n.pos,c=null;for(;i>0&&c===null;)s=n.node(i),s.type===r?c=i:(i-=1,a-=1);return c===null?null:{$pos:e.doc.resolve(a),depth:c}},_v=(t,e)=>{const n=nu(t,e);if(!n)return!1;const[,r]=jB(e,t,n.$pos.pos+4);return r},Tj=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},Mj=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},jj=(t,e,n)=>{if(!n)return!1;const r=It(t,e.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},qx=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Gi(t.state,e)&&Tj(t.state,e,n)){const{$anchor:c}=t.state.selection,u=t.state.doc.resolve(c.before()-1),f=[];u.node().descendants((x,y)=>{x.type.name===e&&f.push({node:x,pos:y})});const p=f.at(-1);if(!p)return!1;const m=t.state.doc.resolve(u.start()+p.pos+1);return t.chain().cut({from:c.start()-1,to:c.end()+1},m.end()).joinForward().run()}if(!Gi(t.state,e)||!PB(t.state))return!1;const r=nu(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=jj(e,t.state,i);return Mj(e,t.state)&&!a?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},Aj=(t,e)=>{const n=_v(t,e),r=nu(t,e);return!r||!n?!1:n>r.depth},Rj=(t,e)=>{const n=_v(t,e),r=nu(t,e);return!r||!n?!1:n<r.depth},Gx=(t,e)=>{if(!Gi(t.state,e)||!OB(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:Aj(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Rj(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},TV=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},Oj=Rt.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Gx(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Gx(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&qx(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&qx(t,n,r)&&(e=!0)}),e}}}}),oS=/^(\s*)(\d+)\.\s+(.*)$/,MV=/^\s/;function jV(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],i=s.match(oS);if(!i)break;const[,a,c,u]=i,f=a.length;let p=u,m=n+1;const x=[s];for(;m<t.length;){const y=t[m];if(y.match(oS))break;if(y.trim()==="")x.push(y),p+=` 193`,m+=1;else if(y.match(MV))x.push(y),p+=` 194${y.slice(f+2)}`,m+=1;else break}e.push({indent:f,number:parseInt(c,10),content:p.trim(),raw:x.join(` 195`)}),r=m,n=m}return[e,r]}function Pj(t,e,n){var r;const s=[];let i=0;for(;i<t.length;){const a=t[i];if(a.indent===e){const c=a.content.split(` 196`),u=((r=c[0])==null?void 0:r.trim())||"",f=[];u&&f.push({type:"paragraph",raw:u,tokens:n.inlineTokens(u)});const p=c.slice(1).join(` 197`).trim();if(p){const y=n.blockTokens(p);f.push(...y)}let m=i+1;const x=[];for(;m<t.length&&t[m].indent>e;)x.push(t[m]),m+=1;if(x.length>0){const y=Math.min(...x.map(b=>b.indent)),w=Pj(x,y,n);f.push({type:"list",ordered:!0,start:x[0].number,items:w,raw:x.map(b=>b.raw).join(` 198`)})}s.push({type:"list_item",raw:a.raw,tokens:f}),i=m}else i+=1}return s}function AV(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var RV="listItem",aS="textStyle",lS=/^(\d+)\.\s$/,Dj=ar.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Lt(this.options.HTMLAttributes,n),0]:["ol",Lt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?AV(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 199`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e?.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const s=t.split(` 200`),[i,a]=jV(s);if(i.length===0)return;const c=Pj(i,0,n);return c.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:c,raw:s.slice(0,a).join(` 201`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(RV,this.editor.getAttributes(aS)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}
201,addInputRules(){let t=Ua({find:lS,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=Ua({find:lS,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(aS)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),OV=/^\s*(\[([( |x])?\])\s$/,PV=ar.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Lt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Ev(t,e,s)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),c=document.createElement("input"),u=document.createElement("div"),f=m=>{var x,y;c.ariaLabel=((y=(x=this.options.a11y)==null?void 0:x.checkboxLabel)==null?void 0:y.call(x,m,c.checked))||`Task item checkbox for ${m.textContent||"empty task item"}`};f(t),i.contentEditable="false",c.type="checkbox",c.addEventListener("mousedown",m=>m.preventDefault()),c.addEventListener("change",m=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){c.checked=!c.checked;return}const{checked:x}=m.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:y})=>{const w=n();if(typeof w!="number")return!1;const b=y.doc.nodeAt(w);return y.setNodeMarkup(w,void 0,{...b?.attrs,checked:x}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,x)||(c.checked=!c.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([m,x])=>{s.setAttribute(m,x)}),s.dataset.checked=t.attrs.checked,c.checked=t.attrs.checked,i.append(c,a),s.append(i,u),Object.entries(e).forEach(([m,x])=>{s.setAttribute(m,x)});let p=new Set(Object.keys(e));return{dom:s,contentDOM:u,update:m=>{if(m.type!==this.type)return!1;s.dataset.checked=m.attrs.checked,c.checked=m.attrs.checked,f(m);const x=r.extensionManager.attributes,y=zc(m,x),w=new Set(Object.keys(y)),b=this.options.HTMLAttributes;return p.forEach(S=>{w.has(S)||(S in b?s.setAttribute(S,b[S]):s.removeAttribute(S))}),Object.entries(y).forEach(([S,N])=>{N==null?S in b?s.setAttribute(S,b[S]):s.removeAttribute(S):s.setAttribute(S,N)}),p=w,!0}}}}
201,addInputRules(){return[Ua({find:OV,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),DV=ar.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Lt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 202`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const a=_x(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:c=>({indentLevel:c[1].length,mainContent:c[4],checked:c[3].toLowerCase()==="x"}),createToken:(c,u)=>({type:"taskItem",raw:"",mainContent:c.mainContent,indentLevel:c.indentLevel,checked:c.checked,text:c.mainContent,tokens:n.inlineTokens(c.mainContent),nestedTokens:u}),customNestedParser:r},n);return a?[{type:"taskList",raw:a.raw,items:a.items}]:n.blockTokens(i)},s=_x(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,a)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:a}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Rt.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(Nj.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(Ej.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Oj.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Dj.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(PV.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(DV.configure(this.options.taskList)),t}});var cS=" ",IV="Â ",LV=ar.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Lt(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===cS||r[0].text===IV)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e)=>{if(!t)return"";const n=Array.isArray(t.content)?t.content:[];return n.length===0?cS:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),_V=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,zV=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,FV=Qo.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",Lt(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
vendor: 5,935 bytes, line 202
202,addInputRules(){return[Va({find:_V,type:this.type})]},addPasteRules(){return[Ho({find:zV,type:this.type})]}}),$V=ar.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),BV=Qo.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",Lt(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function HV(t={}){return new bt({view(e){return new VV(e,t)}})}class VV{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(s=>{let i=a=>{this[s](a)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}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,s=this.editorView.dom,i=s.getBoundingClientRect(),a=i.width/s.offsetWidth,c=i.height/s.offsetHeight;if(n){let m=e.nodeBefore,x=e.nodeAfter;if(m||x){let y=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(y){let w=y.getBoundingClientRect(),b=m?w.bottom:w.top;m&&x&&(b=(b+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let S=this.width/2*c;r={left:w.left,right:w.right,top:b-S,bottom:b+S}}}}if(!r){let m=this.editorView.coordsAtPos(this.cursorPos),x=this.width/2*a;r={left:m.left-x,right:m.left+x,top:m.top,bottom:m.bottom}}let u=this.editorView.dom.offsetParent;this.element||(this.element=u.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 f,p;if(!u||u==document.body&&getComputedStyle(u).position=="static")f=-pageXOffset,p=-pageYOffset;else{let m=u.getBoundingClientRect(),x=m.width/u.offsetWidth,y=m.height/u.offsetHeight;f=m.left-u.scrollLeft*x,p=m.top-u.scrollTop*y}this.element.style.left=(r.left-f)/a+"px",this.element.style.top=(r.top-p)/c+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/c+"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),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let c=M2(this.editorView.state.doc,a,this.editorView.dragging.slice);c!=null&&(a=c)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Et extends ze{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Et.valid(r)?new Et(r):ze.near(r)}content(){return pe.empty}eq(e){return e instanceof Et&&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 Et(e.resolve(n.pos))}getBookmark(){return new zv(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!UV(e)||!WV(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Et.valid(e))return e;let s=e.pos,i=null;for(let a=e.depth;;a--){let c=e.node(a);if(n>0?e.indexAfter(a)<c.childCount:e.index(a)>0){i=c.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;s+=n;let u=e.doc.resolve(s);if(Et.valid(u))return u}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!Ee.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=a,s+=n;let c=e.doc.resolve(s);if(Et.valid(c))return c}return null}}}Et.prototype.visible=!1;Et.findFrom=Et.findGapCursorFrom;ze.jsonID("gapcursor",Et);class zv{constructor(e){this.pos=e}map(e){return new zv(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Et.valid(n)?new Et(n):ze.near(n)}}function Ij(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function UV(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 s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||Ij(s.type))return!0;
vendor: 17,585 bytes, line 202
202if(s.inlineContent)return!1}}return!0}function WV(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 s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||Ij(s.type))return!0;if(s.inlineContent)return!1}}return!0}function KV(){return new bt({props:{decorations:JV,createSelectionBetween(t,e,n){return e.pos==n.pos&&Et.valid(n)?new Et(n):null},handleClick:GV,handleKeyDown:qV,handleDOMEvents:{beforeinput:QV}}})}const qV=jM({ArrowLeft:Dd("horiz",-1),ArrowRight:Dd("horiz",1),ArrowUp:Dd("vert",-1),ArrowDown:Dd("vert",1)});function Dd(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let a=r.selection,c=e>0?a.$to:a.$from,u=a.empty;if(a instanceof De){if(!i.endOfTextblock(n)||c.depth==0)return!1;u=!1,c=r.doc.resolve(e>0?c.after():c.before())}let f=Et.findGapCursorFrom(c,e,u);return f?(s&&s(r.tr.setSelection(new Et(f))),!0):!1}}function GV(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Et.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&Ee.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Et(r))),!0)}function QV(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Et))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 s=G.empty;for(let a=r.length-1;a>=0;a--)s=G.from(r[a].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new pe(s,0,0));return i.setSelection(De.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function JV(t){if(!(t.selection instanceof Et))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",vt.create(t.doc,[An.widget(t.selection.head,e,{key:"gapcursor"})])}var th=200,tn=function(){};tn.prototype.append=function(e){return e.length?(e=tn.from(e),!this.length&&e||e.length<th&&this.leafAppend(e)||this.length<th&&e.leafPrepend(this)||this.appendInner(e)):this};tn.prototype.prepend=function(e){return e.length?tn.from(e).append(this):this};tn.prototype.appendInner=function(e){return new YV(this,e)};tn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?tn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};tn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};tn.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)};tn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,a){return s.push(e(i,a))},n,r),s};tn.from=function(e){return e instanceof tn?e:e&&e.length?new Lj(e):tn.empty};var Lj=(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(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,a,c){for(var u=i;u<a;u++)if(s(this.values[u],c+u)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,a,c){for(var u=i-1;u>=a;u--)if(s(this.values[u],c+u)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=th)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=th)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(tn);tn.empty=new Lj([]);var YV=(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,s,i,a){var c=this.left.length;if(s<c&&this.left.forEachInner(r,s,Math.min(i,c),a)===!1||i>c&&this.right.forEachInner(r,Math.max(s-c,0),Math.min(this.length,i)-c,a+c)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,a){var c=this.left.length;if(s>c&&this.right.forEachInvertedInner(r,s-c,Math.max(i,c)-c,a+c)===!1||i<c&&this.left.forEachInvertedInner(r,Math.min(s,c),i,a)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,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})(tn);const XV=500;class Wr{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 s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let a=e.tr,c,u,f=[],p=[];return this.items.forEach((m,x)=>{if(!m.step){s||(s=this.remapping(r,x+1),i=s.maps.length),i--,p.push(m);return}if(s){p.push(new ps(m.map));let y=m.step.map(s.slice(i)),w;y&&a.maybeStep(y).doc&&(w=a.mapping.maps[a.mapping.maps.length-1],f.push(new ps(w,void 0,void 0,f.length+p.length))),i--,w&&s.appendMap(w,i)}else a.maybeStep(m.step);if(m.selection)return c=s?m.selection.map(s.slice(i)):m.selection,u=new Wr(this.items.slice(0,r).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:c}}addTransform(e,n,r,s){let i=[],a=this.eventCount,c=this.items,u=!s&&c.length?c.get(c.length-1):null;for(let p=0;p<e.steps.length;p++){let m=e.steps[p].invert(e.docs[p]),x=new ps(e.mapping.maps[p],m,n),y;(y=u&&u.merge(x))&&(x=y,p?i.pop():c=c.slice(0,c.length-1)),i.push(x),n&&(a++,n=void 0),s||(u=x)}let f=a-r.depth;return f>e9&&(c=ZV(c,f),a-=f),new Wr(c.append(i),a)}remapping(e,n){let r=new Oc;return this.items.forEach((s,i)=>{let a=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Wr(this.items.append(e.map(n=>new ps(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,c=this.eventCount;this.items.forEach(x=>{x.selection&&c--},s);let u=n;this.items.forEach(x=>{let y=i.getMirror(--u);if(y==null)return;a=Math.min(a,y);let w=i.maps[y];if(x.step){let b=e.steps[y].invert(e.docs[y]),S=x.selection&&x.selection.map(i.slice(u+1,y));S&&c++,r.push(new ps(w,b,S))}else r.push(new ps(w))},s);let f=[];for(let x=n;x<a;x++)f.push(new ps(i.maps[x]));let p=this.items.slice(0,s).append(f).append(r),m=new Wr(p,c);return m.emptyItemCount()>XV&&(m=m.compress(this.items.length-r.length)),m}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,s=[],i=0;return this.items.forEach((a,c)=>{if(c>=e)s.push(a),a.selection&&i++;else if(a.step){let u=a.step.map(n.slice(r)),f=u&&u.getMap();if(r--,f&&n.appendMap(f,r),u){let p=a.selection&&a.selection.map(n.slice(r));p&&i++;let m=new ps(f.invert(),u,p),x,y=s.length-1;(x=s.length&&s[y].merge(m))?s[y]=x:s.push(m)}}else a.map&&r--},this.items.length,0),new Wr(tn.from(s.reverse()),i)}}Wr.empty=new Wr(tn.empty,0);function ZV(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}class ps{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new ps(n.getMap().invert(),n,this.selection)}}}class Mi{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const e9=20;function t9(t,e,n,r){let s=n.getMeta(jo),i;if(s)return s.historyState;n.getMeta(s9)&&(t=new Mi(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(jo))return a.getMeta(jo).redo?new Mi(t.done.addTransform(n,void 0,r,Gd(e)),t.undone,uS(n.mapping.maps),t.prevTime,t.prevComposition):new Mi(t.done,t.undone.addTransform(n,void 0,r,Gd(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let c=n.getMeta("composition"),u=t.prevTime==0||!a&&t.prevComposition!=c&&(t.prevTime<(n.time||0)-r.newGroupDelay||!n9(n,t.prevRanges)),f=a?zg(t.prevRanges,n.mapping):uS(n.mapping.maps);return new Mi(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,Gd(e)),Wr.empty,f,n.time,c??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Mi(t.done.rebased(n,i),t.undone.rebased(n,i),zg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Mi(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),zg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function n9(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function uS(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,i,a)=>e.push(i,a));return e}function zg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function r9(t,e,n){let r=Gd(e),s=jo.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),c=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),u=new Mi(n?c:i.remaining,n?i.remaining:c,null,0,-1);return i.transform.setSelection(a).setMeta(jo,{redo:n,historyState:u})}let Fg=!1,dS=null;function Gd(t){let e=t.plugins;if(dS!=e){Fg=!1,dS=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Fg=!0;break}}return Fg}const jo=new Ut("history"),s9=new Ut("closeHistory");function i9(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new bt({key:jo,state:{init(){return new Mi(Wr.empty,Wr.empty,null,0,-1)},apply(e,n,r){return t9(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?zj:r=="historyRedo"?Fj:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function _j(t,e){return(n,r)=>{let s=jo.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=r9(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const zj=_j(!1,!0),Fj=_j(!0,!0);Rt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new bt({key:new Ut("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit;if(s==null||s===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>s){const a=i-s,c=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const f=r.tr.deleteRange(c,u);return t=!0,f}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;const c=e.selection.$head.pos,u=i-r,f=c-u,p=c;return e.deleteRange(f,p),!(this.storage.characters({node:e.doc})>r)}})]}});var o9=Rt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[HV(this.options)]}});Rt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new bt({key:new Ut("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return vt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,f)=>{if(u.isText)return;if(!(s>=f&&s<=f+u.nodeSize-1))return!1;a+=1});let c=0;return t.descendants((u,f)=>{if(u.isText||!(s>=f&&s<=f+u.nodeSize-1))return!1;if(c+=1,this.options.mode==="deepest"&&a-c>0||this.options.mode==="shallowest"&&c>1)return this.options.mode==="deepest";i.push(An.node(f,f+u.nodeSize,{class:this.options.className}))}),vt.create(t,i)}}})]}});var a9=Rt.create({name:"gapCursor",addProseMirrorPlugins(){return[KV()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=et(Ne(t,"allowGapCursor",n)))!=null?e:null}}}),fS="placeholder";function l9(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}Rt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:fS,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${l9(this.options.dataAttribute)}`:`data-${fS}`;return[new bt({key:new Ut("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,i=[];if(!r)return null;const a=this.editor.isEmpty;return e.descendants((c,u)=>{const f=s>=u&&s<=u+c.nodeSize,p=!c.isLeaf&&Gh(c);if((f||!this.options.showOnlyCurrent)&&p){const m=[this.options.emptyNodeClass];a&&m.push(this.options.emptyEditorClass);const x=An.node(u,u+c.nodeSize,{class:m.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:c,pos:u,hasAnchor:f}):this.options.placeholder});i.push(x)}return this.options.includeChildren}),vt.create(e,i)}}})]}});Rt.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new bt({key:new Ut("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||WM(n.selection)||t.view.dragging?null:vt.create(n.doc,[An.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function hS({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var c9=Rt.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Ut(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new bt({key:e,appendTransaction:(s,i,a)=>{const{doc:c,tr:u,schema:f}=a,p=e.getState(a),m=c.content.size,x=f.nodes[n];if(p)return u.insert(m,x.create())},state:{init:(s,i)=>{const a=i.tr.doc.lastChild;return!hS({node:a,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;const a=s.doc.lastChild;return!hS({node:a,types:r})}}})]}}),u9=Rt.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>zj(t,e),redo:()=>({state:t,dispatch:e})=>Fj(t,e)}},addProseMirrorPlugins(){return[i9(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()}}}),d9=Rt.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(L8.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(R8.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(Nj.configure(this.options.bulletList)),this.options.code!==!1&&s.push(F8.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(H8.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(V8.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(o9.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(a9.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(U8.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(W8.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(u9.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(K8.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Y8.configure(this.options.italic)),this.options.listItem!==!1&&s.push(Ej.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(Oj.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(Cj.
202configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(Dj.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(LV.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(FV.configure(this.options.strike)),this.options.text!==!1&&s.push($V.configure(this.options.text)),this.options.underline!==!1&&s.push(BV.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(c9.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),f9=d9;function wn({value:t,onChange:e,placeholder:n,"data-testid":r}){const s=E8({extensions:[f9.configure({heading:{levels:[1,2,3]}}),kV.configure({openOnClick:!1,HTMLAttributes:{class:"text-primary underline cursor-pointer",rel:"noopener noreferrer",target:"_blank"}})],content:t||"",onUpdate:({editor:a})=>{e(a.getHTML())},editorProps:{attributes:{class:"prose prose-sm max-w-none min-h-[120px] p-3 focus:outline-none"}}});k.useEffect(()=>{if(s&&t!==s.getHTML()&&t!==void 0){const{from:a,to:c}=s.state.selection;s.commands.setContent(t||"",!1);try{s.commands.setTextSelection({from:a,to:c})}catch{}}},[t]);const i=k.useCallback(()=>{if(!s)return;const a=s.getAttributes("link").href,c=window.prompt("URL eingeben:",a||"https://");if(c!==null){if(c===""){s.chain().focus().extendMarkRange("link").unsetLink().run();return}s.chain().focus().extendMarkRange("link").setLink({href:c}).run()}},[s]);return s?d.jsxs("div",{className:"border rounded-md overflow-hidden bg-background","data-testid":r,children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 p-1.5 border-b bg-muted/30",children:[d.jsx(wr,{onClick:()=>s.chain().focus().toggleHeading({level:1}).run(),active:s.isActive("heading",{level:1}),title:"Ãberschrift 1",testId:`${r}-h1`,children:d.jsx($P,{className:"w-4 h-4"})}),d.jsx(wr,{onClick:()=>s.chain().focus().toggleHeading({level:2}).run(),active:s.isActive("heading",{level:2}),title:"Ãberschrift 2",testId:`${r}-h2`,children:d.jsx(BP,{className:"w-4 h-4"})}),d.jsx(wr,{onClick:()=>s.chain().focus().toggleHeading({level:3}).run(),active:s.isActive("heading",{level:3}),title:"Ãberschrift 3",testId:`${r}-h3`,children:d.jsx(HP,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(wr,{onClick:()=>s.chain().focus().toggleBold().run(),active:s.isActive("bold"),title:"Fett",testId:`${r}-bold`,children:d.jsx(PP,{className:"w-4 h-4"})}),d.jsx(wr,{onClick:()=>s.chain().focus().toggleItalic().run(),active:s.isActive("italic"),title:"Kursiv",testId:`${r}-italic`,children:d.jsx(KP,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(wr,{onClick:i,active:s.isActive("link"),title:"Link einfügen",testId:`${r}-link`,children:d.jsx(GP,{className:"w-4 h-4"})}),d.jsx(wr,{onClick:()=>s.chain().focus().unsetLink().run(),disabled:!s.isActive("link"),title:"Link entfernen",testId:`${r}-unlink`,children:d.jsx(cD,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(wr,{onClick:()=>s.chain().focus().toggleBulletList().run(),active:s.isActive("bulletList"),title:"Aufzählung",testId:`${r}-ul`,children:d.jsx(JP,{className:"w-4 h-4"})}),d.jsx(wr,{onClick:()=>s.chain().focus().toggleOrderedList().run(),active:s.isActive("orderedList"),title:"Nummerierte Liste",testId:`${r}-ol`,children:d.jsx(QP,{className:"w-4 h-4"})}),d.jsx("div",{className:"w-px h-5 bg-border mx-1"}),d.jsx(wr,{onClick:()=>s.chain().focus().unsetAllMarks().clearNodes().run(),title:"Formatierung entfernen",testId:`${r}-clear`,children:d.jsx(sD,{className:"w-4 h-4"})}),d.jsx("div",{className:"flex-1"}),d.jsx(wr,{onClick:()=>s.chain().focus().undo().run(),disabled:!s.can().undo(),title:"Rückgängig",testId:`${r}-undo`,children:d.jsx(lD,{className:"w-4 h-4"})}),d.jsx(wr,{onClick:()=>s.chain().focus().redo().run(),disabled:!s.can().redo(),title:"Wiederholen",testId:`${r}-redo`,children:d.jsx(rD,{className:"w-4 h-4"})})]}),d.jsx(uj,{editor:s})]}):null}function wr({onClick:t,active:e,disabled:n,title:r,children:s,testId:i}){return d.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:`h-7 w-7 ${e?"bg-primary/10 text-primary":""}`,onClick:t,disabled:n,title:r,"data-testid":i,children:s})}const h9={hero:"Startseite (Hero)",allgemeinmedizin:"Allgemeinmedizin",praevention:"Prävention",diagnostik:"Diagnostik",innovativ:"Innovative Angebote",team:"Team-Beschreibung",kontakt:"Kontakt-Seite",philosophy:"Philosophie (Wie wir uns ver
202stehen)",cm5:"CM5 â CardioMetabolische MultiMatrix",cm5_closing:"CM5 â Abschlusszitat",cm5_highlight_1:"CM5 â Highlight 1",cm5_highlight_2:"CM5 â Highlight 2",cm5_highlight_3:"CM5 â Highlight 3",contact_details:"Kontaktdaten (Telefon, E-Mail, Adresse)",footer:"Footer",karriere:"Karriere-Seite",arzt_portrait:"Der Mensch hinter Ihrem Arzt",services_overview:"Leistungsübersicht (Unsere Stärken)",strength_0:"Kachel 1: Prävention",strength_1:"Kachel 2: Diagnostik",strength_2:"Kachel 3: Allgemeinmedizin",strength_3:"Kachel 4: Innovative Angebote",booking_cta:"Termin-Banner (CTA)"},p9={philosophy:{title:"Ãberschrift",subtitle:"Zitat (kursiv)",content:"FlieÃtext"},cm5:{title:"Ãberschrift",subtitle:"Untertitel",content:"Einleitungstext"},cm5_closing:{title:"Abschlusszitat"},cm5_highlight_1:{title:"Titel",subtitle:"Beschreibung"},cm5_highlight_2:{title:"Titel",subtitle:"Beschreibung"},cm5_highlight_3:{title:"Titel",subtitle:"Beschreibung"},contact_details:{title:"Telefonnummer",subtitle:"E-Mail-Adresse",content:"Adresse"},karriere:{title:"Ãberschrift",subtitle:"Einleitungstext",content:"Zusatzinfo (unter Stellenangeboten)"},hero:{title:"Name / Ãberschrift",subtitle:"Untertitel",content:"Fachbezeichnung (über dem Namen)"},arzt_portrait:{title:"Ãberschrift",subtitle:"Textblock (Absätze)",content:"Untertitel (z.B. Arzt â Musiker â Podcaster)"},services_overview:{title:"Ãberschrift",subtitle:"Untertitel"},strength_0:{title:"Titel",subtitle:"Beschreibung",content:"Link (z.B. /praevention)"},strength_1:{title:"Titel",subtitle:"Beschreibung",content:"Link (z.B. /diagnostik)"},strength_2:{title:"Titel",subtitle:"Beschreibung",content:"Link (z.B. #allgemeinmedizin)"},strength_3:{title:"Titel",subtitle:"Beschreibung",content:"Link (z.B. /innovativ)"},booking_cta:{title:"Ãberschrift",subtitle:"Beschreibungstext"},footer:{title:"Untertitel (unter Dr. Jelden)",subtitle:"Slogan / Tagline"}},$g={hero:{subtitle:!0},philosophy:{title:!0,subtitle:!0,content:!0},allgemeinmedizin:{subtitle:!0,content:!0},praevention:{subtitle:!0,content:!0},diagnostik:{subtitle:!0,content:!0},diagnostik_internistisch:{subtitle:!0},diagnostik_erweitert:{subtitle:!0},cm5:{subtitle:!0,content:!0},cm5_closing:{title:!0},cm5_highlight_1:{subtitle:!0},cm5_highlight_2:{subtitle:!0},cm5_highlight_3:{subtitle:!0},team:{subtitle:!0},kontakt:{subtitle:!0,content:!0},karriere:{subtitle:!0,content:!0},arzt_portrait:{subtitle:!0},innovativ:{subtitle:!0},services_overview:{subtitle:!0},booking_cta:{subtitle:!0},footer:{subtitle:!0}};function bn({sectionKey:t,content:e}){const{toast:n}=dn(),r=e?.find(b=>b.sectionKey===t),[s,i]=k.useState(null),a=s||{title:r?.title||"",subtitle:r?.subtitle||"",content:r?.content||""},c=Tt({mutationFn:b=>Qe("POST","/api/admin/content",b),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/content"]}),n({title:"Inhalt gespeichert"})}}),u=(b,S)=>{i(N=>({...N||a,[b]:S}))},f=p9[t],p=f?.title||"Titel",m=f?.subtitle||"Untertitel / Beschreibung",x=f?.content,y=f?.subtitle!==void 0||!f,w=!!x||!!a.content;return d.jsxs(ct,{className:"p-5","data-testid":`admin-content-${t}`,children:[d.jsx("h3",{className:"font-semibold text-sm mb-3 text-primary",children:h9[t]||t}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:p}),$g[t]?.title?d.jsx(wn,{value:a.title,onChange:b=>u("title",b),"data-testid":`input-content-title-${t}`}):d.jsx(Ke,{value:a.title,onChange:b=>u("title",b.target.value),"data-testid":`input-content-title-${t}`})]}),y&&d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:m}),$g[t]?.subtitle?d.jsx(wn,{value:a.subtitle,onChange:b=>u("subtitle",b),"data-testid":`input-content-subtitle-${t}`}):d.jsx(uf,{value:a.subtitle,onChange:b=>u("subtitle",b.target.value),"data-testid":`input-content-subtitle-${t}`})]}),w&&d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:x||"Zusatztext"}),$g[t]?.content?d.jsx(wn,{value:a.content,onChange:b=>u("content",b),"data-testid":`input-content-content-${t}`}):d.jsx(uf,{value:a.content,onChange:b=>u("content",b.target.value),"data-testid":`input-content-content-${t}`})]}),d.jsxs(Re,{size:"sm",onClick:()=>c.mutate({sectionKey:t,title:a.title,subtitle:a.subtitle,content:a.content}),disabled:c.isPending,"data-testid":`button-save-content-${t}`,children:[d.jsx(Ji,{className:"w-4 h-4 mr-1.5"}),"Speichern"]})]})]})}function m9({index:t,content:e}){const{toast:n}=dn(),r=`strength_${t}`,s=e?.find(m=>m.sectionKey===r),i=["Prävention & Gesundheitsvorsorge","Klinische Diagnostik","Allgemeinmedizin & persönliche Betreuung","Innovative Angebote"],[a,c]=k.useState(null),u=a||{title:s?.title||i[t],subtitle:s?.subt
202itle||"",content:s?.content||"",imageUrl:s?.imageUrl||""},f=Tt({mutationFn:m=>Qe("POST","/api/admin/content",m),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/content"]}),n({title:"Kachel gespeichert"})},onError:()=>{n({title:"Fehler beim Speichern",variant:"destructive"})}}),p=(m,x)=>{c(y=>({...y||u,[m]:x}))};return d.jsxs("div",{className:"border rounded-lg p-4 space-y-3","data-testid":`admin-strength-${t}`,children:[d.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[u.imageUrl&&d.jsx("img",{src:u.imageUrl,alt:"",className:"w-12 h-12 rounded-md object-cover"}),d.jsxs("h4",{className:"font-medium text-sm",children:["Kachel ",t+1,": ",u.title||i[t]]})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Titel"}),d.jsx(Ke,{value:u.title,onChange:m=>p("title",m.target.value),"data-testid":`input-strength-title-${t}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Beschreibung"}),d.jsx(uf,{value:u.subtitle,onChange:m=>p("subtitle",m.target.value),"data-testid":`input-strength-desc-${t}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Bild-URL (z.B. /images/praevention.png)"}),d.jsx(Ke,{value:u.imageUrl,onChange:m=>p("imageUrl",m.target.value),"data-testid":`input-strength-image-${t}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Link (z.B. /praevention oder #allgemeinmedizin)"}),d.jsx(Ke,{value:u.content,onChange:m=>p("content",m.target.value),"data-testid":`input-strength-link-${t}`})]}),d.jsxs(Re,{size:"sm",onClick:()=>f.mutate({sectionKey:r,title:u.title,subtitle:u.subtitle,content:u.content,imageUrl:u.imageUrl}),disabled:f.isPending,"data-testid":`button-save-strength-${t}`,children:[d.jsx(Ji,{className:"w-4 h-4 mr-1.5"}),"Speichern"]})]})}function g9(){const{data:t,isLoading:e}=rt({queryKey:["/api/content"]});return e?d.jsx("div",{className:"space-y-3",children:[1,2].map(n=>d.jsx("div",{className:"h-24 bg-muted animate-pulse rounded-md"},n))}):d.jsxs("div",{className:"space-y-4",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Startseite bearbeiten"}),d.jsx(bn,{sectionKey:"hero",content:t}),d.jsx(bn,{sectionKey:"philosophy",content:t}),d.jsx(bn,{sectionKey:"services_overview",content:t}),d.jsxs(ct,{className:"p-5","data-testid":"admin-strength-cards",children:[d.jsx("h3",{className:"font-semibold text-sm mb-3 text-primary",children:"Unsere Stärken â Kacheln"}),d.jsx("div",{className:"space-y-4",children:[0,1,2,3].map(n=>d.jsx(m9,{index:n,content:t},n))})]}),d.jsx(bn,{sectionKey:"arzt_portrait",content:t}),d.jsx(bn,{sectionKey:"booking_cta",content:t})]})}function x9({notice:t}){const{toast:e}=dn(),[n,r]=k.useState(!1),[s,i]=k.useState({title:t.title,content:t.content,type:t.type,startDate:t.startDate||"",endDate:t.endD
202ate||""}),a=Tt({mutationFn:m=>Qe("PATCH",`/api/admin/notices/${t.id}`,m),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/notices"]}),r(!1),e({title:"Hinweis aktualisiert"})}}),c=Tt({mutationFn:()=>Qe("DELETE",`/api/admin/notices/${t.id}`),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/notices"]}),e({title:"Hinweis gelöscht"})}}),u=Tt({mutationFn:m=>Qe("PATCH",`/api/admin/notices/${t.id}`,{active:m}),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/notices"]})}});if(n)return d.jsx(ct,{className:"p-4 ring-2 ring-primary/20","data-testid":`admin-notice-${t.id}`,children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Titel"}),d.jsx(Ke,{value:s.title,onChange:m=>i(x=>({...x,title:m.target.value})),"data-testid":`input-edit-notice-title-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Inhalt"}),d.jsx(wn,{value:s.content,onChange:m=>i(x=>({...x,content:m})),"data-testid":`input-edit-notice-content-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Typ"}),d.jsxs(Wi,{value:s.type,onValueChange:m=>i(x=>({...x,type:m})),children:[d.jsx(Ys,{"data-testid":`select-edit-notice-type-${t.id}`,children:d.jsx(Ki,{})}),d.jsxs(Xs,{children:[d.jsx(tt,{value:"info",children:"Information"}),d.jsx(tt,{value:"vacation",children:"Urlaub"}),d.jsx(tt,{value:"warning",children:"Wichtig"})]})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Von"}),d.jsx(Ke,{value:s.startDate,onChange:m=>i(x=>({...x,startDate:m.target.value})),placeholder:"24.12.2025","data-testid":`input-edit-notice-start-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Bis"}),d.jsx(Ke,{value:s.endDate,onChange:m=>i(x=>({...x,endDate:m.target.value})),placeholder:"02.01.2026","data-testid":`input-edit-notice-end-${t.id}`})]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Re,{size:"sm",onClick:()=>a.mutate(s),disabled:a.isPending,"data-testid":`button-save-notice-${t.id}`,children:[d.jsx(Vo,{className:"w-4 h-4 mr-1.5"}),"Speichern"]}),d.jsx(Re,{size:"sm",variant:"outline",onClick:()=>{i({title:t.title,content:t.content,type:t.type,startDate:t.startDate||"",endDate:t.endD
202ate||""}),r(!1)},children:"Abbrechen"})]})]})});const f=t.type==="vacation"?"Urlaub":t.type==="warning"?"Wichtig":"Info",p=t.type==="vacation"?"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300":t.type==="warning"?"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300":"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300";return d.jsx(ct,{className:"p-4","data-testid":`admin-notice-${t.id}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${p}`,children:f}),d.jsx("h3",{className:"font-semibold text-sm",children:t.title})]}),d.jsx("div",{className:"text-sm text-muted-foreground rich-content",dangerouslySetInnerHTML:{__html:Vt(t.content)}}),(t.startDate||t.endDate)&&d.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[t.startDate," ",t.endDate&&`- ${t.endDate}`]})]}),d.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d.jsx(jc,{checked:t.active,onCheckedChange:m=>u.mutate(m),"data-testid":`switch-notice-${t.id}`}),d.jsx(Re,{variant:"outline",size:"icon",onClick:()=>r(!0),"data-testid":`button-edit-notice-${t.id}`,children:d.jsx(Ka,{className:"w-4 h-4"})}),d.jsx(Re,{variant:"destructive",size:"icon",onClick:()=>c.mutate(),"data-testid":`button-delete-notice-${t.id}`,children:d.jsx(Do,{className:"w-4 h-4"})})]})]})})}function y9(){const{toast:t}=dn(),{data:e,isLoading:n}=rt({queryKey:["/api/notices"]}),[r,s]=k.useState(!1),[i,a]=k.useState({title:"",content:"",type:"info",active:!0,startDate:"",endDate:""}),c=Tt({mutationFn:u=>Qe("POST","/api/admin/notices",u),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/notices"]}),s(!1),a({title:"",content:"",type:"info",active:!0,startDate:"",endDate:""}),t({title:"Hinweis erstellt"})}});return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Hinweise & Urlaubsmeldungen"}),d.jsxs(sl,{open:r,onOpenChange:s,children:[d.jsx(il,{asChild:!0,children:d.jsxs(Re,{size:"sm","data-testid":"button-add-notice",children:[d.jsx(qa,{className:"w-4 h-4 mr-1.5"}),"Neuer Hinweis"]})}),d.jsxs(Wo,{children:[d.jsx(Ko,{children:d.jsx(qo,{children:"Neuen Hinweis erstellen"})}),d.jsxs("div",{className:"space-y-4 mt-4",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Titel"}),d.jsx(Ke,{value:i.title||"",onChange:u=>a(f=>({...f,title:u.target.value})),placeholder:"z.B. Urlaubszeit","data-testid":"input-notice-title"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Inhalt"}),d.jsx(wn,{value:i.content||"",onChange:u=>a(f=>({...f,content:u})),"data-testid":"input-notice-content"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Typ"}),d.jsxs(Wi,{value:i.type||"info",onValueChange:u=>a(f=>({...f,type:u})),children:[d.jsx(Ys,{"data-testid":"select-notice-type",children:d.jsx(Ki,{})}),d.jsxs(Xs,{children:[d.jsx(tt,{value:"info",children:"Information"}),d.jsx(tt,{value:"vacation",children:"Urlaub"}),d.jsx(tt,{value:"warning",children:"Wichtig"})]})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Von (optional)"}),d.jsx(Ke,{value:i.startDate||"",onChange:u=>a(f=>({...f,startDate:u.target.value})),placeholder:"24.12.2025","data-testid":"input-notice-start"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Bis (optional)"}),d.jsx(Ke,{value:i.endDate||"",onChange:u=>a(f=>({...f,endDate:u.target.value})),placeholder:"02.01.2026","data-testid":"input-notice-end"})]})]}),d.jsxs(Re,{className:"w-full",onClick:()=>c.mutate(i),disabled:c.isPending||!i.title||!i.content,"data-testid":"button-save-notice",children:[d.jsx(Ji,{className:"w-4 h-4 mr-2"}),"Speichern"]})]})]})]})]}),n?d.jsx("div",{className:"space-y-3",children:[1,2].map(u=>d.jsx("div",{className:"h-20 bg-muted animate-pulse rounded-md"},u))}):e&&e.length>0?d.jsx("div",{className:"space-y-3",children:e.map(u=>d.jsx(x9,{notice:u},u.id))}):d.jsxs(ct,{className:"p-8 text-center text-muted-foreground",children:[d.jsx(ay,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),d.jsx("p",{className:"text-sm",children:"Keine Hinweise vorhanden"}),d.jsx("p",{className:"text-xs mt-1",children:"Erstellen Sie einen neuen Hinweis, z.B. für Urlaubszeiten."})]})]})}function ji(t){if(!t)return{x:50,y:50,zoom:150};try{const e=JSON.parse(t);return{x:e.x??50,y:e.y??50,zoom:e.zoom??150}}catch{const e=(t||"").replace(/%/g,"").split(/\s+/);return{x:parseFloat(e[0])||50,y:parseFloat(e[1])||50,zoom:150}}}function vn(t){return JSON.stringify({x:Math.round(t.x),y:Math.round(t.y),zoom:Math.round(t.zoom)})}function v9({imageUrl:t,position:e,onChange:n,onCommit:r}){const s=k.useRef(null),[i,a]=k.useState(!1),c=k.useRef({mx:0,my:0,sx:50,sy:50}),u=ji(e);return d.jsxs("div",{className:"space-y-3",children:[d.jsx(me,{className:"text-xs",children:"Bildausschnitt anpassen (ziehen + Zoom)"}),d.jsx("div",{ref:s,className:"relative w-full rounded-lg overflow-hidden ring-2 ring-primary/30 cursor-grab active:cursor-grabbing select-none aspect-[16/9]",style:{backgroundImage:`url(${t})`,backgroundSize:`${u.zoom}%`,backgroundPosition:`${u.x}% ${u.y}%`,backgroundRepeat:"no-repeat"},onPointerDown:f=>{a(!0),s.current?.setPointerCapture(f.pointerId),c.current={mx:f.clientX,my:f.clientY,sx:u.x,sy:u.y}},onPointerMove:f=>{if(!i)return;
202const p=f.clientX-c.current.mx,m=f.clientY-c.current.my,x=.3,y=Math.max(0,Math.min(100,c.current.sx-p*x)),w=Math.max(0,Math.min(100,c.current.sy-m*x));n(vn({x:y,y:w,zoom:u.zoom}))},onPointerUp:()=>{a(!1),r(vn(u))},"data-testid":"team-photo-crop-editor"}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"flex-1",children:[d.jsxs(me,{className:"text-[10px] text-muted-foreground mb-1 block",children:["Zoom: ",u.zoom,"%"]}),d.jsx("input",{type:"range",min:"100",max:"300",step:"5",value:u.zoom,className:"w-full accent-primary","data-testid":"team-photo-zoom-slider",onChange:f=>{const p=parseInt(f.target.value);n(vn({x:u.x,y:u.y,zoom:p}))},onMouseUp:()=>r(vn(u)),onTouchEnd:()=>r(vn(u))})]}),d.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>{const f=vn({x:50,y:50,zoom:100});n(f),r(f)},children:"Zurücksetzen"})]})]})}function b9({imageUrl:t,position:e,onChange:n,onCommit:r}){const s=k.useRef(null),[i,a]=k.useState(!1),c=k.useRef({mx:0,my:0,sx:50,sy:50}),u=ji(e);return d.jsxs("div",{className:"space-y-3",children:[d.jsx(me,{className:"text-xs",children:"Bildausschnitt anpassen"}),d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("div",{ref:s,className:"relative w-32 h-32 rounded-full overflow-hidden ring-2 ring-primary/30 cursor-grab active:cursor-grabbing select-none flex-shrink-0",style:{backgroundImage:`url(${t})`,backgroundSize:`${u.zoom}%`,backgroundPosition:`${u.x}% ${u.y}%`,backgroundRepeat:"no-repeat"},onPointerDown:f=>{a(!0),s.current?.setPointerCapture(f.pointerId),c.current={mx:f.clientX,my:f.clientY,sx:u.x,sy:u.y}},onPointerMove:f=>{if(!i)return;const p=f.clientX-c.current.mx,m=f.clientY-c.current.my,x=.5,y=Math.max(0,Math.min(100,c.current.sx-p*x)),w=Math.max(0,Math.min(100,c.current.sy-m*x));n(vn({x:y,y:w,zoom:u.zoom}))},onPointerUp:()=>{a(!1),r(vn(u))},"data-testid":"image-position-picker"}),d.jsxs("div",{className:"flex flex-col gap-2 pt-1",children:[d.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Vorschau"}),d.jsx("div",{className:"w-16 h-16 rounded-full overflow-hidden ring-2 ring-border flex-shrink-0",style:{backgroundImage:`url(${t})`,backgroundSize:`${u.zoom}%`,backgroundPosition:`${u.x}% ${u.y}%`,backgroundRepeat:"no-repeat"}}),d.jsx("button",{type:"button",className:"text-[10px] text-primary hover:underline",onClick:()=>{const f=vn({x:50,y:50,zoom:150});n(f),r(f)},children:"Zurücksetzen"})]})]}),d.jsxs("div",{children:[d.jsxs(me,{className:"text-[10px] text-muted-foreground mb-1 block",children:["Zoom: ",u.zoom,"%"]}),d.jsx("input",{type:"range",min:"100",max:"300",step:"5",value:u.zoom,className:"w-40 accent-primary","data-testid":"input-zoom-slider",onChange:f=>{const p=parseInt(f.target.value),m=vn({x:u.x,y:u.y,zoom:p});n(m)},onMouseUp:()=>r(vn(u)),onTouchEnd:()=>r(vn(u))})]})]})}function w9({member:t}){const{toast:e}=dn(),[n,r]=k.useState(!1),[s,i]=k.useState({name:t.name,role:t.role,description:t.description||""}),[a,c]=k.useState(t.imageUrl||""),[u,f]=k.useState(t.imagePosition||vn({x:50,y:50,zoom:150})),[p,m]=k.useState(!1),x=k.useRef(null),y=Tt({mutationFn:E=>Qe("PATCH",`/api/admin/team/${t.id}`,E),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/team"]}),r(!1),e({title:"Teammitglied aktualisiert"})}}),w=Tt({mutationFn:()=>Qe("DELETE",`/api/admin/team/${t.id}`),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/team"]}),e({title:"Teammitglied entfernt"})}}),b=async E=>{m(!0);const M=new FormData;M.append("photo",E);try{const j=await fetch("/api/admin/upload/team",{method:"POST",body:M});if(!j.ok)throw new Error("Upload fehlgeschlagen");const{url:A}=await j.json();c(A);const P=vn({x:50,y:50,zoom:150});await Qe("PATCH",`/api/admin/team/${t.id}`,{imageUrl:A,imagePosition:P}),f(P),Ve.invalidateQueries({queryKey:["/api/team"]}),e({title:"Foto hochgeladen"})}catch{e({title:"Foto-Upload fehlgeschlagen",variant:"destructive"})}finally{m(!1)}},S=async()=>{const E=a.split("/").pop();E&&await fetch(`/api/admin/upload/team/${E}`,{method:"DELETE"}).catch(()=>{}),c("");const M=vn({x:50,y:50,zoom:150});f(M),await Qe("PATCH",`/api/admin/team/${t.id}`,{imageUrl:"",imagePosition:M}),Ve.invalidateQueries({queryKey:["/api/team"]}),e({title:"Foto entfernt"})},N=t.name.split(" ").map(E=>E[0]).join("").slice(0,2);return n?d.jsx(ct,{className:"p-4 ring-2 ring-primary/20","data-testid":`admin-team-${t.id}`,children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs mb-1.5 block",children:"Foto"}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-14 h-14 roun
202ded-full overflow-hidden bg-primary/10 ring-2 ring-border flex items-center justify-center text-primary font-bold text-lg flex-shrink-0",style:a?{backgroundImage:`url(${a})`,backgroundSize:`${ji(u).zoom}%`,backgroundPosition:`${ji(u).x}% ${ji(u).y}%`,backgroundRepeat:"no-repeat"}:{},children:!a&&d.jsx("span",{children:N})}),d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx("input",{ref:x,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden","data-testid":`input-photo-${t.id}`,onChange:E=>{const M=E.target.files?.[0];M&&b(M)}}),d.jsx(Re,{size:"sm",variant:"outline",type:"button",onClick:()=>x.current?.click(),disabled:p,"data-testid":`button-upload-photo-${t.id}`,className:"text-xs h-7 px-2.5",children:p?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin mr-1.5"}),"Wird hochgeladenâ¦"]}):d.jsxs(d.Fragment,{children:[d.jsx(kC,{className:"w-3 h-3 mr-1.5"}),"Foto wählen"]})}),a&&d.jsxs(Re,{size:"sm",variant:"ghost",type:"button",onClick:S,className:"text-xs h-7 px-2.5 text-destructive hover:text-destructive","data-testid":`button-remove-photo-${t.id}`,children:[d.jsx(Do,{className:"w-3 h-3 mr-1"}),"Entfernen"]})]})]}),a&&d.jsx(b9,{imageUrl:a,position:u,onChange:E=>f(E),onCommit:E=>{Qe("PATCH",`/api/admin/team/${t.id}`,{imagePosition:E}).then(()=>Ve.invalidateQueries({queryKey:["/api/team"]})).catch(()=>{})}})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Name"}),d.jsx(Ke,{value:s.name,onChange:E=>i(M=>({...M,name:E.target.value})),"data-testid":`input-edit-team-name-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Rolle"}),d.jsx(Ke,{value:s.role,onChange:E=>i(M=>({...M,role:E.target.value})),"data-testid":`input-edit-team-role-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Beschreibung"}),d.jsx(wn,{value:s.description,onChange:E=>i(M=>({...M,description:E})),"data-testid":`input-edit-team-desc-${t.id}`})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Re,{size:"sm",onClick:()=>y.mutate(s),disabled:y.isPending,"data-testid":`button-save-team-${t.id}`,children:[d.jsx(Vo,{className:"w-4 h-4 mr-1.5"}),"Speichern"]}),d.jsx(Re,{size:"sm",variant:"outline",onClick:()=>{i({name:t.name,role:t.role,description:t.description||""}),r(!1)},children:"Abbrechen"})]})]})}):d.jsx(ct,{className:"p-4","data-testid":`admin-team-${t.id}`,children:d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden bg-primary/10 ring-2 ring-border flex items-center justify-center text-primary font-bold text-sm flex-shrink-0",style:a?{backgroundImage:`url(${a})`,backgroundSize:`${ji(u).zoom}%`,backgroundPosition:`${ji(u).x}% ${ji(u).y}%`,backgroundRepeat:"no-repeat"}:{},children:!a&&d.jsx("span",{children:N})}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("h3",{className:"font-semibold text-sm",children:t.name}),d.jsx("p",{className:"text-xs text-primary",children:t.role}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:t.description?.replace(/<[^>]*>/g,"")||""})]})]}),d.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d.jsx(Re,{variant:"outline",size:"icon",onClick:()=>r(!0),"data-testid":`button-edit-team-${t.id}`,children:d.jsx(Ka,{className:"w-4 h-4"})}),d.jsx(Re,{variant:"destructive",size:"icon",onClick:()=>w.mutate(),"data-testid":`button-delete-team-${t.id}`,children:d.jsx(Do,{className:"w-4 h-4"})})]})]})})}function k9(){const{toast:t}=dn(),{data:e,isLoading:n}=rt({queryKey:["/api/team"]}),{data:r}=rt({queryKey:["/api/content"]}),[s,i]=k.useState([]),[a,c]=k.useState(!1),[u,f]=k.useState({name:"",role:"",description:"",imageUrl:""});k.useEffect(()=>{e&&i(e)},[e]);const p=kh(Ui(tl,{activationConstraint:{distance:5}}),Ui(el,{coordinateGetter:Rh})),m=Tt({mutationFn:M=>Qe("POST","/api/admin/team",M),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/team"]}),c(!1),f({name:"",role:"",description:"",imageUrl:""}),t({title:"Teammitglied hinzugefügt"})}}),x=M=>{const{active:j,over:A}=M;if(!A||j.id===A.id)return;const P=s.findIndex(U=>U.id===j.id),O=s.findIndex(U=>U.id===A.id),z=nl(s,P,O).map((U,Y)=>({...U,sortOrder:Y+1}
202));i(z),z.forEach(U=>{Qe("PATCH",`/api/admin/team/${U.id}`,{sortOrder:U.sortOrder}).catch(()=>{i(e),t({title:"Fehler beim Speichern der Reihenfolge",variant:"destructive"})})}),Ve.invalidateQueries({queryKey:["/api/team"]})},y=r?.find(M=>M.sectionKey==="team"),w=y?.imageUrl||"/images/team-group.png",[b,S]=k.useState(y?.imagePosition||vn({x:50,y:50,zoom:100}));k.useEffect(()=>{y?.imagePosition&&S(y.imagePosition)},[y?.imagePosition]);const N=async M=>{await Qe("POST","/api/admin/content",{sectionKey:"team",imagePosition:M}),Ve.invalidateQueries({queryKey:["/api/content"]})},E=async M=>{const j=M.target.files?.[0];if(!j)return;const A=new FormData;A.append("photo",j);try{const P=await fetch("/api/admin/upload/team",{method:"POST",body:A});if(!P.ok){const z=await P.json().catch(()=>({error:"Upload fehlgeschlagen"}));throw new Error(z.error||"Upload fehlgeschlagen")}const{url:O}=await P.json();await Qe("POST","/api/admin/content",{sectionKey:"team",imageUrl:O}),Ve.invalidateQueries({queryKey:["/api/content"]}),t({title:"Teamfoto aktualisiert"})}catch(P){t({title:P?.message||"Fehler beim Hochladen",variant:"destructive"})}};return d.jsxs("div",{className:"space-y-6",children:[d.jsx(bn,{sectionKey:"team",content:r}),d.jsxs(ct,{className:"p-5","data-testid":"admin-team-photo",children:[d.jsx("h3",{className:"font-semibold text-sm mb-3 text-primary",children:"Teamfoto"}),d.jsxs("div",{className:"space-y-4",children:[d.jsx(v9,{imageUrl:w,position:b,onChange:S,onCommit:N}),d.jsx("div",{className:"flex items-center gap-3",children:d.jsxs(me,{htmlFor:"team-photo-upload",className:"cursor-pointer",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-2 rounded-md bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 transition-colors",children:[d.jsx(kC,{className:"w-4 h-4"}),"Neues Teamfoto hochladen"]}),d.jsx("input",{id:"team-photo-upload",type:"file",accept:"image/*",className:"hidden",onChange:E,"data-testid":"input-team-photo-upload"})]})})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between gap-4 mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Teammitglieder"}),d.jsxs(sl,{open:a,onOpenChange:c,children:[d.jsx(il,{asChild:!0,children:d.jsxs(Re,{size:"sm","data-testid":"button-add-team",children:[d.jsx(qa,{className:"w-4 h-4 mr-1.5"}),"Neues Mitglied"]})}),d.jsxs(Wo,{children:[d.jsx(Ko,{children:d.jsx(qo,{children:"Teammitglied hinzufügen"})}),d.jsxs("div",{className:"space-y-4 mt-4",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Name"}),d.jsx(Ke,{value:u.name||"",onChange:M=>f(j=>({...j,name:M.target.value})),placeholder:"Dr. med. Max Mustermann","data-testid":"input-team-name"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Rolle"}),d.jsx(Ke,{value:u.role||"",onChange:M=>f(j=>({...j,role:M.target.value})),placeholder:"Facharzt für Allgemeinmedizin","data-testid":"input-team-role"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Beschreibung"}),d.jsx(wn,{value:u.description||"",onChange:M=>f(j=>({...j,description:M})),"data-testid":"input-team-desc"})]}),d.jsxs(Re,{className:"w-full",onClick:()=>m.mutate(u),disabled:m.isPending||!u.name||!u.role,"data-testid":"button-save-team",children:[d.jsx(Ji,{className:"w-4 h-4 mr-2"}),"Speichern"]})]})]})]})]}),n?d.jsx("div",{className:"space-y-3",children:[1,2,3].map(M=>d.jsx("div",{className:"h-16 bg-muted animate-pulse rounded-md"},M))}):s.length>0?d.jsx(Th,{sensors:p,collisionDetection:Sh,onDragEnd:x,children:d.jsx(jh,{items:s.map(M=>M.id),strategy:Mh,children:d.jsx("div",{className:"space-y-2",children:s.map(M=>d.jsx(j9,{member:M},M.id))})})}):d.jsxs(ct,{className:"p-8 text-center text-muted-foreground",children:[d.jsx(SC,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),d.jsx("p",{className:"text-sm",children:"Keine Teammitglieder vorhanden"})]})]})]})}function S9({hours:t}){const{toast:e}=dn(),[n,r]=k.useState(!1),[s,i]=k.useState({day:t.day,morning:t.morning||"",afternoon:t.afternoon||""}),a=Tt({mutationFn:u=>Qe("PATCH",`/api/admin/opening-hours/${t.id}`,u),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/opening-hours"]}),r(!1),e({title:"Sprechzeit aktualisiert"})}}),c=Tt({mutationFn:()=>Qe("DELETE",`/api/admin/opening-hours/${t.id}`),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/opening-hours"]}),e({title:"Sprechzeit entfernt"})}});return n?d.jsx(ct,{className:"p-4 ring-2 ring-primary/20","data-testid":`admin-hours-${t.id}`,children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Tag"}),d.jsx(Ke,{value:s.day,onChange:u=>i(f=>({...f,day:u.target.value})),"data-testid":`input-edit-hours-day-${t.id}`})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Vormittags"}),d.jsx(Ke,{value:s.morning,onChange:u=>i(f=>({...f,morning:u.target.value})),"data-testid":`input-edit-hours-morning-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Nachmittags"}),d.jsx(Ke,{value:s.afternoon,onChange:u=>i(f=>({...f,afternoon:u.target.value})),"data-testid":`input-edit-hours-afternoon-${t.id}`})]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Re,{size:"sm",onClick:()=>a.mutate(s),disabled:a.isPending,"data-testid":`button-save-hours-${t.id}`,children:[d.jsx(Vo,{className:"w-4 h-4 mr-1.5"}),"Speichern"]}),d.jsx(Re,{size:"sm",variant:"outline",onClick:()=>{i({day:t.day,morning:t.morning||"",afternoon:t.afternoon||""}),r(!1)},children:"Abbrechen"})]})]})}):d.jsx(ct,{className:"p-4","data-testid":`admin-hours-${t.id}`,children:d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-sm",children:t.day}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.morning||"-"," ",t.afternoon&&`| ${t.afternoon}`]})]}),d.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d.jsx(Re,{variant:"outline",size:"icon",onClick:()=>r(!0),"data-testid":`button-edit-hours-${t.id}`,children:d.jsx(Ka,{className:"w-4 h-4"})}),d.jsx(Re,{variant:"destructive",size:"icon",onClick:()=>c.mutate(),"data-testid":`button-delete-hours-${t.id}
202`,children:d.jsx(Do,{className:"w-4 h-4"})})]})]})})}function C9(){const{toast:t}=dn(),{data:e,isLoading:n}=rt({queryKey:["/api/opening-hours"]}),[r,s]=k.useState(!1),[i,a]=k.useState({day:"",morning:"",afternoon:"",sortOrder:0}),c=Tt({mutationFn:u=>Qe("POST","/api/admin/opening-hours",u),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/opening-hours"]}),s(!1),a({day:"",morning:"",afternoon:"",sortOrder:0}),t({title:"Sprechzeit gespeichert"})}});return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Sprechzeiten"}),d.jsxs(sl,{open:r,onOpenChange:s,children:[d.jsx(il,{asChild:!0,children:d.jsxs(Re,{size:"sm","data-testid":"button-add-hours",children:[d.jsx(qa,{className:"w-4 h-4 mr-1.5"}),"Neuer Eintrag"]})}),d.jsxs(Wo,{children:[d.jsx(Ko,{children:d.jsx(qo,{children:"Sprechzeit hinzufügen"})}),d.jsxs("div",{className:"space-y-4 mt-4",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Tag"}),d.jsx(Ke,{value:i.day||"",onChange:u=>a(f=>({...f,day:u.target.value})),placeholder:"Montag","data-testid":"input-hours-day"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Vormittags"}),d.jsx(Ke,{value:i.morning||"",onChange:u=>a(f=>({...f,morning:u.target.value})),placeholder:"08:00 - 12:00","data-testid":"input-hours-morning"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Nachmittags"}),d.jsx(Ke,{value:i.afternoon||"",onChange:u=>a(f=>({...f,afternoon:u.target.value})),placeholder:"14:00 - 17:00","data-testid":"input-hours-afternoon"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Reihenfolge"}),d.jsx(Ke,{type:"number",value:i.sortOrder||0,onChange:u=>a(f=>({...f,sortOrder:parseInt(u.target.value)||0})),"data-testid":"input-hours-order"})]}),d.jsxs(Re,{className:"w-full",onClick:()=>c.mutate(i),disabled:c.isPending||!i.day,"data-testid":"button-save-hours",children:[d.jsx(Ji,{className:"w-4 h-4 mr-2"}),"Speichern"]})]})]})]})]}),n?d.jsx("div",{className:"space-y-3",children:[1,2,3].map(u=>d.jsx("div",{className:"h-12 bg-muted animate-pulse rounded-md"},u))}):e&&e.length>0?d.jsx("div",{className:"space-y-3",children:e.map(u=>d.jsx(S9,{hours:u},u.id))}):d.jsxs(ct,{className:"p-8 text-center text-muted-foreground",children:[d.jsx(Po,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),d.jsx("p",{className:"text-sm",children:"Keine Sprechzeiten eingetragen"})]})]})}function N9({faq:t}){const{toast:e}=dn(),[n,r]=k.useState(!1),[s,i]=k.useState({question:t.question,answer:t.answer}),a=Tt({mutationFn:u=>Qe("PATCH",`/api/admin/faqs/${t.id}`,u),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/faqs"]}),r(!1),e({title:"FAQ aktualisiert"})}}),c=Tt({mutationFn:()=>Qe("DELETE",`/api/admin/faqs/${t.id}`),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/faqs"]}),e({title:"FAQ gelöscht"})}});return n?d.jsx(ct,{className:"p-4 ring-2 ring-primary/20","data-testid":`admin-faq-${t.id}`,children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Frage"}),d.jsx(Ke,{value:s.question,onChange:u=>i(f=>({...f,question:u.target.value})),"data-testid":`input-edit-faq-question-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Antwort"}),d.jsx(wn,{value:s.answer,onChange:u=>i(f=>({...f,answer:u})),"data-testid":`input-edit-faq-answer-${t.id}`})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Re,{size:"sm",onClick:()=>a.mutate(s),disabled:a.isPending,"data-testid":`button-save-faq-${t.id}`,children:[d.jsx(Vo,{className:"w-4 h-4 mr-1.5"}),"Speichern"]}),d.jsx(Re,{size:"sm",variant:"outline",onClick:()=>{i({question:t.question,answer:t.answer}),r(!1)},children:"Abbrechen"})]})]})}):d.jsx(ct,{className:"p-4","data-testid":`admin-faq-${t.id}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h3",{className:"font-semibold text-sm",children:t.question}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:t.answer})]}),d.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d.jsx(Re,{variant:"outline",size:"icon",onClick:()=>r(!0),"data-testid":`button-edit-faq-${t.id}`,children:d.jsx(Ka,{className:"w-4 h-4"})}),d.jsx(Re,{variant:"destructive",size:"icon",onClick:()=>c.mutate(),"data-testid":`button-delete-faq-${t.id}
202`,children:d.jsx(Do,{className:"w-4 h-4"})})]})]})})}function E9({faq:t}){const{attributes:e,listeners:n,setNodeRef:r,transform:s,transition:i,isDragging:a}=Ah({id:t.id});return d.jsxs("div",{ref:r,style:{transform:Vi.Transform.toString(s),transition:i,opacity:a?.4:1},className:"flex items-stretch gap-1",children:[d.jsx("button",{...e,...n,className:"flex items-center px-1.5 text-muted-foreground/40 hover:text-muted-foreground cursor-grab active:cursor-grabbing touch-none",tabIndex:-1,children:d.jsx(ch,{className:"w-4 h-4"})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(N9,{faq:t})})]})}function T9(){const{toast:t}=dn(),{data:e,isLoading:n}=rt({queryKey:["/api/faqs"]}),[r,s]=k.useState(!1),[i,a]=k.useState({question:"",answer:"",category:"general",sortOrder:0}),c=Tt({mutationFn:p=>Qe("POST","/api/admin/faqs",p),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/faqs"]}),s(!1),a({question:"",answer:"",category:"general",sortOrder:0}),t({title:"FAQ erstellt"})}}),u=kh(Ui(tl),Ui(el,{coordinateGetter:Rh})),f=async(p,m)=>{const{active:x,over:y}=p;if(!y||x.id===y.id||!e)return;const w=e.filter(E=>E.category===m).sort((E,M)=>E.sortOrder-M.sortOrder),b=w.findIndex(E=>E.id===x.id),S=w.findIndex(E=>E.id===y.id);if(b===-1||S===-1)return;const N=nl(w,b,S);for(let E=0;E<N.length;E++)N[E].sortOrder!==E+1&&await Qe("PATCH",`/api/admin/faqs/${N[E].id}`,{sortOrder:E+1});Ve.invalidateQueries({queryKey:["/api/faqs"]})};return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Häufige Fragen"}),d.jsxs(sl,{open:r,onOpenChange:s,children:[d.jsx(il,{asChild:!0,children:d.jsxs(Re,{size:"sm","data-testid":"button-add-faq",children:[d.jsx(qa,{className:"w-4 h-4 mr-1.5"}),"Neue Frage"]})}),d.jsxs(Wo,{children:[d.jsx(Ko,{children:d.jsx(qo,{children:"FAQ hinzufügen"})}),d.jsxs("div",{className:"space-y-4 mt-4",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Sektion"}),d.jsxs("select",{className:"w-full mt-1 rounded-md border border-input bg-background px-3 py-2 text-sm",value:i.category||"general",onChange:p=>a(m=>({...m,category:p.target.value})),"data-testid":"select-faq-category",children:[d.jsx("option",{value:"general",children:"Allgemein"}),d.jsx("option",{value:"praevention",children:"Prävention"}),d.jsx("option",{value:"diagnostik",children:"Diagnostik"}),d.jsx("option",{value:"innovativ",children:"Innovativ"})]})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Frage"}),d.jsx(Ke,{value:i.question||"",onChange:p=>a(m=>({...m,question:p.target.value})),placeholder:"Wie kann ich einen Termin vereinbaren?","data-testid":"input-faq-question"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Antwort"}),d.jsx(wn,{value:i.answer||"",onChange:p=>a(m=>({...m,answer:p})),"data-testid":"input-faq-answer"})]}),d.jsxs(Re,{className:"w-full",onClick:()=>c.mutate(i),disabled:c.isPending||!i.question||!i.answer,"data-testid":"button-save-faq",children:[d.jsx(Ji,{className:"w-4 h-4 mr-2"}),"Speichern"]})]})]})]})]}),n?d.jsx("div",{className:"space-y-3",children:[1,2].map(p=>d.jsx("div",{className:"h-16 bg-muted animate-pulse rounded-md"},p))}):e&&e.length>0?d.jsx("div",{className:"space-y-6",children:["general","praevention","diagnostik","innovativ"].map(p=>{const m=e.filter(y=>y.category===p).sort((y,w)=>y.sortOrder-w.sortOrder);if(m.length===0)return null;const x={general:"Allgemein",praevention:"Prävention",diagnostik:"Diagnostik",innovativ:"Innovativ"};return d.jsxs("div",{children:[d.jsxs("h3",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3",children:[x[p]," (",m.length,")"]}),d.jsx(Th,{sensors:u,collisionDetection:Sh,onDragEnd:y=>f(y,p),children:d.jsx(jh,{items:m.map(y=>y.id),strategy:Mh,children:d.jsx("div",{className:"space-y-3",children:m.map(y=>d.jsx(E9,{faq:y},y.id))})})})]},p)})}):d.jsxs(ct,{className:"p-8 text-center text-muted-foreground",children:[d.jsx(yC,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),d.jsx("p",{className:"text-sm",children:"Keine FAQs vorhanden"})]})]})}function M9({service:t}){const{attributes:e,listeners:n,setNodeRef:r,transform:s,transition:i,isDragging:a}=Ah({id:t.id});
202return d.jsxs("div",{ref:r,style:{transform:Vi.Transform.toString(s),transition:i,opacity:a?.4:1},className:"flex items-stretch gap-1",children:[d.jsx("button",{...e,...n,className:"flex items-center px-1.5 text-muted-foreground/40 hover:text-muted-foreground cursor-grab active:cursor-grabbing touch-none",tabIndex:-1,children:d.jsx(ch,{className:"w-4 h-4"})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(A9,{service:t})})]})}function j9({member:t}){const{attributes:e,listeners:n,setNodeRef:r,transform:s,transition:i,isDragging:a}=Ah({id:t.id});return d.jsxs("div",{ref:r,style:{transform:Vi.Transform.toString(s),transition:i,opacity:a?.4:1},className:"flex items-stretch gap-1",children:[d.jsx("button",{...e,...n,className:"flex items-center px-1.5 text-muted-foreground/40 hover:text-muted-foreground cursor-grab active:cursor-grabbing touch-none",tabIndex:-1,children:d.jsx(ch,{className:"w-4 h-4"})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsx(w9,{member:t})})]})}const $j=[{value:"stethoscope",label:"Stethoskop"},{value:"heartpulse",label:"Herzschlag"},{value:"shield",label:"Schild"},{value:"microscope",label:"Mikroskop"},{value:"scan",label:"Scan"},{value:"syringe",label:"Spritze"},{value:"brain",label:"Gehirn"},{value:"activity",label:"Aktivität"},{value:"monitor",label:"Monitor"},{value:"pill",label:"Pille"},{value:"award",label:"Auszeichnung"},{value:"flask",label:"Kolben"}];function A9({service:t}){const{toast:e}=dn(),[n,r]=k.useState(!1),[s,i]=k.useState({title:t.title,description:t.description,category:t.category,icon:t.icon,sortOrder:t.sortOrder}),a=Tt({mutationFn:m=>Qe("PATCH",`/api/admin/services/${t.id}`,m),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/admin/services"]}),Ve.invalidateQueries({queryKey:["/api/services"]}),r(!1),e({title:"Leistung aktualisiert"})}}),c=Tt({mutationFn:()=>Qe("DELETE",`/api/admin/services/${t.id}`),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/admin/services"]}),Ve.invalidateQueries({queryKey:["/api/services"]}),e({title:"Leistung gelöscht"})}}),u=()=>{a.mutate({active:!t.active})},f=t.category==="allgemeinmedizin"?"Allgemeinmedizin":t.category==="praevention"?"Prävention":t.category==="innovativ"?"Innovative Angebote":"Diagnostik",p=t.category==="allgemeinmedizin"?"bg-teal-100 dark:bg-teal-900/30 text-teal-700 dark:text-teal-300":t.category==="praevention"?"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300":t.category==="innovativ"?"bg-violet-100 dark:bg-violet-900/30 text-violet-700 dark:text-violet-300":"bg-sky-100 dark:bg-sky-900/30 text-sky-700 dark:text-sky-300";return n?d.jsx(ct,{className:"p-4 ring-2 ring-primary/20","data-testid":`admin-service-${t.id}`,children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Titel"}),d.jsx(Ke,{value:s.title,onChange:m=>i(x=>({...x,title:m.target.value})),"data-testid":`input-edit-service-title-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Reihenfolge"}),d.jsx(Ke,{type:"number",value:s.sortOrder,onChange:m=>i(x=>({...x,sortOrder:parseInt(m.target.value)||0})),"data-testid":`input-edit-service-order-${t.id}`})]})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Beschreibung"}),d.jsx(wn,{value:s.description,onChange:m=>i(x=>({...x,description:m})),"data-testid":`input-edit-service-desc-${t.id}`})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Kategorie"}),d.jsxs(Wi,{value:s.category,onValueChange:m=>i(x=>({...x,category:m})),children:[d.jsx(Ys,{"data-testid":`select-edit-service-cat-${t.id}`,children:d.jsx(Ki,{})}),d.jsxs(Xs,{children:[d.jsx(tt,{value:"allgemeinmedizin",children:"Allgemeinmedizin"}),d.jsx(tt,{value:"praevention",children:"Prävention"}),d.jsx(tt,{value:"diagnostik",children:"Diagnostik"}),d.jsx(tt,{value:"innovativ",children:"Innovative Angebote"})]})]})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Icon"}),d.jsxs(Wi,{value:s.icon,onValueChange:m=>i(x=>({...x,icon:m})),children:[d.jsx(Ys,{"data-testid":`select-edit-service-icon-${t.id}`,children:d.jsx(Ki,{})}),d.jsx(Xs,{children:$j.map(m=>d.jsx(tt,{value:m.value,children:m.label},m.value))})]})]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Re,{size:"sm",onClick:()=>a.mutate(s),disabled:a.isPending,"data-testid":`button-save-service-${t.id}`,children:[d.jsx(Vo,{className:"w-4 h-4 mr-1.5"}),"Speichern"]}),d.jsx(Re,{size:"sm",variant:"outline",onClick:()=>
202{i({title:t.title,description:t.description,category:t.category,icon:t.icon,sortOrder:t.sortOrder}),r(!1)},"data-testid":`button-cancel-service-${t.id}`,children:"Abbrechen"})]})]})}):d.jsx(ct,{className:`p-4 ${t.active?"":"opacity-50"}`,"data-testid":`admin-service-${t.id}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[d.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${p}`,children:f}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",t.sortOrder]}),d.jsx("h3",{className:"font-semibold text-sm",children:t.title}),!t.active&&d.jsx("span",{className:"text-xs text-muted-foreground italic",children:"(inaktiv)"})]}),d.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:t.description})]}),d.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d.jsx(jc,{checked:t.active,onCheckedChange:u,"data-testid":`switch-service-active-${t.id}`}),d.jsx(Re,{variant:"outline",size:"icon",onClick:()=>r(!0),"data-testid":`button-edit-service-${t.id}`,children:d.jsx(Ka,{className:"w-4 h-4"})}),d.jsx(Re,{variant:"destructive",size:"icon",onClick:()=>c.mutate(),"data-testid":`button-delete-service-${t.id}`,children:d.jsx(Do,{className:"w-4 h-4"})})]})]})})}const R9=[{key:"allgemeinmedizin",label:"Allgemeinmedizin",chip:"bg-teal-100 text-teal-700 dark:bg-teal-900/30 dark:text-teal-300"},{key:"praevention",label:"Prävention",chip:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-300"},{key:"diagnostik",label:"Diagnostik",chip:"bg-sky-100 text-sky-700 dark:bg-sky-900/30 dark:text-sky-300"},{key:"innovativ",label:"Innovative Angebote",chip:"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-300"}];function O9({category:t,label:e,chipClass:n,items:r,onDragEnd:s}){const i=kh(Ui(tl,{activationConstraint:{distance:5}}),Ui(el,{coordinateGetter:Rh}));return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("span",{className:`text-xs font-semibold px-2.5 py-1 rounded-full ${n}`,children:e}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[r.length," Einträge"]})]}),d.jsx(Th,{sensors:i,collisionDetection:Sh,onDragEnd:s,children:d.jsx(jh,{items:r.map(a=>a.id),strategy:Mh,children:d.jsx("div",{className:"space-y-2",children:r.map(a=>d.jsx(M9,{service:a},a.id))})})})]})}function P9(){const{toast:t}=dn(),{data:e,isLoading:n}=rt({queryKey:["/api/admin/services"]}),{data:r}=rt({queryKey:["/api/content"]}),[s,i]=k.useState([]),[a,c]=k.useState(!1),[u,f]=k.useState({title:"",description:"",icon:"stethoscope",category:"allgemeinmedizin"});k.useEffect(()=>{e&&i(e)},[e]);const p=Tt({mutationFn:y=>Qe("POST","/api/admin/services",y),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/admin/services"]}),Ve.invalidateQueries({queryKey:["/api/services"]}),c(!1),f({title:"",description:"",icon:"stethoscope",category:"allgemeinmedizin"}),t({title:"Leistung erstellt"})}}),m=y=>w=>{const{active:b,over:S}=w;if(!S||b.id===S.id)return;const N=s.filter(P=>P.category===y),E=s.filter(P=>P.category!==y),M=N.findIndex(P=>P.id===b.id),j=N.findIndex(P=>P.id===S.id),A=nl(N,M,j).map((P,O)=>({...P,sortOrder:O+1}));i([...E,...A]),A.forEach(P=>{Qe("PATCH",`/api/admin/services/${P.id}`,{sortOrder:P.sortOrder}).catch(()=>{i(e),t({title:"Fehler beim Speichern der Reihenfolge",variant:"destructive"})})}),Ve.invalidateQueries({queryKey:["/api/services"]})},x={allgemeinmedizin:["allgemeinmedizin"],praevention:["praevention"],diagnostik:["diagnostik"],innovativ:["innovativ"]};return d.jsx("div",{className:"space-y-6",children:d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between gap-4 mb-5",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Leistungen verwalten"}),d.jsxs(sl,{open:a,onOpenChange:c,children:[d.jsx(il,{asChild:!0,children:d.jsxs(Re,{size:"sm","data-testid":"button-add-service",children:[d.jsx(qa,{className:"w-4 h-4 mr-1.5"}),"Neue Leistung"]})}),d.jsxs(Wo,{children:[d.jsx(Ko,{children:d.jsx(qo,{children:"Leistung hinzufügen"})}
202),d.jsxs("div",{className:"space-y-4 mt-4",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Titel"}),d.jsx(Ke,{value:u.title||"",onChange:y=>f(w=>({...w,title:y.target.value})),placeholder:"Ultraschalluntersuchung","data-testid":"input-service-title"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Beschreibung"}),d.jsx(wn,{value:u.description||"",onChange:y=>f(w=>({...w,description:y})),"data-testid":"input-service-desc"})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Kategorie"}),d.jsxs(Wi,{value:u.category||"allgemeinmedizin",onValueChange:y=>f(w=>({...w,category:y})),children:[d.jsx(Ys,{"data-testid":"select-service-category",children:d.jsx(Ki,{})}),d.jsxs(Xs,{children:[d.jsx(tt,{value:"allgemeinmedizin",children:"Allgemeinmedizin"}),d.jsx(tt,{value:"praevention",children:"Prävention"}),d.jsx(tt,{value:"diagnostik",children:"Diagnostik"}),d.jsx(tt,{value:"innovativ",children:"Innovative Angebote"})]})]})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Icon"}),d.jsxs(Wi,{value:u.icon||"stethoscope",onValueChange:y=>f(w=>({...w,icon:y})),children:[d.jsx(Ys,{"data-testid":"select-service-icon",children:d.jsx(Ki,{})}),d.jsx(Xs,{children:$j.map(y=>d.jsx(tt,{value:y.value,children:y.label},y.value))})]})]})]}),d.jsxs(Re,{className:"w-full",onClick:()=>p.mutate(u),disabled:p.isPending||!u.title||!u.description,"data-testid":"button-save-service",children:[d.jsx(Ji,{className:"w-4 h-4 mr-2"}),"Speichern"]})]})]})]})]}),n?d.jsx("div",{className:"space-y-3",children:[1,2,3].map(y=>d.jsx("div",{className:"h-16 bg-muted animate-pulse rounded-md"},y))}):d.jsx("div",{className:"space-y-8",children:R9.map(({key:y,label:w,chip:b})=>d.jsxs("div",{className:"space-y-4",children:[(x[y]||[]).map(S=>d.jsx(bn,{sectionKey:S,content:r},S)),d.jsx(O9,{category:y,label:w,chipClass:b,items:s.filter(S=>S.category===y),onDragEnd:m(y)})]},y))})]})})}function D9(){const{data:t,isLoading:e}=rt({queryKey:["/api/content"]});return e?d.jsx("div",{className:"space-y-3",children:[1,2].map(n=>d.jsx("div",{className:"h-24 bg-muted animate-pulse rounded-md"},n))}):d.jsxs("div",{className:"space-y-4",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"CM5 bearbeiten"}),d.jsx(bn,{sectionKey:"cm5",content:t}),d.jsx(bn,{sectionKey:"cm5_highlight_1",content:t}),d.jsx(bn,{sectionKey:"cm5_highlight_2",content:t}),d.jsx(bn,{sectionKey:"cm5_highlight_3",content:t}),d.jsx(bn,{sectionKey:"cm5_closing",content:t})]})}function I9(){const{data:t,isLoading:e}=rt({queryKey:["/api/content"]});return e?d.jsx("div",{className:"space-y-3",children:[1,2].map(n=>d.jsx("div",{className:"h-24 bg-muted animate-pulse rounded-md"},n))}):d.jsxs("div",{className:"space-y-4",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Kontakt & Footer"}),d.jsx(bn,{sectionKey:"kontakt",content:t}),d.jsx(bn,{sectionKey:"contact_details",content:t}),d.jsx(bn,{sectionKey:"footer",content:t})]})}function L9({job:t}){const{attributes:e,listeners:n,setNodeRef:r,transform:s,transition:i,isDragging:a}=Ah({id:t.id}),c={transform:Vi.Transform.toString(s),transition:i,opacity:a?.5:1},[u,f]=k.useState(!1),[p,m]=k.useState(t.title),[x,y]=k.useState(t.description),[w,b]=k.useState(t.employmentType),[S,N]=k.useState(t.validThrough||""),[E,M]=k.useState(t.salaryMin||""),[j,A]=k.useState(t.salaryMax||""),[P,O]=k.useState(t.qualifications||""),[z,U]=k.useState(t.responsibilities||""),[Y,Q]=k.useState(t.benefits||""),[X,le]=k.useState(t.active),{toast:W}=dn(),ce=Tt({mutationFn:H=>Qe("PATCH",`/api/admin/jobs/${t.id}`,H),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/admin/jobs"]}),f(!1),W({title:"Stelle aktualisiert"})}}),se=Tt({mutationFn:()=>Qe("DELETE",`/api/admin/jobs/${t.id}`),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/admin/jobs"]}),W({title:"Stelle gelöscht"})}}),ie=Tt({mutationFn:()=>Qe("PATCH",`/api/admin/jobs/${t.id}`,{active:!t.active}),onSuccess:()=>Ve.invalidateQueries({queryKey:["/api/admin/jobs"]})});
202return u?d.jsx(ct,{ref:r,style:c,className:"p-4 ring-2 ring-primary/20","data-testid":`card-edit-job-${t.id}`,children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Stellentitel"}),d.jsx(Ke,{value:p,onChange:H=>m(H.target.value),"data-testid":`input-job-title-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Art der Beschäftigung"}),d.jsxs(Wi,{value:w,onValueChange:b,children:[d.jsx(Ys,{"data-testid":`select-job-type-${t.id}`,children:d.jsx(Ki,{})}),d.jsxs(Xs,{children:[d.jsx(tt,{value:"FULL_TIME",children:"Vollzeit"}),d.jsx(tt,{value:"PART_TIME",children:"Teilzeit"}),d.jsx(tt,{value:"FULL_OR_PART_TIME",children:"Voll- oder Teilzeit"}),d.jsx(tt,{value:"TEMPORARY",children:"Befristet"}),d.jsx(tt,{value:"INTERN",children:"Praktikum"}),d.jsx(tt,{value:"OTHER",children:"Sonstiges"})]})]})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Beschreibung"}),d.jsx(wn,{value:x,onChange:y})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Qualifikationen (optional)"}),d.jsx(wn,{value:P,onChange:O})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Aufgaben (optional)"}),d.jsx(wn,{value:z,onChange:U})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Benefits (optional)"}),d.jsx(wn,{value:Y,onChange:Q})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Gehalt min (â¬)"}),d.jsx(Ke,{value:E,onChange:H=>M(H.target.value),placeholder:"z.B. 3000","data-testid":`input-job-salary-min-${t.id}`})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Gehalt max (â¬)"}),d.jsx(Ke,{value:j,onChange:H=>A(H.target.value),placeholder:"z.B. 4500","data-testid":`input-job-salary-max-${t.id}`})]})]}),d.jsxs("div",{children:[d.jsx(me,{className:"text-xs",children:"Bewerbungsfrist (YYYY-MM-DD)"}),d.jsx(Ke,{value:S,onChange:H=>N(H.target.value),placeholder:"2026-06-30","data-testid":`input-job-deadline-${t.id}`})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(jc,{checked:X,onCheckedChange:le,"data-testid":`switch-job-edit-active-${t.id}`}),d.jsx(me,{className:"text-xs",children:"Aktiv"})]}),d.jsxs("div",{className:"flex gap-2 pt-2",children:[d.jsxs(Re,{size:"sm",onClick:()=>ce.mutate({title:p,description:x,employmentType:w,validThrough:S||null,salaryMin:E||null,salaryMax:j||null,qualifications:P||null,responsibilities:z||null,benefits:Y||null,active:X}),disabled:ce.isPending,"data-testid":`button-save-job-${t.id}`,children:[d.jsx(Vo,{className:"w-3.5 h-3.5 mr-1"}),"Speichern"]}),d.jsxs(Re,{size:"sm",variant:"outline",onClick:()=>f(!1),"data-testid":`button-cancel-job-${t.id}`,children:[d.jsx(Uo,{className:"w-3.5 h-3.5 mr-1"}),"Abbrechen"]})]})]})}
202):d.jsx(ct,{ref:r,style:c,className:"p-4","data-testid":`card-admin-job-${t.id}`,children:d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsx("button",{...e,...n,className:"mt-1 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground touch-none","data-testid":`drag-job-${t.id}`,children:d.jsx(ch,{className:"w-4 h-4"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx("h4",{className:"font-semibold text-sm truncate",children:t.title}),d.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full ${t.active?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:t.active?"Aktiv":"Inaktiv"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:t.employmentType==="FULL_TIME"?"Vollzeit":t.employmentType==="PART_TIME"?"Teilzeit":t.employmentType==="FULL_OR_PART_TIME"?"Voll- oder Teilzeit":t.employmentType==="TEMPORARY"?"Befristet":t.employmentType==="INTERN"?"Praktikum":"Sonstiges"})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(jc,{checked:t.active,onCheckedChange:()=>ie.mutate(),"data-testid":`switch-job-active-${t.id}`}),d.jsx(Re,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>f(!0),"data-testid":`button-edit-job-${t.id}`,children:d.jsx(Ka,{className:"w-3.5 h-3.5"})}),d.jsx(Re,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive",onClick:()=>{confirm("Stelle löschen?")&&se.mutate()},"data-testid":`button-delete-job-${t.id}`,children:d.jsx(Do,{className:"w-3.5 h-3.5"})})]})]})})}function _9(){const{data:t,isLoading:e}=rt({queryKey:["/api/admin/jobs"]}),{data:n,isLoading:r}=rt({queryKey:["/api/content"]}),[s,i]=k.useState([]),[a,c]=k.useState(!1),[u,f]=k.useState(""),[p,m]=k.useState(""),[x,y]=k.useState("FULL_TIME"),{toast:w}=dn();k.useEffect(()=>{t&&i([...t].sort((E,M)=>E.sortOrder-M.sortOrder))},[t]);const b=kh(Ui(tl,{activationConstraint:{distance:5}}),Ui(el,{coordinateGetter:Rh})),S=E=>{const{active:M,over:j}=E;if(!j||M.id===j.id)return;const A=s.findIndex(z=>z.id===M.id),P=s.findIndex(z=>z.id===j.id),O=nl(s,A,P).map((z,U)=>({...z,sortOrder:U+1}));i(O),O.forEach(z=>{Qe("PATCH",`/api/admin/jobs/${z.id}`,{sortOrder:z.sortOrder}).catch(()=>{i(t),w({title:"Fehler beim Speichern der Reihenfolge",variant:"destructive"})})}),Ve.invalidateQueries({queryKey:["/api/admin/jobs"]})},N=Tt({mutationFn:E=>Qe("POST","/api/admin/jobs",E),onSuccess:()=>{Ve.invalidateQueries({queryKey:["/api/admin/jobs"]}),c(!1),f(""),m(""),y("FULL_TIME"),w({title:"Stelle erstellt"})}});return e||r?d.jsx("div",{className:"space-y-3",children:[1,2].map(E=>d.jsx("div",{className:"h-20 bg-muted animate-pulse rounded-md"},E))}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(bn,{sectionKey:"karriere",content:n}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-lg font-semibold",children:"Stellenangebote"}),d.jsxs(sl,{open:a,onOpenChange:c,children:[d.jsx(il,{asChild:!0,children:d.jsxs(Re,{size:"sm","data-testid":"button-add-job",children:[d.jsx(qa,{className:"w-4 h-4 mr-1"}),"Neue Stelle"]})}),d.jsxs(Wo,{children:[d.jsx(Ko,{children:d.jsx(qo,{children:"Neue Stelle erstellen"})}),d.jsxs("div",{className:"space-y-3 pt-2",children:[d.jsxs("div",{children:[d.jsx(me,{children:"Stellentitel"}),d.jsx(Ke,{value:u,onChange:E=>f(E.target.value),placeholder:"z.B. MFA (m/w/d)","data-testid":"input-new-job-title"})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Art der Beschäftigung"}),d.jsxs(Wi,{value:x,onValueChange:y,children:[d.jsx(Ys,{"data-testid":"select-new-job-type",children:d.jsx(Ki,{})}),d.jsxs(Xs,{children:[d.jsx(tt,{value:"FULL_TIME",children:"Vollzeit"}),d.jsx(tt,{value:"PART_TIME",children:"Teilzeit"}),d.jsx(tt,{value:"FULL_OR_PART_TIME",children:"Voll- oder Teilzeit"}),d.jsx(tt,{value:"TEMPORARY",children:"Befristet"}),d.jsx(tt,{value:"INTERN",children:"Praktikum"}),d.jsx(tt,{value:"OTHER",children:"Sonstiges"})]})]})]}),d.jsxs("div",{children:[d.jsx(me,{children:"Beschreibung"}),d.jsx(wn,{value:p,onChange:m})]}),d.jsxs(Re,{onClick:()=>N.mutate({title:u,description:p,employmentType:x}),disabled:!u||!p||N.isPending,"data-testid":"button-create-job",children:[d.jsx(Ji,{className:"w-4 h-4 mr-1"}),"Erstellen"]})]})]})]})]}),s.length>0?d.jsx(Th,{sensors:b,collisionDetection:Sh,onDragEnd:S,children:d.jsx(jh,{items:s.map(E=>E.id),strategy:Mh,children:d.jsx("div",{className:"space-y-3",children:s.map(E=>d.jsx(L9,{job:E},E.id))})})}):d.jsxs(ct,{className:"p-8 text-center text-muted-foreground",children:[d.jsx(lh,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),d.jsx("p",{className:"text-sm",children:"Noch keine Stellenangebote angelegt."})]})]})}function z9(){const[t,e]=k.useState(""),[n,r]=k.useState(""),[s,i]=k.useState(!1),[a,c]=k.useState(""),[u,f]=k.useState(!1),p=async m=>{m.preventDefault(),c(""),f(!0);
202try{(await(await Qe("POST","/api/auth/login",{email:t,password:n})).json()).ok&&Ve.invalidateQueries({queryKey:["/api/auth/me"]})}catch(x){c(x.message||"Anmeldung fehlgeschlagen")}finally{f(!1)}};return d.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-50 to-green-100 flex items-center justify-center p-4","data-testid":"login-page",children:d.jsxs(ct,{className:"w-full max-w-md p-8 shadow-lg",children:[d.jsxs("div",{className:"text-center mb-6",children:[d.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx(lc,{className:"w-8 h-8 text-primary"})}),d.jsx("h1",{className:"text-2xl font-bold",children:"Admin-Login"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Hausarztpraxis Dr. Jelden"})]}),d.jsxs("form",{onSubmit:p,className:"space-y-4",children:[a&&d.jsx("div",{className:"bg-destructive/10 text-destructive text-sm p-3 rounded-md","data-testid":"login-error",children:a}),d.jsxs("div",{children:[d.jsx(me,{htmlFor:"email",children:"E-Mail"}),d.jsxs("div",{className:"relative mt-1",children:[d.jsx(cy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),d.jsx(Ke,{id:"email",type:"email",value:t,onChange:m=>e(m.target.value),placeholder:"[email protected]",className:"pl-10",required:!0,"data-testid":"input-email"})]})]}),d.jsxs("div",{children:[d.jsx(me,{htmlFor:"password",children:"Passwort"}),d.jsxs("div",{className:"relative mt-1",children:[d.jsx(lc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),d.jsx(Ke,{id:"password",type:s?"text":"password",value:n,onChange:m=>r(m.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"pl-10 pr-10",required:!0,"data-testid":"input-password"}),d.jsx("button",{type:"button",onClick:()=>i(!s),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","data-testid":"button-toggle-password",children:s?d.jsx(vC,{className:"w-4 h-4"}):d.jsx(bC,{className:"w-4 h-4"})})]})]}),d.jsx(Re,{type:"submit",className:"w-full",disabled:u,"data-testid":"button-login",children:u?"Anmeldenâ¦":"Anmelden"})]})]})})}function F9(){const[t,e]=k.useState(""),[n,r]=k.useState(""),[s,i]=k.useState(""),[a,c]=k.useState(!1),[u,f]=k.useState(""),[p,m]=k.useState(!1),{toast:x}=dn(),y=async w=>{if(w.preventDefault(),f(""),n.length<6){f("Das Passwort muss mindestens 6 Zeichen haben");return}if(n!==s){f("Die Passwörter stimmen nicht überein");return}m(!0);try{await Qe("POST","/api/auth/change-password",{currentPassword:t,newPassword:n}),x({title:"Passwort geändert",description:"Ihr neues Passwort wurde gespeichert."}),Ve.invalidateQueries({queryKey:["/api/auth/me"]})}catch(b){f(b.message||"Fehler beim Ãndern des Passworts")}finally{m(!1)}};return d.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-50 to-green-100 flex items-center justify-center p-4","data-testid":"change-password-page",children:d.jsxs(ct,{className:"w-full max-w-md p-8 shadow-lg",children:[d.jsxs("div",{className:"text-center mb-6",children:[d.jsx("div",{className:"w-16 h-16 bg-orange-100 rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx(lc,{className:"w-8 h-8 text-orange-600"})}),d.jsx("h1",{className:"text-2xl font-bold",children:"Passwort ändern"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Bitte wählen Sie ein neues Passwort"})]}),d.jsxs("form",{onSubmit:y,className:"space-y-4",children:[u&&d.jsx("div",{className:"bg-destructive/10 text-destructive text-sm p-3 rounded-md","data-testid":"change-password-error",children:u}),d.jsxs("div",{children:[d.jsx(me,{htmlFor:"newPassword",children:"Neues Passwort"}),d.jsxs("div",{className:"relative mt-1",children:[d.jsx(lc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),d.jsx(Ke,{id:"newPassword",type:a?"text":"password",value:n,onChange:w=>r(w.target.value),placeholder:"Min. 6 Zeichen",className:"pl-10 pr-10",required:!0,"data-testid":"input-new-password"}),d.jsx("button",{type:"button",onClick:()=>c(!a),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?d.jsx(vC,{className:"w-4 h-4"}):d.jsx(bC,{className:"w-4 h-4"})})]})]}),d.jsxs("div",{children:[d.jsx(me,{htmlFor:"confirmPassword",children:"Passwort bestätigen"}),d.jsxs("div",{className:"relative mt-1",children:[d.jsx(lc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),d.jsx(Ke,{id:"confirmPassword",type:a?"text":"password",value:s,onChange:w=>i(w.target.value),placeholder:"Passwort wiederholen",className:"pl-10",required:!0,"data-testid":"input-confirm-password"})]})]}),d.jsx(Re,{type:"submit",className:"w-full",disabled:p,"data-testid":"button-change-password",children:p?"Speichernâ¦":"Passwort speichern"})]})]})})}function $9(){const{data:t,isLoading:e}=rt({queryKey:["/api/auth/me"]}),{toast:n}=dn(),r=async()=>
202{await Qe("POST","/api/auth/logout",{}),Ve.invalidateQueries({queryKey:["/api/auth/me"]}),n({title:"Abgemeldet",description:"Sie wurden erfolgreich abgemeldet."})};return e?d.jsx("div",{className:"min-h-screen flex items-center justify-center",children:d.jsx("div",{className:"animate-spin w-8 h-8 border-4 border-primary border-t-transparent rounded-full"})}):t?.authenticated?t.user?.mustChangePassword?d.jsx(F9,{}):d.jsx("div",{className:"min-h-screen bg-background","data-testid":"admin-page",children:d.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[d.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[d.jsx("a",{href:"/",children:d.jsx(Re,{variant:"secondary",size:"icon","data-testid":"button-admin-back",children:d.jsx(OP,{className:"w-4 h-4"})})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h1",{className:"text-2xl font-bold",children:"Praxis-Verwaltung"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Inhalte der Website bearbeiten"})]}),d.jsxs(Re,{variant:"outline",size:"sm",onClick:r,"data-testid":"button-logout",children:[d.jsx(YP,{className:"w-4 h-4 mr-2"}),"Abmelden"]})]}),d.jsxs(iz,{defaultValue:"startseite","data-testid":"admin-tabs",children:[d.jsxs(DT,{className:"w-full flex flex-wrap h-auto gap-1 bg-muted/50 p-1",children:[d.jsxs(us,{value:"startseite",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-startseite",children:[d.jsx(UP,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Start"]}),d.jsxs(us,{value:"services",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-services",children:[d.jsx(Kc,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Leistungen"]}),d.jsxs(us,{value:"cm5",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-cm5",children:[d.jsx(qP,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"CM5"]}),d.jsxs(us,{value:"team",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-team",children:[d.jsx(SC,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Team"]}),d.jsxs(us,{value:"hours",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-hours",children:[d.jsx(Po,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Zeiten"]}),d.jsxs(us,{value:"kontakt",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-kontakt",children:[d.jsx(Gs,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Kontakt"]}),d.jsxs(us,{value:"karriere",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-karriere",children:[d.jsx(lh,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Karriere"]}),d.jsxs(us,{value:"notices",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-notices",children:[d.jsx(ay,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"Hinweise"]}),d.jsxs(us,{value:"faqs",className:"flex-1 min-w-[80px] text-xs sm:text-sm","data-testid":"tab-faqs",children:[d.jsx(yC,{className:"w-4 h-4 mr-1.5 hidden sm:inline"}),"FAQs"]})]}),d.jsxs("div",{className:"mt-6",children:[d.jsx(ds,{value:"startseite",children:d.jsx(g9,{})}),d.jsx(ds,{value:"services",children:d.jsx(P9,{})}),d.jsx(ds,{value:"cm5",children:d.jsx(D9,{})}),d.jsx(ds,{value:"team",children:d.jsx(k9,{})}),d.jsx(ds,{value:"hours",children:d.jsx(C9,{})}),d.jsx(ds,{value:"kontakt",children:d.jsx(I9,{})}),d.jsx(ds,{value:"karriere",children:d.jsx(_9,{})}),d.jsx(ds,{value:"notices",children:d.jsx(y9,{})}),d.jsx(ds,{value:"faqs",children:d.jsx(T9,{})})]})]})]})}):d.jsx(z9,{})}const B9={stethoscope:Kc,heartpulse:uh,activity:oy,shield:dh,microscope:dy,brain:ly,syringe:gy,pill:hy,scan:my,monitor:fy,award:xC,flask:wC,scale:py,weight:yy,trendingdown:xy};function H9({services:t,content:e}){return d.jsxs("div",{className:"relative py-16 md:py-28 bg-background-alt overflow-hidden","data-testid":"section-prevention",children:[d.jsx("div",{className:"section-blob section-blob-green w-[400px] h-[400px] top-10 -right-24"}),d.jsx("div",{className:"section-blob section-blob-warm w-[350px] h-[350px] -bottom-20 left-10"}),d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 md:gap-16 items-start",children:[d.jsx("div",{className:"order-2 lg:order-1 lg:pt-8",children:d.jsx("div",{className:"relative rounded-2xl overflow-hidden",children:d.jsx("img",{src:"/images/praevention.png",alt:"Prävention und Vorsorge",className:"w-full object-cover aspect-[4/3]"})})}),d.jsxs("div",{className:"order-1 lg:order-2",children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-widest uppercase mb-3",children:"Prävention"}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4 leading-tight",children:e?.title||"Prävention auf höchstem Niveau"}),d.jsx("div",{className:"text-muted-foreground text-sm sm:text-base leading-relaxed mb-8 rich-content",dangerouslySetInnerHTML:{__html:Vt(e?.subtitle||"Für gesundheitsbewusste Menschen mit hohem Anspruch an Vorsorge. Strukturierte Check-ups zur Früherkennung relevanter Risiken.")}}),t&&t.length>0?d.jsx("div",{className:"space-y-1",children:t.map(n=>{const r=B9[n.icon]||dh,s=n.icon==="award";return d.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg hover:bg-accent/50 transition-colors group","data-testid":`prevention-item-${n.id}`,children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5 overflow-visible",children:s?d.jsx("img",{src:"/images/cm5-logo.png",alt:"CM5",className:"w-16 h-16 max-w-none object-contain","data-testid":"img-cm5-inline"}):d.jsx(r,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h3",{className:"font-semibold text-sm sm:text-base mb-0.5",children:n.title}),d.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground leading-relaxed",children:n.description})]})]},n.id)})}):d.jsx("div",{className:"space-y-3",children:["Gesundheits-Check-up","Hautkrebsvorsorge","Krebsvorsorge","Kardiologische Diagnostik"].map((n,r)=>d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(_P,{className:"w-5 h-5 text-primary flex-shrink-0"}),d.jsx("span",{className:"text-sm font-medium",children:n})]},r))})]})]})})]})}const V9=[{icon:tD,title:"Fünf Achsen, ein Blick",desc:"Erfassen Sie Ihre gesundheitliche Verfassung sofort in unserem interaktiven Radar-Chart."},{icon:uh,title:"Wissen statt Raten",desc:"Von Ihrer Herz-Resilienz bis zur Stoffwechsel-Effizienz â wir zeigen Ihnen genau, wo Sie stehen."},{icon:iD,title:"Ihr biologisches Echo",desc:"Erfahren Sie durch das BioAge Delta, wie jung Ihr Körper wirklich ist â und wie wir gemeinsam Zeit gewinnen."},{icon:zP,title:"Konkrete Handlungsempfehlungen",desc:"Auf Ihre Ergebnisse individuell abgestimmte MaÃnahmen â damit Sie wissen, was Sie tun können."}
202,{icon:RP,title:"Stoffwechselprofil",desc:"Bestimmung Ihres Stoffwechseltyps mit darauf abgestimmten Ernährungsempfehlungen."},{icon:oD,title:"Intuitive Verlaufskontrolle",desc:"Verfolgen Sie Ihre eigene Entwicklung über mehrere Untersuchungen hinweg."}];function U9({content:t,closingContent:e,highlights:n}){const r=t?.title||"CM5 â die CardioMetabolische MultiMatrix",s=t?.subtitle||"Ihre Gesundheit ist kein Zahlensalat. Sie ist eine Landkarte.",i=t?.content||"Haben Sie sich nach einem Check-up jemals gefragt, was die vielen Laborwerte und Untersuchungsergebnisse eigentlich wirklich für Ihr Leben, Ihre Gesundheit und Ihre Zukunft bedeuten? Mit der CM5 â CardioMetabolic MultiMatrix machen wir das Unsichtbare sichtbar. Wir übersetzen komplexe Medizin in ein intuitives und nachvollziehbares Erlebnis.",a=e?.title||"Verlassen Sie die Praxis nicht mit einem Bericht, den Sie nicht verstehen. Verlassen Sie sie mit einem Plan, den Sie jederzeit nachvollziehen können â und den Sie umsetzen können.",c=V9.map((u,f)=>({icon:u.icon,title:n?.[f]?.title||u.title,desc:n?.[f]?.subtitle||u.desc}));return d.jsx("div",{className:"py-16 md:py-28 bg-gradient-to-br from-primary/5 via-background to-primary/5 dark:from-primary/10 dark:via-neutral-950 dark:to-primary/10","data-testid":"section-cm5",children:d.jsxs("div",{className:"max-w-7xl mx-auto px-5 sm:px-8",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-primary/10 px-3 py-1.5 mb-5",children:[d.jsx(_d,{className:"w-3.5 h-3.5 text-primary"}),d.jsx("span",{className:"text-primary text-xs font-semibold tracking-wide uppercase",children:"Proprietäre Methode"})]}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight leading-tight mb-3","data-testid":"text-cm5-title",children:r}),d.jsx("div",{className:"text-lg sm:text-xl font-medium text-foreground/80 mb-5 rich-content","data-testid":"text-cm5-subtitle",dangerouslySetInnerHTML:{__html:Vt(s)}}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-10 mb-10 items-center",children:[d.jsx("div",{className:"flex items-center justify-center",children:d.jsx("img",{src:"/images/cm5-logo.png",alt:"CM5 CardioMetabolic MultiMatrix",className:"w-48 sm:w-56 md:w-full max-w-xs h-auto object-contain drop-shadow-md","data-testid":"img-cm5-logo"})}),d.jsx("div",{className:"md:col-span-2",children:d.jsx("div",{className:"text-muted-foreground text-sm sm:text-base leading-relaxed text-left rich-content","data-testid":"text-cm5-intro",dangerouslySetInnerHTML:{__html:Vt(i)}})})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-10",children:c.map((u,f)=>d.jsxs("div",{className:"flex items-start gap-3.5 p-4 rounded-xl bg-white dark:bg-neutral-900 border border-border/50 shadow-sm","data-testid":`card-cm5-highlight-${f}`,children:[d.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:d.jsx(u.icon,{className:"w-5 h-5 text-primary"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-sm sm:text-base mb-1",children:u.title}),d.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground leading-relaxed",children:u.desc})]})]},f))}),d.jsx("div",{className:"relative pl-5 border-l-2 border-primary/30 mb-10",children:d.jsx("div",{className:"text-sm sm:text-base font-medium text-foreground/80 italic leading-relaxed rich-content","data-testid":"text-cm5-closing",dangerouslySetInnerHTML:{__html:Vt(a)}})}),d.jsx("div",{className:"relative w-full pt-4","data-testid":"cm5-embed",children:d.jsx("iframe",{src:`https://www.cm5-multimatrix.com/embed/praxis.html?v=${Date.now()}`,width:"100%",className:"min-h-[800px]",style:{border:"none",borderRadius:"12px"},title:"CM5 CardioMetabolic MultiMatrix"})})]})})}function Fv({phone:t,content:e,contactContent:n}){const s=(t||n?.title||"06841 / 172130").replace(/[\s/]/g,"");return d.jsx("div",{className:"relative py-14 md:py-20 bg-primary text-primary-foreground overflow-hidden","data-testid":"section-booking-cta",children:d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold mb-2",children:e?.title||"Termin vereinbaren"}
202),d.jsx("p",{className:"text-primary-foreground/80 text-sm sm:text-base",children:e?.subtitle||"Online buchen â schnell, einfach, rund um die Uhr verfügbar."})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[d.jsxs(Gr,{href:"/termin",className:"inline-flex items-center gap-2 bg-white text-primary font-semibold px-6 py-3 rounded-full hover:bg-white/90 transition-colors","data-testid":"cta-book-online",children:[d.jsx(Oo,{className:"w-4 h-4"}),"Online Termin buchen"]}),d.jsxs("a",{href:`tel:+49${s}`,className:"inline-flex items-center gap-2 bg-primary-foreground/15 text-white font-semibold px-6 py-3 rounded-full hover:bg-primary-foreground/25 transition-colors","data-testid":"cta-call",children:[d.jsx(Gs,{className:"w-4 h-4"}),"Anrufen"]})]})]})})})}function W9(){const{data:t}=rt({queryKey:["/api/services"]}),{data:e}=rt({queryKey:["/api/faqs"]}),n=t?.filter(s=>s.category==="praevention"),r=e?.filter(s=>s.category==="praevention");return d.jsx(Cs,{children:({getContent:s})=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Prävention, Longevity & Anti-Aging | Hausarzt Homburg â Dr. Jelden",description:"Prävention, Longevity und Anti-Aging in Homburg: CM5 CardioMetabolische MultiMatrix, strukturierte Check-ups, Hautkrebsvorsorge und Premium-Vorsorge. Ihr Hausarzt Dr. Jelden â evidenzbasierte Gesundheitsvorsorge im Saarland.",keywords:"Prävention Homburg, Longevity, Anti-Aging Medizin, CM5 CardioMetabolische MultiMatrix, Gesundheitsvorsorge, Check-up Homburg, Hautkrebsvorsorge, Präventionsmedizin Saarland, Hausarzt Homburg"}),d.jsx("div",{className:"pt-36 md:pt-40"}),d.jsx(H9,{services:n,content:s("praevention")}),d.jsx(U9,{content:s("cm5"),closingContent:s("cm5_closing"),highlights:[s("cm5_highlight_1"),s("cm5_highlight_2"),s("cm5_highlight_3")]}),r&&r.length>0&&d.jsx(Gc,{faqs:r}),d.jsx(Fv,{content:s("booking_cta"),contactContent:s("contact_details")})]})})}function K9(){const{data:t}=rt({queryKey:["/api/services"]}),{data:e}=rt({queryKey:["/api/faqs"]}),n=t?.filter(s=>s.category==="diagnostik"),r=e?.filter(s=>s.category==="diagnostik");return d.jsx(Cs,{children:({getContent:s})=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Klinische Diagnostik | Hausarzt Homburg â Dr. Jelden",description:"Klinische Diagnostik in Homburg: internistische, chirurgische, orthopädische und neurologische Abklärung. Ultraschalldiagnostik (DEGUM I). Hausarztpraxis Dr. Jelden.",keywords:"Diagnostik Homburg, Ultraschall Homburg, internistische Diagnostik, Hausarzt Diagnostik, Dr. Jelden"}),d.jsx("div",{className:"pt-36 md:pt-40"}),d.jsx(vN,{services:n,content:s("diagnostik")}),r&&r.length>0&&d.jsx(Gc,{faqs:r}),d.jsx(Fv,{content:s("booking_cta"),contactContent:s("contact_details")})]})})}function $v(t){if(!t)return{x:50,y:50,zoom:100};try{const e=JSON.parse(t);return{x:e.x??50,y:e.y??50,zoom:e.zoom??100}}catch{const e=(t||"").replace(/%/g,"").split(/\s+/);return{x:parseFloat(e[0])||50,y:parseFloat(e[1])||50,zoom:100}}}function pS({member:t,onClick:e}){const n=$v(t.imagePosition);return t.imageUrl?d.jsx("button",{onClick:e,className:"w-20 h-20 sm:w-24 sm:h-24 mx-auto mb-3 ring-2 ring-border rounded-full overflow-hidden bg-primary/10 cursor-pointer hover:ring-primary/50 transition-all hover:scale-105",style:{backgroundImage:`url(${t.imageUrl})`,backgroundSize:`${n.zoom}%`,backgroundPosition:`${n.x}% ${n.y}%`,backgroundRepeat:"no-repeat"},role:"img","aria-label":`${t.name} â Bild vergröÃern`,"data-testid":`btn-team-photo-${t.id}`}):d.jsx("div",{className:"w-20 h-20 sm:w-24 sm:h-24 mx-auto mb-3 ring-2 ring-border rounded-full overflow-hidden bg-primary/10 flex items-center justify-center",children:d.jsx("span",{className:"text-lg sm:text-2xl text-primary font-semibold",children:t.name.split(" ").map(r=>r[0]).join("").slice(0,2)})})}function q9({member:t,onClose:e}){const n=$v(t.imagePosition);return d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-4",onClick:e,"data-testid":"lightbox-overlay",children:[d.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-white/80 hover:text-white bg-black/40 rounded-full p-2 transition-colors","data-testid":"btn-lightbox-close",children:d.jsx(Uo,{className:"w-6 h-6"})}),d.jsxs("div",{className:"relative max-w-lg w-full",onClick:r=>r.stopPropagation(),children:[d.jsx("div",{className:"w-full aspect-[3/4] rounded-2xl overflow-hidden bg-neutral-900",style:{backgroundImage:`url(${t.imageUrl})`,backgroundSize:`${n.zoom}%`,backgroundPosition:`${n.x}% ${n.y}%`,backgroundRepeat:"no-repeat"}}),d.jsxs("div",{className:"text-center mt-4",children:[d.jsx("h3",{className:"text-white font-semibold text-lg",children:t.name}),d.jsx("p",{className:"text-white/60 text-sm",children:t.role})]})]})]})}function G9({team:t,content:e}){const[n,r]=k.useState(null),[s,i]=k.useState(null);return d.jsxs("div",{className:"relative py-16 md:py-28 bg-background dark:bg-neutral-950 overflow-hidden","data-testid":"section-team",children:[d.jsx("div",{className:"section-blob section-blob-green w-[500px] h-[500px] -top-32 -left-32"}),d.jsx("div",{className:"section-blob section-blob-warm w-[400px] h-[400px] bottom-0 -right-24"}),d.jsxs("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:[d.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-10 md:mb-16",children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-widest uppercase mb-3",children:"Unser Team"}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4 leading-tight",children:e?.title||"Gemeinsam für das Wohl unserer Patient:innen"}),d.jsx("div",{className:"text-muted-foreground text-sm sm:text-base leading-relaxed rich-content",dangerouslySetInnerHTML:{__html:Vt(e?.subtitle||"Unser Team ist unsere Stärke.")}})]}),d.jsx("div",{className:"mb-10 md:mb-16 rounded-2xl overflow-hidden aspect-[16/9]",style:(()=>{const a=e?.imageUrl||"/images/team-group.png",c=$v(e?.imagePosition);return{backgroundImage:`url(${a})`,backgroundSize:`${c.zoom}%`,backgroundPosition:`${c.x}% ${c.y}%`,backgroundRepeat:"no-repeat"}})(),role:"img","aria-label":"Team der Praxis Dr. Jelden","data-testid":"img-team-group"}),t&&t.length>0&&d.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",children:t.map(a=>{const c=s===a.id;return d.jsxs("div",{className:"group","data-testid":`card-team-${a.id}`,children:[d.jsxs("div",{className:"flex flex-col items-center mb-3",children:[d.jsx("div",{className:"sm:block hidden",children:d.jsx(pS,{member:a,onClick:a.imageUrl?()=>r(a):void 0})}),d.jsx("div",{className:"sm:hidden",children:d.jsx(pS,{member:a,onClick:a.imageUrl?()=>r(a):void 0})}),a.description?d.jsxs("button",{className:"sm:hidden flex flex-col items-center cursor-pointer active:scale-[0.98] transition-transform",onClick:()=>i(c?null:a.id),"data-testid":`btn-team-expand-${a.id}`,children:[d.jsx("h3",{className:"font-semibold text-base leading-snug text-center",children:a.name}),d.jsx("p",{className:"text-primary text-xs font-medium text-center",children:a.role}),d.jsx(Wc,{className:`w-4 h-4 text-muted-foreground mt-0.5 transition-transform duration-200 ${c?"rotate-180":""}`})]}):d.jsxs("div",{className:"sm:hidden flex flex-col items-center",children:[d.jsx("h3",{className:"font-semibold text-base leading-snug text-center",children:a.name}),d.jsx("p",{className:"text-primary text-xs font-medium text-center",children:a.role})]}),d.jsxs("div",{className:"hidden sm:block text-center",children:[d.jsx("h3",{className:"font-semibold text-lg leading-snug",children:a.name}),d.jsx("p",{className:"text-primary text-sm font-medium",children:a.role})]})]}),a.description&&d.jsx("div",{className:`sm:hidden overflow-hidden transition-all duration-300 ease-in-out ${c?"max-h-[600px] opacity-100 mt-1":"max-h-0 opacity-0"}`,"data-testid":`bio-mobile-${a.id}`,children:d.jsx("div",{className:"text-muted-foreground text-xs leading-relaxed px-1 pb-2 rich-content",dangerouslySetInnerHTML:{__html:a.description}})}),a.description&&d.jsx("div",{className:"text-muted-foreground text-sm leading-relaxed hidden sm:block rich-content",dangerouslySetInnerHTML:{__html:a.description}})]},a.id)})})]}),n&&d.jsx(q9,{member:n,onClose:()=>r(null)})]})}function Q9(){const{data:t}=rt({queryKey:["/api/team"]});return d.jsx(Cs,{children:({getContent:e})=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Unser Team | Hausarzt Homburg â Dr. Jelden",description:"Das Team der Hausarztpraxis Dr. Jelden in Homburg. Facharzt für Allgemeinmedizin, Präventionsmedizin und ein engagiertes Praxisteam."}),d.jsx("div",{className:"pt-36 md:pt-40"}),d.jsx(G9,{team:t,content:e("team")})]})})}function J9({hours:t,content:e,contactDetails:n}){const r=n?.title||"06841 172 130",s=n?.subtitle||"[email protected]",i=n?.content||"EisenbahnstraÃe 47, 66424 Homburg",a=r.replace(/\s+/g,"");i.split(",").map(u=>u.trim());const c=encodeURIComponent(i);return d.jsxs("div",{className:"relative py-16 md:py-28 bg-background dark:bg-neutral-950 overflow-hidden","data-testid":"section-contact",children:[d.jsx("div",{className:"section-blob section-blob-sage w-[400px] h-[400px] -top-20 -right-20"}),d.jsxs("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:[d.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-10 md:mb-16",children:[d.jsx("p",{className:"text-primary font-semibold text-xs tracking-widest uppercase mb-3",children:"Kontakt & Anfahrt"}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4 leading-tight",children:e?.title||"So erreichen Sie uns"})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 md:gap-8",children:[d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{className:"rounded-2xl bg-neutral-50 dark:bg-neutral-900/50 p-5 sm:p-6","data-testid":"card-contact-info",children:[d.jsx("h3",{className:"font-bold text-base sm:text-lg mb-5",children:"Kontaktdaten"}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:d.jsx(uy,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-sm",children:"Adresse"}),d.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:i})]})]}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:d.jsx(Gs,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-sm",children:"Telefon"}),d.jsx("a",{href:`tel:+49${a}`,className:"text-xs sm:text-sm text-primary hover:underline","data-testid":"link-contact-phone",children:r})]})]}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:d.jsx(cy,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-sm",children:"E-Mail"}),d.jsx("a",{href:`mailto:${s}`,className:"text-xs sm:text-sm text-primary hover:underline","data-testid":"link-contact-email",children:s})]})]})]}),d.jsxs("div",{className:"mt-5 flex flex-col gap-3",children:[d.jsx(Gr,{href:"/termin",className:"w-full",children:d.jsxs(Re,{className:"w-full rounded-full bg-primary hover:bg-primary/90","data-testid":"button-contact-book-online",children:[d.jsx(Oo,{className:"w-4 h-4 mr-2"}),"Online Termin buchen"]})}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[d.jsx("a",{href:`tel:+49${a}`,className:"flex-1",children:d.jsxs(Re,{variant:"secondary",className:"w-full rounded-full","data-testid":"button-contact-call",children:[d.jsx(Gs,{className:"w-4 h-4 mr-2"}),"Anrufen"]})}),d.jsx("a",{href:`https://maps.google.com/?q=${c}`,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:d.jsxs(Re,{variant:"outline",className:"w-full rounded-full","data-testid":"button-contact-directions",children:[d.jsx(ZP,{className:"w-4 h-4 mr-2"}),"Route planen"]}
202)})]})]})]}),t&&t.length>0&&d.jsxs("div",{className:"rounded-2xl bg-neutral-50 dark:bg-neutral-900/50 p-5 sm:p-6","data-testid":"card-opening-hours",children:[d.jsxs("div",{className:"flex items-center gap-2.5 mb-5",children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:d.jsx(Po,{className:"w-4 h-4 text-primary"})}),d.jsx("h3",{className:"font-bold text-base sm:text-lg",children:"Sprechzeiten"})]}),d.jsx("div",{className:"space-y-2",children:t.map(u=>d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-border/30 last:border-0",children:[d.jsx("span",{className:"font-medium text-sm",children:u.day}),d.jsxs("div",{className:"text-xs sm:text-sm text-muted-foreground text-right",children:[u.morning&&d.jsx("span",{children:u.morning}),u.morning&&u.afternoon&&d.jsx("span",{className:"mx-2 text-border",children:"|"}),u.afternoon&&d.jsx("span",{children:u.afternoon}),!u.morning&&!u.afternoon&&d.jsx("span",{className:"text-muted-foreground/50 italic",children:"Geschlossen"})]})]},u.id))})]})]}),d.jsx("div",{className:"rounded-2xl overflow-hidden h-[350px] sm:h-[400px] lg:h-auto lg:min-h-[450px]",children:d.jsx("iframe",{src:"https://www.google.com/maps?q=Praxis+Dr.+med.+Michael+Jelden+Talstr.+21+66424+Homburg&output=embed",width:"100%",height:"100%",style:{border:0,minHeight:"100%"},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Praxis Dr. Jelden - Standort","data-testid":"map-iframe"})})]})]})]})}function Y9(){const{data:t}=rt({queryKey:["/api/faqs"]}),e=t?.filter(n=>n.category==="general");return d.jsx(Cs,{children:({getContent:n,hours:r})=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Kontakt & Anfahrt | Hausarzt Homburg â Dr. Jelden",description:"Hausarztpraxis Dr. Jelden, Talstr. 21, 66424 Homburg. Telefon: 06841/172130. Sprechzeiten, Anfahrt und Online-Terminbuchung.",keywords:"Hausarzt Homburg Kontakt, Praxis Dr. Jelden Adresse, Hausarztpraxis Homburg Telefon, Termin Hausarzt Homburg"}),d.jsx("div",{className:"pt-36 md:pt-40"}),d.jsx(J9,{hours:r,content:n("kontakt"),contactDetails:n("contact_details")}),e&&e.length>0&&d.jsx(Gc,{faqs:e})]})})}function X9({job:t}){const e={FULL_TIME:"Vollzeit",PART_TIME:"Teilzeit",FULL_OR_PART_TIME:"Voll- oder Teilzeit",TEMPORARY:"Befristet",INTERN:"Praktikum",VOLUNTEER:"Ehrenamtlich",PER_DIEM:"Tageweise",OTHER:"Sonstiges"};return d.jsxs(ct,{className:"p-6 md:p-8 hover:shadow-md transition-shadow","data-testid":`card-job-${t.id}`,children:[d.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-xl font-bold text-foreground mb-1","data-testid":`text-job-title-${t.id}`,children:t.title}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-muted-foreground",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(lh,{className:"w-4 h-4"}),e[t.employmentType]||t.employmentType]}),d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(uy,{className:"w-4 h-4"}),"Homburg (Saar)"]})]})]}),d.jsx("span",{className:"text-xs font-medium px-3 py-1 rounded-full bg-primary/10 text-primary flex-shrink-0",children:e[t.employmentType]||t.employmentType})]}),d.jsx("div",{className:"rich-content text-foreground/80 text-sm leading-relaxed mb-5","data-testid":`text-job-desc-${t.id}`,dangerouslySetInnerHTML:{__html:Vt(t.description)}}),t.qualifications&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h4",{className:"text-sm font-semibold text-foreground mb-2",children:"Was wir uns wünschen"}),d.jsx("div",{className:"rich-content text-sm text-foreground/70 leading-relaxed",dangerouslySetInnerHTML:{__html:Vt(t.qualifications)}})]}),t.responsibilities&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h4",{className:"text-sm font-semibold text-foreground mb-2",children:"Ihre Aufgaben"}),d.jsx("div",{className:"rich-content text-sm text-foreground/70 leading-relaxed",dangerouslySetInnerHTML:{__html:Vt(t.responsibilities)}})]}),t.benefits&&d.jsxs("div",{className:"mb-4",children:[d.jsxs("h4",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-1.5",children:[d.jsx(VP,{className:"w-4 h-4 text-primary"}),"Was wir bieten"]}
202),d.jsx("div",{className:"rich-content text-sm text-foreground/70 leading-relaxed",dangerouslySetInnerHTML:{__html:Vt(t.benefits)}})]}),(t.salaryMin||t.salaryMax)&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-4 pt-4 border-t",children:[d.jsx(Po,{className:"w-4 h-4"}),d.jsxs("span",{children:["Vergütung: ",t.salaryMin&&`ab ${t.salaryMin} â¬`,t.salaryMin&&t.salaryMax&&" â ",t.salaryMax&&`bis ${t.salaryMax} â¬`,t.salaryUnit==="MONTH"?" / Monat":t.salaryUnit==="HOUR"?" / Stunde":" / Jahr"]})]}),t.validThrough&&d.jsxs("p",{className:"text-xs text-muted-foreground mt-3",children:["Bewerbungsfrist: ",t.validThrough]}),d.jsx("div",{className:"mt-6 pt-4 border-t",children:d.jsxs("a",{href:"/kontakt",className:"inline-flex items-center gap-1.5 text-sm font-semibold text-primary hover:underline","data-testid":`link-apply-${t.id}`,children:["Jetzt bewerben",d.jsx(Yd,{className:"w-4 h-4"})]})})]})}function Z9({jobs:t}){return k.useEffect(()=>{const e=t.filter(s=>s.active);if(e.length===0)return;const n=e.map(s=>({"@context":"https://schema.org/","@type":"JobPosting",title:s.title,description:s.description.replace(/<[^>]*>/g,""),datePosted:s.createdAt||new Date().toISOString().split("T")[0],...s.validThrough&&{validThrough:s.validThrough},employmentType:s.employmentType,hiringOrganization:{"@type":"Organization",name:"Praxis Dr. med. Michael Jelden",sameAs:typeof window<"u"?window.location.origin:"",logo:typeof window<"u"?`${window.location.origin}/images/logo.png`:""},jobLocation:{"@type":"Place",address:{"@type":"PostalAddress",streetAddress:"EisenbahnstraÃe 47",addressLocality:"Homburg",addressRegion:"Saarland",postalCode:"66424",addressCountry:"DE"}},...(s.salaryMin||s.salaryMax)&&{baseSalary:{"@type":"MonetaryAmount",currency:s.salaryCurrency||"EUR",value:{"@type":"QuantitativeValue",...s.salaryMin&&s.salaryMax?{minValue:parseFloat(s.salaryMin),maxValue:parseFloat(s.salaryMax)}:s.salaryMin?{value:parseFloat(s.salaryMin)}:{value:parseFloat(s.salaryMax)},unitText:s.salaryUnit||"MONTH"}}}})),r=document.createElement("script");return r.type="application/ld+json",r.id="job-posting-jsonld",r.textContent=JSON.stringify(n.length===1?n[0]:n),document.head.appendChild(r),()=>{const s=document.getElementById("job-posting-jsonld");s&&s.remove()}},[t]),null}function eU(){const{data:t,isLoading:e}=rt({queryKey:["/api/jobs"]}),n=t?.filter(r=>r.active)||[];return d.jsx(Cs,{children:({getContent:r})=>{const s=r("karriere");return d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Karriere | Praxis Dr. Jelden â Stellenangebote in Homburg",description:"Aktuelle Stellenangebote in der Praxis Dr. Jelden, Homburg. Werden Sie Teil unseres Teams in der Allgemeinmedizin und Präventionsmedizin."}),n.length>0&&d.jsx(Z9,{jobs:n}),d.jsx("section",{className:"pt-36 md:pt-40 pb-16 md:pb-24","data-testid":"karriere-section",children:d.jsxs("div",{className:"max-w-4xl mx-auto px-5 sm:px-8",children:[d.jsxs("div",{className:"mb-12 md:mb-16",children:[d.jsx("p",{className:"text-primary/80 text-sm font-semibold tracking-[0.2em] uppercase mb-3","data-testid":"text-karriere-label",children:"Karriere"}),d.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-foreground leading-tight mb-4","data-testid":"text-karriere-title",children:s?.title||"Werden Sie Teil unseres Teams"}),s?.subtitle&&d.jsx("div",{className:"text-lg text-foreground/60 leading-relaxed max-w-2xl rich-content","data-testid":"text-karriere-subtitle",dangerouslySetInnerHTML:{__html:Vt(s.subtitle)}}),!s?.subtitle&&d.jsx("p",{className:"text-lg text-foreground/60 leading-relaxed max-w-2xl","data-testid":"text-karriere-subtitle",children:"Wir suchen engagierte Menschen, die mit uns gemeinsam die Zukunft der Hausarztmedizin gestalten möchten."})]}),e?d.jsx("div",{className:"space-y-6",children:[1,2].map(i=>d.jsx("div",{className:"h-48 bg-muted animate-pulse rounded-xl"},i))}):n.length>0?d.jsx("div",{className:"space-y-6",children:n.map(i=>d.jsx(X9,{job:i},i.id))}):d.jsxs(ct,{className:"p-12 text-center","data-testid":"card-no-jobs",children:[d.jsx(lh,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground
202/30"}),d.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:"Derzeit keine offenen Stellen"}),d.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto",children:"Aktuell haben wir keine offenen Positionen ausgeschrieben. Initiativbewerbungen sind jedoch jederzeit willkommen."}),d.jsxs("a",{href:"/kontakt",className:"inline-flex items-center gap-1.5 mt-4 text-sm font-semibold text-primary hover:underline","data-testid":"link-initiativ",children:["Initiativbewerbung senden",d.jsx(Yd,{className:"w-4 h-4"})]})]}),s?.content&&d.jsx("div",{className:"mt-16 rich-content text-foreground/70 leading-relaxed","data-testid":"text-karriere-content",dangerouslySetInnerHTML:{__html:Vt(s.content)}})]})})]})}})}function tU(){return d.jsx(Cs,{children:()=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Online Termin buchen | Hausarzt Homburg â Dr. Jelden",description:"Jetzt bequem online einen Termin beim Hausarzt in Homburg vereinbaren. Praxis Dr. med. Michael Jelden â Allgemeinmedizin und Prävention."}),d.jsx("div",{className:"pt-32 md:pt-40"}),d.jsxs("section",{className:"relative pb-16 md:pb-24 bg-background overflow-hidden","data-testid":"section-termin",children:[d.jsx("div",{className:"section-blob section-blob-sage w-[400px] h-[400px] -top-20 -right-20"}),d.jsxs("div",{className:"max-w-5xl mx-auto px-5 sm:px-8 relative z-[1]",children:[d.jsxs("div",{className:"text-center mb-8 md:mb-12",children:[d.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-primary/10 mb-5",children:d.jsx(Oo,{className:"w-7 h-7 text-primary"})}),d.jsx("p",{className:"text-primary font-semibold text-xs tracking-[0.2em] uppercase mb-3",children:"Online Terminbuchung"}),d.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight leading-tight mb-4",children:"Jetzt Termin buchen"}),d.jsx("p",{className:"text-muted-foreground text-sm sm:text-base max-w-xl mx-auto leading-relaxed",children:"Wählen Sie bequem online Ihren Wunschtermin. Schnell, unkompliziert und rund um die Uhr verfügbar."})]}),d.jsx("div",{className:"rounded-2xl overflow-hidden shadow-md border border-border/30 bg-white",children:d.jsx("iframe",{name:"samedi-widget",src:"https://termin.samedi.de/b/praxis-dr-med-michael-jelden/jeldenpraxis/vitas/allgemeine-sprechstunde--11?ref=doctors-website",frameBorder:0,style:{width:"100%",height:"100%",minHeight:620,display:"block"},id:"samedi-widget",title:"Online Terminbuchung â Praxis Dr. Jelden","data-testid":"iframe-samedi"})}),d.jsxs("p",{className:"text-center text-xs text-muted-foreground/60 mt-4",children:["Ein Service von"," ",d.jsx("a",{href:"https://patient.samedi.de/",target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors underline underline-offset-2",children:"samedi"}),"."]})]})]})]})})}const nU={stethoscope:Kc,heartpulse:uh,activity:oy,shield:dh,microscope:dy,brain:ly,syringe:gy,pill:hy,scan:my,monitor:fy,award:xC,flask:wC,scale:py,weight:yy,trendingdown:xy};function rU({services:t,content:e}){return!e&&(!t||t.length===0)?null:d.jsxs("div",{className:"relative py-16 md:py-28 bg-neutral-950 overflow-hidden","data-testid":"section-innovativ",children:[d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,_hsl(115_35%_32%_/_0.15),_transparent_60%)]"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,_hsl(270_40%_20%_/_0.2),_transparent_60%)]"}),d.jsx("div",{className:"max-w-7xl mx-auto px-5 sm:px-8 relative z-[1]",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/5 border border-white/10 rounded-full px-3 py-1.5 mb-5",children:[d.jsx(_d,{className:"w-3.5 h-3.5 text-violet-400"}),d.jsx("span",{className:"text-violet-300 font-semibold text-xs tracking-[0.15em] uppercase",children:"Innovative Angebote"})]}),d.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-bold tracking-tight mb-4 leading-tight text-white",children:e?.title||"Methoden, die neue Wege gehen"}),d.jsx("div",{className:"text-white/60 text-sm sm:text-base leading-relaxed mb-3 rich-content",dangerouslySetInnerHTML:{__html:Vt(e?.subtitle||"Evidenzbasierte Behandlungskonzepte jenseits des Mainstream
202s â für Patient:innen, die nach Alternativen suchen.")}}),d.jsx("p",{className:"text-white/40 text-sm font-medium leading-relaxed mb-8",children:"Modernste Methoden, sorgfältig geprüft und individuell eingesetzt."}),t&&t.length>0&&d.jsx("div",{className:"space-y-2",children:t.map(n=>{const r=nU[n.icon]||_d;return d.jsxs("div",{className:"flex items-start gap-3 p-3.5 rounded-xl border border-white/[0.08] bg-white/[0.04] hover:border-white/40 hover:bg-white/[0.08] transition-all group","data-testid":`service-item-${n.id}`,children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-violet-500/15 flex items-center justify-center flex-shrink-0 mt-0.5 group-hover:bg-violet-500/25 transition-colors",children:d.jsx(r,{className:"w-4 h-4 text-violet-400"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h3",{className:"font-semibold text-sm sm:text-base mb-0.5 text-white",children:n.title}),d.jsx("p",{className:"text-xs sm:text-sm text-white/50 leading-relaxed",children:n.description})]})]},n.id)})})]}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute -inset-4 bg-violet-500/10 blur-3xl rounded-full"}),d.jsxs("div",{className:"relative rounded-2xl overflow-hidden ring-1 ring-white/10",children:[d.jsx("img",{src:"/images/innovativ-abstract.png",alt:"Innovative Therapien",className:"w-full object-cover object-center aspect-[4/3]"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950/80 via-neutral-950/20 to-transparent"}),d.jsx("div",{className:"absolute bottom-5 left-5 right-5",children:d.jsxs("div",{className:"inline-flex items-center gap-2 bg-violet-500/20 backdrop-blur border border-violet-400/20 rounded-full px-3 py-1.5",children:[d.jsx(_d,{className:"w-3 h-3 text-violet-300"}),d.jsx("span",{className:"text-violet-200 text-xs font-medium",children:"Wissenschaftlich fundiert. Individuell eingesetzt."})]})})]})]})]})})]})}function sU(){const{data:t}=rt({queryKey:["/api/services"]}),{data:e}=rt({queryKey:["/api/faqs"]}),n=t?.filter(s=>s.category==="innovativ"),r=e?.filter(s=>s.category==="innovativ");return d.jsx(Cs,{children:({getContent:s})=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Ketamin-Infusionstherapie & Liquid Biopsy | Hausarzt Homburg â Dr. Jelden",description:"Ketamin-Infusionstherapie bei Depressionen, PTBS und chronischen Schmerzen. Liquid Biopsy zur nicht-invasiven Krebsfrüherkennung. Evidenzbasierte innovative Methoden in der Praxis Dr. Jelden, Homburg/Saar.",keywords:"Ketamin-Infusionstherapie, Ketamin Therapie Homburg, Ketamin Depression Saarland, Liquid Biopsy, Krebsfrüherkennung Bluttest, Anti-Aging, Longevity, innovative Therapie Homburg, Hausarzt Homburg, Dr. Jelden"}),d.jsx("div",{className:"pt-36 md:pt-40 bg-neutral-950"}),d.jsx(rU,{services:n,content:s("innovativ")}),r&&r.length>0&&d.jsx(Gc,{faqs:r}),d.jsx(Fv,{content:s("booking_cta"),contactContent:s("contact_details")})]})})}function iU(){return d.jsx(Cs,{children:()=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Impressum | Hausarzt Homburg â Dr. Jelden",description:"Impressum der Hausarztpraxis Dr. med. Michael Jelden in Homburg. Angaben gemäà § 5 TMG."}),d.jsx("div",{className:"pt-36 md:pt-40"}),d.jsxs("section",{className:"max-w-3xl mx-auto px-5 sm:px-8 pb-24",children:[d.jsx("h1",{className:"text-3xl font-bold text-foreground mb-10","data-testid":"text-impressum-title",children:"Impressum"}),d.jsxs("div",{className:"prose prose-neutral max-w-none space-y-8 text-sm leading-relaxed text-neutral-700",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"Angaben gemäà § 5 TMG"}),d.jsxs("p",{children:["Dr. med. Michael Jelden",d.jsx("br",{}),"Facharzt für Allgemeinmedizin",d.jsx("br",{}),"Arzt für Prävention & Gesundheitsvorsorge"]}),d.jsxs("p",{className:"mt-3",children:["Talstr. 21",d.jsx("br",{}),"66424 Homburg"]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"Kontakt"}),d.jsxs("p",{children:["Telefon: 06841 / 172 130",d.jsx("br",{}),"Fax: 06841 / 17 21 322",d.jsx("br",{}),"E-Mail: [email protected]",d.jsx("br",{}),"Website: www.hausarzt-homburg.de"]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb
202-2",children:"Berufsbezeichnung und berufsrechtliche Regelungen"}),d.jsxs("p",{children:["Berufsbezeichnung: Facharzt für Allgemeinmedizin",d.jsx("br",{}),"Verliehen in: Deutschland"]}),d.jsxs("p",{className:"mt-3",children:["Zuständige Kammer:",d.jsx("br",{}),"Ãrztekammer des Saarlandes",d.jsx("br",{}),"FaktoreistraÃe 4",d.jsx("br",{}),"66111 Saarbrücken",d.jsx("br",{}),d.jsx("a",{href:"https://www.aerztekammer-saarland.de",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.aerztekammer-saarland.de"})]}),d.jsxs("p",{className:"mt-3",children:["Kassenärztliche Vereinigung:",d.jsx("br",{}),"KV Saarland",d.jsx("br",{}),"FaktoreistraÃe 4",d.jsx("br",{}),"66111 Saarbrücken",d.jsx("br",{}),d.jsx("a",{href:"https://www.kvsaarland.de",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.kvsaarland.de"})]}),d.jsx("p",{className:"mt-3",children:"Es gelten die Berufsordnung der Ãrztekammer des Saarlandes sowie die Gebührenordnung für Ãrzte (GOÃ)."})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"Umsatzsteuer"}),d.jsx("p",{children:"Ãrztliche Leistungen sind gemäà § 4 Nr. 14 UStG von der Umsatzsteuer befreit."})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"Verantwortlich für den Inhalt nach § 18 Abs. 2 MStV"}),d.jsxs("p",{children:["Dr. med. Michael Jelden",d.jsx("br",{}),"Talstr. 21",d.jsx("br",{}),"66424 Homburg"]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"Streitschlichtung"}),d.jsxs("p",{children:["Die Europäische Kommission stellt eine Plattform zur Online-Streitbeilegung (OS) bereit:"," ",d.jsx("a",{href:"https://ec.europa.eu/consumers/odr/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://ec.europa.eu/consumers/odr/"})]}),d.jsx("p",{className:"mt-2",children:"Wir sind nicht bereit oder verpflichtet, an Streitbeilegungsverfahren vor einer Verbraucherschlichtungsstelle teilzunehmen."})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"Haftungsausschluss"}),d.jsx("h3",{className:"font-semibold text-neutral-800 mb-1",children:"Haftung für Inhalte"}),d.jsx("p",{children:"Die Inhalte unserer Seiten wurden mit gröÃter Sorgfalt erstellt. Für die Richtigkeit, Vollständigkeit und Aktualität der Inhalte können wir jedoch keine Gewähr übernehmen. Als Diensteanbieter sind wir gemäà § 7 Abs. 1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen."}),d.jsx("h3",{className:"font-semibold text-neutral-800 mb-1 mt-4",children:"Haftung für Links"}),d.jsx("p",{children:"Unser Angebot enthält Links zu externen Webseiten Dritter, auf deren Inhalte wir keinen Einfluss haben. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber verantwortlich. Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar."}),d.jsx("h3",{className:"font-semibold text-neutral-800 mb-1 mt-4",children:"Urheberrecht"}),d.jsx("p",{children:"Die durch den Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung auÃerhalb der Grenzen des Urheberrechts bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers."})]})]})]})]})})}function oU(){return d.jsx(Cs,{children:()=>d.jsxs(d.Fragment,{children:[d.jsx(Ns,{title:"Datenschutzerklärung | Hausarzt Homburg â Dr. Jelden",description:"Datenschutzerklärung der Hausarztpraxis Dr. med. Michael Jelden in Homburg. Informationen zum Datenschutz gemäà DSGVO."}),d.jsx("div",{className:"pt-36 md:pt-40"}),d.jsxs("section",{className:"max-w-3xl mx-auto px-5 sm:px-8 pb-24",children:[d.jsx("h1",{className:"text-3xl font-bold text-foreground mb-10","data-testid":"text-datenschutz-title",children:"Datenschutzerklärung"}),d.jsxs("div",{className:"prose prose-neutral max-w-none space-y-8 text-sm leading-relaxed text-neutral-700",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb
202-2",children:"1. Verantwortlicher"}),d.jsx("p",{children:"Verantwortlich für die Datenverarbeitung auf dieser Website ist:"}),d.jsxs("p",{className:"mt-2",children:["Dr. med. Michael Jelden",d.jsx("br",{}),"Talstr. 21",d.jsx("br",{}),"66424 Homburg",d.jsx("br",{}),"Telefon: 06841 / 172 130",d.jsx("br",{}),"E-Mail: [email protected]"]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"2. Erhebung und Speicherung personenbezogener Daten"}),d.jsx("h3",{className:"font-semibold text-neutral-800 mb-1",children:"a) Beim Besuch der Website"}),d.jsx("p",{children:"Beim Aufrufen unserer Website werden durch den auf Ihrem Endgerät zum Einsatz kommenden Browser automatisch Informationen an den Server unserer Website gesendet. Diese Informationen werden temporär in einem sogenannten Logfile gespeichert. Folgende Informationen werden dabei ohne Ihr Zutun erfasst und bis zur automatisierten Löschung gespeichert:"}),d.jsxs("ul",{className:"list-disc pl-5 mt-2 space-y-1",children:[d.jsx("li",{children:"IP-Adresse des anfragenden Rechners"}),d.jsx("li",{children:"Datum und Uhrzeit des Zugriffs"}),d.jsx("li",{children:"Name und URL der abgerufenen Datei"}),d.jsx("li",{children:"Website, von der aus der Zugriff erfolgt (Referrer-URL)"}),d.jsx("li",{children:"Verwendeter Browser und ggf. das Betriebssystem Ihres Rechners"})]}),d.jsx("p",{className:"mt-2",children:"Die genannten Daten werden zu folgenden Zwecken verarbeitet: Gewährleistung eines reibungslosen Verbindungsaufbaus der Website, Gewährleistung einer komfortablen Nutzung unserer Website sowie Auswertung der Systemsicherheit und -stabilität."}),d.jsx("p",{className:"mt-2",children:"Die Rechtsgrundlage für die Datenverarbeitung ist Art. 6 Abs. 1 lit. f DSGVO. Unser berechtigtes Interesse folgt aus den oben aufgelisteten Zwecken zur Datenerhebung."}),d.jsx("h3",{className:"font-semibold text-neutral-800 mb-1 mt-4",children:"b) Bei der Online-Terminbuchung"}),d.jsxs("p",{children:["Für die Online-Terminbuchung nutzen wir den externen Dienst samedi GmbH. Wenn Sie über unsere Website einen Termin buchen, werden Ihre eingegebenen Daten (Name, Kontaktdaten, gewünschter Termin) direkt an samedi übermittelt. Die Datenverarbeitung durch samedi erfolgt auf Grundlage eines Auftragsverarbeitungsvertrags gemäà Art. 28 DSGVO. Weitere Informationen finden Sie in der Datenschutzerklärung von samedi unter"," ",d.jsx("a",{href:"https://www.samedi.de/datenschutz",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.samedi.de/datenschutz"}),"."]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"3. Weitergabe von Daten"}),d.jsx("p",{children:"Eine Ãbermittlung Ihrer persönlichen Daten an Dritte zu anderen als den im Folgenden aufgeführten Zwecken findet nicht statt. Wir geben Ihre persönlichen Daten nur an Dritte weiter, wenn:"}),d.jsxs("ul",{className:"list-disc pl-5 mt-2 space-y-1",children:[d.jsx("li",{children:"Sie Ihre ausdrückliche Einwilligung dazu erteilt haben (Art. 6 Abs. 1 lit. a DSGVO)"}),d.jsx("li",{children:"die Weitergabe zur Geltendmachung, Ausübung oder Verteidigung von Rechtsansprüchen erforderlich ist (Art. 6 Abs. 1 lit. f DSGVO)"}),d.jsx("li",{children:"eine gesetzliche Verpflichtung besteht (Art. 6 Abs. 1 lit. c DSGVO)"}),d.jsx("li",{children:"dies gesetzlich zulässig und für die Abwicklung von Vertragsverhältnissen mit Ihnen erforderlich ist (Art. 6 Abs. 1 lit. b DSGVO)"})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"4. Cookies"}),d.jsx("p",{children:"Unsere Website verwendet technisch notwendige Cookies, die für den Betrieb der Seite erforderlich sind. Darüber hinaus setzen wir keine Tracking-Cookies oder Analyse-Tools ein."})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"5. Ihre Rechte"}),d.jsx("p",{children:"Sie haben gegenüber uns folgende Rechte hinsichtlich der Sie betreffenden personenbezogenen Daten:"}),d.jsxs("ul",{className:"list-disc pl-5 mt-2 space-y-1",children:[d.jsx("li",{children:"Recht auf Auskunft (Art. 15 DSGVO)"}),d.jsx("li",{children:"Recht auf Berichtigung (Art. 16 DSGVO)"}),d.jsx("li",{children:"Recht auf Löschung (Art. 17 DSGVO)"}),d.jsx("li",{children:"Recht auf Einschränkung der Verarbeitung (Art. 18 DSGVO)"}),d.jsx("li",{children:"Recht auf Datenübertragbarkeit (Art. 20 DSGVO)"}
202),d.jsx("li",{children:"Recht auf Widerspruch gegen die Verarbeitung (Art. 21 DSGVO)"})]}),d.jsx("p",{className:"mt-3",children:"Sie haben zudem das Recht, sich bei einer Datenschutz-Aufsichtsbehörde über die Verarbeitung Ihrer personenbezogenen Daten durch uns zu beschweren."}),d.jsxs("p",{className:"mt-2",children:["Zuständige Aufsichtsbehörde:",d.jsx("br",{}),"Unabhängiges Datenschutzzentrum Saarland",d.jsx("br",{}),"Fritz-Dobisch-StraÃe 12",d.jsx("br",{}),"66111 Saarbrücken",d.jsx("br",{}),d.jsx("a",{href:"https://www.datenschutz.saarland.de",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.datenschutz.saarland.de"})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"6. SSL-/TLS-Verschlüsselung"}),d.jsx("p",{children:'Diese Seite nutzt aus Sicherheitsgründen eine SSL- bzw. TLS-Verschlüsselung. Eine verschlüsselte Verbindung erkennen Sie daran, dass die Adresszeile des Browsers von âhttp://" auf âhttps://" wechselt und an dem Schloss-Symbol in Ihrer Browserzeile.'})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-neutral-900 mb-2",children:"7. Aktualität und Ãnderung dieser Datenschutzerklärung"}),d.jsx("p",{children:"Diese Datenschutzerklärung ist aktuell gültig und hat den Stand März 2026. Durch die Weiterentwicklung unserer Website oder aufgrund geänderter gesetzlicher bzw. behördlicher Vorgaben kann es notwendig werden, diese Datenschutzerklärung zu ändern."})]})]})]})]})})}function aU({children:t}){const[e]=rh(),[n,r]=k.useState(!0),[s,i]=k.useState(t),a=k.useRef(e);return k.useEffect(()=>{if(a.current!==e){a.current=e,r(!1);const c=setTimeout(()=>{window.scrollTo(0,0),i(t),r(!0)},250);return()=>clearTimeout(c)}else i(t)},[e,t]),d.jsx("div",{className:"transition-opacity duration-300 ease-in-out",style:{opacity:n?1:0},children:s})}function lU(){return d.jsxs(tO,{children:[d.jsx(vr,{path:"/",component:D4}),d.jsx(vr,{path:"/praevention",component:W9}),d.jsx(vr,{path:"/diagnostik",component:K9}),d.jsx(vr,{path:"/innovativ",component:sU}),d.jsx(vr,{path:"/team",component:Q9}),d.jsx(vr,{path:"/kontakt",component:Y9}),d.jsx(vr,{path:"/karriere",component:eU}),d.jsx(vr,{path:"/termin",component:tU}),d.jsx(vr,{path:"/impressum",component:iU}),d.jsx(vr,{path:"/datenschutz",component:oU}),d.jsx(vr,{path:"/admin",component:$9}),d.jsx(vr,{component:SL})]})}function cU(){return d.jsx(wO,{client:Ve,children:d.jsxs(xL,{children:[d.jsx(WD,{}),d.jsx(aU,{children:d.jsx(lU,{})})]})})}DR.createRoot(document.getElementById("root")).render(d.jsx(cU,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.