1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function A(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+k(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(ee,`$&/`)+`/`),A(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+k(s,l);c+=A(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+k(s,l++),c+=A(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function te(e,t,n){if(e==null)return e;var r=[],i=0;return A(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j={current:null},re={transition:null},M={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:re,ReactCurrentOwner:C};function ie(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INT
vendor: 7,453 bytes, line 1
1ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,e.act=ie,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=re.transition;re.transition={};try{e()}finally{re.transition=t}},e.unstable_act=ie,e.useCallback=function(e,t){return j.current.useCallback(e,t)},e.useContext=function(e){return j.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return j.current.useDeferredValue(e)},e.useEffect=function(e,t){return j.current.useEffect(e,t)},e.useId=function(){return j.current.useId()},e.useImperativeHandle=function(e,t,n){return j.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return j.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return j.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return j.current.useMemo(e,t)},e.useReducer=function(e,t,n){return j.current.useReducer(e,t,n)},e.useRef=function(e){return j.current.useRef(e)},e.useState=function(e){return j.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return j.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return j.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,te(x);else{var t=n(l);t!==null&&ne(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ne(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?ee():(S=!1,C=null)}}else S=!1}var ee;if(typeof v==`function`)ee=function(){v(O)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=O,ee=function(){A.postMessage(null)}}else ee=function(){g(O,0)};function te(e){C=e,S||(S=!0,ee())}function ne(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,te(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,ne(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d(),n=p();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,f={},m={};function h(e){return l.call(m,e)?!0:l.call(f,e)?!1:u.test(e)?m[e]=!0:(f[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;
vendor: 11,822 bytes, lines 1-5
1if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[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(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),O=Symbol.for(`react.profiler`),ee=Symbol.for(`react.provider`),k=Symbol.for(`react.context`),A=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),j=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),M=Symbol.for(`react.offscreen`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Object.assign,se;function ce(e){if(se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||``}return` 2`+se+e}var le=!1;function ue(e,t){if(!e||le)return``;le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(` 3`),a=r.stack.split(` 4`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=` 5`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{le=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ce(e):``}function de(e){switch(e.tag){case 5:return ce(e.type);case 16:return ce(`Lazy`);case 13:return ce(`Suspense`);case 19:return ce(`SuspenseList`);case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return``}}function fe(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case k:return(e.displayName||`Context`)+`.Consumer`;case ee:return(e._context.displayName||`Context`)+`.Provider`;case A:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case j:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}function pe(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return fe(t);case 8:return t===D?`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 t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function me(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function he(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function N(e){var t=he(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ge(e){e._valueTracker||=N(e)}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=he(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ve(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function ye(e,t){var n=t.checked;return oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function be(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=me(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function xe(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function Se(e,t){xe(e,t);var n=me(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?we(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&we(e,t.type,me(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function we(e,t,n){(t!==`number`||ve(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Te=Array.isArray;function Ee(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+me(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function De(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return oe({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Oe(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Te(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:me(n)}}function ke(e,t){var n=me(t.value),r=me(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function je(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Me(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?je(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ne,Pe=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Ne||=document.createElement(`div`),Ne.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fe(e,t){if(t){var n=e.firstChild;
vendor: 2,303 bytes, line 5
5if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ie={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},Le=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ie).forEach(function(e){Le.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ie[t]=Ie[e]})});function Re(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ie.hasOwnProperty(e)&&Ie[e]?(``+t).trim():t+`px`}function ze(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Re(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Be=oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ve(e,t){if(t){if(Be[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function He(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ue=null;function We(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ge=null,Ke=null,qe=null;function Je(e){if(e=qi(e)){if(typeof Ge!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),Ge(e.stateNode,e.type,t))}}function Ye(e){Ke?qe?qe.push(e):qe=[e]:Ke=e}
vendor: 9,461 bytes, line 5
5function Xe(){if(Ke){var e=Ke,t=qe;if(qe=Ke=null,Je(e),t)for(e=0;e<t.length;e++)Je(t[e])}}function Ze(e,t){return e(t)}function Qe(){}var $e=!1;function et(e,t,n){if($e)return e(t,n);$e=!0;try{return Ze(e,t,n)}finally{$e=!1,(Ke!==null||qe!==null)&&(Qe(),Xe())}}function tt(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var nt=!1;if(c)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener(`test`,rt,rt),window.removeEventListener(`test`,rt,rt)}catch{nt=!1}function it(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var at=!1,ot=null,st=!1,ct=null,lt={onError:function(e){at=!0,ot=e}};function ut(e,t,n,r,i,a,o,s,c){at=!1,ot=null,it.apply(lt,arguments)}function dt(e,t,n,i,a,o,s,c,l){if(ut.apply(this,arguments),at){if(at){var u=ot;at=!1,ot=null}else throw Error(r(198));st||(st=!0,ct=u)}}function ft(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function mt(e){if(ft(e)!==e)throw Error(r(188))}function ht(e){var t=e.alternate;if(!t){if(t=ft(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return mt(a),e;if(o===i)return mt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function gt(e){return e=ht(e),e===null?null:_t(e)}function _t(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_t(e);if(t!==null)return t;e=e.sibling}return null}var vt=n.unstable_scheduleCallback,yt=n.unstable_cancelCallback,bt=n.unstable_shouldYield,xt=n.unstable_requestPaint,St=n.unstable_now,Ct=n.unstable_getCurrentPriorityLevel,wt=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,Et=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,Ot=n.unstable_IdlePriority,kt=null,At=null;function jt(e){if(At&&typeof At.onCommitFiberRoot==`function`)try{At.onCommitFiberRoot(kt,e,void 0,(e.current.flags&128)==128)}catch{}}var Mt=Math.clz32?Math.clz32:Ft,Nt=Math.log,Pt=Math.LN2;function Ft(e){return e>>>=0,e===0?32:31-(Nt(e)/Pt|0)|0}var It=64,Lt=4194304;function Rt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Rt(a))):r=Rt(s)}else o=n&~i,o===0?a!==0&&(r=Rt(a)):r=Rt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mt(t),i=1<<n,r|=e[n],t&=~i;return r}function Bt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;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 Vt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Mt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Bt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ht(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ut(){var e=It;return It<<=1,!(It&4194240)&&(It=64),e}function Wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=n}function Kt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Mt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function qt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Jt=0;function Yt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xt,P,Zt,Qt,$t,en=!1,tn=[],nn=null,rn=null,an=null,on=new Map,sn=new Map,cn=[],ln=`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 un(e,t){switch(e){case`focusin`:case`focusout`:nn=null;break;case`dragenter`:case`dragleave`:rn=null;break;case`mouseover`:case`mouseout`:an=null;break;case`pointerover`:case`pointerout`:on.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:sn.delete(t.pointerId)}}function dn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qi(t),t!==null&&P(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function fn(e,t,n,r,i){switch(t){case`focusin`:return nn=dn(nn,e,t,n,r,i),!0;case`dragenter`:return rn=dn(rn,e,t,n,r,i),!0;case`mouseover`:return an=dn(an,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return on.set(a,dn(on.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,sn.set(a,dn(sn.get(a)||null,e,t,n,r,i)),!0}return!1}function pn(e){var t=Ki(e.target);if(t!==null){var n=ft(t);if(n!==null){if(t=n.tag,t===13){if(t=pt(n),t!==null){e.blockedOn=t,$t(e.priority,function(){Zt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ue=r,n.target.dispatchEvent(r),Ue=null}else return t=qi(n),t!==null&&P(t),e.blockedOn=n,!1;t.shift()}return!0}function hn(e,t,n){mn(e)&&n.delete(t)}function gn(){en=!1,nn!==null&&mn(nn)&&(nn=null),rn!==null&&mn(rn)&&(rn=null),an!==null&&mn(an)&&(an=null),on.forEach(hn),sn.forEach(hn)}function _n(e,t){e.blockedOn===t&&(e.blockedOn=null,en||(en=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,gn)))}function vn(e){function t(t){return _n(t,e)}if(0<tn.length){_n(tn[0],e);for(var n=1;n<tn.length;n++){var r=tn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&_n(nn,e),rn!==null&&_n(rn,e),an!==null&&_n(an,e),on.forEach(t),sn.forEach(t),n=0;n<cn.length;n++)r=cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<cn.length&&(n=cn[0],n.blockedOn===null);)pn(n),n.blockedOn===null&&cn.shift()}var yn=C.ReactCurrentBatchConfig,bn=!0;function xn(e,t,n,r){var i=Jt,a=yn.transition;yn.transition=null;try{Jt=1,Cn(e,t,n,r)}finally{Jt=i,yn.transition=a}}function Sn(e,t,n,r){var i=Jt,a=yn.transition;yn.transition=null;try{Jt=4,Cn(e,t,n,r)}finally{Jt=i,yn.transition=a}}function Cn(e,t,n,r){if(bn){var i=Tn(e,t,n,r);if(i===null)vi(e,t,r,wn,n),un(e,r);else if(fn(i,e,t,n,r))r.stopPropagation();else if(un(e,r),t&4&&-1<ln.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Xt(a),a=Tn(e,t,n,r),a===null&&vi(e,t,r,wn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var wn=null;function Tn(e,t,n,r){if(wn=null,e=We(r),e=Ki(e),e!==null)if(t=ft(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wn=e,null}function En(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`
vendor: 8,707 bytes, line 5
5: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(Ct()){case wt:return 1;case Tt:return 4;case Et:case Dt:return 16;case Ot:return 536870912;default:return 16}default:return 16}}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return kn=i.slice(e,1<r?1-r:void 0)}function jn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Mn(){return!0}function Nn(){return!1}function Pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Mn:Nn,this.isPropagationStopped=Nn,this}return oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=oe({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=oe({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(oe({},Hn,{dataTransfer:0})),Gn=Pn(oe({},Ln,{relatedTarget:0})),Kn=Pn(oe({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(oe({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(oe({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={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`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(oe({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(oe({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(oe({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),rr=Pn(oe({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ir=Pn(oe({},Hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ar=[9,13,27,32],or=c&&`CompositionEvent`in window,sr=null;c&&`documentMode`in document&&(sr=document.documentMode);var cr=c&&`TextEvent`in window&&!sr,lr=c&&(!or||sr&&8<sr&&11>=sr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return ar.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var mr=!1;function hr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function gr(e,t){if(mr)return e===`compositionend`||!or&&fr(e,t)?(e=An(),kn=On=Dn=null,mr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return lr&&t.locale!==`ko`?null:t.data;default:return null}}var _r={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 vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!_r[e.type]:t===`textarea`}function yr(e,t,n,r){Ye(r),t=bi(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var br=null,xr=null;function Sr(e){pi(e,0)}function Cr(e){if(_e(Ji(e)))return e}function wr(e,t){if(e===`change`)return t}var Tr=!1;if(c){var Er;if(c){var Dr=`oninput`in document;if(!Dr){var Or=document.createElement(`div`);Or.setAttribute(`oninput`,`return;`),Dr=typeof Or.oninput==`function`}Er=Dr}else Er=!1;Tr=Er&&(!document.documentMode||9<document.documentMode)}function kr(){br&&(br.detachEvent(`onpropertychange`,Ar),xr=br=null)}function Ar(e){if(e.propertyName===`value`&&Cr(xr)){var t=[];yr(t,xr,e,We(e)),et(Sr,t)}}function jr(e,t,n){e===`focusin`?(kr(),br=t,xr=n,br.attachEvent(`onpropertychange`,Ar)):e===`focusout`&&kr()}function Mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Cr(xr)}function Nr(e,t){if(e===`click`)return Cr(t)}function Pr(e,t){if(e===`input`||e===`change`)return Cr(t)}function Fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ir=typeof Object.is==`function`?Object.is:Fr;function Lr(e,t){if(Ir(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Ir(e[i],t[i]))return!1}return!0}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(){for(var e=window,t=ve();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ve(e.document)}return t}function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Ur(e){var t=Vr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Br(n.ownerDocument.documentElement,n)){if(r!==null&&Hr(n)){if
vendor: 88,932 bytes, lines 5-8
5(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=zr(n,a);var o=zr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wr=c&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==ve(r)||(r=Gr,`selectionStart`in r&&Hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qr&&Lr(qr,r)||(qr=r,r=bi(Kr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Gr)))}function Xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Zr={animationend:Xr(`Animation`,`AnimationEnd`),animationiteration:Xr(`Animation`,`AnimationIteration`),animationstart:Xr(`Animation`,`AnimationStart`),transitionend:Xr(`Transition`,`TransitionEnd`)},Qr={},$r={};c&&($r=document.createElement(`div`).style,`AnimationEvent`in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),`TransitionEvent`in window||delete Zr.transitionend.transition);function ei(e){if(Qr[e])return Qr[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $r)return Qr[e]=t[n];return e}var ti=ei(`animationend`),ni=ei(`animationiteration`),ri=ei(`animationstart`),ii=ei(`transitionend`),ai=new Map,oi=`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 si(e,t){ai.set(e,t),o(t,[e])}for(var ci=0;ci<oi.length;ci++){var li=oi[ci];si(li.toLowerCase(),`on`+(li[0].toUpperCase()+li.slice(1)))}si(ti,`onAnimationEnd`),si(ni,`onAnimationIteration`),si(ri,`onAnimationStart`),si(`dblclick`,`onDoubleClick`),si(`focusin`,`onFocus`),si(`focusout`,`onBlur`),si(ii,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ui=`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(` `),di=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ui));function fi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,dt(r,t,void 0,e),e.currentTarget=null}function pi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;fi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;fi(i,s,l),a=c}}}if(st)throw e=ct,st=!1,ct=null,e}function F(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(di.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(En(t)){case 1:var i=xn;break;case 4:i=Sn;break;default:i=Cn}n=i.bind(null,t,n,e),i=void 0,!nt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}et(function(){var r=a,i=We(n),o=[];a:{var s=ai.get(e);if(s!==void 0){var c=In,l=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:c=er;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=nr;break;case ti:case ni:case ri:c=Kn;break;case ii:c=rr;break;case`scroll`:c=Rn;break;case`wheel`:c=ir;break;case`copy`:case`cut`:case`paste`:c=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=tr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=tt(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ue&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=ft(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=tr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=wr;else if(vr(s))if(Tr)g=Pr;else{g=Mr;var _=jr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Nr);if(g&&=g(e,r)){yr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&we(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(vr(_)||_.contentEditable===`true`)&&(Gr=_,Kr=r,qr=null);break;case`focusout`:qr=Kr=Gr=null;break;case`mousedown`:Jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Jr=!1,Yr(o,n,i);break;case`selectionchange`:if(Wr)break;case`keydown`:case`keyup`:Yr(o,n,i)}var v;if(or)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else mr?fr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(lr&&n.locale!==`ko`&&(mr||y!==`onCompositionStart`?y===`onCompositionEnd`&&mr&&(v=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,mr=!0)),_=bi(r,y),0<_.length&&(y=new Jn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=cr?hr(e,n):gr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}pi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=tt(e,n),a!=null&&r.unshift(yi(e,a,i)),a=tt(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=tt(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=tt(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,` 6`).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),vn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);vn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function $i(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function ea(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var ta={},na=Qi(ta),ra=Qi(!1),ia=ta;function aa(e,t){var n=e.type.contextTypes;if(!n)return ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function oa(e){return e=e.childContextTypes,e!=null}function sa(){$i(ra),$i(na)}function ca(e,t,n){if(na.current!==ta)throw Error(r(168));ea(na,t),ea(ra,n)}function la(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,pe(e)||`Unknown`,a));return oe({},n,i)}function ua(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ta,ia=na.current,ea(na,e),ea(ra,ra.current),!0}function da(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=la(e,t,ia),i.__reactInternalMemoizedMergedChildContext=e,$i(ra),$i(na),ea(na,e)):$i(ra),ea(ra,n)}var fa=null,pa=!1,ma=!1;function ha(e){fa===null?fa=[e]:fa.push(e)}function ga(e){pa=!0,ha(e)}function _a(){if(!ma&&fa!==null){ma=!0;var e=0,t=Jt;try{var n=fa;for(Jt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fa=null,pa=!1}catch(t){throw fa!==null&&(fa=fa.slice(e+1)),vt(wt,_a),t}finally{Jt=t,ma=!1}}return null}var va=[],ya=0,ba=null,xa=0,Sa=[],Ca=0,wa=null,Ta=1,Ea=``;function Da(e,t){va[ya++]=xa,va[ya++]=ba,ba=e,xa=t}function Oa(e,t,n){Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,wa=e;var r=Ta;e=Ea;var i=32-Mt(r)-1;r&=~(1<<i),n+=1;var a=32-Mt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ta=1<<32-Mt(t)+i|n<<i|r,Ea=a+e}else Ta=1<<a|n<<i|r,Ea=e}function ka(e){e.return!==null&&(Da(e,1),Oa(e,1,0))}function Aa(e){for(;e===ba;)ba=va[--ya],va[ya]=null,xa=va[--ya],va[ya]=null;for(;e===wa;)wa=Sa[--Ca],Sa[Ca]=null,Ea=Sa[--Ca],Sa[Ca]=null,Ta=Sa[--Ca],Sa[Ca]=null}var ja=null,Ma=null,Na=!1,Pa=null;function Fa(e,t){var n=lu(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ia(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=wa===null?null:{id:Ta,overflow:Ea},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=lu(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ja=e,Ma=null,!0);default:return!1}}function La(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ra(e){if(Na){var t=Ma;if(t){var n=t;if(!Ia(e,t)){if(La(e))throw Error(r(418));t=Li(n.nextSibling);var i=ja;t&&Ia(e,t)?Fa(i,n):(e.flags=e.flags&-4097|2,Na=!1,ja=e)}}else{if(La(e))throw Error(r(418));e.flags=e.flags&-4097|2,Na=!1,ja=e}}}function za(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ja=e}function Ba(e){if(e!==ja)return!1;if(!Na)return za(e),Na=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Ma){if(La(e))throw Va(),Error(r(418));for(;t;)Fa(e,t),t=Li(t.nextSibling)}if(za(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ma=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ma=null}}else Ma=ja?Li(e.stateNode.nextSibling):null;return!0}function Va(){for(var e=Ma;e;)e=Li(e.nextSibling)}function Ha(){Ma=ja=null,Na=!1}function Ua(e){Pa===null?Pa=[e]:Pa.push(e)}var Wa=C.ReactCurrentBatchConfig;function Ga(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ka(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function qa(e){var t=e._init;return t(e._payload)}function Ja(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=fu(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===re&&qa(i)===t.type)?(r=a(t,n.props),r.ref=Ga(e,t,n),r.return=e,r):(r=pu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ga(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_u(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=gu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=pu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ga(e,null,t),n.return=e,n;case T:return t=_u(t,e.mode,n),t.return=e,t;case re:var r=t._init;return f(e,r(t._payload),n)}if(Te(t)||ae(t))return t=mu(t,e.mode,n,null),t.return=e,t;Ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case re:return i=n._init,p(e,t,i(n._payload),r)}if(Te(n)||ae(n))return i===null?d(e,t,n,r,null):null;Ka(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case re:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Te(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);Ka(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Na&&Da(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Na&&Da(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Na&&Da(r,h),l}function g(a,s,c,l){var u=ae(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Na&&Da(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Na&&Da(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Na&&Da(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===re&&qa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ga(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===E?(r=mu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=pu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ga(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=_u(i,e.mode,o),r.return=e,e=r}return s(e);case re:return l=i._init,_(e,r,l(i._payload),o)}if(Te(i))return h(e,r,i,o);if(ae(i))return g(e,r,i,o);Ka(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=gu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ya=Ja(!0),Xa=Ja(!1),Za=Qi(null),Qa=null,$a=null,eo=null;function to(){eo=$a=Qa=null}function no(e){var t=Za.current;$i(Za),e._currentValue=t}function ro(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function io(e,t){Qa=e,eo=$a=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Js=!0),e.firstContext=null)}function ao(e){var t=e._currentValue;if(eo!==e)if(e={context:e,memoizedValue:t,next:null},$a===null){if(Qa===null)throw Error(r(308));$a=e,Qa.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var oo=null;function so(e){oo===null?oo=[e]:oo.push(e)}function co(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,so(t)):(n.next=i.next,i.next=n),t.interleaved=n,lo(e,r)}function lo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function po(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,rl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lo(e,n)}return i=r.interleaved,i===null?(t.next=t,so(r)):(t.next=i.next,i.next=t),r.interleaved=t,lo(e,n)}function go(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}function _o(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vo(e,t,n,r){var i=e.updateQueue;uo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=oe({},d,f);break a;case 2:uo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);dl|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var bo={},xo=Qi(bo),So=Qi(bo),Co=Qi(bo);function wo(e){if(e===bo)throw Error(r(174));return e}function To(e,t){switch(ea(Co,t),ea(So,e),ea(xo,bo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Me(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Me(t,e)}$i(xo),ea(xo,t)}function Eo(){$i(xo),$i(So),$i(Co)}function Do(e){wo(Co.current);var t=wo(xo.current),n=Me(t,e.type);t!==n&&(ea(So,e),ea(xo,n))}function Oo(e){So.current===e&&($i(xo),$i(So))}var ko=Qi(0);function Ao(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=[];function Mo(){for(var e=0;e<jo.length;e++)jo[e]._workInProgressVersionPrimary=null;jo.length=0}var No=C.ReactCurrentDispatcher,Po=C.ReactCurrentBatchConfig,Fo=0,Io=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=0,Ho=0;function Uo(){throw Error(r(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ir(e[n],t[n]))return!1;return!0}function Go(e,t,n,i,a,o){if(Fo=o,Io=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,No.current=e===null||e.memoizedState===null?Os:ks,e=n(i,a),Bo){o=0;do{if(Bo=!1,Vo=0,25<=o)throw Error(r(301));o+=1,Ro=Lo=null,t.updateQueue=null,No.current=As,e=n(i,a)}while(Bo)}if(No.current=Ds,t=Lo!==null&&Lo.next!==null,Fo=0,Ro=Lo=Io=null,zo=!1,t)throw Error(r(300));return e}function Ko(){var e=Vo!==0;return Vo=0,e}function qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?Io.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function Jo(){if(Lo===null){var e=Io.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?Io.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw Error(r(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?Io.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function Yo(e,t){return typeof t==`function`?t(e):t}function Xo(e){var t=Jo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Lo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Fo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Io.lanes|=d,dl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Ir(i,t.memoizedState)||(Js=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Io.lanes|=o,dl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Zo(e){var t=Jo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ir(o,t.memoizedState)||(Js=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Qo(){}function $o(e,t){var n=Io,i=Jo(),a=t(),o=!Ir(i.memoizedState,a);if(o&&(i.memoizedState=a,Js=!0),i=i.queue,ds(ns.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Ro!==null&&Ro.memoizedState.tag&1){if(n.flags|=2048,os(9,ts.bind(null,n,i,a,t),void 0,null),il===null)throw Error(r(349));Fo&30||es(n,t,a)}return a}function es(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Io.updateQueue,t===null?(t={lastEffect:null,stores:null},Io.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ts(e,t,n,r){t.value=n,t.getSnapshot=r,rs(t)&&is(e)}function ns(e,t,n){return n(function(){rs(t)&&is(e)})}function rs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ir(e,n)}catch{return!0}}function is(e){var t=lo(e,1);t!==null&&jl(t,e,1,-1)}function as(e){var t=qo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e},t.queue=e,e=e.dispatch=Cs.bind(null,Io,e),[t.memoizedState,e]}function os(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Io.updateQueue,t===null?(t={lastEffect:null,stores:null},Io.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ss(){return Jo().memoizedState}function cs(e,t,n,r){var i=qo();Io.flags|=e,i.memoizedState=os(1|t,n,void 0,r===void 0?null:r)}function ls(e,t,n,r){var i=Jo();r=r===void 0?null:r;var a=void 0;if(Lo!==null){var o=Lo.memoizedState;if(a=o.destroy,r!==null&&Wo(r,o.deps)){i.memoizedState=os(t,n,a,r);return}}Io.flags|=e,i.memoizedState=os(1|t,n,a,r)}function us(e,t){return cs(8390656,8,e,t)}function ds(e,t){return ls(2048,8,e,t)}function fs(e,t){return ls(4,2,e,t)}function ps(e,t){return ls(4,4,e,t)}function ms(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hs(e,t,n){return n=n==null?null:n.concat([e]),ls(4,4,ms.bind(null,t,e),n)}function gs(){}function _s(e,t){var n=Jo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vs(e,t){var n=Jo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ys(e,t,n){return Fo&21?(Ir(n,t)||(n=Ut(),Io.lanes|=n,dl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Js=!0),e.memoizedState=n)}function bs(e,t){var n=Jt;Jt=n!==0&&4>n?n:4,e(!0);var r=Po.transition;Po.transition={};try{e(!1),t()}finally{Jt=n,Po.transition=r}}function xs(){return Jo().memoizedState}function Ss(e,t,n){var r=Al(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ws(e))Ts(t,n);else if(n=co(e,t,n,r),n!==null){var i=kl();jl(n,e,r,i),Es(n,t,r)}}function Cs(e,t,n){var r=Al(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ws(e))Ts(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ir(s,o)){var c=t.interleaved;c===null?(i.next=i,so(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=co(e,t,i,r),n!==null&&(i=kl(),jl(n,e,r,i),Es(n,t,r))}}function ws(e){var t=e.alternate;return e===Io||t!==null&&t===Io}function Ts(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Es(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}var Ds={readContext:ao,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useInsertionEffect:Uo,useLayoutEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useMutableSource:Uo,useSyncExternalStore:Uo,useId:Uo,unstable_isNewReconciler:!1},Os={readContext:ao,useCallback:function(e,t){return qo().memoizedState=[e,t===void 0?null:t],e},useContext:ao,useEffect:us,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),cs(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){return cs(4,2,e,t)},useMemo:function(e,t){var n=qo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ss.bind(null,Io,e),[r.memoizedState,e]},useRef:function(e){var t=qo();return e={current:e},t.memoizedState=e},useState:as,useDebugValue:gs,useDeferredValue:function(e){return qo().memoizedState=e},useTransition:function(){var e=as(!1),t=e[0];return e=bs.bind(null,e[1]),qo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Io,a=qo();if(Na){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),il===null)throw Error(r(349));Fo&30||es(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(ns.bind(null,i,o,e),[e]),i.flags|=2048,os(9,ts.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=qo(),t=il.identifierPrefix;if(Na){var n=Ea,r=Ta;n=(r&~(1<<32-Mt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Vo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Ho++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},ks={readContext:ao,useCallback:_s,useContext:ao,useEffect:ds,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Xo,useRef:ss,useState:function(){return Xo(Yo)},useDebugValue:gs,useDeferredValue:function(e){return ys(Jo(),Lo.memoizedState,e)},useTransition:function(){return[Xo(Yo)[0],Jo().memoizedState]},useMutableSource:Qo,useSyncExternalStore:$o,useId:xs,unstable_isNewReconciler:!1},As={readContext:ao,useCallback:_s,useContext:ao,useEffect:ds,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Zo,useRef:ss,useState:function(){return Zo(Yo)},useDebugValue:gs,useDeferredValue:function(e){var t=Jo();return Lo===null?t.memoizedState=e:ys(t,Lo.memoizedState,e)},useTransition:function(){return[Zo(Yo)[0],Jo().memoizedState]},useMutableSource:Qo,useSyncExternalStore:$o,useId:xs,unstable_isNewReconciler:!1};function js(e,t){if(e&&e.defaultProps){for(var n in t=oe({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ms(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ns={isMounted:function(e){return(e=e._reactInternals)?ft(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kl(),i=Al(e),a=mo(r,i);a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(jl(t,e,i,r),go(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kl(),i=Al(e),a=mo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(jl(t,e,i,r),go(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kl(),r=Al(e),i=mo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ho(e,i,r),t!==null&&(jl(t,e,r,n),go(t,e,r))}};function Ps(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Lr(n,r)||!Lr(i,a):!0}function Fs(e,t,n){var r=!1,i=ta,a=t.contextType;return typeof a==`object`&&a?a=ao(a):(i=oa(t)?ia:na.current,r=t.contextTypes,a=(r=r!=null)?aa(e,i):ta),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ns,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Is(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ns.enqueueReplaceState(t,t.state,null)}function Ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},fo(e);var a=t.contextType;typeof a==`object`&&a?i.context=ao(a):(a=oa(t)?ia:na.current,i.context=aa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Ms(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Ns.enqueueReplaceState(i,i.state,null),vo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Rs(e,t){try{var n=``,r=t;do n+=de(r),r=r.return;while(r);var i=n}catch(e){i=` 7Error generating stack: `+e.message+` 8`+e.stack}return{value:e,source:t,stack:i,digest:null}}function zs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Vs=typeof WeakMap==`function`?WeakMap:Map;function Hs(e,t,n){n=mo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,bl=r),Bs(e,t)},n}function Us(e,t,n){n=mo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Bs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Bs(e,t),typeof r!=`function`&&(xl===null?xl=new Set([this]):xl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Ws(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nu.bind(null,e,t,n),t.then(e,e))}function Gs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ks(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mo(-1,1),t.tag=2,ho(n,t,1))),n.lanes|=1),e)}var qs=C.ReactCurrentOwner,Js=!1;function Ys(e,t,n,r){t.child=e===null?Xa(t,null,n,r):Ya(t,e.child,n,r)}function Xs(e,t,n,r,i){n=n.render;var a=t.ref;return io(t,i),r=Go(e,t,n,r,a,i),n=Ko(),e!==null&&!Js?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gc(e,t,i)):(Na&&n&&ka(t),t.flags|=1,Ys(e,t,r,i),t.child)}function Zs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!uu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Qs(e,t,a,r,i)):(e=pu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Lr:n,n(o,r)&&e.ref===t.ref)return gc(e,t,i)}return t.flags|=1,e=fu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Qs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Lr(a,r)&&e.ref===t.ref)if(Js=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Js=!0);else return t.lanes=e.lanes,gc(e,t,i)}return tc(e,t,n,r,i)}function $s(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ea(cl,sl),sl|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ea(cl,sl),sl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,ea(cl,sl),sl|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),ea(cl,sl),sl|=r;return Ys(e,t,i,n),t.child}function ec(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tc(e,t,n,r,i){var a=oa(n)?ia:na.current;return a=aa(t,a),io(t,i),n=Go(e,t,n,r,a,i),r=Ko(),e!==null&&!Js?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gc(e,t,i)):(Na&&r&&ka(t),t.flags|=1,Ys(e,t,n,i),t.child)}function nc(e,t,n,r,i){if(oa(n)){var a=!0;ua(t)}else a=!1;if(io(t,i),t.stateNode===null)hc(e,t),Fs(t,n,r),Ls(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=ao(l):(l=oa(n)?ia:na.current,l=aa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Is(t,o,r,l),uo=!1;var f=t.memoizedState;o.state=f,vo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ra.current||uo?(typeof u==`function`&&(Ms(t,n,u,r),c=t.memoizedState),(s=uo||Ps(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,po(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:js(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=ao(c):(c=oa(n)?ia:na.current,c=aa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Is(t,o,r,c),uo=!1,f=t.memoizedState,o.state=f,vo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ra.current||uo?(typeof p==`function`&&(Ms(t,n,p,r),m=t.memoizedState),(l=uo||Ps(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return rc(e,t,n,r,a,i)}function rc(e,t,n,r,i,a){ec(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&da(t,n,!1),gc(e,t,a);r=t.stateNode,qs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ya(t,e.child,null,a),t.child=Ya(t,null,s,a)):Ys(e,t,s,a),t.memoizedState=r.state,i&&da(t,n,!0),t.child}function ic(e){var t=e.stateNode;t.pendingContext?ca(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ca(e,t.context,!1),To(e,t.containerInfo)}function ac(e,t,n,r,i){return Ha(),Ua(i),t.flags|=256,Ys(e,t,n,r),t.child}var oc={dehydrated:null,treeContext:null,retryLane:0};function sc(e){return{baseLanes:e,cachePool:null,transitions:null}}function cc(e,t,n){var r=t.pendingProps,i=ko.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ea(ko,i&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=hu(o,r,0,null),e=mu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=sc(n),t.memoizedState=oc,e):lc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return dc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=fu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=mu(a,o,n,null),a.flags|=2):a=fu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?sc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=oc,r}return a=e.child,e=a.sibling,r=fu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lc(e,t){return t=hu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function uc(e,t,n,r){return r!==null&&Ua(r),Ya(t,e.child,null,n),e=lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=zs(Error(r(422))),uc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=hu({mode:`visible`,children:i.children},a,0,null),o=mu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ya(t,e.child,null,s),t.child.memoizedState=sc(s),t.memoizedState=oc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return uc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=zs(o,i,void 0),uc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Js||c){if(i=il,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,lo(e,a),jl(i,e,a,-1))}return Gl(),i=zs(Error(r(421))),uc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=iu.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ma=Li(a.nextSibling),ja=t,Na=!0,Pa=null,e!==null&&(Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,Ta=e.id,Ea=e.overflow,wa=t),t=lc(t,i.children),t.flags|=4096,t)}function fc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ro(e.return,t,n)}function pc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ys(e,t,r.children,n),r=ko.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fc(e,n,t);else if(e.tag===19)fc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ea(ko,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ao(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),pc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ao(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}pc(t,!0,n,null,a);break;case`together`:pc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=fu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _c(e,t,n){switch(t.tag){case 3:ic(t),Ha();break;case 5:Do(t);break;case 1:oa(t.type)&&ua(t);break;case 4:To(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ea(Za,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ea(ko,ko.current&1),e=gc(e,t,n),e===null?null:e.sibling):cc(e,t,n):(ea(ko,ko.current&1),t.flags|=128,null);ea(ko,ko.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ea(ko,ko.current),r)break;return null;case 22:case 23:return t.lanes=0,$s(e,t,n)}return gc(e,t,n)}var vc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},yc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,wo(xo.current);var o=null;switch(n){case`input`:i=ye(e,i),r=ye(e,r),o=[];break;case`select`:i=oe({},i,{value:void 0}),r=oe({},r,{value:void 0}),o=[];break;case`textarea`:i=De(e,i),r=De(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}Ve(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&F(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},bc=function(e,t,n,r){n!==r&&(t.flags|=4)};function xc(e,t){if(!Na)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Sc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Cc(e,t,n){var i=t.pendingProps;switch(Aa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sc(t),null;case 1:return oa(t.type)&&sa(),Sc(t),null;case 3:return i=t.stateNode,Eo(),$i(ra),$i(na),Mo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pa!==null&&(Fl(Pa),Pa=null))),Sc(t),null;case 5:Oo(t);var o=wo(Co.current);if(n=t.type,e!==null&&t.stateNode!=null)yc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Sc(t),null}if(e=wo(xo.current),Ba(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=(t.mode&1)!=0,n){case`dialog`:F(`cancel`,i),F(`close`,i);break;case`iframe`:case`object`:case`embed`:F(`load`,i);break;case`video`:case`audio`:for(o=0;o<ui.length;o++)F(ui[o],i);break;case`source`:F(`error`,i);break;case`img`:case`image`:case`link`:F(`error`,i),F(`load`,i);break;case`details`:F(`toggle`,i);break;case`input`:be(i,s),F(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},F(`invalid`,i);break;case`textarea`:Oe(i,s),F(`invalid`,i)}for(var c in Ve(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&F(`scroll`,i)}switch(n){case`input`:ge(i),Ce(i,s,!0);break;case`textarea`:ge(i),Ae(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=je(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,vc(e,t,!1,!1),t.stateNode=e;a:{switch(c=He(n,i),n){case`dialog`:F(`cancel`,e),F(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:F(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ui.length;o++)F(ui[o],e);o=i;break;case`source`:F(`error`,e),o=i;break;case`img`:case`image`:case`link`:F(`error`,e),F(`load`,e),o=i;break;case`details`:F(`toggle`,e),o=i;break;case`input`:be(e,i),o=ye(e,i),F(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=oe({},i,{value:void 0}),F(`invalid`,e);break;case`textarea`:Oe(e,i),o=De(e,i),F(`invalid`,e);break;default:o=i}for(s in Ve(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?ze(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Pe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Fe(e,u):typeof u==`number`&&Fe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&F(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:ge(e),Ce(e,i,!1);break;case`textarea`:ge(e),Ae(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+me(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Ee(e,!!i.multiple,i.defaultValue,!0):Ee(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Sc(t),null;case 6:if(e&&t.stateNode!=null)bc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=wo(Co.current),wo(xo.current),Ba(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ja,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return Sc(t),null;case 13:if($i(ko),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Na&&Ma!==null&&t.mode&1&&!(t.flags&128))Va(),Ha(),t.flags|=98560,s=!1;else if(s=Ba(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else Ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Sc(t),s=!1}else Pa!==null&&(Fl(Pa),Pa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||ko.current&1?ll===0&&(ll=3):Gl())),t.updateQueue!==null&&(t.flags|=4),Sc(t),null);case 4:return Eo(),e===null&&gi(t.stateNode.containerInfo),Sc(t),null;case 10:return no(t.type._context),Sc(t),null;case 17:return oa(t.type)&&sa(),Sc(t),null;case 19:if($i(ko),s=t.memoizedState,s===null)return Sc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)xc(s,!1);else{if(ll!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Ao(e),c!==null){for(t.flags|=128,xc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ea(ko,ko.current&1|2),t.child}e=e.sibling}s.tail!==null&&St()>_l&&(t.flags|=128,i=!0,xc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Ao(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Na)return Sc(t),null}else 2*St()-s.renderingStartTime>_l&&n!==1073741824&&(t.flags|=128,i=!0,xc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(Sc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=St(),t.sibling=null,n=ko.current,ea(ko,i?n&1|2:n&1),t);case 22:case 23:return Vl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?sl&1073741824&&(Sc(t),t.subtreeFlags&6&&(t.flags|=8192)):Sc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function wc(e,t){switch(Aa(t),t.tag){case 1:return oa(t.type)&&sa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Eo(),$i(ra),$i(na),Mo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oo(t),null;case 13:if($i(ko),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $i(ko),null;case 4:return Eo(),null;case 10:return no(t.type._context),null;case 22:case 23:return Vl(),null;case 24:return null;default:return null}}var Tc=!1,Ec=!1,Dc=typeof WeakSet==`function`?WeakSet:Set,I=null;function Oc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){tu(e,t,n)}else n.current=null}function kc(e,t,n){try{n()}catch(n){tu(e,t,n)}}var Ac=!1;function jc(e,t){if(Oi=bn,e=Vr(),Hr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ki={focusedElem:e,selectionRange:n},bn=!1,I=t;I!==null;)if(t=I,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:js(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){tu(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return h=Ac,Ac=!1,h}function Mc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&kc(t,n,a)}i=i.next}while(i!==r)}}function Nc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Fc(e){var t=e.alternate;t!==null&&(e.alternate=null,Fc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ic(e){return e.tag===5||e.tag===3||e.tag===4}function Lc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ic(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(Rc(e,t,n),e=e.sibling;e!==null;)Rc(e,t,n),e=e.sibling}function zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zc(e,t,n),e=e.sibling;e!==null;)zc(e,t,n),e=e.sibling}var Bc=null,Vc=!1;function Hc(e,t,n){for(n=n.child;n!==null;)Uc(e,t,n),n=n.sibling}function Uc(e,t,n){if(At&&typeof At.onCommitFiberUnmount==`function`)try{At.onCommitFiberUnmount(kt,n)}catch{}switch(n.tag){case 5:Ec||Oc(n,t);case 6:var r=Bc,i=Vc;Bc=null,Hc(e,t,n),Bc=r,Vc=i,Bc!==null&&(Vc?(e=Bc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bc.removeChild(n.stateNode));break;case 18:Bc!==null&&(Vc?(e=Bc,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),vn(e)):Ii(Bc,n.stateNode));break;case 4:r=Bc,i=Vc,Bc=n.stateNode.containerInfo,Vc=!0,Hc(e,t,n),Bc=r,Vc=i;break;case 0:case 11:case 14:case 15:if(!Ec&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&kc(n,t,o),i=i.next}while(i!==r)}Hc(e,t,n);break;case 1:if(!Ec&&(Oc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){tu(n,t,e)}Hc(e,t,n);break;case 21:Hc(e,t,n);break;case 22:n.mode&1?(Ec=(r=Ec)||n.memoizedState!==null,Hc(e,t,n),Ec=r):Hc(e,t,n);break;default:Hc(e,t,n)}}function Wc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dc),t.forEach(function(t){var r=au.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Gc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Bc=c.stateNode,Vc=!1;break a;case 3:Bc=c.stateNode.containerInfo,Vc=!0;break a;case 4:Bc=c.stateNode.containerInfo,Vc=!0;break a}c=c.return}if(Bc===null)throw Error(r(160));Uc(o,s,a),Bc=null,Vc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){tu(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Kc(t,e),t=t.sibling}function Kc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gc(t,e),qc(e),i&4){try{Mc(3,e,e.return),Nc(3,e)}catch(t){tu(e,e.return,t)}try{Mc(5,e,e.return)}catch(t){tu(e,e.return,t)}}break;case 1:Gc(t,e),qc(e),i&512&&n!==null&&Oc(n,n.return);break;case 5:if(Gc(t,e),qc(e),i&512&&n!==null&&Oc(n,n.return),e.flags&32){var a=e.stateNode;try{Fe(a,``)}catch(t){tu(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&xe(a,o),He(c,s);var u=He(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ze(a,f):d===`dangerouslySetInnerHTML`?Pe(a,f):d===`children`?Fe(a,f):S(a,d,f,u)}switch(c){case`input`:Se(a,o);break;case`textarea`:ke(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Ee(a,!!o.multiple,o.multiple?[]:``,!1):Ee(a,!!o.multiple,o.defaultValue,!0)):Ee(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){tu(e,e.return,t)}}break;case 6:if(Gc(t,e),qc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){tu(e,e.return,t)}}break;case 3:if(Gc(t,e),qc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{vn(t.containerInfo)}catch(t){tu(e,e.return,t)}break;case 4:Gc(t,e),qc(e);break;case 13:Gc(t,e),qc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(gl=St())),i&4&&Wc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ec=(u=Ec)||d,Gc(t,e),Ec=u):Gc(t,e),qc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(I=e,d=e.child;d!==null;){for(f=I=d;I!==null;){switch(p=I,m=p.child,p.tag){case 0:case 11:case 14:case 15:Mc(4,p,p.return);break;case 1:Oc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){tu(i,n,e)}}break;case 5:Oc(p,p.return);break;case 22:if(p.memoizedState!==null){Zc(f);continue}}m===null?Zc(f):(m.return=p,I=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Re(`display`,s))}catch(t){tu(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){tu(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Gc(t,e),qc(e),i&4&&Wc(e);break;case 21:break;default:Gc(t,e),qc(e)}}function qc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Ic(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Fe(a,``),i.flags&=-33),zc(e,Lc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Rc(e,Lc(e),o);break;default:throw Error(r(161))}}catch(t){tu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Jc(e,t,n){I=e,Yc(e,t,n)}function Yc(e,t,n){for(var r=(e.mode&1)!=0;I!==null;){var i=I,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Tc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Ec;s=Tc;var l=Ec;if(Tc=o,(Ec=c)&&!l)for(I=i;I!==null;)o=I,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Qc(i):(c.return=o,I=c);for(;a!==null;)I=a,Yc(a,t,n),a=a.sibling;I=i,Tc=s,Ec=l}Xc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,I=a):Xc(e,t,n)}}function Xc(e){for(;I!==null;){var t=I;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ec||Nc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ec)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:js(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&yo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}yo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&vn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ec||t.flags&512&&Pc(t)}catch(e){tu(t,t.return,e)}}if(t===e){I=null;break}if(n=t.sibling,n!==null){n.return=t.return,I=n;break}I=t.return}}function Zc(e){for(;I!==null;){var t=I;if(t===e){I=null;break}var n=t.sibling;if(n!==null){n.return=t.return,I=n;break}I=t.return}}function Qc(e){for(;I!==null;){var t=I;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Nc(4,t)}catch(e){tu(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){tu(t,i,e)}}var a=t.return;try{Pc(t)}catch(e){tu(t,a,e)}break;case 5:var o=t.return;try{Pc(t)}catch(e){tu(t,o,e)}}}catch(e){tu(t,t.return,e)}if(t===e){I=null;break}var s=t.sibling;if(s!==null){s.return=t.return,I=s;break}I=t.return}}var $c=Math.ceil,el=C.ReactCurrentDispatcher,tl=C.ReactCurrentOwner,nl=C.ReactCurrentBatchConfig,rl=0,il=null,al=null,ol=0,sl=0,cl=Qi(0),ll=0,ul=null,dl=0,fl=0,pl=0,ml=null,hl=null,gl=0,_l=1/0,vl=null,yl=!1,bl=null,xl=null,Sl=!1,Cl=null,wl=0,Tl=0,El=null,Dl=-1,Ol=0;function kl(){return rl&6?St():Dl===-1?Dl=St():Dl}function Al(e){return e.mode&1?rl&2&&ol!==0?ol&-ol:Wa.transition===null?(e=Jt,e===0?(e=window.event,e=e===void 0?16:En(e.type),e):e):(Ol===0&&(Ol=Ut()),Ol):1}function jl(e,t,n,i){if(50<Tl)throw Tl=0,El=null,Error(r(185));Gt(e,n,i),(!(rl&2)||e!==il)&&(e===il&&(!(rl&2)&&(fl|=n),ll===4&&Ll(e,ol)),Ml(e,i),n===1&&rl===0&&!(t.mode&1)&&(_l=St()+500,pa&&_a()))}function Ml(e,t){var n=e.callbackNode;Vt(e,t);var r=zt(e,e===il?ol:0);if(r===0)n!==null&&yt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yt(n),t===1)e.tag===0?ga(Rl.bind(null,e)):ha(Rl.bind(null,e)),Pi(function(){!(rl&6)&&_a()}),n=null;else{switch(Yt(r)){case 1:n=wt;break;case 4:n=Tt;break;case 16:n=Et;break;case 536870912:n=Ot;break;default:n=Et}n=su(n,Nl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Nl(e,t){if(Dl=-1,Ol=0,rl&6)throw Error(r(327));var n=e.callbackNode;if($l()&&e.callbackNode!==n)return null;var i=zt(e,e===il?ol:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Kl(e,i);else{t=i;var a=rl;rl|=2;var o=Wl();(il!==e||ol!==t)&&(vl=null,_l=St()+500,Hl(e,t));do try{Jl();break}catch(t){Ul(e,t)}while(1);to(),el.current=o,rl=a,al===null?(il=null,ol=0,t=ll):t=0}if(t!==0){if(t===2&&(a=Ht(e),a!==0&&(i=a,t=Pl(e,a))),t===1)throw n=ul,Hl(e,0),Ll(e,i),Ml(e,St()),n;if(t===6)Ll(e,i);else{if(a=e.current.alternate,!(i&30)&&!Il(a)&&(t=Kl(e,i),t===2&&(o=Ht(e),o!==0&&(i=o,t=Pl(e,o))),t===1))throw n=ul,Hl(e,0),Ll(e,i),Ml(e,St()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Zl(e,hl,vl);break;case 3:if(Ll(e,i),(i&130023424)===i&&(t=gl+500-St(),10<t)){if(zt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){kl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(Zl.bind(null,e,hl,vl),t);break}Zl(e,hl,vl);break;case 4:if(Ll(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Mt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=St()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*$c(i/1960))-i,10<i){e.timeoutHandle=ji(Zl.bind(null,e,hl,vl),i);break}Zl(e,hl,vl);break;case 5:Zl(e,hl,vl);break;default:throw Error(r(329))}}}return Ml(e,St()),e.callbackNode===n?Nl.bind(null,e):null}function Pl(e,t){var n=ml;return e.current.memoizedState.isDehydrated&&(Hl(e,t).flags|=256),e=Kl(e,t),e!==2&&(t=hl,hl=n,t!==null&&Fl(t)),e}function Fl(e){hl===null?hl=e:hl.push.apply(hl,e)}function Il(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ir(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ll(e,t){for(t&=~pl,t&=~fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function Rl(e){if(rl&6)throw Error(r(327));$l();var t=zt(e,0);if(!(t&1))return Ml(e,St()),null;var n=Kl(e,t);if(e.tag!==0&&n===2){var i=Ht(e);i!==0&&(t=i,n=Pl(e,i))}if(n===1)throw n=ul,Hl(e,0),Ll(e,t),Ml(e,St()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Zl(e,hl,vl),Ml(e,St()),null}function zl(e,t){var n=rl;rl|=1;try{return e(t)}finally{rl=n,rl===0&&(_l=St()+500,pa&&_a())}}function Bl(e){Cl!==null&&Cl.tag===0&&!(rl&6)&&$l();var t=rl;rl|=1;var n=nl.transition,r=Jt;try{if(nl.transition=null,Jt=1,e)return e()}finally{Jt=r,nl.transition=n,rl=t,!(rl&6)&&_a()}}function Vl(){sl=cl.current,$i(cl)}function Hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),al!==null)for(n=al.return;n!==null;){var r=n;switch(Aa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sa();break;case 3:Eo(),$i(ra),$i(na),Mo();break;case 5:Oo(r);break;case 4:Eo();break;case 13:$i(ko);break;case 19:$i(ko);break;case 10:no(r.type._context);break;case 22:case 23:Vl()}n=n.return}if(il=e,al=e=fu(e.current,null),ol=sl=t,ll=0,ul=null,pl=fl=dl=0,hl=ml=null,oo!==null){for(t=0;t<oo.length;t++)if(n=oo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}oo=null}return e}function Ul(e,t){do{var n=al;try{if(to(),No.current=Ds,zo){for(var i=Io.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}zo=!1}if(Fo=0,Ro=Lo=Io=null,Bo=!1,Vo=0,tl.current=null,n===null||n.return===null){ll=1,ul=t,al=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=ol,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Gs(s);if(m!==null){m.flags&=-257,Ks(m,s,c,o,t),m.mode&1&&Ws(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Ws(o,u,t),Gl();break a}l=Error(r(426))}}else if(Na&&c.mode&1){var _=Gs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ks(_,s,c,o,t),Ua(Rs(l,c));break a}}o=l=Rs(l,c),ll!==4&&(ll=2),ml===null?ml=[o]:ml.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Hs(o,l,t);_o(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(xl===null||!xl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Us(o,c,t);_o(o,x);break a}}o=o.return}while(o!==null)}Xl(n)}catch(e){t=e,al===n&&n!==null&&(al=n=n.return);continue}break}while(1)}function Wl(){var e=el.current;return el.current=Ds,e===null?Ds:e}function Gl(){(ll===0||ll===3||ll===2)&&(ll=4),il===null||!(dl&268435455)&&!(fl&268435455)||Ll(il,ol)}function Kl(e,t){var n=rl;rl|=2;var i=Wl();(il!==e||ol!==t)&&(vl=null,Hl(e,t));do try{ql();break}catch(t){Ul(e,t)}while(1);if(to(),rl=n,el.current=i,al!==null)throw Error(r(261));return il=null,ol=0,ll}function ql(){for(;al!==null;)Yl(al)}function Jl(){for(;al!==null&&!bt();)Yl(al)}function Yl(e){var t=ou(e.alternate,e,sl);e.memoizedProps=e.pendingProps,t===null?Xl(e):al=t,tl.current=null}function Xl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=wc(n,t),n!==null){n.flags&=32767,al=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ll=6,al=null;return}}else if(n=Cc(n,t,sl),n!==null){al=n;return}if(t=t.sibling,t!==null){al=t;return}al=t=e}while(t!==null);ll===0&&(ll=5)}function Zl(e,t,n){var r=Jt,i=nl.transition;try{nl.transition=null,Jt=1,Ql(e,t,n,r)}finally{nl.transition=i,Jt=r}return null}function Ql(e,t,n,i){do $l();while(Cl!==null);if(rl&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Kt(e,o),e===il&&(al=il=null,ol=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sl||(Sl=!0,su(Et,function(){return $l(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=nl.transition,nl.transition=null;var s=Jt;Jt=1;var c=rl;rl|=4,tl.current=null,jc(e,n),Kc(n,e),Ur(ki),bn=!!Oi,ki=Oi=null,e.current=n,Jc(n,e,a),xt(),rl=c,Jt=s,nl.transition=o}else e.current=n;if(Sl&&(Sl=!1,Cl=e,wl=a),o=e.pendingLanes,o===0&&(xl=null),jt(n.stateNode,i),Ml(e,St()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(yl)throw yl=!1,e=bl,bl=null,e;return wl&1&&e.tag!==0&&$l(),o=e.pendingLanes,o&1?e===El?Tl++:(Tl=0,El=e):Tl=0,_a(),null}function $l(){if(Cl!==null){var e=Yt(wl),t=nl.transition,n=Jt;try{if(nl.transition=null,Jt=16>e?16:e,Cl===null)var i=!1;else{if(e=Cl,Cl=null,wl=0,rl&6)throw Error(r(331));var a=rl;for(rl|=4,I=e.current;I!==null;){var o=I,s=o.child;if(I.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(I=u;I!==null;){var d=I;switch(d.tag){case 0:case 11:case 15:Mc(8,d,o)}var f=d.child;if(f!==null)f.return=d,I=f;else for(;I!==null;){d=I;var p=d.sibling,m=d.return;if(Fc(d),d===u){I=null;break}if(p!==null){p.return=m,I=p;break}I=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}I=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,I=s;else b:for(;I!==null;){if(o=I,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Mc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,I=v;break b}I=o.return}}var y=e.current;for(I=y;I!==null;){s=I;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,I=b;else b:for(s=y;I!==null;){if(c=I,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Nc(9,c)}}catch(e){tu(c,c.return,e)}if(c===s){I=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,I=x;break b}I=c.return}}if(rl=a,_a(),At&&typeof At.onPostCommitFiberRoot==`function`)try{At.onPostCommitFiberRoot(kt,e)}catch{}i=!0}return i}finally{Jt=n,nl.transition=t}}return!1}function eu(e,t,n){t=Rs(n,t),t=Hs(e,t,1),e=ho(e,t,1),t=kl(),e!==null&&(Gt(e,1,t),Ml(e,t))}function tu(e,t,n){if(e.tag===3)eu(e,e,n);else for(;t!==null;){if(t.tag===3){eu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xl===null||!xl.has(r))){e=Rs(n,e),e=Us(t,e,1),t=ho(t,e,1),e=kl(),t!==null&&(Gt(t,1,e),Ml(t,e));break}}t=t.return}}function nu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=kl(),e.pingedLanes|=e.suspendedLanes&n,il===e&&(ol&n)===n&&(ll===4||ll===3&&(ol&130023424)===ol&&500>St()-gl?Hl(e,0):pl|=n),Ml(e,t)}function ru(e,t){t===0&&(e.mode&1?(t=Lt,Lt<<=1,!(Lt&130023424)&&(Lt=4194304)):t=1);var n=kl();e=lo(e,t),e!==null&&(Gt(e,t,n),Ml(e,n))}function iu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ru(e,n)}function au(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),ru(e,n)}var ou=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ra.current)Js=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Js=!1,_c(e,t,n);Js=!!(e.flags&131072)}else Js=!1,Na&&t.flags&1048576&&Oa(t,xa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;hc(e,t),e=t.pendingProps;var a=aa(t,na.current);io(t,n),a=Go(null,t,i,e,a,n);var o=Ko();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,oa(i)?(o=!0,ua(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,fo(t),a.updater=Ns,t.stateNode=a,a._reactInternals=t,Ls(t,i,e,n),t=rc(null,t,i,!0,o,n)):(t.tag=0,Na&&o&&ka(t),Ys(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(hc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=du(i),e=js(i,e),a){case 0:t=tc(null,t,i,e,n);break a;case 1:t=nc(null,t,i,e,n);break a;case 11:t=Xs(null,t,i,e,n);break a;case 14:t=Zs(null,t,i,js(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:js(i,a),tc(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:js(i,a),nc(e,t,i,a,n);case 3:a:{if(ic(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,po(e,t),vo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Rs(Error(r(423)),t),t=ac(e,t,i,n,a);break a}else if(i!==a){a=Rs(Error(r(424)),t),t=ac(e,t,i,n,a);break a}else for(Ma=Li(t.stateNode.containerInfo.firstChild),ja=t,Na=!0,Pa=null,n=Xa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ha(),i===a){t=gc(e,t,n);break a}Ys(e,t,i,n)}t=t.child}return t;case 5:return Do(t),e===null&&Ra(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),ec(e,t),Ys(e,t,s,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return cc(e,t,n);case 4:return To(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ya(t,null,i,n):Ys(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:js(i,a),Xs(e,t,i,a,n);case 7:return Ys(e,t,t.pendingProps,n),t.child;case 8:return Ys(e,t,t.pendingProps.children,n),t.child;case 12:return Ys(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,ea(Za,i._currentValue),i._currentValue=s,o!==null)if(Ir(o.value,s)){if(o.children===a.children&&!ra.current){t=gc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=mo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ro(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ro(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ys(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,io(t,n),a=ao(a),i=i(a),t.flags|=1,Ys(e,t,i,n),t.child;case 14:return i=t.type,a=js(i,t.pendingProps),a=js(i.type,a),Zs(e,t,i,a,n);case 15:return Qs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:js(i,a),hc(e,t),t.tag=1,oa(i)?(e=!0,ua(t)):e=!1,io(t,n),Fs(t,i,a),Ls(t,i,a,n),rc(null,t,i,!0,e,n);case 19:return mc(e,t,n);case 22:return $s(e,t,n)}throw Error(r(156,t.tag))};function su(e,t){return vt(e,t)}function cu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lu(e,t,n,r){return new cu(e,t,n,r)}function uu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function du(e){if(typeof e==`function`)return+!!uu(e);if(e!=null){if(e=e.$$typeof,e===A)return 11;if(e===j)return 14}return 2}function fu(e,t){var n=e.alternate;return n===null?(n=lu(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)uu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return mu(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=lu(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case te:return e=lu(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=lu(19,n,t,a),e.elementType=ne,e.lanes=o,e;case M:return hu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ee:s=10;break a;case k:s=9;break a;case A:s=11;break a;case j:s=14;break a;case re:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=lu(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function mu(e,t,n,r){return e=lu(7,e,r,t),e.lanes=n,e}function hu(e,t,n,r){return e=lu(22,e,r,t),e.elementType=M,e.lanes=n,e.stateNode={isHidden:!1},e}function gu(e,t,n){return e=lu(6,e,null,t),e.lanes=n,e}function _u(e,t,n){return t=lu(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wt(0),this.expirationTimes=Wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yu(e,t,n,r,i,a,o,s,c){return e=new vu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=lu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fo(a),e}function bu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function xu(e){if(!e)return ta;e=e._reactInternals;
vendor: 4,418 bytes, line 8
8a:{if(ft(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(oa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(oa(n))return la(e,n,t)}return t}function Su(e,t,n,r,i,a,o,s,c){return e=yu(n,r,!0,e,i,a,o,s,c),e.context=xu(null),n=e.current,r=kl(),i=Al(n),a=mo(r,i),a.callback=t??null,ho(n,a,i),e.current.lanes=i,Gt(e,i,r),Ml(e,r),e}function Cu(e,t,n,r){var i=t.current,a=kl(),o=Al(i);return n=xu(n),t.context===null?t.context=n:t.pendingContext=n,t=mo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ho(i,t,o),e!==null&&(jl(e,i,o,a),go(e,i,o)),o}function wu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Tu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Eu(e,t){Tu(e,t),(e=e.alternate)&&Tu(e,t)}function Du(){return null}var Ou=typeof reportError==`function`?reportError:function(e){console.error(e)};function ku(e){this._internalRoot=e}Au.prototype.render=ku.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Cu(e,t,null,null)},Au.prototype.unmount=ku.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bl(function(){Cu(null,e,null,null)}),t[Hi]=null}};function Au(e){this._internalRoot=e}Au.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cn.length&&t!==0&&t<cn[n].priority;n++);cn.splice(n,0,e),n===0&&pn(e)}};function ju(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Nu(){}function Pu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=wu(o);a.call(e)}}var o=Su(t,r,e,0,null,!1,!1,``,Nu);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),Bl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=wu(c);s.call(e)}}var c=yu(e,0,!1,null,null,!1,!1,``,Nu);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),Bl(function(){Cu(t,c,n,r)}),c}function Fu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=wu(o);s.call(e)}}Cu(t,o,e,i)}else o=Pu(n,t,e,i,r);return wu(o)}Xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rt(t.pendingLanes);n!==0&&(qt(t,n|1),Ml(t,St()),!(rl&6)&&(_l=St()+500,_a()))}break;case 13:Bl(function(){var t=lo(e,1);t!==null&&jl(t,e,1,kl())}),Eu(e,1)}},P=function(e){if(e.tag===13){var t=lo(e,134217728);t!==null&&jl(t,e,134217728,kl()),Eu(e,134217728)}},Zt=function(e){if(e.tag===13){var t=Al(e),n=lo(e,t);n!==null&&jl(n,e,t,kl()),Eu(e,t)}},Qt=function(){return Jt},$t=function(e,t){var n=Jt;try{return Jt=e,t()}finally{Jt=n}},Ge=function(e,t,n){switch(t){case`input`:if(Se(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));_e(i),Se(i,a)}}}break;case`textarea`:ke(e,n);break;case`select`:t=n.value,t!=null&&Ee(e,!!n.multiple,t,!1)}},Ze=zl,Qe=Bl;var Iu={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Ye,Xe,zl]},Lu={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Ru={bundleType:Lu.bundleType,version:Lu.version,rendererPackageName:Lu.rendererPackageName,rendererConfig:Lu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gt(e),e===null?null:e.stateNode},findFiberByHostInstance:Lu.findFiberByHostInstance||Du,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};
8if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{kt=zu.inject(Ru),At=zu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Iu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ju(t))throw Error(r(200));return bu(e,t,null,n)},e.createRoot=function(e,t){if(!ju(e))throw Error(r(299));var n=!1,i=``,a=Ou;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=yu(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new ku(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=gt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Bl(e)},e.hydrate=function(e,t,n){if(!Mu(t))throw Error(r(200));return Fu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!ju(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Ou;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Su(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Au(t)},e.render=function(e,t,n){if(!Mu(t))throw Error(r(200));return Fu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Mu(e))throw Error(r(40));return e._reactRootContainer?(Bl(function(){Fu(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=zl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Mu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Fu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=h();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}))(),_=l(d()),v=1,y=1e6,b=0;function x(){return b=(b+1)%(2**53-1),b.toString()}var S=new Map,C=e=>{if(S.has(e))return;let t=setTimeout(()=>{S.delete(e),D({type:`REMOVE_TOAST`,toastId:e})},y);S.set(e,t)},w=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,v)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?C(n):e.toasts.forEach(e=>{C(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},T=[],E={toasts:[]};function D(e){E=w(E,e),T.forEach(e=>{e(E)})}function O({...e}){let t=x(),n=e=>D({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>D({type:`DISMISS_TOAST`,toastId:t});return D({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function ee(){let[e,t]=_.useState(E);return _.useEffect(()=>(T.push(t),()=>{let e=T.indexOf(t);e>-1&&T.splice(e,1)}),[e]),{...e,toast:O,dismiss:e=>D({type:`DISMISS_TOAST`,toastId:e})}}var k=l(h(),1);function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function te(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function ne(...e){return t=>e.forEach(e=>te(e,t))}function j(...e){return _.useCallback(ne(...e),e)}var re=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),M=o(((e,t)=>{t.exports=re()}))();function ie(e,t=[]){let n=[];function r(t,r){let i=_.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=_.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})}function s(n,o){let s=o?.[e][a]||i,c=_.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>_.createContext(e));return function(n){let r=n?.[e]||t;return _.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ae(i,...t)]}function ae(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var oe=_.forwardRef((e,t)=>
8{let{children:n,...r}=e,i=_.Children.toArray(n),a=i.find(le);if(a){let e=a.props.children,n=i.map(t=>t===a?_.Children.count(e)>1?_.Children.only(null):_.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(se,{...r,ref:t,children:_.isValidElement(e)?_.cloneElement(e,void 0,n):null})}return(0,M.jsx)(se,{...r,ref:t,children:n})});oe.displayName=`Slot`;var se=_.forwardRef((e,t)=>{let{children:n,...r}=e;if(_.isValidElement(n)){let e=de(n);return _.cloneElement(n,{...ue(r,n.props),ref:t?ne(t,e):e})}return _.Children.count(n)>1?_.Children.only(null):null});se.displayName=`SlotClone`;var ce=({children:e})=>(0,M.jsx)(M.Fragment,{children:e});function le(e){return _.isValidElement(e)&&e.type===ce}function ue(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function de(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function fe(e){let t=e+`CollectionProvider`,[n,r]=ie(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=_.useRef(null),a=_.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=_.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(oe,{ref:j(t,a(s,n).collectionRef),children:r})});c.displayName=s;let l=e+`CollectionItemSlot`,u=`data-radix-collection-item`,d=_.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=_.useRef(null),s=j(t,o),c=a(l,n);return _.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(oe,{[u]:``,ref:s,children:r})});d.displayName=l;function f(t){let n=a(e+`CollectionConsumer`,t);return _.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:c,ItemSlot:d},f,r]}function pe(e,t){let n=_.createContext(t),r=e=>{let{children:t,...r}=e,i=_.useMemo(()=>r,Object.values(r));return(0,M.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=_.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function me(e,t=[]){let n=[];function r(t,r){let i=_.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=_.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=_.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>_.createContext(e));return function(n){let r=n?.[e]||t;return _.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,he(i,...t)]}function he(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var N=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=_.forwardRef((e,n)=>{let{asChild:r,...i}=e,a=r?oe:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ge(e,t){e&&k.flushSync(()=>e.dispatchEvent(t))}function _e(e){let t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...e)=>t.current?.(...e),[])}function ve(e,t=globalThis?.document){let n=_e(e);_.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};
vendor: 4,102 bytes, line 8
8return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ye=`DismissableLayer`,be=`dismissableLayer.update`,xe=`dismissableLayer.pointerDownOutside`,Se=`dismissableLayer.focusOutside`,Ce,we=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Te=_.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=_.useContext(we),[u,d]=_.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=_.useState({}),m=j(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),y=u?h.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=Oe(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=ke(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ve(e=>{y===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),_.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ce=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ae(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ce)}},[u,f,n,l]),_.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ae())},[u,l]),_.useEffect(()=>{let e=()=>p({});return document.addEventListener(be,e),()=>document.removeEventListener(be,e)},[]),(0,M.jsx)(N.div,{...c,ref:m,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:A(e.onFocusCapture,C.onFocusCapture),onBlurCapture:A(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,S.onPointerDownCapture)})});Te.displayName=ye;var Ee=`DismissableLayerBranch`,De=_.forwardRef((e,t)=>{let n=_.useContext(we),r=_.useRef(null),i=j(t,r);return _.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,M.jsx)(N.div,{...e,ref:i})});De.displayName=Ee;function Oe(e,t=globalThis?.document){let n=_e(e),r=_.useRef(!1),i=_.useRef(()=>{});return _.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){je(xe,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ke(e,t=globalThis?.document){let n=_e(e),r=_.useRef(!1);return _.useEffect(()=>{let e=e=>{e.target&&!r.current&&je(Se,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ae(){let e=new CustomEvent(be);document.dispatchEvent(e)}function je(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ge(i,a):i.dispatchEvent(a)}var Me=Te,Ne=De,Pe=globalThis?.document?_.useLayoutEffect:()=>{},Fe=`Portal`,Ie=_.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=_.useState(!1);Pe(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?k.createPortal((0,M.jsx)(N.div,{...r,ref:t}),o):null});Ie.displayName=Fe;function Le(e,t){return _.useReducer((e,n)=>t[e][n]??e,e)}var Re=e=>{let{present:t,children:n}=e,r=ze(t),i=typeof n==`function`?n({present:r.isPresent}):_.Children.only(n),a=j(r.ref,Ve(i));return typeof n==`function`||r.isPresent?_.cloneElement(i,{ref:a}):null};Re.displayName=`Presence`;function ze(e){let[t,n]=_.useState(),r=_.useRef({}),i=_.useRef(e),a=_.useRef(`none`),[o,s]=Le(e?`mounted`:`unmounted`,{mou
8nted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return _.useEffect(()=>{let e=Be(r.current);a.current=o===`mounted`?e:`none`},[o]),Pe(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Be(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Pe(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Be(r.current).includes(a.animationName);if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Be(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:_.useCallback(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function Be(e){return e?.animationName||`none`}function Ve(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function He({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=Ue({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=_e(n);return[o,_.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function Ue({defaultProp:e,onChange:t}){let n=_.useState(e),[r]=n,i=_.useRef(r),a=_e(t);return _.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var We=`VisuallyHidden`,Ge=_.forwardRef((e,t)=>(0,M.jsx)(N.span,{...e,ref:t,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`,...e.style}}));Ge.displayName=We;var Ke=Ge,qe=`ToastProvider`,[Je,Ye,Xe]=fe(`Toast`),[Ze,Qe]=me(`Toast`,[Xe]),[$e,et]=Ze(qe),tt=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=_.useState(null),[l,u]=_.useState(0),d=_.useRef(!1),f=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${qe}\`. Expected non-empty \`string\`.`),(0,M.jsx)(Je.Provider,{scope:t,children:(0,M.jsx)($e,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:_.useCallback(()=>u(e=>e+1),[]),onToastRemove:_.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};tt.displayName=qe;var nt=`ToastViewport`,rt=[`F8`],it=`toast.viewportPause`,at=`toast.viewportResume`,ot=_.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=rt,label:i=`Notifications ({hotkey})`,...a}=e,o=et(nt,n),s=Ye(n),c=_.useRef(null),l=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=j(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;_.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),_.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(it);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(at);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=_.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Nt(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return _.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Pt(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};
vendor: 5,553 bytes, line 8
8return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,M.jsxs)(Ne,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,M.jsx)(ct,{ref:l,onFocusFromOutsideViewport:()=>{Pt(h({tabbingDirection:`forwards`}))}}),(0,M.jsx)(Je.Slot,{scope:n,children:(0,M.jsx)(N.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,M.jsx)(ct,{ref:u,onFocusFromOutsideViewport:()=>{Pt(h({tabbingDirection:`backwards`}))}})]})});ot.displayName=nt;var st=`ToastFocusProxy`,ct=_.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=et(st,n);return(0,M.jsx)(Ge,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});ct.displayName=st;var lt=`Toast`,ut=`toast.swipeStart`,dt=`toast.swipeMove`,ft=`toast.swipeCancel`,pt=`toast.swipeEnd`,mt=_.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s=!0,c]=He({prop:r,defaultProp:i,onChange:a});return(0,M.jsx)(Re,{present:n||s,children:(0,M.jsx)(_t,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:_e(e.onPause),onResume:_e(e.onResume),onSwipeStart:A(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:A(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:A(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:A(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});mt.displayName=lt;var[ht,gt]=Ze(lt,{onClose(){}}),_t=_.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=et(lt,n),[g,v]=_.useState(null),y=j(t,e=>v(e)),b=_.useRef(null),x=_.useRef(null),S=i||h.duration,C=_.useRef(0),w=_.useRef(S),T=_.useRef(0),{onToastAdd:E,onToastRemove:D}=h,O=_e(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),ee=_.useCallback(e=>{!e||e===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(O,e))},[O]);_.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{ee(w.current),l?.()},n=()=>{let e=new Date().getTime()-C.current;w.current-=e,window.clearTimeout(T.current),c?.()};return e.addEventListener(it,n),e.addEventListener(at,t),()=>{e.removeEventListener(it,n),e.removeEventListener(at,t)}}},[h.viewport,S,c,l,ee]),_.useEffect(()=>{a&&!h.isClosePausedRef.current&&ee(S)},[a,S,h.isClosePausedRef,ee]),_.useEffect(()=>(E(),()=>D()),[E,D]);let te=_.useMemo(()=>g?Ot(g):null,[g]);return h.viewport?(0,M.jsxs)(M.Fragment,{children:[te&&(0,M.jsx)(vt,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,"aria-atomic":!0,children:te}),(0,M.jsx)(ht,{scope:n,onClose:O,children:k.createPortal((0,M.jsx)(Je.ItemSlot,{scope:n,children:(0,M.jsx)(Me,{asChild:!0,onEscapeKeyDown:A(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||O(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,M.jsx)(N.li,{role:`status`,"aria-live":`off`,"aria-atomic":!0,tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:A(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:A(e.onPointerDown,e=>{e.button===0&&(b.current={x:e.clientX,y:e.clientY})}),onPointerMove:A(e.onPointerMove,e=>{if(!b.current)return;let t=e.clientX-b.current.x,n=e.clientY-b.current.y,r=!!x.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(x.current=l,kt(dt,d,f,{discrete:!1})):At(l,h.swipeDirection,c)?(x.current=l,kt(ut,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(b.current=null)}),onPointerUp:A(e.onPointerUp,e=>{let t=x.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),x.current=null,b.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};At(t,h.swipeDirection,h.swipeThreshold)?kt(pt,p,r,{discrete:!0}):kt(ft,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),vt=e=>{let{__scopeToast:t,children:n,...r}=e,i=et(lt,t),[a,o]=_.useState(!1),[s,c]=_.useState(!1);return jt(()=>o(!0)),_.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,M.jsx)(Ie,{asChild:!0,children:(0,M.jsx)(Ge,{...r,children:a&&(0,M.jsxs)(M.Fragment,{children:[i.label,` `,n]})})})},yt=`ToastTitle`,bt=_.forwardRef((e,t)=>
8{let{__scopeToast:n,...r}=e;return(0,M.jsx)(N.div,{...r,ref:t})});bt.displayName=yt;var xt=`ToastDescription`,St=_.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,M.jsx)(N.div,{...r,ref:t})});St.displayName=xt;var Ct=`ToastAction`,wt=_.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,M.jsx)(Dt,{altText:n,asChild:!0,children:(0,M.jsx)(Et,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ct}\`. Expected non-empty \`string\`.`),null)});wt.displayName=Ct;var Tt=`ToastClose`,Et=_.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=gt(Tt,n);return(0,M.jsx)(Dt,{asChild:!0,children:(0,M.jsx)(N.button,{type:`button`,...r,ref:t,onClick:A(e.onClick,i.onClose)})})});Et.displayName=Tt;var Dt=_.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,M.jsx)(N.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ot(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Mt(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ot(e))}}),t}function kt(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ge(i,a):i.dispatchEvent(a)}var At=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function jt(e=()=>{}){let t=_e(e);Pe(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Mt(e){return e.nodeType===e.ELEMENT_NODE}function Nt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pt(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var Ft=tt,It=ot,Lt=mt,Rt=bt,zt=St,Bt=wt,Vt=Et;function Ht(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ht(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ut(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ht(e))&&(r&&(r+=` `),r+=t);return r}var Wt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Gt=Ut,Kt=(e,t)=>n=>{if(t?.variants==null)return Gt(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Wt(t)||Wt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Gt(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},qt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Jt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Yt={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`},Xt=(0,_.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,_.createElement)(`svg`,{ref:c,...Yt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jt(`lucide`,i),...s},[...o.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(a)?a:[a]])),P=(e,t)=>{let n=(0,_.forwardRef)(({className:n,...r},i)=>(0,_.createElement)(Xt,{ref:i,iconNode:t,className:Jt(`lucide-${qt(e)}`,n),...r}));return n.displayName=`${e}`,n},Zt=P(`ArrowDown`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Qt=P(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),$t=P(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),en=P(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),tn=P(`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`}]]),nn=P(`Building2`,[[`path`,{d:`M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z`,key:`1b4qmf`}],[`path`,{d:`M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2`,key:`i71pzd`}],[`path`,{d:`M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2`,key:`10jefs`}],[`path`,{d:`M10 6h4`,key:`1itunk`}],[`path`,{d:`M10 10h4`,key:`tcdvrf`}],[`path`,{d:`M10 14h4`,key:`kelpxr`}],[`path`,{d:`M10 18h4`,key:`1ulq68`}]]),rn=P(`CalendarClock`,[[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M17.5 17.5 16 16.3V14`,key:`akvzfd`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),an=P(`CalendarDays`,[[`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`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),on=P(`CalendarPlus`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8`,key:`3spt84`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M16 19h6`,key:`xwg31i`}],[`path`,{d:`M19 16v6`,key:`tddt3s`}]]),sn=P(`CalendarRange`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M17 14h-6`,key:`bkmgh3`}],[`path`,{d:`M13 18H7`,key:`bb0bb7`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M17 18h.01`,key:`1bdyru`}]]),cn=P(`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`}]]),ln=P(`Car`,[[`path`,{d:`M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2`,key:`5owen`}],[`circle`,{cx:`7`,cy:`17`,r:`2`,key:`u2ysq9`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}],[`circle`,{cx:`17`,cy:`17`,r:`2`,key:`axvx0g`}
8]]),un=P(`ChartNoAxesColumnIncreasing`,[[`line`,{x1:`12`,x2:`12`,y1:`20`,y2:`10`,key:`1vz5eb`}],[`line`,{x1:`18`,x2:`18`,y1:`20`,y2:`4`,key:`cun8e5`}],[`line`,{x1:`6`,x2:`6`,y1:`20`,y2:`16`,key:`hq0ia6`}]]),dn=P(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),fn=P(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),pn=P(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),mn=P(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),hn=P(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),gn=P(`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`}]]),_n=P(`CircleCheckBig`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),vn=P(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),yn=P(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),bn=P(`Circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),xn=P(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),Sn=P(`CreditCard`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),Cn=P(`Crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),wn=P(`DollarSign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),Tn=P(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),En=P(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Dn=P(`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`}]]),On=P(`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`}]]),kn=P(`Facebook`,[[`path`,{d:`M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z`,key:`1jg4f8`}]]),An=P(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),jn=P(`Flag`,[[`path`,{d:`M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z`,key:`i9b6wo`}],[`line`,{x1:`4`,x2:`4`,y1:`22`,y2:`15`,key:`1cm3nv`}]]),Mn=P(`Footprints`,[[`path`,{d:`M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z`,key:`1dudjm`}],[`path`,{d:`M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z`,key:`l2t8xc`}],[`path`,{d:`M16 17h4`,key:`1dejxt`}],[`path`,{d:`M4 13h4`,key:`1bwh8b`}]]),Nn=P(`HeartHandshake`,[[`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:`M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66`,key:`4oyue0`}],[`path`,{d:`m18 15-2-2`,key:`60u0ii`}],[`path`,{d:`m15 18-2-2`,key:`6p76be`}]]),Pn=P(`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`}]]),Fn=P(`History`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),In=P(`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`}]]),Ln=P(`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`}]]),Rn=P(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}
8]]),zn=P(`Instagram`,[[`rect`,{width:`20`,height:`20`,x:`2`,y:`2`,rx:`5`,ry:`5`,key:`2e1cvw`}],[`path`,{d:`M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z`,key:`9exkf1`}],[`line`,{x1:`17.5`,x2:`17.51`,y1:`6.5`,y2:`6.5`,key:`r4j83e`}]]),Bn=P(`ListChecks`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),Vn=P(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Hn=P(`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`}]]),Un=P(`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`}]]),Wn=P(`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`}]]),Gn=P(`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`}]]),Kn=P(`Mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),qn=P(`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`}]]),Jn=P(`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`}]]),Yn=P(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Xn=P(`Repeat`,[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]),Zn=P(`Ruler`,[[`path`,{d:`M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z`,key:`icamh8`}],[`path`,{d:`m14.5 12.5 2-2`,key:`inckbg`}],[`path`,{d:`m11.5 9.5 2-2`,key:`fmmyf7`}],[`path`,{d:`m8.5 6.5 2-2`,key:`vc6u1g`}],[`path`,{d:`m17.5 15.5 2-2`,key:`wo5hmg`}]]),Qn=P(`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`}]]),$n=P(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),er=P(`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`}]]),tr=P(`ShoppingBag`,[[`path`,{d:`M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z`,key:`hou9p0`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M16 10a4 4 0 0 1-8 0`,key:`1ltviw`}]]),nr=P(`SquarePen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),rr=P(`Star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}
8]]),ir=P(`Store`,[[`path`,{d:`m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7`,key:`ztvudi`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}],[`path`,{d:`M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4`,key:`2ebpfo`}],[`path`,{d:`M2 7h20`,key:`1fcdvo`}],[`path`,{d:`M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7`,key:`6c3vgh`}]]),ar=P(`Tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),or=P(`Target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),sr=P(`Ticket`,[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`M13 5v2`,key:`dyzc3o`}],[`path`,{d:`M13 17v2`,key:`1ont0d`}],[`path`,{d:`M13 11v2`,key:`1wjjxi`}]]),cr=P(`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`}]]),lr=P(`Trophy`,[[`path`,{d:`M6 9H4.5a2.5 2.5 0 0 1 0-5H6`,key:`17hqa7`}],[`path`,{d:`M18 9h1.5a2.5 2.5 0 0 0 0-5H18`,key:`lmptdp`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22`,key:`1nw9bq`}],[`path`,{d:`M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22`,key:`1np0yb`}],[`path`,{d:`M18 2H6v7a6 6 0 0 0 12 0V2Z`,key:`u46fv3`}]]),ur=P(`Tv`,[[`rect`,{width:`20`,height:`15`,x:`2`,y:`7`,rx:`2`,ry:`2`,key:`10ag99`}],[`polyline`,{points:`17 2 12 7 7 2`,key:`11pgbg`}]]),dr=P(`Upload`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`17 8 12 3 7 8`,key:`t8dd8p`}],[`line`,{x1:`12`,x2:`12`,y1:`3`,y2:`15`,key:`widbto`}]]),fr=P(`User`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),pr=P(`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`}]]),mr=P(`Utensils`,[[`path`,{d:`M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2`,key:`cjf0a3`}],[`path`,{d:`M7 2v20`,key:`1473qp`}],[`path`,{d:`M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7`,key:`j28e5`}]]),hr=P(`Wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),gr=P(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),_r=P(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),vr=`-`,yr=e=>{let t=Cr(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(vr);return n[0]===``&&n.length!==1&&n.shift(),br(n,t)||Sr(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},br=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?br(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(vr);return t.validators.find(({validator:e})=>e(a))?.classGroupId},xr=/^\[(.+)\]$/,Sr=e=>{if(xr.test(e)){let t=xr.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},Cr=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 11,395 bytes, line 8
8return Dr(Object.entries(e.classGroups),n).forEach(([e,n])=>{wr(n,r,e,t)}),r},wr=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:Tr(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(Er(e)){wr(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{wr(i,Tr(t,e),n,r)})})},Tr=(e,t)=>{let n=e;return t.split(vr).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Er=e=>e.isThemeGetter,Dr=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Or=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},kr=`!`,Ar=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(kr);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},jr=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Mr=e=>({cache:Or(e.cacheSize),parseClassName:Ar(e),...yr(e)}),Nr=/\s+/,Pr=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Nr),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=jr(c).join(`:`),h=l?m+kr:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function Fr(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=Ir(t))&&(r&&(r+=` `),r+=n);return r}var Ir=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ir(e[r]))&&(n&&(n+=` `),n+=t);return n};function Lr(e,...t){let n,r,i,a=o;function o(o){return n=Mr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=Pr(e,n);return i(e,a),a}return function(){return a(Fr.apply(null,arguments))}}var Rr=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},zr=/^\[(?:([a-z-]+):)?(.+)\]$/i,Br=/^\d+\/\d+$/,Vr=new Set([`px`,`full`,`screen`]),Hr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ur=/\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$/,Wr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qr=e=>Yr(e)||Vr.has(e)||Br.test(e),Jr=e=>ci(e,`length`,li),Yr=e=>!!e&&!Number.isNaN(Number(e)),Xr=e=>ci(e,`number`,Yr),Zr=e=>!!e&&Number.isInteger(Number(e)),Qr=e=>e.endsWith(`%`)&&Yr(e.slice(0,-1)),$r=e=>zr.test(e),ei=e=>Hr.test(e),ti=new Set([`length`,`size`,`percentage`]),ni=e=>ci(e,ti,ui),ri=e=>ci(e,`position`,ui),ii=new Set([`image`,`url`]),ai=e=>ci(e,ii,fi),oi=e=>ci(e,``,di),si=()=>!0,ci=(e,t,n)=>{let r=zr.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},li=e=>Ur.test(e)&&!Wr.test(e),ui=()=>!1,di=e=>Gr.test(e),fi=e=>Kr.test(e),pi=Lr(()=>{let e=Rr(`colors`),t=Rr(`spacing`),n=Rr(`blur`),r=Rr(`brightness`),i=Rr(`borderColor`),a=Rr(`borderRadius`),o=Rr(`borderSpacing`),s=Rr(`borderWidth`),c=Rr(`contrast`),l=Rr(`grayscale`),u=Rr(`hueRotate`),d=Rr(`invert`),f=Rr(`gap`),p=Rr(`gradientColorStops`),m=Rr(`gradientColorStopPositions`),h=Rr(`inset`),g=Rr(`margin`),_=Rr(`opacity`),v=Rr(`padding`),y=Rr(`saturate`),b=Rr(`scale`),x=Rr(`sepia`),S=Rr(`skew`),C=Rr(`space`),w=Rr(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,$r,t],O=()=>[$r,t],ee=()=>[``,qr,Jr],k=()=>[`auto`,Yr,$r],A=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],te=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],j=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],re=()=>[``,`0`,$r],M=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],ie=()=>[Yr,$r];return{cacheSize:500,separator:`:`,theme:{colors:[si],spacing:[qr,Jr],blur:[`none`,``,ei,$r],brightness:ie(),borderColor:[e],borderRadius:[`none`,``,`full`,ei,$r],borderSpacing:O(),borderWidth:ee(),contrast:ie(),grayscale:re(),hueRotate:ie(),invert:re(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Qr,Jr],inset:D(),margin:D(),opacity:ie(),padding:O(),saturate:ie(),scale:ie(),sepia:re(),skew:ie(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,$r]}],container:[`container`],columns:[{columns:[ei]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:[...A(),$r]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Zr,$r]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,$r]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:[`first`,`last`,`none`,Zr,$r]}],"grid-cols":[{"grid-cols":[si]}],"col-start-end":[{col:[`auto`,{span:[`full`,Zr,$r]},$r]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[si]}],"row-start-end":[{row:[`auto`,{span:[Zr,$r]},$r]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,$r]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,$r]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...j()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...j(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...j(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,$r,t]}],"min-w":[{"min-w":[$r,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[$r,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[ei]},ei]}],h:[{h:[$r,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[$r,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[$r,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[$r,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,ei,Jr]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Xr]}],"font-family":[{font:[si]}],"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-fractons`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,$r]}],"line-clamp":[{"line-clamp":[`none`,Yr,Xr]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,qr,$r]}],"list-image":[{"list-image":[`none`,$r]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,$r]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...te(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,qr,Jr]}],"underline-offset":[{"underline-offset":[`auto`,qr,$r]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$r]}],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`,$r]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...A(),ri]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,ni]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ai]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}
8],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...te(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}
vendor: 4,008 bytes, line 8
8],"divide-style":[{divide:te()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...te()]}],"outline-offset":[{"outline-offset":[qr,$r]}],"outline-w":[{outline:[qr,Jr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[qr,Jr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,ei,oi]}],"shadow-color":[{shadow:[si]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...ne(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,ei,$r]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,$r]}],duration:[{duration:ie()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,$r]}],delay:[{delay:ie()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,$r]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Zr,$r]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,$r]}],accent:[{accent:[`auto`,e]}],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`,$r]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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`]}
vendor: 4,641 bytes, line 8
8],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`,$r]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[qr,Jr,Xr]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},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`]}}});function F(...e){return pi(Ut(e))}var mi=Ft,hi=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(It,{ref:n,className:F(`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]`,e),...t}));hi.displayName=It.displayName;var gi=Kt(`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`}}),_i=_.forwardRef(({className:e,variant:t,...n},r)=>(0,M.jsx)(Lt,{ref:r,className:F(gi({variant:t}),e),...n}));_i.displayName=Lt.displayName;var vi=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(Bt,{ref:n,className:F(`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`,e),...t}));vi.displayName=Bt.displayName;var yi=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(Vt,{ref:n,className:F(`absolute right-2 top-2 rounded-md p-1 text-foreground
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`,e),"toast-close":``,...t,children:(0,M.jsx)(gr,{className:`h-4 w-4`})}));yi.displayName=Vt.displayName;var bi=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(Rt,{ref:n,className:F(`text-sm font-semibold`,e),...t}));bi.displayName=Rt.displayName;var xi=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(zt,{ref:n,className:F(`text-sm opacity-90`,e),...t}));xi.displayName=zt.displayName;function Si(){let{toasts:e}=ee();return(0,M.jsxs)(mi,{children:[e.map(function({id:e,title:t,description:n,action:r,...i}){return(0,M.jsxs)(_i,{...i,children:[(0,M.jsxs)(`div`,{className:`grid gap-1`,children:[t&&(0,M.jsx)(bi,{children:t}),n&&(0,M.jsx)(xi,{children:n})]}),r,(0,M.jsx)(yi,{})]},e)}),(0,M.jsx)(hi,{})]})}var Ci=[`light`,`dark`],wi=`(prefers-color-scheme: dark)`,Ti=_.createContext(void 0),Ei={setTheme:e=>{},themes:[]},Di=()=>_.useContext(Ti)??Ei;_.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:c})=>{let l=a===`system`,u=n===`class`?`var d=document.documentElement,c=d.classList;${`c.remove(${s.map(e=>`'${e}'`).join(`,`)})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?Ci.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:`if(e==='light'||e==='dark')d.style.colorScheme=e`:``,f=(e,t=!1,r=!0)=>{let a=o?o[e]:e,s=t?e+`|| ''`:`'${a}'`,c=``;return i&&r&&!t&&Ci.includes(e)&&(c+=`d.style.colorScheme = '${e}';`),n===`class`?t||a?c+=`c.add(${s})`:c+=`null`:a&&(c+=`d[s](n,${s})`),c},p=e?`!function(){${u}${f(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${l})){var t='${wi}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f(`dark`)}}else{${f(`light`)}}}else if(e){${o?`var x=${JSON.stringify(o)};`:``}${f(o?`x[e]`:`e`,!0)}}${l?``:`else{`+f(a,!1,!1)+`}`}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:``}${f(o?`x[e]`:`e`,!0)}}else{${f(a,!1,!1)};}${d}}catch(t){}}();`;return _.createElement(`script`,{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var Oi=e=>{switch(e){case`success`:return ji;case`info`:return Ni;case`warning`:return Mi;case`error`:return Pi;default:return null}},ki=Array(12).fill(0),Ai=({visible:e})=>_.createElement(`div`,{className:`sonner-loading-wrapper`,"data-visible":e},_.createElement(`div`,{className:`sonner-spinner`},ki.map((e,t)=>_.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),ji=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Mi=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Ni=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Pi=_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},_.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Fi=()=>{let[e,t]=_.useState(document.hidden);return _.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Ii=1,Li=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
8{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:Ii++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=e instanceof Promise?e:e(),i=n!==void 0;return r.then(async e=>{if(zi(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,message:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,message:r,description:a})}}).catch(async e=>{if(t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,message:r,description:a})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),(e=t.finally)==null||e.call(t)}),n},this.custom=(e,t)=>{let n=t?.id||Ii++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Ri=(e,t)=>{let n=t?.id||Ii++;return Li.addToast({title:e,...t,id:n}),n},zi=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Bi=Object.assign(Ri,{success:Li.success,info:Li.info,warning:Li.warning,error:Li.error,custom:Li.custom,message:Li.message,promise:Li.promise,dismiss:Li.dismiss,loading:Li.loading},{getHistory:()=>Li.toasts});function Vi(e,{insertAt:t}={}){if(!e||typeof document>`u`)return;let n=document.head||document.getElementsByTagName(`head`)[0],r=document.createElement(`style`);r.type=`text/css`,t===`top`&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Vi(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
8left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
8:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 9`);function Hi(e){return e.label!==void 0}var Ui=3,Wi=`32px`,Gi=4e3,Ki=356,qi=14,Ji=20,Yi=200;function Xi(...e){return e.filter(Boolean).join(` `)}var Zi=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,loadingIcon:C,expandByDefault:w,classNames:T,icons:E,closeButtonAriaLabel:D=`Close toast`,pauseWhenPageIsHidden:O,cn:ee}=e,[k,A]=_.useState(!1),[te,ne]=_.useState(!1),[j,re]=_.useState(!1),[M,ie]=_.useState(!1),[ae,oe]=_.useState(0),[se,ce]=_.useState(0),le=_.useRef(null),ue=_.useRef(null),de=c===0,fe=c+1<=o,pe=n.type,me=n.dismissible!==!1,he=n.className||``,N=n.descriptionClassName||``,ge=_.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=_.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=_.useMemo(()=>n.duration||b||Gi,[n.duration,b]),ye=_.useRef(0),be=_.useRef(0),xe=_.useRef(0),Se=_.useRef(null),[Ce,we]=x.split(`-`),Te=_.useMemo(()=>
9s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=Fi(),De=n.invert||t,Oe=pe===`loading`;be.current=_.useMemo(()=>ge*S+Te,[ge,Te]),_.useEffect(()=>{A(!0)},[]),_.useLayoutEffect(()=>{if(!k)return;let e=ue.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[k,n.title,n.description,a,n.id]);let ke=_.useCallback(()=>{ne(!0),oe(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Yi)},[n,d,a,be]);_.useEffect(()=>{if(n.promise&&pe===`loading`||n.duration===1/0||n.type===`loading`)return;let e,t=ve;return u||i||O&&Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;t-=e}xe.current=new Date().getTime()})():t!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{var e;(e=n.onAutoClose)==null||e.call(n,n),ke()},t)),()=>clearTimeout(e)},[u,i,w,n,ve,ke,n.promise,pe,O,Ee]),_.useEffect(()=>{let e=ue.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),_.useEffect(()=>{n.delete&&ke()},[ke,n.delete]);function Ae(){return E!=null&&E.loading?_.createElement(`div`,{className:`sonner-loader`,"data-visible":pe===`loading`},E.loading):C?_.createElement(`div`,{className:`sonner-loader`,"data-visible":pe===`loading`},C):_.createElement(Ai,{visible:pe===`loading`})}return _.createElement(`li`,{"aria-live":n.important?`assertive`:`polite`,"aria-atomic":`true`,role:`status`,tabIndex:0,ref:ue,className:ee(v,he,T?.toast,n?.classNames?.toast,T?.default,T?.[pe],n?.classNames?.[pe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":k,"data-promise":!!n.promise,"data-removed":te,"data-visible":fe,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":de,"data-swiping":j,"data-dismissible":me,"data-type":pe,"data-invert":De,"data-swipe-out":M,"data-expanded":!!(u||w&&k),style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${te?ae:be.current}px`,"--initial-height":w?`auto`:`${se}px`,...m,...n.style},onPointerDown:e=>{Oe||!me||(le.current=new Date,oe(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(re(!0),Se.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t;if(M||!me)return;Se.current=null;let r=Number(ue.current?.style.getPropertyValue(`--swipe-amount`).replace(`px`,``)||0),i=new Date().getTime()-le.current?.getTime(),a=Math.abs(r)/i;if(Math.abs(r)>=Ji||a>.11){oe(be.current),(e=n.onDismiss)==null||e.call(n,n),ke(),ie(!0);return}(t=ue.current)==null||t.style.setProperty(`--swipe-amount`,`0px`),re(!1)},onPointerMove:e=>{var t;if(!Se.current||!me)return;let n=e.clientY-Se.current.y,r=e.clientX-Se.current.x,i=(Ce===`top`?Math.min:Math.max)(0,n),a=e.pointerType===`touch`?10:2;Math.abs(i)>a?(t=ue.current)==null||t.style.setProperty(`--swipe-amount`,`${n}px`):Math.abs(r)>a&&(Se.current=null)}},_e&&!n.jsx?_.createElement(`button`,{"aria-label":D,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!me?()=>{}:()=>{var e;ke(),(e=n.onDismiss)==null||e.call(n,n)},className:ee(T?.closeButton,n?.classNames?.closeButton)},_.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},_.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),_.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`}))):null,n.jsx||_.isValidElement(n.title)?n.jsx||n.title:_.createElement(_.Fragment,null,pe||n.icon||n.promise?_.createElement(`div`,{"data-icon":``,className:ee(T?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:n.icon||E?.[pe]||Oi(pe)):null,_.createElement(`div`,{"data-content":``,className:ee(T?.content,n?.classNames?.content)},_.createElement(`div`,{"data-title":``,className:ee(T?.title,n?.classNames?.title)},n.title),n.description?_.createElement(`div`,{"data-description":``,className:ee(y,N,T?.description,n?.classNames?.description)}
9,n.description):null),_.isValidElement(n.cancel)?n.cancel:n.cancel&&Hi(n.cancel)?_.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{var t,r;Hi(n.cancel)&&me&&((r=(t=n.cancel).onClick)==null||r.call(t,e),ke())},className:ee(T?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,_.isValidElement(n.action)?n.action:n.action&&Hi(n.action)?_.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{var t,r;Hi(n.action)&&(e.defaultPrevented||((r=(t=n.action).onClick)==null||r.call(t,e),ke()))},className:ee(T?.actionButton,n?.classNames?.actionButton)},n.action.label):null))};function Qi(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}var $i=e=>{let{invert:t,position:n=`bottom-right`,hotkey:r=[`altKey`,`KeyT`],expand:i,closeButton:a,className:o,offset:s,theme:c=`light`,richColors:l,duration:u,style:d,visibleToasts:f=Ui,toastOptions:p,dir:m=Qi(),gap:h=qi,loadingIcon:g,icons:v,containerAriaLabel:y=`Notifications`,pauseWhenPageIsHidden:b,cn:x=Xi}=e,[S,C]=_.useState([]),w=_.useMemo(()=>Array.from(new Set([n].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,n]),[T,E]=_.useState([]),[D,O]=_.useState(!1),[ee,A]=_.useState(!1),[te,ne]=_.useState(c===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:c),j=_.useRef(null),re=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),M=_.useRef(null),ie=_.useRef(!1),ae=_.useCallback(e=>{var t;(t=S.find(t=>t.id===e.id))!=null&&t.delete||Li.dismiss(e.id),C(t=>t.filter(({id:t})=>t!==e.id))},[S]);return _.useEffect(()=>Li.subscribe(e=>{if(e.dismiss){C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{k.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),_.useEffect(()=>{if(c!==`system`){ne(c);return}c===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ne(`dark`):ne(`light`)),typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,({matches:e})=>{ne(e?`dark`:`light`)})},[c]),_.useEffect(()=>{S.length<=1&&O(!1)},[S]),_.useEffect(()=>{let e=e=>{var t,n;r.every(t=>e[t]||e.code===t)&&(O(!0),(t=j.current)==null||t.focus()),e.code===`Escape`&&(document.activeElement===j.current||(n=j.current)!=null&&n.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),_.useEffect(()=>{if(j.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,ie.current=!1)}},[j.current]),S.length?_.createElement(`section`,{"aria-label":`${y} ${re}`,tabIndex:-1},w.map((e,n)=>{let[r,c]=e.split(`-`);return _.createElement(`ol`,{key:e,dir:m===`auto`?Qi():m,tabIndex:-1,ref:j,className:o,"data-sonner-toaster":!0,"data-theme":te,"data-y-position":r,"data-x-position":c,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--offset":typeof s==`number`?`${s}px`:s||Wi,"--width":`${Ki}px`,"--gap":`${h}px`,...d},onBlur:e=>{ie.current&&!e.currentTarget.contains(e.relatedTarget)&&(ie.current=!1,M.current&&=(M.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ie.current||(ie.current=!0,M.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{ee||O(!1)},onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A(!0)},onPointerUp:()=>A(!1)},S.filter(t=>!t.position&&n===0||t.position===e).map((n,r)=>_.createElement(Zi,{key:n.id,icons:v,index:r,toast:n,defaultRichColors:l,duration:p?.duration??u,className:p?.className,descriptionClassName:p?.descriptionClassName,invert:t,visibleToasts:f,closeButton:p?.closeButton??a,interacting:ee,position:e,style:p?.style,unstyled:p?.unstyled,classNames:p?.classNames,cancelButtonStyle:p?.cancelButtonStyle,actionButtonStyle:p?.actionButtonStyle,removeToast:ae,toasts:S.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:i,gap:h,loadingIcon:g,expanded:D,pauseWhenPageIsHidden:b,cn:x})))})):null},ea=({...e})=>{let{theme:t=`system`}=Di();return(0,M.jsx)($i,{theme:t,className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-muted-foreground`,actionButton:`group-[.toast]:bg-primary group-[.toast]:text-primary-foreground`,cancelButton:`group-[.toast]:bg-muted group-[.toast]:text-muted-foreground`}},...e})},ta=_.useId||(()=>void 0),na=0;function ra(e){let[t,n]=_.useState(ta());return Pe(()=>{e||n(e=>e??String(na++))},[e]),e||(t?`radix-${t}`:``)}var ia=[`top`,`right`,`bottom`,`left`],aa=Math.min,oa=Math.max,sa=Math.round,ca=Math.floor,la=e=>({x:e,y:e}),ua={left:`right`,right:`left`,bottom:`top`,top:`bottom`},da={start:`end`,end:`start`};function fa(e,t,n){return oa(e,aa(t,n))}function pa(e,t){return typeof e==`function`?e(t):e}function ma(e){return e.split(`-`)[0]}function ha(e){return e.split(`-`)[1]}function ga(e){return e===`x`?`y`:`x`}function _a(e){return e===`y`?`height`:`width`}function va(e){return[`top`,`bottom`].includes(ma(e))?`y`:`x`}function ya(e){return ga(va(e))}function ba(e,t,n){n===void 0&&(n=!1);
vendor: 16,820 bytes, line 9
9let r=ha(e),i=ya(e),a=_a(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ta(o)),[o,Ta(o)]}function xa(e){let t=Ta(e);return[Sa(e),t,Sa(t)]}function Sa(e){return e.replace(/start|end/g,e=>da[e])}function Ca(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function wa(e,t,n,r){let i=ha(e),a=Ca(ma(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Sa)))),a}function Ta(e){return e.replace(/left|right|bottom|top/g,e=>ua[e])}function Ea(e){return{top:0,right:0,bottom:0,left:0,...e}}function Da(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ea(e)}function Oa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ka(e,t,n){let{reference:r,floating:i}=e,a=va(t),o=ya(t),s=_a(o),c=ma(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ha(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var Aa=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ka(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=ka(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function ja(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pa(t,e),p=Da(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Oa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Oa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ma=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pa(e,t)||{};if(l==null)return{};let d=Da(u),f={x:n,y:r},p=ya(i),m=_a(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=aa(d[_],T),D=aa(d[v],T),O=E,ee=C-h[m]-D,k=C/2-h[m]/2+w,A=fa(O,k,ee),te=!c.arrow&&ha(i)!=null&&k!==A&&a.reference[m]/2-(k<O?E:D)-h[m]/2<0,ne=te?k<O?k-O:k-ee:0;return{[p]:f[p]+ne,data:{[p]:A,centerOffset:k-A-ne,...te&&{alignmentOffset:ne}},reset:te}}}),Na=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ma(r),_=va(o),v=ma(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ta(o)]:xa(o)),x=p!==`none`;!d&&x&&b.push(...wa(o,m,p,y));let S=[o,...b],C=await ja(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ba(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=va(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Pa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fa(e){return ia.some(t=>e[t]>=0)}var Ia=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=pa(e,t);switch(r){case`referenceHidden`:{let e=Pa(await ja(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Fa(e)}}}case`escaped`:{let e=Pa(await ja(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Fa(e)}}}default:return{}}}}};async function La(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ma(n),s=ha(n),c=va(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=pa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ra=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await La(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},za=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=pa(e,t),l={x:n,y:r},u=await ja(t,c),d=va(ma(i)),f=ga(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=fa(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=fa(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Ba=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pa(e,t),u={x:n,y:r},d=va(i),f=ga(d),p=u[f],m=u[d],h=pa(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=[`top`,`left`].includes(ma(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Va=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=pa(e,t),u=await ja(t,l),d=ma(i),f=ha(i),p=va(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=aa(h-u[g],v),x=aa(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=oa(u.left,0),t=oa(u.right,0),n=oa(u.top,0),r=oa(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:oa(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:oa(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ha(){return typeof window<`u`}function Ua(e){return Ka(e)?(e.nodeName||``).toLowerCase():`#document`}function Wa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ga(e){return((Ka(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ka(e){return Ha()?e instanceof Node||e instanceof Wa(e).Node:!1}function qa(e){return Ha()?e instanceof Element||e instanceof Wa(e).Element:!1}function Ja(e){return Ha()?e instanceof HTMLElement||e instanceof Wa(e).HTMLElement:!1}function Ya(e){return!Ha()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Wa(e).ShadowRoot}function Xa(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ro(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Za(e){return[`table`,`td`,`th`].includes(Ua(e))}function Qa(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function $a(e){let t=to(),n=qa(e)?ro(e):e;return n.transform!==`none`||n.perspective!==`none`||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function eo(e){let t=ao(e);for(;Ja(t)&&!no(t);){if($a(t))return t;if(Qa(t))return null;t=ao(t)}return null}function to(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function no(e){return[`html`,`body`,`#document`].includes(Ua(e))}function ro(e){return Wa(e).getComputedStyle(e)}function io(e){return qa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ao(e){if(Ua(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ya(e)&&e.host||Ga(e);return Ya(t)?t.host:t}function oo(e){let t=ao(e);return no(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ja(t)&&Xa(t)?t:oo(t)}function so(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=oo(e),i=r===e.ownerDocument?.body,a=Wa(r);if(i){let e=co(a);return t.concat(a,a.visualViewport||[],Xa(r)?r:[],e&&n?so(e):[])}return t.concat(r,so(r,[],n))}function co(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lo(e){let t=ro(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ja(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=sa(n)!==a||sa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function uo(e){return qa(e)?e:e.contextElement}function fo(e){let t=uo(e);if(!Ja(t))return la(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lo(t),o=(a?sa(n.width):n.width)/r,s=(a?sa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var po=la(0);function mo(e){let t=Wa(e);return!to()||!t.visualViewport?po:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ho(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wa(e)?!1:t}function go(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=uo(e),o=la(1);t&&(r?qa(r)&&(o=fo(r)):o=fo(e));let s=ho(a,n,r)?mo(a):la(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Wa(a),t=r&&qa(r)?Wa(r):r,n=e,i=co(n);for(;i&&r&&t!==n;){let e=fo(i),t=i.getBoundingClientRect(),r=ro(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Wa(i),i=co(n)}}return Oa({width:u,height:d,x:c,y:l})}function _o(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ga(r),s=t?Qa(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=la(1),u=la(0),d=Ja(r);if((d||!d&&!a)&&((Ua(r)!==`body`||Xa(o))&&(c=io(r)),Ja(r))){let e=go(r);l=fo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function vo(e){return Array.from(e.getClientRects())}function yo(e,t){let n=io(e).scrollLeft;return t?t.left+n:go(Ga(e)).left+n}function bo(e){let t=Ga(e),n=io(e),r=e.ownerDocument.body,i=oa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+yo(e),s=-n.scrollTop;return ro(r).direction===`rtl`&&(o+=oa(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function xo(e,t){let n=Wa(e),r=Ga(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=to();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function So(e,t){let n=go(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ja(e)?fo(e):la(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Co(e,t,n){let r;if(t===`viewport`)r=xo(e,n);else if(t===`document`)r=bo(Ga(e));else if(qa(t))r=So(t,n);else{let n=mo(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Oa(r)}function wo(e,t){let n=ao(e);return n===t||!qa(n)||no(n)?!1:ro(n).position===`fixed`||wo(n,t)}function To(e,t){let n=t.get(e);if(n)return n;let r=so(e,[],!1).filter(e=>qa(e)&&Ua(e)!==`body`),i=null,a=ro(e).position===`fixed`,o=a?ao(e):e;for(;qa(o)&&!no(o);){let t=ro(o),n=$a(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&[`absolute`,`fixed`].includes(i.position)||Xa(o)&&!n&&wo(e,o))?r=r.filter(e=>e!==o):i=t,o=ao(o)}return t.set(e,r),r}function Eo(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Qa(t)?[]:To(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Co(t,n,i);return e.top=oa(r.top,e.top),e.right=aa(r.right,e.right),e.bottom=aa(r.bottom,e.bottom),e.left=oa(r.left,e.left),e},Co(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Do(e){let{width:t,height:n}=lo(e);return{width:t,height:n}}function Oo(e,t,n){let r=Ja(t),i=Ga(t),a=n===`fixed`,o=go(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=la(0);if(r||!r&&!a)if((Ua(t)!==`body`||Xa(i))&&(s=io(t)),r){let e=go(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=yo(i));let l=0,u=0;if(i&&!r&&!a){let e=i.getBoundingClientRect();u=e.top+s.scrollTop,l=e.left+s.scrollLeft-yo(i,e)}return{x:o.left+s.scrollLeft-c.x-l,y:o.top+s.scrollTop-c.y-u,width:o.width,height:o.height}}function ko(e){return ro(e).position===`static`}function Ao(e,t){if(!Ja(e)||ro(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ga(e)===n&&(n=n.ownerDocument.body),n}function jo(e,t){let n=Wa(e);if(Qa(e))return n;if(!Ja(e)){let t=ao(e);for(;t&&!no(t);){if(qa(t)&&!ko(t))return t;t=ao(t)}return n}let r=Ao(e,t);for(;r&&Za(r)&&ko(r);)r=Ao(r,t);return r&&no(r)&&ko(r)&&!$a(r)?n:r||eo(e)||n}var Mo=async function(e){let t=this.getOffsetParent||jo,n=this.getDimensions,r=await n(e.floating);return{reference:Oo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function No(e){return ro(e).direction===`rtl`}var Po={convertOffsetParentRelativeRectToViewportRelativeRect:_o,getDocumentElement:Ga,getClippingRect:Eo,getOffsetParent:jo,getElementRects:Mo,getClientRects:vo,getDimensions:Do,getScale:fo,isElement:qa,isRTL:No};function Fo(e,t){let n=null,r,i=Ga(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let{left:l,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;let p=ca(u),m=ca(i.clientWidth-(l+d)),h=ca(i.clientHeight-(u+f)),g=ca(l),_={rootMargin:-p+`px `+-m+`px `+-h+`px `+-g+`px`,threshold:oa(0,aa(1,c))||1},v=!0;function y(e){let t=e[0].intersectionRatio;if(t!==c){if(!v)return o();t?o(!1,t):r=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(y,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,_)}n.observe(e)}return o(!0),a}function Io(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=uo(e),u=i||a?[...l?so(l):[],...so(t)]:[];
vendor: 9,999 bytes, line 9
9u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Fo(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?go(e):null;c&&g();function g(){let t=go(e);h&&(t.x!==h.x||t.y!==h.y||t.width!==h.width||t.height!==h.height)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Lo=Ra,Ro=za,zo=Na,Bo=Va,Vo=Ia,Ho=Ma,Uo=Ba,Wo=(e,t,n)=>{let r=new Map,i={platform:Po,...n},a={...i.platform,_c:r};return Aa(e,t,{...i,platform:a})},Go=typeof document<`u`?_.useLayoutEffect:_.useEffect;function Ko(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ko(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ko(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jo(e,t){let n=qo(e);return Math.round(t*n)/n}function Yo(e){let t=_.useRef(e);return Go(()=>{t.current=e}),t}function Xo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);Ko(f,r)||p(r);let[m,h]=_.useState(null),[g,v]=_.useState(null),y=_.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=_.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||g,C=_.useRef(null),w=_.useRef(null),T=_.useRef(u),E=c!=null,D=Yo(c),O=Yo(i),ee=Yo(l),A=_.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Wo(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};te.current&&!Ko(T.current,t)&&(T.current=t,k.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);Go(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=_.useRef(!1);Go(()=>(te.current=!0,()=>{te.current=!1}),[]),Go(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ne=_.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),j=_.useMemo(()=>({reference:x,floating:S}),[x,S]),re=_.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=Jo(j.floating,u.x),r=Jo(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...qo(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:A,refs:ne,elements:j,floatingStyles:re}),[u,A,ne,j,re])}var Zo=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ho({element:r.current,padding:i}).fn(n):r?Ho({element:r,padding:i}).fn(n):{}}}},Qo=(e,t)=>({...Lo(e),options:[e,t]}),$o=(e,t)=>({...Ro(e),options:[e,t]}),es=(e,t)=>({...Uo(e),options:[e,t]}),ts=(e,t)=>({...zo(e),options:[e,t]}),ns=(e,t)=>({...Bo(e),options:[e,t]}),rs=(e,t)=>({...Vo(e),options:[e,t]}),is=(e,t)=>({...Zo(e),options:[e,t]}),as=`Arrow`,os=_.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,M.jsx)(N.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,M.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});os.displayName=as;var ss=os;function cs(e,t=[]){let n=[];function r(t,r){let i=_.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=_.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})}function s(n,o){let s=o?.[e][a]||i,c=_.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>_.createContext(e));return function(n){let r=n?.[e]||t;return _.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ls(i,...t)]}function ls(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function us(e){let[t,n]=_.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var ds=`Popper`,[fs,ps]=cs(ds),[ms,hs]=fs(ds),gs=e=>{let{__scopePopper:t,children:n}=e,[r,i]=_.useState(null);return(0,M.jsx)(ms,{scope:t,anchor:r,onAnchorChange:i,children:n})};gs.displayName=ds;var _s=`PopperAnchor`,vs=_.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=hs(_s,n),o=_.useRef(null),s=j(t,o);return _.useEffect(()=>{a.onAnchorChange(r?.current||o.current)}),r?null:(0,M.jsx)(N.div,{...i,ref:s})});vs.displayName=_s;var ys=`PopperContent`,[bs,xs]=fs(ys),Ss=_.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=hs(ys,n),[v,y]=_.useState(null),b=j(t,e=>y(e)),[x,S]=_.useState(null),C=us(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,k={padding:D,boundary:O.filter(Es),altBoundary:ee},{refs:A,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:ie}=Xo({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Io(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Qo({mainAxis:i+T,alignmentAxis:o}),c&&$o({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?es():void 0,...k}),c&&ts({...k}),ns({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&is({element:x,padding:s}),Ds({arrowWidth:w,arrowHeight:T}),f&&rs({strategy:`referenceHidden`,...k})]}),[ae,oe]=Os(ne),se=_e(m);Pe(()=>{re&&se?.()},[re,se]);let ce=ie.arrow?.x,le=ie.arrow?.y,ue=ie.arrow?.centerOffset!==0,[de,fe]=_.useState();return Pe(()=>{v&&fe(window.getComputedStyle(v).zIndex)},[v]),(0,M.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,M.jsx)(bs,{scope:n,placedSide:ae,onArrowChange:S,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,M.jsx)(N.div,{"data-side":ae,"data-align":oe,...h,ref:b,style:{...h.style,animation:re?void 0:`none`}})})})});Ss.displayName=ys;var Cs=`PopperArrow`,ws={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ts=_.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=xs(Cs,n),a=ws[i.placedSide];return(0,M.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:(0,M.jsx)(ss,{...r,ref:t,style:{...r.style,display:`block`}})})});Ts.displayName=Cs;function Es(e){return e!==null}var Ds=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Os(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Os(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ks=gs,As=vs,js=Ss,Ms=Ts,[Ns,Ps]=me(`Tooltip`,[ps]),Fs=ps(),Is=`TooltipProvider`,Ls=700,Rs=`tooltip.open`,[zs,Bs]=Ns(Is),Vs=e=>{let{__scopeTooltip:t,delayDuration:n=Ls,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,[o,s]=_.useState(!0),c=_.useRef(!1),l=_.useRef(0);return _.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,M.jsx)(zs,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:_.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:_.useCallback(e=>{c.current=e}
vendor: 5,072 bytes, line 9
9,[]),disableHoverableContent:i,children:a})};Vs.displayName=Is;var Hs=`Tooltip`,[Us,Ws]=Ns(Hs),Gs=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Bs(Hs,e.__scopeTooltip),l=Fs(t),[u,d]=_.useState(null),f=ra(),p=_.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=_.useRef(!1),[v=!1,y]=He({prop:r,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rs))):c.onClose(),a?.(e)}}),b=_.useMemo(()=>v?g.current?`delayed-open`:`instant-open`:`closed`,[v]),x=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),S=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=_.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return _.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,M.jsx)(ks,{...l,children:(0,M.jsx)(Us,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:_.useCallback(()=>{c.isOpenDelayed?C():x()},[c.isOpenDelayed,C,x]),onTriggerLeave:_.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};Gs.displayName=Hs;var Ks=`TooltipTrigger`,qs=_.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Ws(Ks,n),a=Bs(Ks,n),o=Fs(n),s=j(t,_.useRef(null),i.onTriggerChange),c=_.useRef(!1),l=_.useRef(!1),u=_.useCallback(()=>c.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,M.jsx)(As,{asChild:!0,...o,children:(0,M.jsx)(N.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:A(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:A(e.onPointerDown,()=>{c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:A(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:A(e.onBlur,i.onClose),onClick:A(e.onClick,i.onClose)})})});qs.displayName=Ks;var Js=`TooltipPortal`,[Ys,Xs]=Ns(Js,{forceMount:void 0}),Zs=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Ws(Js,t);return(0,M.jsx)(Ys,{scope:t,forceMount:n,children:(0,M.jsx)(Re,{present:n||a.open,children:(0,M.jsx)(Ie,{asChild:!0,container:i,children:r})})})};Zs.displayName=Js;var Qs=`TooltipContent`,$s=_.forwardRef((e,t)=>{let n=Xs(Qs,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Ws(Qs,e.__scopeTooltip);return(0,M.jsx)(Re,{present:r||o.open,children:o.disableHoverableContent?(0,M.jsx)(rc,{side:i,...a,ref:t}):(0,M.jsx)(ec,{side:i,...a,ref:t})})}),ec=_.forwardRef((e,t)=>{let n=Ws(Qs,e.__scopeTooltip),r=Bs(Qs,e.__scopeTooltip),i=_.useRef(null),a=j(t,i),[o,s]=_.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=_.useCallback(()=>{s(null),d(!1)},[d]),p=_.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=sc(r,oc(r,n.getBoundingClientRect())),a=cc(t.getBoundingClientRect());s(uc([...i,...a])),d(!0)},[d]);return _.useEffect(()=>()=>f(),[f]),_.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),_.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!lc(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,M.jsx)(rc,{...e,ref:a})}),[tc,nc]=Ns(Hs,{isInside:!1}),rc=_.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Ws(Qs,n),l=Fs(n),{onClose:u}=c;return _.useEffect(()=>(document.addEventListener(Rs,u),()=>document.removeEventListener(Rs,u)),[u]),_.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,M.jsx)(Te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,M.jsxs)(js,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,M.jsx)(ce,{children:r}),(0,M.jsx)(tc,{scope:n,isInside:!0,children:(0,M.jsx)(Ke,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});$s.displayName=Qs;var ic=`TooltipArrow`,ac=_.forwardRef((e,t)=>
9{let{__scopeTooltip:n,...r}=e,i=Fs(n);return nc(ic,n).isInside?null:(0,M.jsx)(Ms,{...i,...r,ref:t})});ac.displayName=ic;function oc(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function sc(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cc(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function lc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function uc(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),dc(t)}function dc(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fc=Vs,pc=$s,mc=fc,hc=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,M.jsx)(pc,{ref:r,sideOffset:t,className:F(`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`,e),...n}));hc.displayName=pc.displayName;var gc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_c=typeof window>`u`||`Deno`in globalThis;function vc(){}function yc(e,t){return typeof e==`function`?e(t):e}function bc(e){return typeof e==`number`&&e>=0&&e!==1/0}function xc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Sc(e,t){return typeof e==`function`?e(t):e}function Cc(e,t){return typeof e==`function`?e(t):e}function wc(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ec(o,t.options))return!1}else if(!I(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Tc(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Dc(t.options.mutationKey)!==Dc(a))return!1}else if(!I(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ec(e,t){return(t?.queryKeyHashFn||Dc)(e)}function Dc(e){return JSON.stringify(e,(e,t)=>Ac(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function I(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?!Object.keys(t).some(n=>!I(e[n],t[n])):!1}function Oc(e,t){if(e===t)return e;let n=kc(e)&&kc(t);if(n||Ac(e)&&Ac(t)){let r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{},c=0;for(let i=0;i<o;i++){let o=n?i:a[i];(!n&&r.includes(o)||n)&&e[o]===void 0&&t[o]===void 0?(s[o]=void 0,c++):(s[o]=Oc(e[o],t[o]),s[o]===e[o]&&e[o]!==void 0&&c++)}return i===o&&c===i?e:s}return t}function kc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ac(e){if(!jc(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!jc(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function jc(e){return Object.prototype.toString.call(e)===`[object Object]`}function Mc(e){return new Promise(t=>{setTimeout(t,e)})}function Nc(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Oc(e,t)}function Pc(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fc(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ic=Symbol();function Lc(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ic?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Rc=new class extends gc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!_c&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();
vendor: 9,879 bytes, line 9
9this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},zc=new class extends gc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!_c&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Bc(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}function Vc(e){return Math.min(1e3*2**e,3e4)}function Hc(e){return(e??`online`)===`online`?zc.isOnline():!0}var Uc=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Wc(e){return e instanceof Uc}function Gc(e){let t=!1,n=0,r=!1,i,a=Bc(),o=t=>{r||(f(new Uc(t)),e.abort?.())},s=()=>{t=!0},c=()=>{t=!1},l=()=>Rc.isFocused()&&(e.networkMode===`always`||zc.isOnline())&&e.canRun(),u=()=>Hc(e.networkMode)&&e.canRun(),d=t=>{r||(r=!0,e.onSuccess?.(t),i?.(),a.resolve(t))},f=t=>{r||(r=!0,e.onError?.(t),i?.(),a.reject(t))},p=()=>new Promise(t=>{i=e=>{(r||l())&&t(e)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let i,a=n===0?e.initialPromise:void 0;try{i=a??e.fn()}catch(e){i=Promise.reject(e)}Promise.resolve(i).then(d).catch(i=>{if(r)return;let a=e.retry??(_c?0:3),o=e.retryDelay??Vc,s=typeof o==`function`?o(n,i):o,c=a===!0||typeof a==`number`&&n<a||typeof a==`function`&&a(n,i);if(t||!c){f(i);return}n++,e.onFail?.(n,i),Mc(s).then(()=>l()?void 0:p()).then(()=>{t?f(i):m()})})};return{promise:a,cancel:o,continue:()=>(i?.(),a),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),a)}}function Kc(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0),a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var qc=Kc(),Jc=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bc(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_c?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(clearTimeout(this.#e),void 0)}},Yc=class extends Jc{#e;#t;#n;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Zc(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Nc(this.state.data,e,this.options);return this.#o({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(vc).catch(vc):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Cc(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ic||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!xc(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:`invalidate`})}fetch(e,t){if(this.state.fetchStatus!==`idle`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=Lc(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return r(n),this.#a=!1,this.options.persister?this.options.persister(e,n,this):e(n)}};r(i),this.options.behavior?.onFetch(i,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#o({type:`fetch`,meta:i.fetchOptions?.meta});let a=e=>{Wc(e)&&e.silent||this.#o({type:`error`,error:e}),Wc(e)||(this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#r=Gc({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(e===void 0){a(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){a(e);return}this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:a,onFail:(e,t)=>{this.#o({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#o({type:`pause`})},onContinue:()=>{this.#o({type:`continue`})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#r.start()}#o(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Xc(t.data,this.options),fetchMeta:e.meta??null};case`success`:return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:`success`,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};case`error`:let n=e.error;return Wc(n)&&n.revert&&this.#t?{...this.#t,fetchStatus:`idle`}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:`idle`,status:`error`};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),qc.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Xc(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hc(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Zc(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 Qc=class extends gc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Ec(r,t),a=this.get(i);return a||(a=new Yc({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){qc.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>wc(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>wc(e,t)):t}notify(e){qc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){qc.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qc.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$c=class extends Jc{#e;#t;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||el(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:`observerRemoved`,mutation:this,observer:e})}
9optionalRemove(){this.#e.length||(this.state.status===`pending`?this.scheduleGc():this.#t.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){this.#n=Gc({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#r({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#r({type:`pause`})},onContinue:()=>{this.#r({type:`continue`})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});let t=this.state.status===`pending`,n=!this.#n.canStart();try{if(!t){this.#r({type:`pending`,variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#r({type:`pending`,context:t,variables:e,isPaused:n})}let r=await this.#n.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#r({type:`success`,data:r}),r}catch(t){try{throw await this.#t.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#t.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#r({type:`error`,error:t})}}finally{this.#t.runNext(this)}}#r(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),qc.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:`updated`,action:e})})}};function el(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var tl=class extends gc{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){let r=new $c({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){let t=nl(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:`added`,mutation:e})}remove(e){let t=nl(e);if(this.#e.has(t)){let n=this.#e.get(t)?.filter(t=>t!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:`removed`,mutation:e})}canRun(e){let t=this.#e.get(nl(e))?.find(e=>e.state.status===`pending`);return!t||t===e}runNext(e){return(this.#e.get(nl(e))?.find(t=>
9t!==e&&t.state.isPaused))?.continue()??Promise.resolve()}clear(){qc.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Tc(t,e))}findAll(e={}){return this.getAll().filter(t=>Tc(e,t))}notify(e){qc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return qc.batch(()=>Promise.all(e.map(e=>e.continue().catch(vc))))}};function nl(e){return e.options.scope?.id??String(e.mutationId)}function rl(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener(`abort`,()=>{n=!0}),t.signal)})},u=Lc(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a={queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};l(a);let o=await u(a),{maxPages:s}=t.options,c=i?Fc:Pc;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?al:il,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:il(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function il(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function al(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ol=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Qc,this.#t=e.mutationCache||new tl,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Rc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=zc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{let n=this.defaultQueryOptions(e),r=this.#e.build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Sc(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=yc(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return qc.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;qc.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e,r={type:`active`,...e};return qc.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){let n={revert:!0,...t},r=qc.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(vc).catch(vc)}invalidateQueries(e={},t={}){return qc.batch(()=>{if(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e.refetchType===`none`)return Promise.resolve();let n={...e,type:e.refetchType??e.type??`active`};return this.refetchQueries(n,t)})}refetchQueries(e={},t){let n={...t,cancelRefetch:t?.cancelRefetch??!0},r=qc.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(vc)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(vc)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Sc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vc).catch(vc)}fetchInfiniteQuery(e){return e.behavior=rl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vc).catch(vc)}ensureInfiniteQueryData(e){return e.behavior=rl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Dc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{I(e,t.queryKey)&&(n={...n,...t.defaultOptions})}),n}setMutationDefaults(e,t){this.#i.set(Dc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{I(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ec(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.enabled!==!0&&t.queryFn===Ic&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},sl=_.createContext(void 0),cl=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,M.jsx)(sl.Provider,{value:e,children:t})),ll=`modulepreload`,ul=function(e){return`/`+e},dl={},fl=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ul(t,n),t in dl)return;dl[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:ll,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n
9)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},pl=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ml=/^[\\/]{2}/;function hl(e,t){return t+e.replace(/\\/g,`/`)}var gl=`popstate`;function _l(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function vl(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Cl(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:wl(t)}return El(t,n,null,e)}function yl(e,t){if(e===!1||e==null)throw Error(t)}function bl(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function xl(){return Math.random().toString(36).substring(2,10)}function Sl(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Cl(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Tl(t):t,state:n,key:t&&t.key||r||xl(),mask:i}}function wl({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Tl(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function El(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=_l(e)?e:Cl(h.location,e,t);n&&n(r,e),l=u()+1;let d=Sl(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=_l(e)?e:Cl(h.location,e,t);n&&n(r,e),l=u();let i=Sl(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Dl(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(gl,d),c=e,()=>{i.removeEventListener(gl,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Dl(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),yl(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:wl(t);return i=i.replace(/ $/,`%20`),!n&&ml.test(i)&&(i=r+i),new URL(i,r)}function Ol(e,t,n=`/`){return kl(e,t,n,!1)}function kl(e,t,n,r,i){let a=Yl((typeof t==`string`?Tl(t):t).pathname||`/`,n);if(a==null)return null;let o=i??jl(e),s=null,c=Jl(a);for(let e=0;s==null&&e<o.length;++e)s=Wl(o[e],c,r);return s}function Al(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function jl(e){let t=Ml(e);return Pl(t),t}function Ml(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;yl(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ru([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(yl(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Ml(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Hl(l,e.index),routesMeta:u.map((e,t)=>
9{let[n,r]=ql(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Nl(e.path))a(e,t,!0,n)}),t}function Nl(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Nl(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Pl(e){e.sort((e,t)=>e.score===t.score?Ul(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Fl=/^:[\w-]+$/,Il=3,Ll=2,Rl=1,zl=10,Bl=-2,Vl=e=>e===`*`;function Hl(e,t){let n=e.split(`/`),r=n.length;return n.some(Vl)&&(r+=Bl),t&&(r+=Ll),n.filter(e=>!Vl(e)).reduce((e,t)=>e+(Fl.test(t)?Il:t===``?Rl:zl),r)}function Ul(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Wl(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Kl(u,l,s.matcher,s.compiledParams):Gl(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Gl({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
9Object.assign(i,d.params),o.push({params:i,pathname:ru([a,d.pathname]),pathnameBase:au(ru([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=ru([a,d.pathnameBase]))}return o}function Gl(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ql(e.path,e.caseSensitive,e.end);return Kl(e,t,n,r)}function Kl(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ql(e,t=!1,n=!0){bl(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Jl(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return bl(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Yl(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Xl(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Tl(e):e,a;return n?(n=nu(n),a=n.startsWith(`/`)?Zl(n.substring(1),`/`):Zl(n,t)):a=t,{pathname:a,search:ou(r),hash:su(i)}}function Zl(e,t){let n=iu(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ql(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $l(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function eu(e){let t=$l(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function tu(e,t,n,r=!1){let i;typeof e==`string`?i=Tl(e):(i={...e},yl(!i.pathname||!i.pathname.includes(`?`),Ql(`?`,`pathname`,`search`,i)),yl(!i.pathname||!i.pathname.includes(`#`),Ql(`#`,`pathname`,`hash`,i)),yl(!i.search||!i.search.includes(`#`),Ql(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Xl(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var nu=e=>e.replace(/[\\/]{2,}/g,`/`),ru=e=>nu(e.join(`/`)),iu=e=>e.replace(/\/+$/,``),au=e=>iu(e).replace(/^\/*/,`/`),ou=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,su=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,cu=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function lu(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function uu(e){return ru(e.map(e=>e.route.path).filter(Boolean))||`/`}var du=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function fu(e,t){let n=e;if(typeof n!=`string`||!pl.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(du)try{let e=new URL(window.location.href),r=ml.test(n)?new URL(hl(n,e.protocol)):new URL(n),a=Yl(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{bl(!1,`<Link to="${n}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var pu=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(pu);var mu=[`GET`,...pu];new Set(mu);var hu=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function gu(e){try{return hu.includes(new URL(e).protocol)}catch{return!1}}var _u=_.createContext(null);_u.displayName=`DataRouter`;var vu=_.createContext(null);vu.displayName=`DataRouterState`;var yu=_.createContext(!1);function bu(){return _.useContext(yu)}var xu=_.createContext({isTransitioning:!1});xu.displayName=`ViewTransition`;var Su=_.createContext(new Map);Su.displayName=`Fetchers`;var Cu=_.createContext(null);Cu.displayName=`Await`;var wu=_.createContext(null);wu.displayName=`Navigation`;var Tu=_.createContext(null);Tu.displayName=`Location`;var Eu=_.createContext({outlet:null,matches:[],isDataRoute:!1});Eu.displayName=`Route`;var Du=_.createContext(null);Du.displayName=`RouteError`;var Ou=`REACT_ROUTER_ERROR`,ku=`REDIRECT`,Au=`ROUTE_ERROR_RESPONSE`;function ju(e){if(e.startsWith(`${Ou}:${ku}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Mu(e){if(e.startsWith(`${Ou}:${Au}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new cu(t.status,t.statusText,t.data)}catch{}}function Nu(e,{relative:t}={}){yl(Pu(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(wu),{hash:i,pathname:a,search:o}=Uu(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ru([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Pu(){return _.useContext(Tu)!=null}function Fu(){return yl(Pu(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Tu).location}var Iu=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Lu(e){_.useContext(wu).static||_.useLayoutEffect(e)}function Ru(){let{isDataRoute:e}=_.useContext(Eu);return e?cd():zu()}function zu(){yl(Pu(),`useNavigate() may be used only in the context of a <Router> component.`);
9let e=_.useContext(_u),{basename:t,navigator:n}=_.useContext(wu),{matches:r}=_.useContext(Eu),{pathname:i}=Fu(),a=JSON.stringify(eu(r)),o=_.useRef(!1);return Lu(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(bl(o.current,Iu),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=tu(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ru([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Bu=_.createContext(null);function Vu(e){let t=_.useContext(Eu).outlet;return _.useMemo(()=>t&&_.createElement(Bu.Provider,{value:e},t),[t,e])}function Hu(){let{matches:e}=_.useContext(Eu);return e[e.length-1]?.params??{}}function Uu(e,{relative:t}={}){let{matches:n}=_.useContext(Eu),{pathname:r}=Fu(),i=JSON.stringify(eu(n));return _.useMemo(()=>tu(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Wu(e,t){return Gu(e,t)}function Gu(e,t,n){yl(Pu(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(wu),{matches:i}=_.useContext(Eu),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;ud(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 10 11Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Fu(),d;if(t){let e=typeof t==`string`?Tl(t):t;yl(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Ol(e,{pathname:p});bl(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),bl(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Qu(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ru([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ru([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Tu.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Ku(){let e=sd(),t=lu(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`ð¿ Hey developer ð`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var qu=_.createElement(Ku,null),Ju=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Mu(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(Eu.Provider,{value:this.props.routeContext},_.createElement(Du.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(Xu,{error:e},t):t}};Ju.contextType=yu;var Yu=new WeakMap;function Xu({children:e,error:t}){let{basename:n}=_.useContext(wu);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ju(t.digest);if(e){let r=Yu.get(t);if(r)throw r;let i=fu(e.location,n),a=i.absoluteURL||i.to;
11if(gu(a))throw Error(`Invalid redirect location`);if(du&&!Yu.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Yu.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Zu({routeContext:e,match:t,children:n}){let r=_.useContext(_u);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Eu.Provider,{value:e},n)}function Qu(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);yl(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:uu(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||qu,o&&(s<0&&c===0?(ud(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(Zu,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(Ju,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function $u(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ed(e){let t=_.useContext(_u);return yl(t,$u(e)),t}function td(e){let t=_.useContext(vu);return yl(t,$u(e)),t}function nd(e){let t=_.useContext(Eu);return yl(t,$u(e)),t}function rd(e){let t=nd(e),n=t.matches[t.matches.length-1];return yl(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function id(){return rd(`useRouteId`)}function ad(){let e=td(`useNavigation`);return _.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function od(){let{matches:e,loaderData:t}=td(`useMatches`);return _.useMemo(()=>e.map(e=>Al(e,t)),[e,t])}function sd(){let e=_.useContext(Du),t=td(`useRouteError`),n=rd(`useRouteError`);return e===void 0?t.errors?.[n]:e}function cd(){let{router:e}=ed(`useNavigate`),t=rd(`useNavigate`),n=_.useRef(!1);return Lu(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{bl(n.current,Iu),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ld={};function ud(e,t,n){!t&&!ld[e]&&(ld[e]=!0,bl(!1,n))}_.memo(dd);function dd({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Gu(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function fd(e){return Vu(e.context)}function pd(e){yl(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function md({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){yl(!Pu(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Tl(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=Yl(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
11return bl(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(wu.Provider,{value:c},_.createElement(Tu.Provider,{children:t,value:h}))}function hd({children:e,location:t}){return Wu(gd(e),t)}_.Component;function gd(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,gd(e.props.children,i));return}yl(e.type===pd,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),yl(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=gd(e.props.children,i)),n.push(a)}),n}var _d=`get`,vd=`application/x-www-form-urlencoded`;function yd(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function bd(e){return yd(e)&&e.tagName.toLowerCase()===`button`}function xd(e){return yd(e)&&e.tagName.toLowerCase()===`form`}function Sd(e){return yd(e)&&e.tagName.toLowerCase()===`input`}function Cd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wd(e,t){return e.button===0&&(!t||t===`_self`)&&!Cd(e)}function Td(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Ed(e,t){let n=Td(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Dd=null;function Od(){if(Dd===null)try{new FormData(document.createElement(`form`),0),Dd=!1}catch{Dd=!0}return Dd}var kd=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ad(e){return e!=null&&!kd.has(e)?(bl(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vd}"`),null):e}function jd(e,t){let n,r,i,a,o;if(xd(e)){let o=e.getAttribute(`action`);r=o?Yl(o,t):null,n=e.getAttribute(`method`)||_d,i=Ad(e.getAttribute(`enctype`))||vd,a=new FormData(e)}else if(bd(e)||Sd(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Yl(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||_d,i=Ad(e.getAttribute(`formenctype`))||Ad(o.getAttribute(`enctype`))||vd,a=new FormData(o,e),!Od()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(yd(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=_d,r=null,i=vd,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Md={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Nd=/[&><\u2028\u2029]/g;function Pd(e){return e.replace(Nd,e=>Md[e])}function Fd(e,t){if(e===!1||e==null)throw Error(t)}function Id(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Yl(i.pathname,t)===`/`?i.pathname=`${iu(t)}/_root.${r}`:i.pathname=`${iu(i.pathname)}.${r}`,i}async function Ld(e,t){if(e.id in t)return t[e.id];try{let n=await fl(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
11isSpaMode,window.location.reload(),new Promise(()=>{})}}function Rd(e){return e!=null&&typeof e.page==`string`}function zd(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Bd(e,t,n){return Gd((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ld(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(zd).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Vd(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Hd(e,t,{includeHydrateFallback:n}={}){return Ud(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ud(e){return[...new Set(e)]}function Wd(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Gd(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Rd(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Wd(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Kd(){let e=_.useContext(_u);return Fd(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function qd(){let e=_.useContext(vu);return Fd(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Jd=_.createContext(void 0);Jd.displayName=`FrameworkContext`;function Yd(){let e=_.useContext(Jd);return Fd(e,`You must render this element inside a <HydratedRouter> element`),e}function Xd(e,t){let n=_.useContext(Jd),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Zd(s,p),onBlur:Zd(c,m),onMouseEnter:Zd(l,p),onMouseLeave:Zd(u,m),onTouchStart:Zd(d,p)}]:[a,f,{}]:[!1,f,{}]}function Zd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Qd({page:e,...t}){let n=bu(),{nonce:r}=Yd(),{router:i}=Kd(),a=_.useMemo(()=>Ol(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?_.createElement(ef,{page:e,matches:a,...t}):_.createElement(tf,{page:e,matches:a,...t})):null}function $d(e){let{manifest:t,routeModules:n}=Yd(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return Bd(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ef({page:e,matches:t,...n}){let r=Fu(),{future:i}=Yd(),{basename:a}=Kd(),o=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Id(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return _.createElement(_.Fragment,null,o.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function tf({page:e,matches:t,...n}){let r=Fu(),{future:i,manifest:a,routeModules:o}=Yd(),{basename:s}=Kd(),{loaderData:c,matches:l}=qd(),u=_.useMemo(()=>Vd(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>Vd(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>
11{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Id(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>Hd(d,a),[d,a]),m=$d(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function nf(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var rf=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{rf&&(window.__reactRouterVersion=`7.18.2`)}catch{}function af({basename:e,children:t,useTransitions:n,window:r}){let i=_.useRef();i.current??=vl({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(md,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function of({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(md,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}of.displayName=`unstable_HistoryRouter`;var L=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:v}=_.useContext(wu),y=typeof l==`string`&&pl.test(l),b=fu(l,h);l=b.to;let x=Nu(l,{relative:r}),S=Fu(),C=null;if(o){let e=tu(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ru([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=Xd(n,p),D=pf(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let ee=!(b.isExternal||i),k=_.createElement(`a`,{...p,...E,href:(ee?C:void 0)||b.absoluteURL||x,onClick:ee?O:e,ref:nf(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,k,_.createElement(Qd,{page:x})):k});L.displayName=`Link`;var sf=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Uu(a,{relative:c.relative}),d=Fu(),f=_.useContext(vu),{navigator:p,basename:m}=_.useContext(wu),h=f!=null&&wf(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=Yl(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(L,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});sf.displayName=`NavLink`;var cf=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=_d,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=_.useContext(wu),g=_f(),v=vf(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&pl.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});cf.displayName=`Form`;function lf({getKey:e,storageKey:t,...n}){let r=_.useContext(Jd),{basename:i}=_.useContext(wu),a=Fu(),o=od();Sf({getKey:e,storageKey:t});let s=_.useMemo(()=>
11{if(!r||!e)return null;let t=xf(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),_.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Pd(JSON.stringify(t||yf))}, ${Pd(JSON.stringify(s))})`}})}lf.displayName=`ScrollRestoration`;function uf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function df(e){let t=_.useContext(_u);return yl(t,uf(e)),t}function ff(e){let t=_.useContext(vu);return yl(t,uf(e)),t}function pf(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Ru(),d=Fu(),f=Uu(e,{relative:o});return _.useCallback(p=>{if(wd(p,t)){p.preventDefault();let t=n===void 0?wl(d)===wl(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function mf(e){bl(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=_.useRef(Td(e)),n=_.useRef(!1),r=Fu(),i=_.useMemo(()=>Ed(r.search,n.current?null:t.current),[r.search]),a=Ru();return[i,_.useCallback((e,t)=>{let r=Td(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var hf=0,gf=()=>`__${String(++hf)}__`;function _f(){let{router:e}=df(`useSubmit`),{basename:t}=_.useContext(wu),n=id(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=jd(e,t);a.navigate===!1?await r(a.fetcherKey||gf(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function vf(e,{relative:t}={}){let{basename:n}=_.useContext(wu),r=_.useContext(Eu);yl(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Uu(e||`.`,{relative:t})},o=Fu();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ru([n,a.pathname])),wl(a)}var yf=`react-router-scroll-positions`,bf={};function xf(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Yl(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Sf({getKey:e,storageKey:t}={}){let{router:n}=df(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=ff(`useScrollRestoration`),{basename:a}=_.useContext(wu),o=Fu(),s=od(),c=ad();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Cf(_.useCallback(()=>{if(c.state===`idle`){let t=xf(o,s,a,e);bf[t]=window.scrollY}try{sessionStorage.setItem(t||yf,JSON.stringify(bf))}catch(e){bl(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||yf);e&&(bf=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(bf,()=>window.scrollY,e?(t,n)=>xf(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{bl(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Cf(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function wf(e,{relative:t}={}){let n=_.useContext(xu);yl(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=df(`useViewTransitionState`),i=Uu(e,{relative:t});if(!n.isTransitioning)return!1;let a=Yl(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Yl(n.nextLocation.pathname,r)||n.nextLocation.pathname;
11return Gl(i.pathname,o)!=null||Gl(i.pathname,a)!=null}var Tf=()=>{let{pathname:e,hash:t}=Fu();return(0,_.useEffect)(()=>{t?setTimeout(()=>{let e=document.getElementById(t.substring(1));if(e){e.scrollIntoView({behavior:`smooth`});return}},100):window.scrollTo(0,0)},[e,t]),null},Ef=Kt(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-10 px-4 py-2`,sm:`h-9 rounded-md px-3`,lg:`h-11 rounded-md px-8`,icon:`h-10 w-10`}},defaultVariants:{variant:`default`,size:`default`}}),R=_.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,M.jsx)(r?oe:`button`,{className:F(Ef({variant:t,size:n,className:e})),ref:a,...i}));R.displayName=`Button`;var Df={year:2026,drawAt:`2026-10-23T19:00:00-03:00`,dateLabel:`October 23, 2026`,timeLabel:`7:00pm`,ticketPrice:150,maxTickets:500,minTickets:250,previousYearPrizeCount:4},Of=[{rank:1,name:`Lifetime Membership`,value:null,valueLabel:`Priceless`,detail:`Belvedere Golf Club, for life`,icon:Cn},{rank:2,name:`2027 Season Membership with Cart`,value:2743,valueLabel:`$2,743`,detail:`A full 2027 season, cart included`,icon:jn},{rank:3,name:`20 Passes with Cart`,value:2100,valueLabel:`$2,100`,detail:`Twenty rounds, riding`,icon:ln},{rank:4,name:`20 Passes Walking`,value:1575,valueLabel:`$1,575`,detail:`Twenty rounds, walking`,icon:Mn},{rank:5,name:`10 Passes with Cart`,value:1050,valueLabel:`$1,050`,detail:`Ten rounds, riding`,icon:ln},{rank:6,name:`10 Passes Walking`,value:788,valueLabel:`$788`,detail:`Ten rounds, walking`,icon:Mn},{rank:7,name:`2027 Season Cart Rental`,value:760,valueLabel:`$760`,detail:`Ride all 2027 season`,icon:sn},{rank:8,name:`$300 F&B Card`,value:300,valueLabel:`$300`,detail:`Food & beverage at the club`,icon:mr},{rank:9,name:`Driving Range Membership`,value:289,valueLabel:`$289`,detail:`Unlimited practice`,icon:or},{rank:10,name:`Pro Shop Gift Card`,value:200,valueLabel:`$200`,detail:`Gear up in the pro shop`,icon:tr},{rank:11,name:`1st Ticket Out`,value:null,valueLabel:`Free entry`,detail:`A 2027 Foundation Draw ticket`,icon:sr}],kf=Of.reduce((e,t)=>e+(t.value??0),0),Af=e=>`$${e.toLocaleString(`en-CA`)}`,jf=(e=Date.now())=>e<new Date(Df.drawAt).getTime(),Mf=()=>(0,M.jsxs)(`section`,{className:`relative h-screen w-full overflow-hidden`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-cover bg-center bg-no-repeat bg-fixed animate-slow-zoom`,style:{backgroundImage:`url("/lovable-uploads/28e620e6-938a-4705-b2d6-81103c7434a8.png")`}}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-b from-black/40 via-black/20 to-black/60`}),(0,M.jsx)(`div`,{className:`absolute inset-0 flex flex-col justify-center items-center text-white p-4 md:p-8`,children:(0,M.jsxs)(`div`,{className:`text-center max-w-4xl mx-auto space-y-8`,children:[jf()&&(0,M.jsxs)(L,{to:`/foundation-draw`,className:`group inline-flex items-center gap-2 rounded-full border border-golf-gold/60 bg-golf-green-dark/70 px-4 py-2 text-sm font-semibold text-golf-gold-light shadow-lg backdrop-blur-sm transition-colors hover:bg-golf-green-dark animate-fade-in md:text-base`,children:[(0,M.jsx)(sr,{className:`h-4 w-4 shrink-0`}),(0,M.jsxs)(`span`,{className:`sm:hidden`,children:[Df.year,` Foundation Draw tickets on sale`]}),(0,M.jsxs)(`span`,{className:`hidden sm:inline`,children:[Df.year,` Foundation Draw: win a Lifetime Membership`]}),(0,M.jsx)($t,{className:`h-4 w-4 shrink-0 transition-transform group-hover:translate-x-1`})]}),(0,M.jsxs)(`div`,{className:`animate-fade-in space-y-2`,children:[(0,M.jsx)(`span`,{className:`text-lg md:text-xl tracking-[0.2em] uppercase font-light text-golf-sand-light`,children:`Welcome to`}),(0,M.jsx)(`h1`,{className:`font-playfair text-5xl md:text-7xl lg:text-8xl font-bold text-white drop-shadow-lg`,children:`Belvedere`}),(0,M.jsx)(`span`,{className:`block text-2xl md:text-3xl font-playfair italic text-golf-sand-light mt-2`,children:`Golf Club`})]}),(0,M.jsx)(`div`,{className:`w-24 h-1 bg-golf-sand mx-auto rounded-full animate-fade-in delay-100`}),(0,M.jsxs)(`p`,{className:`text-lg md:text-2xl font-light text-white/90 max-w-2xl mx-auto animate-fade-in delay-200 leading-relaxed`,children:[`Experience a century of golfing tradition in the heart of Prince Edward Island.`,(0,M.jsx)(`span`,{className:`block mt-2 text-sm md:text-base opacity-80 uppercase tracking-wider`,children:`Est. 1902`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col sm:flex-row justify-center gap-5 animate-fade-in delay-300 pt-4`,children:[(0,M.jsx)(R,{size:`lg`,className:`bg-golf-green hover:bg-golf-green-dark text-white px-8 py-6 text-lg rounded-full shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1`,asChild:!0,children:(0,M.jsx)(`a`,{href:`https://belvederegc.cps.golf/`,target:`_blank`,rel:`noopener noreferrer`,children:`Book a Tee Time`})}),(0,M.jsx)(R,{size:`lg`,variant:`outline`,className:`bg-white/10 backdrop-blur-sm border-white text-white hover:bg-white hover:text-golf-green px-8 py-6 text-lg rounded-full shadow-lg transition-all duration-300`,asChild:!0,children:(0,M.jsx)(L,{to:`/about`,children:`Explore the Club`})})]})]})}),(0,M.jsx)(`div`,{className:`absolute bottom-10 left-1/2 transform -translate-x-1/2 animate-bounce hidden md:block`,children:(0,M.jsxs)(`button`,{onClick:()=>{let e=document.getElementById(`about`);e&&e.scrollIntoView({behavior:`smooth`})},className:`text-white hover:text-golf-sand transition-colors flex flex-col items-center gap-2 opacity-80 hover:opacity-100`,"aria-label":`Scroll down`,children:[(0,M.jsx)(`span`,{className:`text-xs uppercase tracking-widest`,children:`Discover`}),(0,M.jsx)(Zt,{className:`h-6 w-6`})]})})]});function Nf(e){let t=Math.max(0,e);return{d:Math.floor(t/864e5),h:Math.floor(t%864e5/36e5),m:Math.floor(t%36e5/6e4),s:Math.floor(t%6e4/1e3)}}var Pf=({value:e,label:t,className:n=``})=>(0,M.jsxs)(`div`,{className:`flex w-14 sm:w-16 flex-col items-center ${n}`,children:[(0,M.jsx)(`span`,{className:`font-playfair text-3xl sm:text-4xl font-bold text-white tabular-nums leading-none`,children:String(e).padStart(2,`0`)}),(0,M.jsx)(`span`,{className:`mt-2 text-[10px] uppercase tracking-[0.2em] text-golf-gold-light/80`,children:t})]}),Ff=({drawAt:e})=>{let t=new Date(e).getTime(),[n,r]=(0,_.useState)(t-Date.now());if((0,_.useEffect)(()=>{let e=setInterval(()=>{let n=t-Date.now();r(n),n<=0&&clearInterval(e)},1e3);return()=>clearInterval(e)},[t]),n<=0)return(0,M.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-golf-gold/50 bg-black/20 px-4 py-2 text-sm font-medium text-golf-gold-light`,children:[(0,M.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-golf-gold`}
11),`The draw has taken place. Thank you for your support!`]});let{d:i,h:a,m:o,s}=Nf(n);return(0,M.jsxs)(`div`,{className:`inline-flex items-start gap-1 sm:gap-2 rounded-2xl border border-golf-gold/40 bg-black/25 px-4 py-4 backdrop-blur-sm`,role:`timer`,"aria-label":`${i} days, ${a} hours, ${o} minutes until the draw`,children:[(0,M.jsx)(Pf,{value:i,label:`Days`}),(0,M.jsx)(`span`,{className:`font-playfair text-3xl text-golf-gold/60 leading-none`,children:`:`}),(0,M.jsx)(Pf,{value:a,label:`Hours`}),(0,M.jsx)(`span`,{className:`font-playfair text-3xl text-golf-gold/60 leading-none`,children:`:`}),(0,M.jsx)(Pf,{value:o,label:`Min`}),(0,M.jsx)(`span`,{className:`hidden sm:inline font-playfair text-3xl text-golf-gold/60 leading-none`,children:`:`}),(0,M.jsx)(Pf,{value:s,label:`Sec`,className:`hidden sm:flex`})]})},If=()=>{if(!jf())return null;let e=Of.slice(0,3);return(0,M.jsxs)(`section`,{"aria-labelledby":`home-draw-heading`,className:`relative overflow-hidden bg-golf-green-dark py-16 text-white md:py-20`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-cover bg-center opacity-20`,style:{backgroundImage:`url("/lovable-uploads/7b95b060-251e-47e2-9259-933777c5fe0e.jpg")`},"aria-hidden":`true`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-golf-green-dark via-golf-green-dark/90 to-golf-green-dark/70`,"aria-hidden":`true`}),(0,M.jsx)(`div`,{className:`relative container mx-auto max-w-6xl`,children:(0,M.jsxs)(`div`,{className:`grid items-center gap-10 lg:grid-cols-[1.2fr_1fr]`,children:[(0,M.jsxs)(`div`,{className:`text-center lg:text-left`,children:[(0,M.jsxs)(`div`,{className:`inline-flex rounded-full border border-golf-gold/50 bg-golf-gold/15 px-4 py-1 text-sm font-semibold text-golf-gold-light`,children:[`Tickets on sale now · Only `,Df.maxTickets,` available`]}),(0,M.jsxs)(`h2`,{id:`home-draw-heading`,className:`mt-5 text-balance font-playfair text-4xl font-bold leading-tight md:text-6xl`,children:[(0,M.jsx)(`span`,{className:`text-golf-gold-light`,children:Df.year}),` Golf Foundation Draw`]}),(0,M.jsxs)(`p`,{className:`mx-auto mt-4 max-w-xl text-lg text-white/85 lg:mx-0`,children:[`Win a `,(0,M.jsx)(`strong`,{className:`text-white`,children:`Lifetime Membership`}),`, plus 10 more prizes worth`,` `,(0,M.jsx)(`strong`,{className:`text-white`,children:Af(kf)}),`. Every $`,Df.ticketPrice,` ticket includes a 2027 green fee.`]}),(0,M.jsxs)(`p`,{className:`mt-4 flex items-center justify-center gap-2 text-sm text-white/75 lg:justify-start`,children:[(0,M.jsx)(an,{className:`h-4 w-4 text-golf-gold-light`}),` Draw `,Df.dateLabel,` at `,Df.timeLabel]}),(0,M.jsxs)(`div`,{className:`mt-8 flex flex-col items-center gap-3 sm:flex-row sm:justify-center lg:justify-start`,children:[(0,M.jsx)(R,{asChild:!0,size:`lg`,className:`h-14 rounded-full bg-golf-gold px-8 text-base font-bold text-golf-green-dark shadow-lg hover:bg-golf-gold-light`,children:(0,M.jsxs)(L,{to:`/foundation-draw#buy`,children:[(0,M.jsx)(sr,{className:`mr-2 h-5 w-5`}),` Get your ticket · $`,Df.ticketPrice]})}),(0,M.jsx)(R,{asChild:!0,size:`lg`,variant:`outline`,className:`h-14 rounded-full border-white/40 bg-transparent px-8 text-base text-white hover:bg-white/10 hover:text-white`,children:(0,M.jsxs)(L,{to:`/foundation-draw`,children:[`See all 11 prizes `,(0,M.jsx)($t,{className:`ml-2 h-4 w-4`})]})})]})]}),(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-6`,children:[(0,M.jsx)(Ff,{drawAt:Df.drawAt}),(0,M.jsxs)(`ul`,{className:`w-full max-w-md divide-y divide-white/10 rounded-2xl border border-golf-gold/30 bg-black/20 backdrop-blur-sm`,children:[e.map(e=>(0,M.jsxs)(`li`,{className:`flex items-center gap-3 px-5 py-3`,children:[(0,M.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-golf-green-dark font-playfair text-xs font-bold ring-2 ring-golf-gold`,children:e.rank}),(0,M.jsx)(`span`,{className:`font-semibold`,children:e.name}),(0,M.jsx)(`span`,{className:`ml-auto whitespace-nowrap pl-2 font-playfair text-lg text-golf-gold-light`,children:e.valueLabel})]},e.rank)),(0,M.jsxs)(`li`,{className:`px-5 py-3 text-center text-sm text-white/70`,children:[`+ `,Of.length-e.length,` more prizes, including passes, a cart rental and gift cards`]})]})]})]})})]})},Lf=()=>{let e=new Date().getFullYear()-1902;return(0,M.jsx)(`section`,{id:`about`,className:`py-20 md:py-32 bg-white overflow-hidden`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[(0,M.jsxs)(`div`,{className:`text-center max-w-3xl mx-auto mb-16 md:mb-24`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-center gap-2 mb-4`,children:[(0,M.jsx)(`span`,{className:`h-px w-12 bg-golf-green/30`}),(0,M.jsx)(`span`,{className:`text-sm uppercase tracking-widest text-golf-green font-semibold`,children:`Our Heritage`}),(0,M.jsx)(`span`,{className:`h-px w-12 bg-golf-green/30`})]}),(0,M.jsx)(`h2`,{className:`font-playfair text-4xl md:text-5xl font-bold text-gray-900 mb-6`,children:`A Century of Excellence`}),(0,M.jsxs)(`p`,{className:`text-lg md:text-xl text-gray-600 font-light leading-relaxed`,children:[`For over `,e,` years, Belvedere Golf Club has been a cornerstone of golfing excellence in Prince Edward Island, blending rich tradition with the natural beauty of our historic grounds.`]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center`,children:[(0,M.jsxs)(`div`,{className:`order-2 lg:order-1 space-y-8`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-4 text-golf-green`,children:`PEI's Historic Golf Destination`}),(0,M.jsx)(`p`,{className:`text-gray-700 leading-relaxed text-lg`,children:`Belvedere Golf Club's story began over a century ago when a group of civic leaders formed a golf club in Charlottetown. The site, originally known as the Belvidere Woods, has evolved from a private estate into one of Eastern Canada's premier golf destinations.`})]}),(0,M.jsx)(`div`,{className:`pl-6 border-l-4 border-golf-sand`,children:(0,M.jsx)(`p`,{className:`text-gray-600 italic`,children:`"In 1902, Alexander Beazeley and a group of sporting minded entrepreneurs brought the game of golf to Charlottetown. Their organizational spirit enabled Belvedere to evolve into the treasure that exists today."`})}),(0,M.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4 pt-4`,children:[(0,M.jsx)(R,{asChild:!0,variant:`outline`,className:`border-golf-green text-golf-green hover:bg-golf-green hover:text-white group`,children:(0,M.jsxs)(L,{to:`/about/history`,children:[`Read Full History`,(0,M.jsx)($t,{className:`ml-2 h-4 w-4 group-hover:translate-x-1 transition-transform`})]})}),(0,M.jsx)(R,{asChild:!0,variant:`ghost`,className:`text-gray-600 hover:text-golf-green hover:bg-transparent`,children:(0,M.jsx)(L,{to:`/updates`,children:`View Latest Club Updates`})})]})]}),(0,M.jsxs)(`div`,{className:`order-1 lg:order-2 relative`,children:[(0,M.jsxs)(`div`,{className:`relative z-10 rounded-2xl overflow-hidden shadow-2xl`,children:[(0,M.jsx)(`img`,{alt:`Historic Belvedere Golf Club`,className:`w-full h-full object-cover transform hover:scale-105 transition-transform duration-700`,src:`/lovable-uploads/d24d4814-ce23-4ab3-bfa3-9cd92e3f1ae6.jpg`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/50 to-transparent`})]}),(0,M.jsx)(`div`,{className:`absolute -bottom-10 -left-10 z-20 hidden md:block`,children:(0,M.jsxs)(`div`,{className:`bg-golf-sand text-golf-green-dark p-8 rounded-full shadow-xl border-4 border-white w-40 h-40 flex flex-col items-center justify-center text-center`,children:[(0,M.jsx)(`span`,{className:`font-playfair font-bold text-4xl leading-none`,children:e}),(0,M.jsxs)(`span`,{className:`text-xs font-bold uppercase tracking-wide mt-1`,children:[`Years of`,(0,M.jsx)(`br`,{}),`Tradition`]})]})}),(0,M.jsx)(`div`,{className:`absolute -top-6 -right-6 w-full h-full border-2 border-golf-sand/50 rounded-2xl -z-10 hidden md:block`})]})]}),(0,M.jsxs)(`div`,{className:`mt-24 grid grid-cols-1 md:grid-cols-3 gap-8`,children:[(0,M.jsxs)(`div`,{className:`bg-stone-50 p-8 rounded-xl hover:shadow-lg transition-shadow border border-stone-100 group`,children:[(0,M.jsx)(`div`,{className:`w-12 h-12 bg-white rounded-full flex items-center justify-center shadow-sm mb-6 group-hover:bg-golf-green group-hover:text-white transition-colors`,children:(0,M.jsx)(Fn,{className:`h-6 w-6 text-golf-green group-hover:text-white transition-colors`})}),(0,M.jsx)(`h4`,{className:`font-playfair text-xl font-bold mb-3 text-golf-green`,children:`Historic Design`}),(0,M.jsx)(`p`,{className:`text-gray-600 leading-relaxed`,children:`One of Canada's oldest courses on its original site, featuring a traditional layout winding through hardwood lined fairways.`})]}),(0,M.jsxs)(`div`,{className:`bg-stone-50 p-8 rounded-xl hover:shadow-lg transition-shadow border border-stone-100 group`,children:[(0,M.jsx)(`div`,{className:`w-12 h-12 bg-white rounded-full flex items-center justify-center shadow-sm mb-6 group-hover:bg-golf-green group-hover:text-white transition-colors`,children:(0,M.jsx)(tn,{className:`h-6 w-6 text-golf-green group-hover:text-white transition-colors`})}),(0,M.jsx)(`h4`,{className:`font-playfair text-xl font-bold mb-3 text-golf-green`,children:`Top Ranked`}),(0,M.jsx)(`p`,{className:`text-gray-600 leading-relaxed`,children:`Consistently ranked among Eastern Canada's best member clubs, offering tournament-ready conditions daily.`})]}),(0,M.jsxs)(`div`,{className:`bg-stone-50 p-8 rounded-xl hover:shadow-lg transition-shadow border border-stone-100 group`,children:[(0,M.jsx)(`div`,{className:`w-12 h-12 bg-white rounded-full flex items-center justify-center shadow-sm mb-6 group-hover:bg-golf-green group-hover:text-white transition-colors`,children:(0,M.jsx)(Wn,{className:`h-6 w-6 text-golf-green group-hover:text-white transition-colors`})}),(0,M.jsx)(`h4`,{className:`font-playfair text-xl font-bold mb-3 text-golf-green`,children:`Golf Destination`}),(0,M.jsx)(`p`,{className:`text-gray-600 leading-relaxed`,children:`Located in Charlottetown, the heart of Canada's number one golf destination, maintaining historic charm with modern standards.`})]})]})]})})},Rf=()=>(0,M.jsx)(`section`,{id:`course`,className:`py-20 md:py-32 bg-stone-100`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[(0,M.jsxs)(`div`,{className:`text-center max-w-3xl mx-auto mb-16`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-6`,children:`The Course`}),(0,M.jsx)(`p`,{className:`text-lg md:text-xl text-gray-600 font-light`,children:`Experience a masterful blend of challenging play and natural beauty across our meticulously maintained championship course.`})]}),(0,M.jsx)(`div`,{className:`bg-white rounded-2xl shadow-xl overflow-hidden max-w-6xl mx-auto mb-20`,children:(0,M.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3`,children:[(0,M.jsxs)(`div`,{className:`lg:col-span-2 relative min-h-[300px]`,children:[(0,M.jsx)(`img`,{alt:`Belvedere Golf Course Green`,className:`absolute inset-0 w-full h-full object-cover`,src:`/lovable-uploads/7b95b060-251e-47e2-9259-933777c5fe0e.jpg`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-black/10`})]}),(0,M.jsxs)(`div`,{className:`p-8 md:p-10 flex flex-col justify-between bg-white`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-6 text-golf-green border-b border-gray-100 pb-4`,children:`Course Stats`}),(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between group`,children:[(0,M.jsxs)(`div`,{className:`flex items-center text-gray-500 group-hover:text-golf-green transition-colors`,children:[(0,M.jsx)(un,{className:`h-5 w-5 mr-3`}),(0,M.jsx)(`span`,{className:`font-medium`,children:`Par`})]}),(0,M.jsx)(`span`,{className:`text-lg font-bold text-gray-900`,children:`71`})]}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between group`,children:[(0,M.jsxs)(`div`,{className:`flex items-center text-gray-500 group-hover:text-golf-green transition-colors`,children:[(0,M.jsx)(Zn,{className:`h-5 w-5 mr-3`}),(0,M.jsx)(`span`,{className:`font-medium`,children:`Length`})]}),(0,M.jsxs)(`div`,{className:`text-right`,children:[(0,M.jsx)(`span`,{className:`block text-lg font-bold text-gray-900`,children:`6,318 yds`}),(0,M.jsx)(`span`,{className:`text-xs text-gray-400 uppercase`,children:`Championship`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between group`,children:[(0,M.jsxs)(`div`,{className:`flex items-center text-gray-500 group-hover:text-golf-green transition-colors`,children:[(0,M.jsx)(Kn,{className:`h-5 w-5 mr-3`}),(0,M.jsx)(`span`,{className:`font-medium`,children:`Slope / Rating`})]}),(0,M.jsx)(`span`,{className:`text-lg font-bold text-gray-900`,children:`121 / 70.4`})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 bg-golf-green/5 p-3 rounded-lg text-golf-green text-sm font-medium`,children:[(0,M.jsx)(Wn,{className:`h-4 w-4`}),`4 Tee Deck Options Available`]})]})]}),(0,M.jsx)(`div`,{className:`mt-8`,children:(0,M.jsx)(R,{asChild:!0,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white py-6 text-lg group shadow-md transition-all hover:shadow-lg`,children:(0,M.jsxs)(L,{to:`/scorecard`,children:[`View Full Scorecard`,(0,M.jsx)($t,{className:`ml-2 h-5 w-5 group-hover:translate-x-1 transition-transform`})]})})})]})]})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl md:text-3xl font-bold mb-10 text-center text-gray-900`,children:`Signature Features`}),(0,M.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 md:gap-8`,children:[{title:`Bentgrass Greens`,description:`Smooth, consistent putting surfaces maintained to excellent standards.`,image:`/lovable-uploads/004826b9-32fc-40d0-9072-755b7ddf9635.png`},{title:`Strategic Bunkering`,description:`Perfectly positioned bunkers challenge players of all skill levels.`,image:`/lovable-uploads/1a036cb3-2f83-4bfb-9a62-49d279a35c8d.png`},{title:`Water Features`,description:`Scenic ponds and streams enhance both beauty and challenge.`,image:`/lovable-uploads/fb5e7ffc-5005-4d7b-ab80-b102f1858243.png`},{title:`Harbour Views`,description:`Breathtaking views of the Charlottetown harbour from several holes.`,image:`/lovable-uploads/52573c2d-1e4c-4882-bfd8-3b39905670d6.png`}].map((e,t)=>(0,M.jsxs)(`div`,{className:`group bg-white rounded-xl overflow-hidden shadow-md hover:shadow-xl transition-all duration-300 flex flex-col h-full`,children:[(0,M.jsxs)(`div`,{className:`aspect-square overflow-hidden relative`,children:[(0,M.jsx)(`img`,{src:e.image,alt:e.title,className:`w-full h-full object-cover transition-transform duration-700 group-hover:scale-110`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300`})]}),(0,M.jsxs)(`div`,{className:`p-6 flex-grow`,children:[(0,M.jsx)(`h4`,{className:`font-playfair text-xl font-bold mb-2 text-golf-green`,children:e.title}),(0,M.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed`,children:e.description})]})]},t))})]})]})}),zf=()=>(0,M.jsxs)(`section`,{id:`membership`,className:`py-20 md:py-32 bg-white relative overflow-hidden`,children:[(0,M.jsx)(`div`,{className:`absolute top-0 right-0 w-1/3 h-full bg-golf-sand/10 skew-x-12 transform translate-x-20 pointer-events-none`}),(0,M.jsx)(`div`,{className:`container mx-auto px-4 relative z-10`,children:(0,M.jsxs)(`div`,{className:`flex flex-col lg:flex-row items-center gap-16`,children:[(0,M.jsxs)(`div`,{className:`lg:w-1/2 space-y-8`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{className:`text-golf-green font-bold uppercase tracking-widest text-sm mb-2 block`,children:`Join the Club`}),(0,M.jsx)(`h2`,{className:`font-playfair text-4xl md:text-5xl font-bold text-gray-900 mb-6`,children:`Become a Member`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 leading-relaxed`,children:`Join a distinguished community of golf enthusiasts and experience the exclusive benef
11its of being a Belvedere member. Whether you're a competitive player or just enjoy the social game, we have a place for you.`})]}),(0,M.jsx)(`div`,{className:`space-y-4`,children:[`Priority Tee Time Booking`,`Access to Member-Only Tournaments`,`Reciprocal Playing Privileges`,`Social Events & Dining`].map((e,t)=>(0,M.jsxs)(`div`,{className:`flex items-center gap-4 p-4 rounded-lg bg-stone-50 border border-stone-100 hover:bg-white hover:shadow-md transition-all`,children:[(0,M.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-golf-green/10 flex items-center justify-center shrink-0`,children:(0,M.jsx)(dn,{className:`h-4 w-4 text-golf-green`})}),(0,M.jsx)(`span`,{className:`font-medium text-gray-800`,children:e})]},t))}),(0,M.jsx)(`div`,{className:`pt-4`,children:(0,M.jsx)(R,{asChild:!0,size:`lg`,className:`bg-golf-green hover:bg-golf-green-dark text-white px-8 py-6 text-lg shadow-lg hover:shadow-xl transition-all`,children:(0,M.jsx)(L,{to:`/membership`,children:`View Membership Options`})})})]}),(0,M.jsx)(`div`,{className:`lg:w-1/2 w-full`,children:(0,M.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-6`,children:[(0,M.jsxs)(`div`,{className:`bg-white p-8 rounded-2xl shadow-lg border border-gray-100 hover:-translate-y-1 transition-transform duration-300`,children:[(0,M.jsx)(`div`,{className:`h-12 w-12 bg-blue-50 rounded-xl flex items-center justify-center mb-6`,children:(0,M.jsx)(pr,{className:`h-6 w-6 text-blue-600`})}),(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Adult & Couples`}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Full access memberships for individuals and partners.`})]}),(0,M.jsxs)(`div`,{className:`bg-white p-8 rounded-2xl shadow-lg border border-gray-100 hover:-translate-y-1 transition-transform duration-300 sm:mt-8`,children:[(0,M.jsx)(`div`,{className:`h-12 w-12 bg-green-50 rounded-xl flex items-center justify-center mb-6`,children:(0,M.jsx)(rr,{className:`h-6 w-6 text-green-600`})}),(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Intermediate`}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Perfect for young professionals aged 19-35.`})]}),(0,M.jsxs)(`div`,{className:`bg-white p-8 rounded-2xl shadow-lg border border-gray-100 hover:-translate-y-1 transition-transform duration-300`,children:[(0,M.jsx)(`div`,{className:`h-12 w-12 bg-amber-50 rounded-xl flex items-center justify-center mb-6`,children:(0,M.jsx)(lr,{className:`h-6 w-6 text-amber-600`})}),(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Junior Programs`}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Developing the next generation of golfers.`})]}),(0,M.jsx)(`div`,{className:`bg-golf-green p-8 rounded-2xl shadow-lg flex items-center justify-center text-center sm:mt-8`,children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold text-white mb-2`,children:`Join Today`}),(0,M.jsx)(`p`,{className:`text-golf-sand text-sm`,children:`Start your legacy at Belvedere.`})]})})]})})]})})]});function Bf(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e==`object`&&t===`[object Date]`?new e.constructor(+e):typeof e==`number`||t===`[object Number]`||typeof e==`string`||t===`[object String]`?new Date(e):new Date(NaN)}function Vf(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Hf(e,t){let n=Bf(e);return isNaN(t)?Vf(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Uf(e,t){let n=Bf(e);if(isNaN(t))return Vf(e,NaN);if(!t)return n;let r=n.getDate(),i=Vf(e,n.getTime());return i.setMonth(n.getMonth()+t+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}var Wf=365.2425,Gf=6048e5,Kf=864e5,qf=6e4,Jf=36e5,Yf=3600*24;Yf*7,Yf*Wf/12*3;var Xf={};function Zf(){return Xf}function Qf(e,t){let n=Zf(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Bf(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function $f(e){return Qf(e,{weekStartsOn:1})}function ep(e){let t=Bf(e),n=t.getFullYear(),r=Vf(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=$f(r),a=Vf(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let o=$f(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function tp(e){let t=Bf(e);return t.setHours(0,0,0,0),t}function np(e){let t=Bf(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function rp(e,t){let n=tp(e),r=tp(t),i=+n-np(n),a=+r-np(r);return Math.round((i-a)/Kf)}function ip(e){let t=ep(e),n=Vf(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),$f(n)}function ap(e,t){return Hf(e,t*7)}function op(e,t){return Uf(e,t*12)}function sp(e){let t;return e.forEach(function(e){let n=Bf(e);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function cp(e){let t;
11return e.forEach(e=>{let n=Bf(e);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function lp(e,t){let n=Bf(e),r=Bf(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function up(e,t){let n=tp(e),r=tp(t);return+n==+r}function dp(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function fp(e){if(!dp(e)&&typeof e!=`number`)return!1;let t=Bf(e);return!isNaN(Number(t))}function pp(e,t){let n=Bf(e),r=Bf(t),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return i*12+a}function mp(e,t,n){let r=Qf(e,n),i=Qf(t,n),a=+r-np(r),o=+i-np(i);return Math.round((a-o)/Gf)}function hp(e){let t=Bf(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function gp(e){let t=Bf(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _p(e){let t=Bf(e),n=Vf(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function vp(e,t){let n=Zf(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Bf(e),a=i.getDay(),o=(a<r?-7:0)+6-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function yp(e){return vp(e,{weekStartsOn:1})}var bp={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},xp=(e,t,n)=>{let r,i=bp[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function Sp(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Cp={date:Sp({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:Sp({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:Sp({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},wp={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Tp=(e,t,n,r)=>wp[e];function Ep(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var Dp={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:Ep({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Ep({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Ep({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:Ep({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:Ep({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function Op(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Ap(s,e=>e.test(o)):kp(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}
vendor: 6,432 bytes, line 11
11}function kp(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ap(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function jp(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var Mp={code:`en-US`,formatDistance:xp,formatLong:Cp,formatRelative:Tp,localize:Dp,match:{ordinalNumber:jp({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Op({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:Op({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:Op({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:Op({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:Op({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Np(e){let t=Bf(e);return rp(t,_p(t))+1}function Pp(e){let t=Bf(e),n=$f(t)-+ip(t);return Math.round(n/Gf)+1}function Fp(e,t){let n=Bf(e),r=n.getFullYear(),i=Zf(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=Vf(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=Qf(o,t),c=Vf(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=Qf(c,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ip(e,t){let n=Zf(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Fp(e,t),a=Vf(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Qf(a,t)}function Lp(e,t){let n=Bf(e),r=Qf(n,t)-+Ip(n,t);return Math.round(r/Gf)+1}function Rp(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var zp={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return Rp(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):Rp(n+1,2)},d(e,t){return Rp(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return Rp(e.getHours()%12||12,t.length)},H(e,t){return Rp(e.getHours(),t.length)},m(e,t){return Rp(e.getMinutes(),t.length)},s(e,t){return Rp(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return Rp(Math.trunc(r*10**(n-3)),t.length)}},Bp={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},Vp={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return zp.y(e,t)},Y:function(e,t,n,r){let i=Fp(e,r),a=i>0?i:1-i;return t===`YY`?Rp(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):Rp(a,t.length)},R:function(e,t){return Rp(ep(e),t.length)},u:function(e,t){return Rp(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return Rp(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return Rp(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return zp.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return Rp(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=Lp(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):Rp(i,t.length)},I:function(e,t,n){let r=Pp(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):Rp(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):zp.d(e,t)},D:function(e,t,n){let r=Np(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):Rp(r,t.length)},E:function(e,t,n){let r=e.getDay();
vendor: 4,141 bytes, line 11
11switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return Rp(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return Rp(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return Rp(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?Bp.noon:r===0?Bp.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?Bp.evening:r>=12?Bp.afternoon:r>=4?Bp.morning:Bp.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return zp.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):zp.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):Rp(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):Rp(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):zp.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):zp.s(e,t)},S:function(e,t){return zp.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return Up(r);case`XXXX`:case`XX`:return Wp(r);default:return Wp(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return Up(r);case`xxxx`:case`xx`:return Wp(r);default:return Wp(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+Hp(r,`:`);default:return`GMT`+Wp(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+Hp(r,`:`);default:return`GMT`+Wp(r,`:`)}},t:function(e,t,n){return Rp(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return Rp(e.getTime(),t.length)}};function Hp(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;
11return a===0?n+String(i):n+String(i)+t+Rp(a,2)}function Up(e,t){return e%60==0?(e>0?`-`:`+`)+Rp(Math.abs(e)/60,2):Wp(e,t)}function Wp(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Rp(Math.trunc(r/60),2),a=Rp(r%60,2);return n+i+t+a}var Gp=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},Kp=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},qp={p:Kp,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Gp(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,Gp(r,t)).replace(`{{time}}`,Kp(i,t))}},Jp=/^D+$/,Yp=/^Y+$/,Xp=[`D`,`DD`,`YY`,`YYYY`];function Zp(e){return Jp.test(e)}function Qp(e){return Yp.test(e)}function $p(e,t,n){let r=em(e,t,n);if(console.warn(r),Xp.includes(e))throw RangeError(r)}function em(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var tm=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nm=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rm=/^'([^]*?)'?$/,im=/''/g,am=/[a-zA-Z]/;function om(e,t,n){let r=Zf(),i=n?.locale??r.locale??Mp,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Bf(e);if(!fp(s))throw RangeError(`Invalid time value`);let c=t.match(nm).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=qp[t];return n(e,i.formatLong)}return e}).join(``).match(tm).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:sm(e)};if(Vp[t])return{isToken:!0,value:e};if(t.match(am))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&Qp(a)||!n?.useAdditionalDayOfYearTokens&&Zp(a))&&$p(a,t,String(e));let o=Vp[a[0]];return o(s,a,i.localize,l)}).join(``)}function sm(e){let t=e.match(rm);return t?t[1].replace(im,`'`):e}function cm(e){let t=Bf(e),n=t.getFullYear(),r=t.getMonth(),i=Vf(e,0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function lm(e){return Math.trunc(Bf(e)/1e3)}function um(e){let t=Bf(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function dm(e,t){return mp(um(e),gp(e),t)+1}function fm(e,t){let n=Bf(e),r=Bf(t);return n.getTime()>r.getTime()}function pm(e,t){let n=Bf(e),r=Bf(t);return+n<+r}function mm(e,t){let n=Bf(e),r=Bf(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function hm(e,t){let n=Bf(e),r=Bf(t);return n.getFullYear()===r.getFullYear()}function gm(e,t){return Hf(e,-t)}function _m(e,t){let n=t?.additionalDigits??2,r=Sm(e),i;if(r.date){let e=Cm(r.date,n);i=wm(e.restDateString,e.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);let a=i.getTime(),o=0,s;if(r.time&&(o=Em(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=Om(r.timezone),isNaN(s))return new Date(NaN)}else{let e=new Date(a+o),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return new Date(a+o+s)}var vm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ym=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,bm=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xm=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Sm(e){let t={},n=e.split(vm.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],vm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(vm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=vm.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function Cm(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function wm(e,t){if(t===null)return new Date(NaN);let n=e.match(ym);if(!n)return new Date(NaN);let r=!!n[4],i=Tm(n[1]),a=Tm(n[2])-1,o=Tm(n[3]),s=Tm(n[4]),c=Tm(n[5])-1;if(r)return Pm(t,s,c)?km(t,s,c):new Date(NaN);{let e=new Date(0);return!Mm(t,a,o)||!Nm(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function Tm(e){return e?parseInt(e):1}function Em(e){let t=e.match(bm);if(!t)return NaN;let n=Dm(t[1]),r=Dm(t[2]),i=Dm(t[3]);return Fm(n,r,i)?n*Jf+r*qf+i*1e3:NaN}function Dm(e){return e&&parseFloat(e.replace(`,`,`.`))||0}
11function Om(e){if(e===`Z`)return 0;let t=e.match(xm);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Im(r,i)?n*(r*Jf+i*qf):NaN}function km(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Am=[31,null,31,30,31,30,31,31,30,31,30,31];function jm(e){return e%400==0||e%4==0&&e%100!=0}function Mm(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Am[t]||(jm(e)?29:28))}function Nm(e,t){return t>=1&&t<=(jm(e)?366:365)}function Pm(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Fm(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Im(e,t){return t>=0&&t<=59}function Lm(e,t){let n=Bf(e),r=n.getFullYear(),i=n.getDate(),a=Vf(e,0);a.setFullYear(r,t,15),a.setHours(0,0,0,0);let o=cm(a);return n.setMonth(t,Math.min(i,o)),n}function Rm(e,t){let n=Bf(e);return isNaN(+n)?Vf(e,NaN):(n.setFullYear(t),n)}function zm(e,t){return Uf(e,-t)}var Bm=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{ref:n,className:F(`rounded-lg border bg-card text-card-foreground shadow-sm`,e),...t}));Bm.displayName=`Card`;var Vm=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{ref:n,className:F(`flex flex-col space-y-1.5 p-6`,e),...t}));Vm.displayName=`CardHeader`;var Hm=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{ref:n,className:F(`text-2xl font-semibold leading-none tracking-tight`,e),...t}));Hm.displayName=`CardTitle`;var Um=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{ref:n,className:F(`text-sm text-muted-foreground`,e),...t}));Um.displayName=`CardDescription`;var Wm=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{ref:n,className:F(`p-6 pt-0`,e),...t}));Wm.displayName=`CardContent`;var Gm=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{ref:n,className:F(`flex items-center p-6 pt-0`,e),...t}));Gm.displayName=`CardFooter`;var Km=function(){return Km=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Km.apply(this,arguments)};function qm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jm(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function Ym(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Xm=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Zm=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}},Qm=class extends Zm{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},$m=class extends Zm{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},eh=class extends Zm{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},th;(function(e){e.Any=`any`,e.ApNortheast1=`ap-northeast-1`,e.ApNortheast2=`ap-northeast-2`,e.ApSouth1=`ap-south-1`,e.ApSoutheast1=`ap-southeast-1`,e.ApSoutheast2=`ap-southeast-2`,e.CaCentral1=`ca-central-1`,e.EuCentral1=`eu-central-1`,e.EuWest1=`eu-west-1`,e.EuWest2=`eu-west-2`,e.EuWest3=`eu-west-3`,e.SaEast1=`sa-east-1`,e.UsEast1=`us-east-1`,e.UsWest1=`us-west-1`,e.UsWest2=`us-west-2`})(th||={});var nh=class{constructor(e,{headers:t={},customFetch:n,region:r=th.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=Xm(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Jm(this,arguments,void 0,function*(e,t={}){let n,r;try{let{headers:i,method:a,body:o,signal:s,timeout:c}=t,l={},{region:u}=t;u||=this.region;let d=new URL(`${this.url}/${e}`);u&&u!==`any`&&(l[`x-region`]=u,d.searchParams.set(`forceFunctionRegion`,u));let f;o&&(i&&!Object.prototype.hasOwnProperty.call(i,`Content-Type`)||!i)?typeof Blob<`u`&&o instanceof Blob||o instanceof ArrayBuffer?(l[`Content-Type`]=`application/octet-stream`,f=o):typeof o==`string`?(l[`Content-Type`]=`text/plain`,f=o):typeof FormData<`u`&&o instanceof FormData?f=o:(l[`Content-Type`]=`application/json`,f=JSON.stringify(o)):f=o&&typeof o!=`string`&&!(typeof Blob<`u`&&o instanceof Blob)&&!(o instanceof ArrayBuffer)&&!(typeof FormData<`u`&&o instanceof FormData)?JSON.stringify(o):o;let p=s;c&&(r=new AbortController,n=setTimeout(()=>r.abort(),c),s?(p=r.signal,s.addEventListener(`abort`,()=>r.abort())):p=r.signal);let m=yield this.fetch(d.toString(),{method:a||`POST`,headers:Object.assign(Object.assign(Object.assign({},l),this.headers),i),body:f,signal:p}).catch(e=>{throw new Qm(e)}),h=m.headers.get(`x-relay-error`);if(h&&h===`true`)throw new $m(m);if(!m.ok)throw new eh(m);let g=(m.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim(),_;return _=g===`application/json`?yield m.json():g===`application/octet-stream`||g===`application/pdf`?yield m.blob():g===`text/event-stream`?m:g===`multipart/form-data`?yield m.formData():yield m.text(),{data:_,error:null,response:m}}catch(e){return{data:null,error:e,response:e instanceof eh||e instanceof $m?e.context:void 0}}finally{n&&clearTimeout(n)}})}},rh=3,ih=e=>Math.min(1e3*2**e,3e4),ah=[520,503],oh=[`GET`,`HEAD`,`OPTIONS`],sh=class extends
11Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ch(e,t){return new Promise(n=>{if(t?.aborted){n();return}let r=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t?.addEventListener(`abort`,i)})}function lh(e,t,n,r){return!(!r||n>=rh||!oh.includes(e)||!ah.includes(t))}var uh=class{constructor(e){this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.shouldStripNulls=e.shouldStripNulls??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,this.retryEnabled=e.retry??!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get(`Accept`)===`text/csv`)throw Error(`stripNulls() cannot be used with csv()`);return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||([`GET`,`HEAD`].includes(this.method)?this.headers.set(`Accept-Profile`,this.schema):this.headers.set(`Content-Profile`,this.schema)),this.method!==`GET`&&this.method!==`HEAD`&&this.headers.set(`Content-Type`,`application/json`),this.shouldStripNulls){let e=this.headers.get(`Accept`);e===`application/vnd.pgrst.object+json`?this.headers.set(`Accept`,`application/vnd.pgrst.object+json;nulls=stripped`):(!e||e===`application/json`)&&this.headers.set(`Accept`,`application/vnd.pgrst.array+json;nulls=stripped`)}let r=this.fetch,i=(async()=>{let e=0;for(;;){let t={};n.headers.forEach((e,n)=>{t[n]=e}),e>0&&(t[`X-Retry-Count`]=String(e));let i;try{i=await r(n.url.toString(),{method:n.method,headers:t,body:JSON.stringify(n.body,(e,t)=>typeof t==`bigint`?t.toString():t),signal:n.signal})}catch(t){if(t?.name===`AbortError`||t?.code===`ABORT_ERR`||!oh.includes(n.method))throw t;if(n.retryEnabled&&e<rh){let t=ih(e);e++,await ch(t,n.signal);continue}throw t}if(lh(n.method,i.status,e,n.retryEnabled)){let t=i.headers?.get(`Retry-After`)??null,r=t===null?ih(e):Math.max(0,parseInt(t,10)||0)*1e3;await i.text(),e++,await ch(r,n.signal);continue}return await n.processResponse(i)}})();return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(t.method!==`HEAD`){let i=await e.text();if(i!==``)if(t.headers.get(`Accept`)===`text/csv`)r=i;else if(t.headers.get(`Accept`)&&t.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`))r=i;else try{r=JSON.parse(i)}catch{if(n={message:i},r=null,t.shouldThrowOnError)throw new sh({message:i,details:``,hint:``,code:``})}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);s&&c&&c.length>1&&(i=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`):r=r.length===1?r[0]:null)}else{let i=await e.text();try{n=JSON.parse(i),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,o=`OK`)}
vendor: 10,009 bytes, line 11
11catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new sh(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},dh=class extends uh{throwOnError(){return super.throwOnError()}select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).join(``);return this.url.searchParams.set(`select`,n),this.headers.append(`Prefer`,`return=representation`),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set(`Accept`,`application/vnd.pgrst.object+json`),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set(`Accept`,`text/csv`),this}geojson(){return this.headers.set(`Accept`,`application/geo+json`),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),this}rollback(){return this.headers.append(`Prefer`,`tx=rollback`),this}returns(){return this}maxAffected(e){return this.headers.append(`Prefer`,`handling=strict`),this.headers.append(`Prefer`,`max-affected=${e}`),this}},fh=RegExp(`[,()]`),ph=class extends dh{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(`,`)}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(`,`)}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(`,`)}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(`,`)}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&fh.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&fh.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t==`string`?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(`,`)}}`),this}textSearch(e,t,{config:n,type:r}={}){let i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let r=n?`${n}.or`:`or`;return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},mh=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new ph({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new ph({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new ph({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new ph({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new ph({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function hh(e){"@babel/helpers - typeof";return hh=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hh(e)}function gh(e,t){if(hh(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(hh(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _h(e){var t=gh(e,`string`);return hh(t)==`symbol`?t:t+``}function vh(e,t,n){return(t=_h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yh(Object(n),!0).forEach(function(t){vh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xh=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let s=r??globalThis.fetch;i!==void 0&&i>0?this.fetch=(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),s(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),s(e,bh(bh({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,bh(bh({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:this.fetch=s,this.retry=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new mh(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}
11`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new ph({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},Sh=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,wsConstructor:WebSocket};let e=globalThis;if(typeof globalThis<`u`&&e.WebSocket!==void 0)return{type:`native`,wsConstructor:e.WebSocket};let t=typeof global<`u`?global:void 0;if(t&&t.WebSocket!==void 0)return{type:`native`,wsConstructor:t.WebSocket};if(typeof globalThis<`u`&&e.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)return{type:`cloudflare`,error:`Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.`,workaround:`Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime.`};if(typeof globalThis<`u`&&e.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.includes(`Vercel-Edge`))return{type:`unsupported`,error:`Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.`,workaround:`Use serverless functions or a different deployment target for WebSocket functionality.`};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.node){let t=e.node,n=parseInt(t.replace(/^v/,``).split(`.`)[0]);return n>=22?globalThis.WebSocket===void 0?{type:`unsupported`,error:`Node.js ${n} detected but native WebSocket not found.`,workaround:`Provide a WebSocket implementation via the transport option.`}:{type:`native`,wsConstructor:globalThis.WebSocket}:{type:`unsupported`,error:`Node.js ${n} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 12import ws from "ws" 13new RealtimeClient(url, { transport: ws })`}}}return{type:`unsupported`,error:`Unknown JavaScript runtime without WebSocket support.`,workaround:`Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation.`}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{let e=this.detectEnvironment();return e.type===`native`||e.type===`ws`}catch{return!1}}},Ch=`realtime-js/2.108.1`,wh=`1.0.0`,Th=`2.0.0`,Eh=Th,Dh=1e4,Oh={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},kh={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},Ah={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},jh=class{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT=`broadcast`,this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=e.topic,i=e.ref??``,a=e.join_ref??``,o=e.payload.event,s=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},c=Object.keys(s).length===0?``:JSON.stringify(s);if(a.length>255)throw Error(`joinRef length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`ref length ${i.length} exceeds maximum of 255`);if(r.length>255)throw Error(`topic length ${r.length} exceeds maximum of 255`);if(o.length>255)throw Error(`userEvent length ${o.length} exceeds maximum of 255`);if(c.length>255)throw Error(`metadata length ${c.length} exceeds maximum of 255`);let l=this.USER_BROADCAST_PUSH_META_LENGTH+a.length+i.length+r.length+o.length+c.length,u=new ArrayBuffer(this.HEADER_LENGTH+l),d=new DataView(u),f=0;d.setUint8(f++,this.KINDS.userBroadcastPush),d.setUint8(f++,a.length),d.setUint8(f++,i.length),d.setUint8(f++,r.length),d.setUint8(f++,o.length),d.setUint8(f++,c.length),d.setUint8(f++,t),Array.from(a,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(i,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(r,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(o,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(c,e=>d.setUint8(f++,e.charCodeAt(0)));var p=new Uint8Array(u.byteLength+n.byteLength);return p.set(new Uint8Array(u),0),p.set(new Uint8Array(n),u.byteLength),p.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},Mh;(function(e){e.abstime=`abstime`,e.bool=`bool`,e.date=`date`,e.daterange=`daterange`,e.float4=`float4`,e.float8=`float8`,e.int2=`int2`,e.int4=`int4`,e.int4range=`int4range`,e.int8=`int8`,e.int8range=`int8range`,e.json=`json`,e.jsonb=`jsonb`,e.money=`money`,e.numeric=`numeric`,e.oid=`oid`,e.reltime=`reltime`,e.text=`text`,e.time=`time`,e.timestamp=`timestamp`,e.timestamptz=`timestamptz`,e.timetz=`timetz`,e.tsrange=`tsrange`,e.tstzrange=`tstzrange`})(Mh||={});var Nh=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=Ph(i,e,t,r),n),{}):{}},Ph=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?Fh(i,a):Ih(a)},Fh=(e,t)=>{if(e.charAt(0)===`_`)return Bh(t,e.slice(1,e.length));switch(e){case Mh.bool:return Lh(t);case Mh.float4:case Mh.float8:case Mh.int2:case Mh.int4:case Mh.int8:case Mh.numeric:case Mh.oid:return Rh(t);case Mh.json:case Mh.jsonb:return zh(t);case Mh.timestamp:return Vh(t);case Mh.abstime:case Mh.date:case Mh.daterange:case Mh.int4range:case Mh.int8range:case Mh.money:case Mh.reltime:case Mh.text:case Mh.time:case Mh.timestamptz:case Mh.timetz:case Mh.tsrange:case Mh.tstzrange:return Ih(t);default:return Ih(t)}},Ih=e=>e,Lh=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},Rh=e=>{if(typeof e==`string`){let t=parseFloat(e);
vendor: 9,952 bytes, line 13
13if(!Number.isNaN(t))return t}return e},zh=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},Bh=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>Fh(t,e))}return e},Vh=e=>typeof e==`string`?e.replace(` `,`T`):e,Hh=e=>{let t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,`http`),t.pathname=t.pathname.replace(/\/+$/,``).replace(/\/socket\/websocket$/i,``).replace(/\/socket$/i,``).replace(/\/websocket$/i,``),t.pathname===``||t.pathname===`/`?t.pathname=`/api/broadcast`:t.pathname+=`/api/broadcast`,t.href},Uh=e=>typeof e==`function`?e:function(){return e},Wh=typeof self<`u`?self:null,Gh=typeof window<`u`?window:null,Kh=Wh||Gh||globalThis,qh=`2.0.0`,Jh=1e4,Yh=1e3,Xh={connecting:0,open:1,closing:2,closed:3},Zh={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},Qh={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},$h={longpoll:`longpoll`,websocket:`websocket`},eg={complete:4},tg=`base64url.bearer.phx.`,ng=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived(`timeout`)||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger(`timeout`,{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},rg=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries+=1,this.callback()},this.timerCalc(this.tries+1))}},ig=class{constructor(e,t,n){this.state=Zh.closed,this.topic=e,this.params=Uh(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ng(this,Qh.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new rg(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive(`ok`,()=>{this.state=Zh.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=Zh.errored,this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log(`channel`,`close ${this.topic}`),this.state=Zh.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=Zh.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive(`timeout`,()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`timeout ${this.topic}`,this.joinPush.timeout),new ng(this,Qh.leave,Uh({}),this.timeout).send(),this.state=Zh.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Qh.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(this.joinedOnce)throw Error(`tried to join multiple times. 'join' can only be called a single time per channel instance`);return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Zh.closed,this.bindings=[]}onClose(e){this.on(Qh.close,e)}onError(e){return this.on(Qh.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(t===void 0||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t||={},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new ng(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Zh.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(Qh.close,`leave`)},n=new ng(this,Qh.leave,Uh({}),e);return n.receive(`ok`,()=>t()).receive(`timeout`,()=>t()),n.send(),this.canPush()||n.trigger(`ok`,{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic===e?r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log(`channel`,`dropping outdated message`,{topic:e,event:t,payload:n,joinRef:r}),!1):!0:!1}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Zh.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error(`channel onMessage callbacks must return the payload, modified or unmodified`);let a=this.bindings.filter(r=>r.event===e&&this.filterBindings(r,t,n));for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Zh.closed}isErrored(){return this.state===Zh.errored}isJoined(){return this.state===Zh.joined}isJoining(){return this.state===Zh.joining}isLeaving(){return this.state===Zh.leaving}},ag=class{static request(e,t,n,r,i,a,o){if(Kh.XDomainRequest){let n=new Kh.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}else if(Kh.XMLHttpRequest){let s=new Kh.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}else if(Kh.fetch&&Kh.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);else throw Error(`No suitable XMLHttpRequest implementation found`)}static fetchRequest(e,t,n,r,i,a,o){let s={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),Kh.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{e.name===`AbortError`&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){e.open(t,n,!0),e.timeout=a;for(let[t,n]of Object.entries(r))e.setRequestHeader(t,n);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===eg.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e===``)return null;try{return JSON.parse(e)}catch{return console&&console.log(`failed to parse JSON response`,e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,a=e[r];typeof a==`object`?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+`=`+encodeURIComponent(a))}return n.join(`&`)}static appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${this.serialize(t)}`}},og=e=>{let t=``,n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)},sg=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(tg)&&(this.authToken=atob(t[1].slice(tg.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Xh.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+$h.websocket),`$1/`+$h.longpoll)}endpointURL(){return ag.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Xh.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===Xh.open||this.readyState===Xh.connecting}poll(){let e={Accept:`application/json`};this.authToken&&(e[`X-Phoenix-AuthToken`]=this.authToken),this.ajax(`GET`,e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,`session_gone`,!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Xh.open,this.onopen({}),this.poll();break;
13case 403:this.onerror(403),this.close(1008,`forbidden`,!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,`internal server error`,500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){typeof e!=`string`&&(e=og(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},e.join(` 14`),()=>this.onerror(`timeout`),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,`internal server error`,!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=Xh.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<`u`?this.onclose(new CloseEvent(`close`,r)):this.onclose(r)}ajax(e,t,n,r,i){let a;a=ag.request(e,this.endpointURL(),t,n,this.timeout,()=>{this.reqs.delete(a),r()},e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},cg=class e{constructor(t,n={}){let r=n.events||{state:`presence_state`,diff:`presence_diff`};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel.on(r.diff,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,n,r){let i=this.clone(e),a={},o={};return this.map(i,(e,n)=>{t[e]||(o[e]=n)}),this.map(t,(e,t)=>{let n=i[e];if(n){let r=t.metas.map(e=>e.phx_ref),i=n.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>i.indexOf(e.phx_ref)<0),c=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);s.length>0&&(a[e]=t,a[e].metas=s),c.length>0&&(o[e]=this.clone(n),o[e].metas=c)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},n,r)}static syncDiff(e,t,n,r){let{joins:i,leaves:a}=this.clone(t);return n||=function(){},r||=function(){},this.map(i,(t,r)=>{let i=e[t];if(e[t]=this.clone(r),i){let n=e[t].metas.map(e=>e.phx_ref),r=i.metas.filter(e=>n.indexOf(e.phx_ref)<0);e[t].metas.unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>a.indexOf(e.phx_ref)<0),r(t,i,n),i.metas.length===0&&delete e[t]}),e}static list(e,t){return t||=function(e,t){return t},this.map(e,(e,n)=>t(e,n))}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},lg={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=this.META_LENGTH+t.length+n.length+i.length+r.length,s=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(s),l=0;c.setUint8(l++,this.KINDS.push),c.setUint8(l++,t.length),c.setUint8(l++,n.length),c.setUint8(l++,i.length),c.setUint8(l++,r.length),Array.from(t,e=>c.setUint8(l++,e.charCodeAt(0))),Array.from(n,e=>c.setUint8(l++,e.charCodeAt(0))),Array.from(i,e=>c.setUint8(l++,e.charCodeAt(0))),Array.from(r,e=>c.setUint8(l++,e.charCodeAt(0)));var u=new Uint8Array(s.byteLength+a.byteLength);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(a),s.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 12,506 bytes, line 14
14,decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+i));o+=i;let l=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:c,event:l,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=n.decode(e.slice(s,s+o));s+=o;let f={status:d,response:e.slice(s,e.byteLength)};return{join_ref:c,ref:l,topic:u,event:Qh.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},ug=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Jh,this.transport=t.transport||Kh.WebSocket||sg,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Kh&&Kh.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=lg.encode.bind(lg),this.defaultDecoder=lg.decode.bind(lg),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||`arraybuffer`,this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport===sg?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;Gh&&Gh.addEventListener&&(Gh.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Gh.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),Gh.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Uh(t.params||{}),this.endPoint=`${e}/${$h.websocket}`,this.vsn=t.vsn||qh,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new rg(()=>{if(this.pageHidden){this.log(`Not reconnecting as page is hidden!`),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return sg}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&=(this.conn.close(),null),this.transport=e}protocol(){return location.protocol.match(/^https/)?`wss`:`ws`}endPointURL(){let e=ag.appendParams(ag.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)===`/`?e.charAt(1)===`/`?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`:e}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log(`passing params to connect is deprecated. Instead pass :params to the Socket constructor`),this.params=Uh(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==sg?this.connectWithFallback(sg,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case sg:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${tg}${btoa(this.authToken).replace(/=/g,``)}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,a=this.transportName(e),o=t=>{this.log(`transport`,`falling back to ${a}...`,t),this.off([void 0,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o(`memorized`);this.fallbackTimer=setTimeout(o,t),i=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),o(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,`true`),this.log(`transport`,`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,t),this.ping(e=>{this.log(`transport`,`connected to primary after`,e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log(`transport`,`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks(`open`)}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log(`transport`,`heartbeat timeout. Attempting to re-establish connection`);try{this.heartbeatCallback(`timeout`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.triggerChanError(Error(`heartbeat timeout`)),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Yh,`heartbeat timeout`)}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||``):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Xh.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log(`transport`,`close`,e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks(`close`,e)}onConnError(e){this.hasLogger()&&this.log(`transport`,`error`,e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks(`error`,e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Qh.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Xh.connecting:return`connecting`;case Xh.open:return`open`;case Xh.closing:return`closing`;default:return`closed`}}isConnected(){return this.connectionState()===`open`}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>e.indexOf(t)===-1)}channel(e,t={}){let n=new ig(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log(`push`,`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(r.status===`ok`?`ok`:`error`,e)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log(`receive`,`${r.status||``} ${t} ${n} ${i&&`(`+i+`)`||``}`.trim(),r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}this.triggerStateCallbacks(`message`,e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log(`transport`,`leaving duplicate topic "${e}"`),t.leave())}},dg=class e{constructor(t,n){let r=mg(n);this.presence=new cg(t.getChannel(),r),this.presence.onJoin((n,r,i)=>{let a=e.onJoinPayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onLeave((n,r,i)=>{let a=e.onLeavePayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onSync(()=>{t.getChannel().trigger(`presence`,{event:`sync`})})}get state(){return e.transformState(this.presence.state)}static transformState(e){return e=pg(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=fg(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:hg(t),newPresences:fg(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:hg(t),leftPresences:fg(n)}}};function fg(e){return e.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function pg(e){return JSON.parse(JSON.stringify(e))}function mg(e){return e?.events&&{events:e.events}}function hg(e){return e?.metas?fg(e):[]}var gg;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(gg||={});var _g=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new dg(this.channel.channelAdapter,t)}};function vg(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);
14if(e&&typeof e==`object`){let t=e;if(typeof t.code==`number`){let n=typeof t.reason==`string`&&t.reason?` (${t.reason})`:``;return Error(`socket closed: ${t.code}${n}`,{cause:e})}return Error(`channel error: transport failure`,{cause:e})}return Error(`channel error: connection lost`)}var yg=class{constructor(e,t,n){let r=bg(n);this.channel=e.getSocket().channel(t,r),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,n){let r;try{r=this.channel.push(e,t,n)}catch{throw Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload())}return r}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===Oh.joined}isJoined(){return this.state===Oh.joined}isJoining(){return this.state===Oh.joining}isClosed(){return this.state===Oh.closed}isLeaving(){return this.state===Oh.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function bg(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var xg;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(xg||={});var Sg;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(Sg||={});var Cg;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(Cg||={});var wg=class e{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},n){if(this.topic=e,this.params=t,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,``),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},t.config),this.channelAdapter=new yg(this.socket.socketAdapter,e,this.params),this.presence=new _g(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Hh(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:n,presence:r,private:i}}=this.params,a=this.bindings.postgres_changes?.map(e=>e.filter)??[],o=!!this.bindings[Sg.PRESENCE]&&this.bindings[Sg.PRESENCE].length>0||this.params.config.presence?.enabled===!0,s={},c={broadcast:n,presence:Object.assign(Object.assign({},r),{enabled:o}),postgres_changes:a,private:i};this.socket.accessTokenValue&&(s.access_token=this.socket.accessTokenValue),this._onError(t=>{e?.(Cg.CHANNEL_ERROR,vg(t))}),this._onClose(()=>e?.(Cg.CLOSED)),this.updateJoinPayload(Object.assign({config:c},s)),this._updateFilterMessage(),this.channelAdapter.subscribe(t).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(Cg.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=Oh.errored;let n=Object.values(t).join(`, `)||`error`;e?.(Cg.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(Cg.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=t&&t[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=Oh.errored,n?.(Cg.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=Oh.errored&&n&&n(Cg.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){let r=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Sg.PRESENCE||e===Sg.POSTGRES_CHANGES;if(r&&i)throw this.socket.log(`channel`,`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(Error(`Payload is required for httpSend()`));let r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":r?`application/octet-stream`:`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set(`private`,`true`);let o={method:`POST`,headers:i,body:r?t:JSON.stringify(t)},s=await this._fetchWithTimeout(a.toString(),o,n.timeout??this.timeout);if(s.status===202)return{success:!0};let c=s.statusText;
14try{let e=await s.json();c=e.error||e.message||c}catch{}return Promise.reject(Error(c))}async send(e,t={}){if(!this.channelAdapter.canPush()&&e.type===`broadcast`){console.warn(`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`);let{event:n,payload:r}=e,i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a={method:`POST`,headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:r,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,a,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e instanceof Error&&e.name===`AbortError`?`timed out`:`error`}}else return new Promise(n=>{let r=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive(`ok`,()=>t(`ok`)).receive(`timeout`,()=>t(`timed out`)).receive(`error`,()=>t(`error`))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_on(e,t,n){let r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:n,ref:this.channelAdapter.on(e,n)};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,n)=>{let r=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(r,n))return!1;let i=this.bindings[r]?.find(t=>t.ref===e.ref);if(!i)return!0;if([`broadcast`,`presence`,`postgres_changes`].includes(r))if(`id`in i){let e=i.id,n=i.filter?.event;return e&&t.ids?.includes(e)&&(n===`*`||n?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}else{let e=(i?.filter?.event)?.toLocaleLowerCase();return e===`*`||e===(t?.event)?.toLocaleLowerCase()}else return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=kh;return t&&[n,r,i,a].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,n)=>{if(typeof t==`object`&&`ids`in t){let e=t.data,{schema:n,table:r,commit_timestamp:i,type:a,errors:o}=e;return Object.assign(Object.assign({},{schema:n,table:r,commit_timestamp:i,eventType:a,new:{},old:{},errors:o}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error(`cannot copy bindings into joined channel`);for(let t in e.bindings)for(let n of e.bindings[t])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=Nh(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=Nh(e.columns,e.old_record)),t}},Tg=class{constructor(e,t){this.socket=new ug(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,n,r=1e4){return new Promise(i=>{setTimeout(()=>i(`timeout`),r),this.socket.disconnect(()=>{e(),i(`ok`)},t,n)})}push(e){this.socket.push(e)}log(e,t,n){this.socket.log(e,t,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Ah.connecting}isDisconnecting(){return this.socket.connectionState()==Ah.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},Eg={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Dg=[1e3,2e3,5e3,1e4],Og=1e4;function kg(){let e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){return Array.from(e.keys())[t]??null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function Ag(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return kg()}var jg=` 15 addEventListener("message", (e) => { 16 if (e.data.event === "start") { 17 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 18 } 19 });`,Mg=class{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint=``,this.headers={},this.params={}
19,this.ref=0,this.serializer=new jh,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new Tg(e,n),this.httpEndpoint=Hh(e),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){let t=e.message;throw t.includes(`Node.js`)?Error(`${t}\n\nTo use Realtime in Node.js, you need to provide a WebSocket implementation: 20 21Option 1: Use Node.js 22+ which has native WebSocket support 22Option 2: Install and provide the "ws" package: 23 24 npm install ws 25 26 import ws from "ws" 27 const client = new RealtimeClient(url, { 28 ...options, 29 transport: ws 30 })`):Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?`ok`:await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return t===`ok`&&e.teardown(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return await this.disconnect(),t}log(e,t,n){this.socketAdapter.log(e,t,n)}connectionState(){return this.socketAdapter.connectionState()||Ah.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new wg(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic),this.channels.length===0&&(this.log(`transport`,`no channels remaining, scheduling disconnect`),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log(`transport`,`disconnecting immediately - no channels`),this.disconnect();return}
30this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log(`transport`,`deferred disconnect fired - no channels, disconnecting`),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log(`transport`,`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log(`transport`,`pending disconnect cancelled - channel activity detected`),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let t,n=!1;if(e)t=e,n=!0;else if(this.accessToken)try{t=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),t=this.accessTokenValue}else t=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{let n={access_token:t,version:Ch};t&&e.updateJoinPayload(n),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(kh.access_token,{access_token:t})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,n)=>{t==`sent`&&this._setAuthSafely(),e&&e(t,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([jg],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_initializeOptions(e){this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null;let t={};t.timeout=e?.timeout??Dh,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??Eg.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??Eg.HEARTBEAT_INTERVAL),t.transport=e?.transport??Sh.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??Ag(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>Dg[e-1]||Og);let n,r,i=e?.vsn??Eh;switch(i){case wh:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case Th:n=this.serializer.encode.bind(this.serializer),r=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${t.vsn}`)}if(t.vsn=i,t.encode=e?.encode??n,t.decode=e?.decode??r,t.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,t.params=Object.assign(Object.assign({},t.params),{log_level:this.logLevel})),this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl,t.autoSendHeartbeat=!this.worker}return t}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,836 bytes, line 30
30,Ng=class extends Error{constructor(e,t){super(e),this.name=`IcebergError`,this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType===`CommitStateUnknownException`||[500,502,504].includes(t.status)&&t.icebergType?.includes(`CommitState`)===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Pg(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function Fg(e){return!e||e.type===`none`?{}:e.type===`bearer`?{Authorization:`Bearer ${e.token}`}:e.type===`header`?{[e.name]:e.value}:e.type===`custom`?await e.getHeaders():{}}function Ig(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=Pg(e.baseUrl,r,i),c=await Fg(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new Ng(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function Lg(e){return e.join(`�`)}var Rg=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:Lg(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${Lg(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Lg(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Lg(e.namespace)}`}),!0}catch(e){if(e instanceof Ng&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof Ng&&e.status===409)return;throw e}}};function zg(e){return e.join(`�`)}var Bg=class{constructor(e,t=``,n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${zg(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${zg(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${zg(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data[`metadata-location`],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${zg(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${zg(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${zg(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof Ng&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ng&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},Vg=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=Ig({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new Rg(this.client,t),this.tableOps=new Bg(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
30async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Hg(e){"@babel/helpers - typeof";return Hg=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Hg(e)}function Ug(e,t){if(Hg(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Hg(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Wg(e){var t=Ug(e,`string`);return Hg(t)==`symbol`?t:t+``}function Gg(e,t,n){return(t=Wg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kg(Object(n),!0).forEach(function(t){Gg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Jg=class extends Error{constructor(e,t=`storage`,n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t===`vectors`?`StorageVectorsError`:`StorageError`,this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Yg(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var Xg=class extends Jg{constructor(e,t,n,r=`storage`){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n}toJSON(){return qg({},super.toJSON())}},Zg=class extends Jg{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function Qg(e,t,n){let r=qg({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function $g(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var e_=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),t_=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},n_=e=>{if(Array.isArray(e))return e.map(e=>n_(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=n_(n)}),t},r_=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),i_=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error;if(typeof t.error==`object`&&t.error!==null){let e=t.error;if(typeof e.message==`string`)return e.message}}return JSON.stringify(e)},a_=async(e,t,n,r)=>{if(typeof e==`object`&&e&&`json`in e&&typeof e.json==`function`){let n=e,i=parseInt(String(n.status),10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new Xg(i_(e),i,n,r))}).catch(()=>{let e=i+``;t(new Xg(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new Zg(i_(e),e,r))},o_=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return qg(qg({},i),n);if(t_(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=Qg(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),qg(qg({},i),n)};async function s_(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,o_(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>a_(e,c,r,o))})}function c_(e=`storage`){return{get:async(t,n,r,i)=>s_(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>s_(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>s_(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>s_(t,`HEAD`,n,qg(qg({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>s_(t,`DELETE`,n,i,a,r,e)}}
30var{get:l_,post:u_,put:d_,head:f_,remove:p_}=c_(`storage`),m_=c_(`vectors`),h_=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=$g(t),this.fetch=e_(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Qg(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Yg(e))return{data:null,error:e};throw e}}},g_=Symbol.toStringTag,__=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[g_]=`StreamDownloadBuilder`,this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Yg(t))return{data:null,error:t};throw t}}},v_=Symbol.toStringTag,y_=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[v_]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new __(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Yg(t))return{data:null,error:t};throw t}}},b_={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},x_={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},S_=class extends h_{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=qg(qg({},x_),r),s=qg(qg({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;if(typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))s=Qg(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?d_:u_)(i.fetch,`${i.url}/object/${u}`,a,qg({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=qg(qg({},x_),r),o=qg(qg({},i.headers),{"x-upsert":String(t.upsert)}),c=t.metadata;if(typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),c&&e.append(`metadata`,i.encodeMetadata(c)),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.has(`cacheControl`)||e.append(`cacheControl`,t.cacheControl),c&&!e.has(`metadata`)&&e.append(`metadata`,i.encodeMetadata(c))):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType,c&&(o[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&e instanceof ReadableStream||e&&typeof e==`object`&&`pipe`in e&&typeof e.pipe==`function`)&&!t.duplex&&(t.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))o=Qg(o,e,t);return{path:a,fullPath:(await d_(i.fetch,s.toString(),e,qg({headers:o},t?.duplex?{duplex:t.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=qg({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await u_(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new Jg(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,n){return this.uploadOrUpdate(`PUT`,e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await u_(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
30stinationBucket:n?.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await u_(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await u_(r.fetch,`${r.url}/object/sign/${i}`,qg({expiresIn:t},a?{transform:n.transform}:{}),{headers:r.headers}),s=new URLSearchParams;n?.download&&s.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&s.set(`cacheNonce`,String(n.cacheNonce));let c=s.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:``}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await u_(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=new URLSearchParams;n?.download&&a.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&a.set(`cacheNonce`,String(n.cacheNonce));let o=a.toString();return i.map(e=>qg(qg({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${o?`&${o}`:``}`):null}))})}download(e,t,n){let r=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image/authenticated`:`object`,i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set(`cacheNonce`,String(t.cacheNonce));let a=i.toString(),o=this._getFinalPath(e);return new y_(()=>l_(this.fetch,`${this.url}/${r}/${o}${a?`?${a}`:``}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e){var t=this;let n=t._getFinalPath(e);return t.handleOperation(async()=>n_(await l_(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await f_(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Yg(e)){let t=e instanceof Xg?e.status:e instanceof Zg?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let n=this._getFinalPath(e),r=new URLSearchParams;t?.download&&r.set(`download`,t.download===!0?``:t.download),t?.transform&&this.applyTransformOptsToQuery(r,t.transform),t?.cacheNonce!=null&&r.set(`cacheNonce`,String(t.cacheNonce));let i=r.toString(),a=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image`:`object`;return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}`)+(i?`?${i}`:``)}}}async remove(e){var t=this;return t.handleOperation(async()=>await p_(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=qg(qg(qg({},b_),t),{},{prefix:e||``});return await u_(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=qg({},e);return await u_(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,``)}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)}applyTransformOptsToQuery(e,t){return t.width&&e.set(`width`,t.width.toString()),t.height&&e.set(`height`,t.height.toString()),t.resize&&e.set(`resize`,t.resize),t.format&&e.set(`format`,t.format),t.quality&&e.set(`quality`,t.quality.toString()),e}},C_={"X-Client-Info":`storage-js/2.108.1`},w_=class extends h_{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=qg(qg({},C_),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await l_(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await l_(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await u_(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await d_(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await u_(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await p_(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){let t={};return e&&(`limit`in e&&(t.limit=String(e.limit)),`offset`in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>
300?`?`+new URLSearchParams(t).toString():``}},T_=class extends h_{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=qg(qg({},C_),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await u_(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=new URLSearchParams;e?.limit!==void 0&&n.set(`limit`,e.limit.toString()),e?.offset!==void 0&&n.set(`offset`,e.offset.toString()),e?.sortColumn&&n.set(`sortColumn`,e.sortColumn),e?.sortOrder&&n.set(`sortOrder`,e.sortOrder),e?.search&&n.set(`search`,e.search);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await l_(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await p_(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!r_(e))throw new Jg(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new Vg({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},E_=class extends h_{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=qg(qg({},C_),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await m_.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await m_.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},D_=class extends h_{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=qg(qg({},C_),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},O_=class extends h_{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=qg(qg({},C_),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await m_.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},k_=class extends O_{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new A_(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}}
30,A_=class extends E_{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new j_(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},j_=class extends D_{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,qg(qg({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},M_=class extends w_{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new S_(this.url,this.headers,e,this.fetch)}get vectors(){return new k_(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new T_(this.url+`/iceberg`,this.headers,this.fetch)}},N_=`2.108.1`,P_=30*1e3,F_=3*P_,I_=`http://localhost:9999`,L_=`supabase.auth.token`,R_={"X-Client-Info":`gotrue-js/${N_}`},z_=`X-Supabase-Api-Version`,B_={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},V_=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,H_=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}};function z(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var U_=class extends H_{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function W_(e){return z(e)&&e.name===`AuthApiError`}var G_=class extends H_{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},K_=class extends H_{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},q_=class extends K_{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function J_(e){return z(e)&&e.name===`AuthSessionMissingError`}var Y_=class extends K_{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
30ResponseError`,500,void 0)}},X_=class extends K_{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},Z_=class extends K_{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}};function Q_(e){return z(e)&&e.name===`AuthImplicitGrantRedirectError`}var $_=class extends K_{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}},ev=class extends K_{constructor(){super(`PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.`,`AuthPKCECodeVerifierMissingError`,400,`pkce_code_verifier_not_found`)}},tv=class extends K_{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function nv(e){return z(e)&&e.name===`AuthRetryableFetchError`}var rv=class extends K_{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function iv(e){return z(e)&&e.name===`AuthRefreshDiscardedError`}var av=class extends K_{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},ov=class extends K_{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},sv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),cv=` 31\r=`.split(``),lv=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<cv.length;t+=1)e[cv[t].charCodeAt(0)]=-2;for(let t=0;t<sv.length;t+=1)e[sv[t].charCodeAt(0)]=t;return e})();function uv(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(sv[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(sv[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function dv(e,t,n){let r=lv[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else if(r===-2)return;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function fv(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{hv(e,r,n)};for(let t=0;t<e.length;t+=1)dv(e.charCodeAt(t),i,a);return t.join(``)}function pv(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function mv(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}pv(r,t)}}function hv(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function gv(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)dv(e.charCodeAt(t),n,r);return new Uint8Array(t)}function _v(e){let t=[];return mv(e,e=>t.push(e)),new Uint8Array(t)}function vv(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>uv(e,n,r)),uv(null,n,r),t.join(``)}function yv(e){return Math.round(Date.now()/1e3)+e}function bv(){return Symbol(`auth-callback`)}var xv=()=>typeof window<`u`&&typeof document<`u`,Sv={tested:!1,writable:!1},Cv=()=>{if(!xv())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(Sv.tested)return Sv.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Sv.tested=!0,Sv.writable=!0}catch{Sv.tested=!0,Sv.writable=!1}return Sv.writable};function wv(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEac
31h((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var Tv=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Ev=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,Dv=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ov=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},kv=async(e,t)=>{await e.removeItem(t)},Av=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Av.promiseConstructor=Promise;function jv(e){let t=e.split(`.`);if(t.length!==3)throw new ov(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!V_.test(t[e]))throw new ov(`JWT not in base64url format`);return{header:JSON.parse(fv(t[0])),payload:JSON.parse(fv(t[1])),signature:gv(t[2]),raw:{header:t[0],payload:t[1]}}}async function Mv(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Nv(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function Pv(e){return(`0`+e.toString(16)).substr(-2)}function Fv(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,Pv).join(``)}async function Iv(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function Lv(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await Iv(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function Rv(e,t,n=!1){let r=Fv(),i=r;n&&(i+=`/recovery`),await Dv(e,`${t}-code-verifier`,i);let a=await Lv(r);return[a,r===a?`plain`:`s256`]}var zv=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Bv(e){let t=e.headers.get(z_);if(!t||!t.match(zv))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Vv(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function Hv(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var Uv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Wv(e){if(!Uv.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function Gv(e){if(!e.passkey)throw Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Kv(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function qv(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;
31if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`string`&&(console.warn(`Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.`),t.value=!0),Reflect.get(e,n,r)}})}function Jv(e){return JSON.parse(JSON.stringify(e))}var Yv=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error}return JSON.stringify(e)},Xv=[502,503,504,520,521,522,523,524,530];async function Zv(e){if(!Ev(e))throw new tv(Yv(e),0);if(Xv.includes(e.status))throw new tv(Yv(e),e.status);let t;try{t=await e.json()}catch(e){throw new G_(Yv(e),e)}let n,r=Bv(e);if(r&&r.getTime()>=B_[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0))throw new av(Yv(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new av(Yv(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new q_;throw new U_(Yv(t),e.status||500,n)}var Qv=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function B(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[z_]=B_[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);let o=await $v(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function $v(e,t,n,r,i,a){let o=Qv(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw console.error(e),new tv(Yv(e),0)}if(s.ok||await Zv(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await Zv(e)}}function ey(e){let t=null;oy(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=yv(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function ty(e){let t=ey(e);return!t.error&&e.weak_password&&typeof e.weak_password==`object`&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message==`string`&&e.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function ny(e){return{data:{user:e.user??e},error:null}}function ry(e){return{data:e,error:null}}function iy(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=qm(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function ay(e){return e}function oy(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var sy=[`global`,`local`,`others`],cy=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=Tv(n),this.experimental=r??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,t=sy[0]){if(sy.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${sy.join(`, `)}`);try{return await B(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await B(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:ny})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=qm(e,[`options`]),r=Object.assign(Object.assign({},n),t);
31return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await B(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:iy,redirectTo:t?.redirectTo})}catch(e){if(z(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await B(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ny})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await B(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:ay});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(z(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){Wv(e);try{return await B(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ny})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){Wv(e);try{return await B(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:ny})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){Wv(e);try{return await B(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:ny})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){Wv(e.userId);try{let{data:t,error:n}=await B(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _deleteFactor(e){Wv(e.userId),Wv(e.id);try{return{data:await B(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await B(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:ay});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(z(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await B(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await B(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await B(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await B(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await B(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await B(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(z(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await B(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await B(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await B(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await B(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){Gv(this.experimental),Wv(e.userId);try{return await B(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){Gv(this.experimental),Wv(e.userId),Wv(e.passkeyId);try{return await B(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}};function ly(e={}){return{getItem:t=>
31e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Cv()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var uy=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function dy(){if(typeof globalThis!=`object`)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<`u`&&(self.globalThis=self)}}function fy(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function py(e){return parseInt(e,16)}function my(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function hy(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(` 32`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=fy(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=` 33Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}var gy=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}toJSON(){return{name:this.name,message:this.message,code:this.code}}},_y=class extends gy{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function vy({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new gy({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new gy({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new gy({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new gy({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new gy({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new gy({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new gy({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new gy({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Ty(t))return new gy({message:`${window.location.hostname}
33 is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new gy({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new gy({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new gy({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new gy({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function yy({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new gy({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new gy({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Ty(t))return new gy({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new gy({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new gy({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new gy({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var by=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function xy(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=qm(e,[`challenge`,`user`,`excludeCredentials`]),a=gv(t).buffer,o=Object.assign(Object.assign({},n),{id:gv(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:gv(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function Sy(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=qm(e,[`challenge`,`allowCredentials`]),i=gv(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:gv(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function Cy(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:vv(new Uint8Array(e.response.attestationObject)),clientDataJSON:vv(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function wy(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;
33return{id:e.id,rawId:e.id,response:{authenticatorData:vv(new Uint8Array(r.authenticatorData)),clientDataJSON:vv(new Uint8Array(r.clientDataJSON)),signature:vv(new Uint8Array(r.signature)),userHandle:r.userHandle?vv(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function Ty(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ey(){return!!(xv()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function Dy(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new _y(`Browser returned unexpected credential type`,t)}:{data:null,error:new _y(`Empty credential response`,t)}}catch(t){return{data:null,error:vy({error:t,options:e})}}}async function Oy(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new _y(`Browser returned unexpected credential type`,t)}:{data:null,error:new _y(`Empty credential response`,t)}}catch(t){return{data:null,error:yy({error:t,options:e})}}}var ky={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},Ay={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function jy(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0)if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];t(n)?r[e]=jy(n,a):r[e]=jy(a)}else r[e]=a}return r}function My(e,t){return jy(ky,e,t||{})}function Ny(e,t){return jy(Ay,e,t||{})}var Py=class{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:`webauthn`}))}async _challenge({factorId:e,webauthn:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??by.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await Dy({publicKey:My(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=Ny(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await Oy(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return z(e)?{data:null,error:e}:{data:null,error:new G_(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new H_(`rpId is required for WebAuthn authentication`)};try{if(!Ey())return{data:null,error:new G_(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return z(e)?{data:null,error:e}:{data:null,error:new G_(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new H_(`rpId is required for WebAuthn registration`)};try{if(!Ey())return{data:null,error:new G_(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status!==`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return z(e)?{data:null,error:e}:{data:null,error:new G_(`Unexpected error in register`,e)}}}};dy();var Fy={url:I_,storageKey:L_,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:R_,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Iy={},Ly=class e{get jwks(){return Iy[this.storageKey]?.jwks??{keys:[]}}set jwks(e){Iy[this.storageKey]=Object.assign(Object.assign({},Iy[this.storageKey]),{jwks:e})}get jwks_cached_at(){return Iy[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){Iy[this.storageKey]=Object.assign(Object.assign({},Iy[this.storageKey]),{cachedAt:e})}constructor(t){var n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let r=Object.assign(Object.assign({},Fy),t);
33if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&xv()){let e=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.experimental=r.experimental??{},this.admin=new cy({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=Tv(r.fetch),this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock!=null&&(this.lock=r.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=-(2**53-1)),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Py(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:Cv()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ly(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=ly(this.memoryStorage)),xv()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${N_}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise||=(async()=>this.lock==null?await this._initialize():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise}async _initialize(){try{let e={},t=`none`;if(xv()&&(e=wv(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),xv()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),Q_(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return z(e)?this._returnResult({error:e}):this._returnResult({error:new G_(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await B(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:ey});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e,a=null,o=null;this.flowType===`pkce`&&([a,o]=await Rv(this.storage,this.storageKey)),t=await B(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:i?.emailRedirectTo,body:{email:n,password:r,data:i?.data??{},gotrue_meta_security:{captcha_token:i?.captchaToken},code_challenge:a,code_challenge_method:o},xform:ey})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await B(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:n,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ey})}else throw new X_(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r||!n)return await kv(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:r});let i=n.session,a=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,i)),this._returnResult({data:{user:a,session:i},error:null})}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await B(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ty})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await B(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ty})}else throw new X_(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new Y_;return this._returnResult({data:{user:null,session:null},error:e})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock==null?this._exchangeCodeForSession(e):this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!xv()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw Error(`@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=fy(l[0]),d=o?.signInWithEthereum?.chainId;d||=py(await s.request({method:`eth_chainId`})),t=hy({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[my(t),u]})}try{let{data:r,error:i}=await B(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:ey});if(i)throw i;if(!r||!r.session||!r.user){let e=new Y_;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!xv()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.
33solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw Error(`@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(` 34`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await B(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:vv(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:ey});if(i)throw i;if(!r||!r.session||!r.user){let e=new Y_;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e){let[t,n]=(await Ov(this.storage,`${this.storageKey}-code-verifier`)??``).split(`/`);try{if(!t&&this.flowType===`pkce`)throw new ev;let{data:r,error:i}=await B(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:t},xform:ey});if(await kv(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!r||!r.session||!r.user){let e=new Y_;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(n===`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign(Object.assign({},r),{redirectType:n??null}),error:i})}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await B(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:ey});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new Y_;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){try{if(`email`in e){let{email:t,options:n}=e,r=null,i=null;this.flowType===`pkce`&&([r,i]=await Rv(this.storage,this.storageKey));let{error:a}=await B(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},code_challenge:r,code_challenge_method:i},redirectTo:n?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await B(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new X_(`You must provide either an email or phone number.`)}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await B(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:ey});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){try{let t=null,n=null;this.flowType===`pkce`&&([t,n]=await Rv(this.storage,this.storageKey));let r=await B(this.fetch,`POST`,`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},`providerId`in e?{provider_id:e.providerId}:null),`domain`in e?{domain:e.domain}:null),{redirect_to:e.options?.redirectTo??void 0}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:t,code_challenge_method:n}),headers:this.headers,xform:ry});return r.data?.url&&xv()&&!e.options?.skipBrowserRedirect&&window.location.assign(r.data.url),this._returnResult(r)}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,this.lock==null?await this._reauthenticate():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new q_;let{error:r}=await B(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{let t=`${this.url}/resend`;if(`email`in e){let{email:n,type:r,options:i}=e,a=null,o=null;this.flowType===`pkce`&&([a,o]=await Rv(this.storage,this.storageKey));let{error:s}=await B(this.fetch,`POST`,t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken},code_challenge:a,code_challenge_method:o},redirectTo:i?.emailRedirectTo});return s&&await kv(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:s})}else if(`phone`in e){let{phone:n,type:r,options:i}=e,{data:a,error:o}=await B(this.fetch,`POST`,t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new X_(`You must provide either an email or phone number and a type`)}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,this.lock==null?await this._useSession(async e=>e):await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug(`#_acquireLock`,`lock released for storage key`,this.storageKey),this.lockAcquired=!1}})}finally{this._debug(`#_acquireLock`,`end`)}}async _useSession(e){this._debug(`#_useSession`,`begin`);try{return await e(await this.__loadSession())}finally{this._debug(`#_useSession`,`end`)}}async __loadSession(){this._debug(`#__loadSession()`,`begin`),this.lock!=null&&!this.lockAcquired&&this._debug(`#__loadSession()`,`used outside of an acquired lock!`,Error().stack);try{let e=null,t=await Ov(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not val
34id`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<F_:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await Ov(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=Kv()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=qv(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t;return t=this.lock==null?await this._getUser():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()),t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await B(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:ny}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new q_}:await B(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:ny})})}catch(e){if(z(e))return J_(e)&&(await this._removeSession(),await kv(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,this.lock==null?await this._updateUser(e,t):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;if(!r.session)throw new q_;let a=r.session,o=null,s=null;this.flowType===`pkce`&&e.email!=null&&([o,s]=await Rv(this.storage,this.storageKey));let{data:c,error:l}=await B(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:t?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:s}),jwt:a.access_token,xform:ny});if(l)throw l;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers(`USER_UPDATED`,a),this._returnResult({data:{user:a.user},error:null})})}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,this.lock==null?await this._setSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new q_;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=jv(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(z(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,this.lock==null?await this._refreshSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new q_;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!xv())throw new Z_(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new Z_(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new $_(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new Z_(`Not a valid implicit grant flow url.`);break;default:}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new $_(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code);
34if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:t.redirectType??null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new Z_(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(z(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){let t=await Ov(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:`global`}){return await this.initializePromise,this.lock==null?await this._signOut(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let{data:n,error:r}=t;if(r&&!J_(r))return this._returnResult({error:r});let i=n.session?.access_token;if(i){let{error:t}=await this.admin.signOut(i,e);if(t&&!(W_(t)&&(t.status===404||t.status===401||t.status===403)||J_(t)))return this._returnResult({error:t})}return e!==`others`&&(await this._removeSession(),await kv(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){let t=bv(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,this.lock==null?await this._emitInitialSession(t):await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),J_(t)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null;this.flowType===`pkce`&&([n,r]=await Rv(this.storage,this.storageKey,!0));try{return await B(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){try{let{data:t,error:n}=await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;let i=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return await B(this.fetch,`GET`,i,{headers:this.headers,jwt:n.session?.access_token??void 0})});if(n)throw n;return xv()&&!e.options?.skipBrowserRedirect&&window.location.assign(t?.url),this._returnResult({data:{provider:e.provider,url:t?.url},error:null})}catch(t){if(z(t))return this._returnResult({data:{provider:e.provider,url:null},error:t});throw t}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await B(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ey});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new Y_}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await kv(this.storage,`${this.storageKey}-code-verifier`),z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await B(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken()`;this._debug(t,`begin`);try{let n=Date.now();return await Nv(async n=>(n>0&&await Mv(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await B(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ey})),(e,t)=>{let r=200*2**e;return t&&nv(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),z(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),xv()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await Ov(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Ov(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await Dv(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??Kv()}else if(t&&!t.user&&!t.user){let e=await Ov(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await kv(this.storage,this.storageKey+`-user`),await Dv(this.storage,this.storageKey,t)):t.user=Kv()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
34id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<F_;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${F_}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(iv(n)?this._debug(e,`refresh discarded by commit guard`,n):(this._debug(e,`refresh failed`,n),nv(n)||(this._debug(e,`refresh failed with a non-retryable error, removing the session`,n),await this._removeSession())))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new q_;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let r=`#_callRefreshToken()`;this._debug(r,`begin`);try{this.refreshingDeferred=new Av;let t=await Ov(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new q_;let a=await Ov(this.storage,this.storageKey);if(t!==null&&(a===null||a.refresh_token!==t.refresh_token)){this._debug(r,`commit guard: storage changed since refresh started, discarding rotated tokens`,{startedWith:`present`,nowHolds:a?`replaced`:`cleared`});let e={data:null,error:new rv};return this.refreshingDeferred.resolve(e),e}let o=this._sessionRemovalEpoch;if(await this._saveSession(n.session),this._sessionRemovalEpoch!==o){this._debug(r,`commit guard (post-save): _removeSession ran during _saveSession, undoing write`),await kv(this.storage,this.storageKey),this.userStorage&&await kv(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new rv};return this.refreshingDeferred.resolve(e),e}await this._notifyAllSubscribers(`TOKEN_REFRESHED`,n.session);let s={data:n.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(e){if(this._debug(r,`error`,e),z(e)){let n={data:null,error:e};return nv(e)||await this._removeSession(),(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(e),e}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0,await kv(this.storage,`${this.storageKey}-code-verifier`);let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await Dv(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Jv(e);await Dv(this.storage,this.storageKey,r)}else{let e=Jv(t);await Dv(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.suppressGetSessionWarning=!1,await kv(this.storage,this.storageKey),await kv(this.storage,this.storageKey+`-code-verifier`),await kv(this.storage,this.storageKey+`-user`),this.userStorage&&await kv(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&xv()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
34catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),P_);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)==null||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug(`#_autoRefreshTokenTick()`,`begin`),this.lock!=null){try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/P_);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${P_}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e instanceof uy)this._debug(`auto refresh token tick lock not available`);else throw e}return}if(this.refreshingDeferred!==null){this._debug(`#_autoRefreshTokenTick()`,`refresh already in flight, skipping`);return}try{let e=Date.now();try{await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/P_);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${P_}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!xv()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug(`#visibilityChangedCallback`,`error`,e)}},window==null||window.addEventListener(`visibilitychange`,this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error(`_handleVisibilityChange`,e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;if(this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting`);return}await this._recoverAndRefresh()});else{if(document.visibilityState!==`visible`){this._debug(t,`visibilityState is no longer visible, skipping recovery`);return}await this._recoverAndRefresh()}}else document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=[`provider=${encodeURIComponent(t)}`];if(n?.redirectTo&&r.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n?.scopes&&r.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType===`pkce`){let[e,t]=await Rv(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});
34r.push(n.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);r.push(e.toString())}return n?.skipBrowserRedirect&&r.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${r.join(`&`)}`}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await B(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await B(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?Cy(e.webauthn.credential_response):wy(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await B(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,a),this._returnResult({data:a,error:o}))})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challenge(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await B(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;if(a.type!==`webauthn`)return{data:a,error:null};switch(a.webauthn.type){case`create`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:xy(a.webauthn.credential_options.publicKey)})})}),error:null};case`request`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Sy(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=jv(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
34=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=jv(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await B(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new q_})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new q_});let a=await B(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&xv()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new q_});let a=await B(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&xv()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await B(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new q_})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await B(this.fetch,`DELETE`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new q_})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await B(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}
34=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=jv(n);if(!t?.allowExpired)try{Vv(i.exp)}catch(e){throw new ov(e instanceof Error?e.message:`JWT validation failed`)}let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=Hv(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,_v(`${o}.${s}`)))throw new ov(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){Gv(this.experimental);try{if(!Ey())return this._returnResult({data:null,error:new G_(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:e?.options?.captchaToken}});if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await Oy({publicKey:Sy(t.options),signal:e?.options?.signal??by.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new G_(`WebAuthn ceremony failed`,null)});let a=wy(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){Gv(this.experimental);try{if(!Ey())return this._returnResult({data:null,error:new G_(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyRegistration();if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await Dy({publicKey:xy(t.options),signal:e?.options?.signal??by.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new G_(`WebAuthn ceremony failed`,null)});let a=Cy(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){Gv(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new q_});let{data:r,error:i}=await B(this.fetch,`POST`,`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){Gv(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new q_});let{data:i,error:a}=await B(this.fetch,`POST`,`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){Gv(this.experimental);try{let{data:t,error:n}=await B(this.fetch,`POST`,`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:e?.options?.captchaToken}}});return n?this._returnResult({data:null,error:n}):this._returnResult({data:t,error:null})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){Gv(this.experimental);try{let{data:t,error:n}=await B(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:ey});return n?this._returnResult({data:null,error:n}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,t.session)),this._returnResult({data:t,error:null}))}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){Gv(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new q_});let{data:r,error:i}=await B(this.fetch,`GET`,`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){Gv(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new q_});let{data:i,error:a}=await B(this.fetch,`PATCH`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){Gv(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new q_});let{error:i}=await B(this.fetch,`DELETE`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}};Ly.nextInstanceID={};var Ry=Ly,zy=`2.108.1`,By=``,Vy;typeof Deno<`u`?(By=`deno`,Vy=Deno.version?.deno):typeof document<`u`?By=`web`:typeof navigator<`u`&&navigator.product===`ReactNative`?By=`react-native`:(By=`node`,Vy=typeof process<`u`?process.version?.replace(/^v/,``):void 0);var Hy=[`runtime=${By}`];Vy&&Hy.push(`runtime-version=${Vy}`);var Uy={headers:{"X-Client-Info":`supabase-js/${zy}; ${Hy.join(`; `)}`}},Wy={schema:`public`},Gy={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Ky={},qy={enabled:!1,respectSamplingDecision:!0};function Jy(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var Yy=null,Xy=`@opentelemetry/api`;function Zy(){return Yy===null&&(Yy=fl(()=>import(Xy),[]).catch(()=>null)),Yy}function Qy(){return Jy(this,void 0,void 0,function*(){try{let e=yield Zy();if(!e||!e.propagation||!e.context)return null;let t={};e.propagation.inject(e.context.active(),t);let n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function $y(e){if(!e||typeof e!=`string`)return null;let t=e.split(`-`);if(t.length!==4)return null;let[n,r,i,a]=t;if(n.length!==2||r.length!==32||i.length!==16||a.length!==2)return null;let o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(a)||r===`00000000000000000000000000000000`||i===`0000000000000000`?null:{version:n,traceId:r,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)==1}}function eb(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(let e of t)try{if(typeof e==`string`){if(tb(n.hostname,e))return!0}
34else if(e instanceof RegExp){if(e.test(n.hostname))return!0}else if(typeof e==`function`&&e(n))return!0}catch{continue}return!1}function tb(e,t){if(t===e)return!0;if(t.startsWith(`*.`)){let n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith(`.`+n)))return!0}return!1}function nb(e){let t=[];try{let n=new URL(e);t.push(n.hostname)}catch{}return t.push(`*.supabase.co`,`*.supabase.in`),t.push(`localhost`,`127.0.0.1`,`[::1]`),t}function rb(e){"@babel/helpers - typeof";return rb=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rb(e)}function ib(e,t){if(rb(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rb(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ab(e){var t=ib(e,`string`);return rb(t)==`symbol`?t:t+``}function ob(e,t,n){return(t=ab(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sb(Object(n),!0).forEach(function(t){ob(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lb=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),ub=()=>Headers,db=(e,t,n,r,i)=>{let a=lb(r),o=ub(),s=i?.enabled===!0,c=i?.respectSamplingDecision!==!1,l=s?nb(t):null;return async(t,r)=>{let i=await n()??e,s=new o(r?.headers);if(s.has(`apikey`)||s.set(`apikey`,e),s.has(`Authorization`)||s.set(`Authorization`,`Bearer ${i}`),l){let e=await fb(t,l,c);e&&(e.traceparent&&!s.has(`traceparent`)&&s.set(`traceparent`,e.traceparent),e.tracestate&&!s.has(`tracestate`)&&s.set(`tracestate`,e.tracestate),e.baggage&&!s.has(`baggage`)&&s.set(`baggage`,e.baggage))}return a(t,cb(cb({},r),{},{headers:s}))}};async function fb(e,t,n){if(!eb(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let r=await Qy();if(!r||!r.traceparent)return null;if(n){let e=$y(r.traceparent);if(e&&!e.isSampled)return null}return r}function pb(e){return typeof e==`boolean`?{enabled:e}:e}function mb(e){return e.endsWith(`/`)?e:e+`/`}function hb(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=pb(e.tracePropagation),d=pb(t.tracePropagation),f={db:cb(cb({},o),n),auth:cb(cb({},s),r),realtime:cb(cb({},c),i),storage:{},global:cb(cb(cb({},l),a),{},{headers:cb(cb({},l?.headers??{}),a?.headers??{})}),tracePropagation:{enabled:u?.enabled??d?.enabled??!1,respectSamplingDecision:u?.respectSamplingDecision??d?.respectSamplingDecision??!0},accessToken:async()=>``};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function gb(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(mb(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var _b=class extends Ry{constructor(e){super(e)}},vb=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=gb(e);if(!t)throw Error(`supabaseKey is required.`);this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:Wy,realtime:Ky,auth:cb(cb({},Gy),{},{storageKey:i}),global:Uy,tracePropagation:qy},o=hb(n??{},a);this.settings=o,this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=db(t,e,this._getAccessToken.bind(this),o.global.fetch,o.tracePropagation),this.realtime=this._initRealtimeClient(cb({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new xh(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit}),this.storage=new M_(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new nh(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
34channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,m){let h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _b({url:this.authUrl.href,headers:cb(cb({},h),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new Mg(this.realtimeUrl.href,cb(cb({},e),{},{params:cb(cb({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,`CLIENT`,t?.access_token)})}_handleTokenChanged(e,t,n){(e===`TOKEN_REFRESHED`||e===`SIGNED_IN`)&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e===`SIGNED_OUT`&&(this.realtime.setAuth(),t==`STORAGE`&&this.auth.signOut(),this.changedAccessToken=void 0)}},yb=(e,t,n)=>new vb(e,t,n);function bb(){if(typeof window<`u`)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}bb()&&console.warn(`â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217`);var xb=`https://zrxrhtupnbvhjpliqqfm.supabase.co`,Sb=`sb_publishable_0PjUUHMClIaX3V0vfotMZg_THF-K2oQ`,Cb=null,wb=(Cb||=yb(xb,Sb),Cb),Tb=`focusScope.autoFocusOnMount`,Eb=`focusScope.autoFocusOnUnmount`,Db={bubbles:!1,cancelable:!0},Ob=`FocusScope`,kb=_.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=_.useState(null),l=_e(i),u=_e(a),d=_.useRef(null),f=j(t,e=>c(e)),p=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Ib(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Ib(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ib(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),_.useEffect(()=>{if(s){Lb.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Tb,Db);s.addEventListener(Tb,l),s.dispatchEvent(t),t.defaultPrevented||(Ab(Bb(Mb(s)),{select:!0}),document.activeElement===e&&Ib(s))}return()=>{s.removeEventListener(Tb,l),setTimeout(()=>{let t=new CustomEvent(Eb,Db);s.addEventListener(Eb,u),s.dispatchEvent(t),t.defaultPrevented||Ib(e??document.body,{select:!0}),s.removeEventListener(Eb,u),Lb.remove(p)},0)}}},[s,l,u,p]);let m=_.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=jb(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Ib(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Ib(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,M.jsx)(N.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});kb.displayName=Ob;function Ab(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ib(r,{select:t}),document.activeElement!==n)return}function jb(e){let t=Mb(e);return[Nb(t,e),Nb(t.reverse(),e)]}function Mb(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Nb(e,t){for(let n of e)if(!Pb(n,{upTo:t}))return n}function Pb(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Fb(e){return e instanceof HTMLInputElement&&`select`in e}function Ib(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Fb(e)&&t&&e.select()}}var Lb=Rb();function Rb(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=zb(e,t),e.unshift(t)},remove(t){e=zb(e,t),e[0]?.resume()}}}function zb(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Bb(e){return e.filter(e=>e.tagName!==`A`)}var Vb=0;function Hb(){_.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Ub()),document.body.insertAdjacentElement(`beforeend`,e[1]??Ub()),Vb++,()=>{Vb===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e
vendor: 8,994 bytes, lines 34-74
34=>e.remove()),Vb--}},[])}function Ub(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Wb=`right-scroll-bar-position`,Gb=`width-before-scroll-bar`,Kb=`with-scroll-bars-hidden`,qb=`--removed-body-scroll-bar-size`;function Jb(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Yb(e,t){var n=(0,_.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Xb=typeof window<`u`?_.useLayoutEffect:_.useEffect,Zb=new WeakMap;function Qb(e,t){var n=Yb(t||null,function(t){return e.forEach(function(e){return Jb(e,t)})});return Xb(function(){var t=Zb.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Jb(e,null)}),i.forEach(function(e){r.has(e)||Jb(e,a)})}Zb.set(n,e)},[e]),n}function $b(e){return e}function ex(e,t){t===void 0&&(t=$b);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function tx(e){e===void 0&&(e={});var t=ex(null);return t.options=Km({async:!0,ssr:!1},e),t}var nx=function(e){var t=e.sideCar,n=qm(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return _.createElement(r,Km({},n))};nx.isSideCarExport=!0;function rx(e,t){return e.useMedium(t),nx}var ix=tx(),ax=function(){},ox=_.forwardRef(function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:ax,onWheelCapture:ax,onTouchMoveCapture:ax}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,g=e.as,v=g===void 0?`div`:g,y=e.gapMode,b=qm(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Qb([n,t]),C=Km(Km({},b),i);return _.createElement(_.Fragment,null,u&&_.createElement(x,{sideCar:ix,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:y}),o?_.cloneElement(_.Children.only(s),Km(Km({},C),{ref:S})):_.createElement(v,Km({},C,{className:c,ref:S}),s))});ox.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ox.classNames={fullWidth:Gb,zeroRight:Wb};var sx,cx=function(){if(sx)return sx;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function lx(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=cx();return t&&e.setAttribute(`nonce`,t),e}function ux(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dx(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var fx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lx())&&(ux(t,n),dx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},px=function(){var e=fx();return function(t,n){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mx=function(){var e=px();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},hx={left:0,top:0,right:0,gap:0},gx=function(e){return parseInt(e||``,10)||0},_x=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[gx(n),gx(r),gx(i)]},vx=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return hx;var t=_x(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yx=mx(),bx=`data-scroll-locked`,xx=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` 35 .${Kb} { 36 overflow: hidden ${r}; 37 padding-right: ${s}px ${r}; 38 } 39 body[${bx}] { 40 overflow: hidden ${r}; 41 overscroll-behavior: contain; 42 ${[t&&`position: relative ${r};`,n===`margin`&&` 43 padding-left: ${i}px; 44 padding-top: ${a}px; 45 padding-right: ${o}px; 46 margin-left:0; 47 margin-top:0; 48 margin-right: ${s}px ${r}; 49 `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} 50 } 51 52 .${Wb} { 53 right: ${s}px ${r}; 54 } 55 56 .${Gb} { 57 margin-right: ${s}px ${r}; 58 } 59 60 .${Wb} .${Wb} { 61 right: 0 ${r}; 62 } 63 64 .${Gb} .${Gb} { 65 margin-right: 0 ${r}; 66 } 67 68 body[${bx}] { 69 ${qb}: ${s}px; 70 } 71`},Sx=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Cx=function(){_.useEffect(function(){return document.body.setAttribute(bx,(Sx()+1).toString()),function(){var e=Sx()-1;e<=0?document.body.removeAttribute(bx):document.body.setAttribute(bx,e.toString())}},[])},wx=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Cx();var a=_.useMemo(function(){return vx(i)},[i]);return _.createElement(yx,{styles:xx(a,!t,i,n?``:`!important`)})},Tx=!1;if(typeof window<`u`)try{var Ex=Object.defineProperty({},"passive",{get:function(){return Tx=!0,!0}});window.addEventListener(`test`,Ex,Ex),window.removeEventListener(`test`,Ex,Ex)}catch{Tx=!1}var Dx=Tx?{passive:!1}:!1,Ox=function(e){return e.tagName===`TEXTAREA`},kx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ox(e)&&n[t]===`visible`)},Ax=function(e){return kx(e,`overflowY`)},jx=function(e){return kx(e,`overflowX`)},Mx=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Fx(e,r)){var i=Ix(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Nx=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Px=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Fx=function(e,t){return e===`v`?Ax(t):jx(t)},Ix=function(e,t){return e===`v`?Nx(t):Px(t)},Lx=function(e,t){return e===`h`&&t===`rtl`?-1:1},Rx=function(e,t,n,r,i){var a=Lx(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{var p=Ix(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Fx(e,s)&&(d+=h,f+=m),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},zx=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bx=function(e){return[e.deltaX,e.deltaY]},Vx=function(e){return e&&`current`in e?e.current:e},Hx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ux=function(e){return` 72 .block-interactivity-${e} {pointer-events: none;} 73 .allow-interactivity-${e} {pointer-events: all;} 74`},Wx=0,Gx=[];function Kx(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),i=_.useState(Wx++)[0],a=_.useState(mx)[0],o=_.useRef(e);_.useEffect(function(){o.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ym([e.lockRef.current],(e.shards||[]).map(Vx),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=_.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=zx(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=Mx(d,u);if(!f)return!0;if(f?l=d:(l=d===`v`?`h`:`v`,f=Mx(d,u)),!f)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var p=r.current||l;return Rx(p,t,e,p===`h`?s:c,!0)},[]),c=_.useCallback(function(e){var n=e;if(!(!Gx.length||Gx[Gx.length-1]!==a)){var r=`deltaY`in n?Bx(n):zx(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Hx(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Vx).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>
vendor: 8,677 bytes, lines 74-78
740?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=_.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:qx(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=_.useCallback(function(e){n.current=zx(e),r.current=void 0},[]),d=_.useCallback(function(t){l(t.type,Bx(t),t.target,s(t,e.lockRef.current))},[]),f=_.useCallback(function(t){l(t.type,zx(t),t.target,s(t,e.lockRef.current))},[]);_.useEffect(function(){return Gx.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Dx),document.addEventListener(`touchmove`,c,Dx),document.addEventListener(`touchstart`,u,Dx),function(){Gx=Gx.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Dx),document.removeEventListener(`touchmove`,c,Dx),document.removeEventListener(`touchstart`,u,Dx)}},[]);var p=e.removeScrollBar,m=e.inert;return _.createElement(_.Fragment,null,m?_.createElement(a,{styles:Ux(i)}):null,p?_.createElement(wx,{gapMode:e.gapMode}):null)}function qx(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Jx=rx(ix,Kx),Yx=_.forwardRef(function(e,t){return _.createElement(ox,Km({},e,{ref:t,sideCar:Jx}))});Yx.classNames=ox.classNames;var Xx=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Zx=new WeakMap,Qx=new WeakMap,$x={},eS=0,tS=function(e){return e&&(e.host||tS(e.parentNode))},nS=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=tS(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},rS=function(e,t,n,r){var i=nS(t,Array.isArray(e)?e:[e]);$x[n]||($x[n]=new WeakMap);var a=$x[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Zx.get(e)||0)+1,l=(a.get(e)||0)+1;Zx.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Qx.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),eS++,function(){o.forEach(function(e){var t=Zx.get(e)-1,i=a.get(e)-1;Zx.set(e,t),a.set(e,i),t||(Qx.has(e)||e.removeAttribute(r),Qx.delete(e)),i||e.removeAttribute(n)}),eS--,eS||(Zx=new WeakMap,Zx=new WeakMap,Qx=new WeakMap,$x={})}},iS=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Xx(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live]`))),rS(r,i,n,`aria-hidden`)):function(){return null}},aS=`Dialog`,[oS,sS]=me(aS),[cS,lS]=oS(aS),uS=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=_.useRef(null),c=_.useRef(null),[l=!1,u]=He({prop:r,defaultProp:i,onChange:a});return(0,M.jsx)(cS,{scope:t,triggerRef:s,contentRef:c,contentId:ra(),titleId:ra(),descriptionId:ra(),open:l,onOpenChange:u,onOpenToggle:_.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};uS.displayName=aS;var dS=`DialogTrigger`,fS=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lS(dS,n),a=j(t,i.triggerRef);return(0,M.jsx)(N.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jS(i.open),...r,ref:a,onClick:A(e.onClick,i.onOpenToggle)})});fS.displayName=dS;var pS=`DialogPortal`,[mS,hS]=oS(pS,{forceMount:void 0}),gS=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=lS(pS,t);return(0,M.jsx)(mS,{scope:t,forceMount:n,children:_.Children.map(r,e=>(0,M.jsx)(Re,{present:n||a.open,children:(0,M.jsx)(Ie,{asChild:!0,container:i,children:e})}))})};gS.displayName=pS;var _S=`DialogOverlay`,vS=_.forwardRef((e,t)=>{let n=hS(_S,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=lS(_S,e.__scopeDialog);return a.modal?(0,M.jsx)(Re,{present:r||a.open,children:(0,M.jsx)(yS,{...i,ref:t})}):null});vS.displayName=_S;var yS=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lS(_S,n);return(0,M.jsx)(Yx,{as:oe,allowPinchZoom:!0,shards:[i.contentRef],children:(0,M.jsx)(N.div,{"data-state":jS(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),bS=`DialogContent`,xS=_.forwardRef((e,t)=>{let n=hS(bS,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=lS(bS,e.__scopeDialog);return(0,M.jsx)(Re,{present:r||a.open,children:a.modal?(0,M.jsx)(SS,{...i,ref:t}):(0,M.jsx)(CS,{...i,ref:t})})});xS.displayName=bS;var SS=_.forwardRef((e,t)=>{let n=lS(bS,e.__scopeDialog),r=_.useRef(null),i=j(t,n.contentRef,r);return _.useEffect(()=>{let e=r.current;if(e)return iS(e)},[]),(0,M.jsx)(wS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:A(e.onFocusOutside,e=>e.preventDefault())})}),CS=_.forwardRef((e,t)=>{let n=lS(bS,e.__scopeDialog),r=_.useRef(!1),i=_.useRef(!1);return(0,M.jsx)(wS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),wS=_.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=lS(bS,n),c=_.useRef(null),l=j(t,c);return Hb(),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(kb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Te,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":jS(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(FS,{titleId:s.titleId}),(0,M.jsx)(LS,{contentRef:c,descriptionId:s.descriptionId})]})]})}),TS=`DialogTitle`,ES=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lS(TS,n);return(0,M.jsx)(N.h2,{id:i.titleId,...r,ref:t})});ES.displayName=TS;var DS=`DialogDescription`,OS=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lS(DS,n);return(0,M.jsx)(N.p,{id:i.descriptionId,...r,ref:t})});OS.displayName=DS;var kS=`DialogClose`,AS=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lS(kS,n);return(0,M.jsx)(N.button,{type:`button`,...r,ref:t,onClick:A(e.onClick,()=>i.onOpenChange(!1))})});AS.displayName=kS;function jS(e){return e?`open`:`closed`}var MS=`DialogTitleWarning`,[NS,PS]=pe(MS,{contentName:bS,titleName:TS,docsSlug:`dialog`}),FS=({titleId:e})=>{let t=PS(MS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 75 76If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 77 78For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},IS=`DialogDescriptionWarning`,LS=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${PS(IS).contentName}}.`;return _.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},RS=uS,zS=fS,BS=gS,VS=vS,HS=xS,US=ES,WS=OS,GS=AS,KS=RS,qS=BS,JS=GS,YS=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(VS,{ref:n,className:F(`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`,e),...t}));YS.displayName=VS.displayName;var XS=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsxs)(qS,{children:[(0,M.jsx)(YS,{}),(0,M.jsxs)(HS,{ref:r,className:F(`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
78nded-lg`,e),...n,children:[t,(0,M.jsxs)(GS,{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:[(0,M.jsx)(gr,{className:`h-4 w-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));XS.displayName=HS.displayName;var ZS=({className:e,...t})=>(0,M.jsx)(`div`,{className:F(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});ZS.displayName=`DialogHeader`;var QS=({className:e,...t})=>(0,M.jsx)(`div`,{className:F(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});QS.displayName=`DialogFooter`;var $S=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(US,{ref:n,className:F(`text-lg font-semibold leading-none tracking-tight`,e),...t}));$S.displayName=US.displayName;var eC=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(WS,{ref:n,className:F(`text-sm text-muted-foreground`,e),...t}));eC.displayName=WS.displayName;var tC=`public/lovable-uploads/f1dd730e-3e13-4391-8a45-758fafd9fff6.png`,nC=({selectedDate:e,showAllEvents:t=!1,currentMonth:n=new Date,limit:r,compact:i})=>{let[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(!0),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(null);console.log(`SocialEventsList props:`,{selectedDate:e,showAllEvents:t,currentMonth:n}),(0,_.useEffect)(()=>{(async()=>{try{let{data:e,error:t}=await wb.from(`social_events`).select(`*`).order(`date`,{ascending:!0});if(t)throw t;e&&o(e)}catch(e){console.error(`Error loading events:`,e),o([])}finally{c(!1)}})()},[]);let p=[...a].sort((e,t)=>lp(_m(e.date),_m(t.date))),m=_.useMemo(()=>{let a=new Date;return a.setHours(0,0,0,0),i||r?p.filter(e=>_m(e.date)>=a):e&&!t?p.filter(t=>{let n=_m(t.date),r=t.end_date?_m(t.end_date):n;return e>=n&&e<=r}):p.filter(e=>mm(_m(e.date),n))},[p,e,t,n,i,r]),h=r?m.slice(0,r):m;console.log(`Events to display:`,h.length,h.map(e=>e.title).join(`, `));let g=e=>{if(e.is_all_day)return`All day`;try{return om(_m(`${e.date}T${e.time}`),`h:mm a`)}catch{return e.time}},v=e=>{let t=_m(e),n=new Date;return n.setHours(0,0,0,0),t<n};return s?(0,M.jsxs)(`div`,{className:`bg-white rounded-lg p-8 text-center shadow border`,children:[(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-2`,children:`Loading events...`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Please wait while we fetch the events.`})]}):h.length===0?(0,M.jsxs)(`div`,{className:`bg-white rounded-lg p-8 text-center shadow border`,children:[(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-2`,children:`No events found`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:e?`There are no events scheduled for ${om(e,`MMMM d, yyyy`)}.`:`There are no upcoming events at this time.`})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`space-y-6`,children:[l&&(0,M.jsx)(`div`,{className:`p-3 bg-yellow-50 border border-yellow-200 rounded-md mb-4 text-sm text-yellow-800`,children:l}),h.map(e=>(0,M.jsx)(Bm,{className:`overflow-hidden ${v(e.date)?`opacity-50`:``}`,children:(0,M.jsx)(Wm,{className:`p-0`,children:(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-12 gap-0`,children:[e.image&&(0,M.jsx)(`div`,{className:`md:col-span-5 lg:col-span-4`,children:(0,M.jsx)(L,{to:`/event/${e.id}`,className:`block w-full h-full`,children:(0,M.jsx)(`div`,{className:`h-full bg-gray-50 flex items-center justify-center`,children:(0,M.jsx)(`img`,{src:e.image,alt:e.title,className:`w-full h-auto max-h-[250px] object-contain py-2`,onError:e=>{e.target.src=tC}})})})}),(0,M.jsxs)(`div`,{className:`${e.image?`md:col-span-7 lg:col-span-8`:`md:col-span-12`} p-6`,children:[(0,M.jsx)(L,{to:`/event/${e.id}`,className:`hover:text-golf-green`,children:(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-2`,children:e.title})}),!1,(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-4 text-sm mb-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center text-golf-green`,children:[(0,M.jsx)(cn,{className:`mr-1 h-4 w-4`}
78),(0,M.jsxs)(`span`,{children:[om(_m(e.date),`MMMM d, yyyy`),e.end_date&&(0,M.jsxs)(M.Fragment,{children:[` - `,om(_m(e.end_date),`MMMM d`)]})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center text-golf-green`,children:[(0,M.jsx)(xn,{className:`mr-1 h-4 w-4`}),(0,M.jsx)(`span`,{children:e.is_all_day?`All day`:`${g(e)}${e.end_time?` - ${om(_m(`${e.date}T${e.end_time}`),`h:mm a`)}`:``}`})]}),!1]}),!1,e.url&&(0,M.jsx)(`div`,{className:`mt-2`,children:(0,M.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:(0,M.jsx)(R,{size:`sm`,variant:`outline`,className:`text-golf-green border-golf-green/30 hover:bg-golf-green/10`,children:`Register`})})})]})]})})},e.id))]}),(0,M.jsx)(KS,{open:!!d,onOpenChange:()=>f(null),children:(0,M.jsx)(XS,{className:`sm:max-w-2xl`,children:d&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(ZS,{children:[(0,M.jsx)($S,{children:d.title}),(0,M.jsxs)(eC,{children:[om(_m(d.date),`MMMM d, yyyy`),d.time&&` at ${om(_m(`${d.date}T${d.time}`),`h:mm a`)}`]})]}),d.image&&(0,M.jsx)(`img`,{src:d.image,alt:d.title,className:`w-full h-64 object-cover rounded-lg mb-4`}),(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsx)(`p`,{className:`text-gray-700`,children:d.description}),d.location&&(0,M.jsxs)(`p`,{className:`text-gray-600`,children:[(0,M.jsx)(`span`,{className:`font-semibold`,children:`Location:`}),` `,d.location]}),d.url&&(0,M.jsx)(`a`,{href:d.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-golf-green hover:text-golf-green/80 inline-block mt-4`,children:`Learn More â`})]})]})})})]})},rC=()=>(0,M.jsxs)(`section`,{className:`py-20 md:py-32 bg-white relative overflow-hidden`,children:[(0,M.jsx)(`div`,{className:`absolute top-0 right-0 w-64 h-64 bg-golf-green/5 rounded-full blur-3xl -translate-y-1/2 translate-x-1/2`}),(0,M.jsx)(`div`,{className:`absolute bottom-0 left-0 w-96 h-96 bg-golf-sand/20 rounded-full blur-3xl translate-y-1/2 -translate-x-1/2`}),(0,M.jsxs)(`div`,{className:`container mx-auto px-4 relative z-10`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col md:flex-row justify-between items-end mb-12`,children:[(0,M.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-4`,children:`Upcoming Events`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 font-light`,children:`Join us for tournaments, socials, and exclusive club gatherings. Don't miss out on what's happening at Belvedere.`})]}),(0,M.jsx)(`div`,{className:`mt-6 md:mt-0`,children:(0,M.jsx)(R,{asChild:!0,variant:`outline`,className:`text-golf-green border-golf-green/30 hover:bg-golf-green/10`,children:(0,M.jsx)(L,{to:`/social-calendar`,children:`View Full Calendar`})})})]}),(0,M.jsx)(`div`,{className:`bg-white/80 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 md:p-8`,children:(0,M.jsx)(nC,{limit:3,compact:!0})})]})]}),iC=1,aC=1e6,oC=0;function sC(){return oC=(oC+1)%(2**53-1),oC.toString()}var cC=new Map,lC=e=>{if(cC.has(e))return;let t=setTimeout(()=>{cC.delete(e),pC({type:`REMOVE_TOAST`,toastId:e})},aC);cC.set(e,t)},uC=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,iC)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?lC(n):e.toasts.forEach(e=>{lC(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},dC=[],fC={toasts:[]};function pC(e){fC=uC(fC,e),dC.forEach(e=>{e(fC)})}function mC({...e}){let t=sC(),n=e=>pC({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>pC({type:`DISMISS_TOAST`,toastId:t});return pC({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function hC(){let[e,t]=_.useState(fC);return _.useEffect(()=>(dC.push(t),()=>{let e=dC.indexOf(t);e>-1&&dC.splice(e,1)}),[e]),{...e,toast:mC,dismiss:e=>pC({type:`DISMISS_TOAST`,toastId:e})}}var gC=async e=>{try{console.log(`Sending email with data:`,e);let t=await fetch(`/api/send-email`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n={};try{n=await t.json()}catch{if(!t.ok)throw Error(`Failed to send email and received invali
78d response from server.`);return{success:!0,message:`Message sent successfully (no response body)`}}if(!t.ok)throw Error(n.message||`Failed to send email`);return{success:!0,message:n.message||`Message sent successfully`}}catch(e){return console.error(`Error sending email:`,e),{success:!1,message:e instanceof Error?e.message:`Unknown error occurred while sending the message`}}},_C=()=>{let{toast:e}=hC(),[t,n]=(0,_.useState)({name:``,email:``,phone:``,message:``}),[r,i]=(0,_.useState)(!1),a=e=>{let{name:t,value:r}=e.target;n(e=>({...e,[t]:r}))};return(0,M.jsx)(`section`,{id:`contact`,className:`section-padding bg-golf-sand/20`,children:(0,M.jsxs)(`div`,{className:`container mx-auto`,children:[(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h2`,{className:`section-heading`,children:`Contact Us`}),(0,M.jsx)(`p`,{className:`section-subheading`,children:`We're here to answer your questions and help you plan your visit to Belvedere Golf Club.`})]}),(0,M.jsxs)(`div`,{className:`mt-16 grid grid-cols-1 lg:grid-cols-2 gap-12`,children:[(0,M.jsx)(`div`,{className:`space-y-10`,children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold mb-6 text-golf-green`,children:`Club Information`}),(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(Wn,{className:`h-5 w-5 text-golf-green mr-3 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`font-bold text-gray-800`,children:`Address`}),(0,M.jsxs)(`address`,{className:`not-italic text-gray-600`,children:[`1 Greensview Dr`,(0,M.jsx)(`br`,{}),`Charlottetown, PE C1A 6J7`]})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(Jn,{className:`h-5 w-5 text-golf-green mr-3 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`font-bold text-gray-800`,children:`Phone`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`1-877-515-8687`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`(902) 566-5542`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(Un,{className:`h-5 w-5 text-golf-green mr-3 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`font-bold text-gray-800`,children:`Email`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`[email protected]`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(cn,{className:`h-5 w-5 text-golf-green mr-3 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`font-bold text-gray-800`,children:`Hours (In Season)`}),(0,M.jsxs)(`p`,{className:`text-gray-600`,children:[`Pro Shop & Clubhouse: 6:30 AM â 7:00 PM daily`,(0,M.jsx)(`br`,{}),`Restaurant: `,(0,M.jsx)(`a`,{href:`/dining-room`,className:`text-golf-green hover:underline`,children:`See Dining Room for hours`})]})]})]})]})]})}),(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-lg p-6 md:p-8`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold mb-6 text-golf-green`,children:`Send Us a Message`}),(0,M.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),i(!0);try{let r=await gC({to:`[email protected]`,from:`[email protected]`,subject:`Website Contact Form: ${t.name}`,replyTo:t.email,name:t.name,email:t.email,phone:t.phone||`Not provided`,message:t.message});if(r.success)e({title:`Message Sent!`,description:`Thank you for reaching out. We will contact you shortly.`}),n({name:``,email:``,phone:``,message:``});else throw Error(r.message)}catch(t){console.error(`Error sending message:`,t),e({title:`Error`,description:`There was a problem sending your message. Please try again later.`,variant:`destructive`})}finally{i(!1)}},className:`space-y-6`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`name`,className:`block text-sm font-medium text-gray-700 mb-1`,children:`Name`}),(0,M.jsx)(`input`,{type:`text`,id:`name`,name:`name`,value:t.name,onChange:a,className:`w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent`,required:!0})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`email`,className:`block text-sm font-medium text-gray-700 mb-1`,children:`Email`}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:t.email,onChange:a,className:`w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent`,required:!0})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`phone`,className:`block text-sm font-medium text-gray-700 mb-1`,children:`Phone`}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:t.phone,onChange:a,className:`w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`message`,className:`block text-sm font-medium text-gray-700 mb-1`,children:`Message`}),(0,M.jsx)(`textarea`,{id:`message`,name:`message`,value:t.message,onChange:a,rows:4,className:`w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent`,required:!0})]}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark`,disabled:r,children:r?`Sending...`:`Send Message`})]})]})]}),(0,M.jsx)(`div`,{className:`mt-20 rounded-lg overflow-hidden shadow-lg cursor-pointer`,onClick:()=>{window.open(`https://maps.google.com/?q=Belvedere+Golf+Club+1+Greensview+Dr+Charlottetown+PE+C1A+6J7`,`_blank`)},children:(0,M.jsxs)(`div`,{className:`relative`,children:[(0,M.jsx)(`img`,{src:`/lovable-uploads/7991c989-1f06-4ff0-b0c4-4be6ebe39b58.png`,alt:`Belvedere Golf Club on Google Maps`,className:`w-full h-96 object-cover`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-black/20 hover:bg-black/30 transition-colors flex items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`bg-white/90 backdrop-blur-sm px-6 py-4 rounded-lg shadow-lg text-center`,children:[(0,M.jsx)(Wn,{className:`h-8 w-8 mb-2 mx-auto text-golf-green`}),(0,M.jsx)(`h4`,{className:`font-playfair text-xl font-bold text-golf-green`,children:`Belvedere Golf Club`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`1 Greensview Dr, Charlottetown, PE C1A 6J7`}),(0,M.jsx)(`p`,{className:`mt-3 text-gray-600 border border-golf-green/40 px-3 py-1 rounded-full text-sm inline-block`,children:`Click to open in Google Maps`})]})})]})})]})})},vC=()=>(0,M.jsxs)(`main`,{className:`min-h-screen`,children:[(0,M.jsx)(Mf,{}),(0,M.jsx)(If,{}),(0,M.jsx)(Lf,{}),(0,M.jsx)(Rf,{}),(0,M.jsx)(zf,{}),(0,M.jsx)(rC,{}),(0,M.jsx)(_C,{})]}),yC=_.createContext(void 0);function bC(e){let t=_.useContext(yC);return e||t||`ltr`}function xC(e){let t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var SC=`NavigationMenu`,[CC,wC,TC]=fe(SC),[EC,DC,OC]=fe(SC),[kC,AC]=me(SC,[TC,OC]),[jC,MC]=kC(SC),[NC,PC]=kC(SC),FC=_.forwardRef((e,t)=>
vendor: 9,400 bytes, line 78
78{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:o=200,skipDelayDuration:s=300,orientation:c=`horizontal`,dir:l,...u}=e,[d,f]=_.useState(null),p=j(t,e=>f(e)),m=bC(l),h=_.useRef(0),g=_.useRef(0),v=_.useRef(0),[y,b]=_.useState(!0),[x=``,S]=He({prop:r,onChange:e=>{let t=e!==``,n=s>0;t?(window.clearTimeout(v.current),n&&b(!1)):(window.clearTimeout(v.current),v.current=window.setTimeout(()=>b(!0),s)),i?.(e)},defaultProp:a}),C=_.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>S(``),150)},[S]),w=_.useCallback(e=>{window.clearTimeout(g.current),S(e)},[S]),T=_.useCallback(e=>{x===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),S(e)},o)},[x,S,o]);return _.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(v.current)},[]),(0,M.jsx)(RC,{scope:n,isRootMenu:!0,value:x,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:e=>{window.clearTimeout(h.current),y?T(e):w(e)},onTriggerLeave:()=>{window.clearTimeout(h.current),C()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:C,onItemSelect:e=>{S(t=>t===e?``:e)},onItemDismiss:()=>S(``),children:(0,M.jsx)(N.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});FC.displayName=SC;var IC=`NavigationMenuSub`,LC=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=MC(IC,n),[l=``,u]=He({prop:r,onChange:i,defaultProp:a});return(0,M.jsx)(RC,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>u(e),onItemSelect:e=>u(e),onItemDismiss:()=>u(``),children:(0,M.jsx)(N.div,{"data-orientation":o,...s,ref:t})})});LC.displayName=IC;var RC=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[m,h]=_.useState(null),[g,v]=_.useState(new Map),[y,b]=_.useState(null);return(0,M.jsx)(jC,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:xC(s),baseId:ra(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:y,onIndicatorTrackChange:b,onTriggerEnter:_e(u),onTriggerLeave:_e(d),onContentEnter:_e(f),onContentLeave:_e(p),onItemSelect:_e(c),onItemDismiss:_e(l),onViewportContentChange:_.useCallback((e,t)=>{v(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:_.useCallback(e=>{v(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,M.jsx)(CC.Provider,{scope:t,children:(0,M.jsx)(NC,{scope:t,items:g,children:o})})})},zC=`NavigationMenuList`,BC=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=MC(zC,n),a=(0,M.jsx)(N.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,M.jsx)(N.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,M.jsx)(CC.Slot,{scope:n,children:i.isRootMenu?(0,M.jsx)(cw,{asChild:!0,children:a}):a})})});BC.displayName=zC;var VC=`NavigationMenuItem`,[HC,UC]=kC(VC),WC=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=ra(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=_.useRef(null),c=_.useRef(null),l=_.useRef(null),u=_.useRef(()=>{}),d=_.useRef(!1),f=_.useCallback((e=`start`)=>{if(s.current){u.current();let t=fw(s.current);t.length&&pw(e===`start`?t:t.reverse())}},[]),p=_.useCallback(()=>{if(s.current){let e=fw(s.current);e.length&&(u.current=mw(e))}},[]);return(0,M.jsx)(HC,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,M.jsx)(N.li,{...i,ref:t})})});WC.displayName=VC;var GC=`NavigationMenuTrigger`,KC=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=MC(GC,e.__scopeNavigationMenu),o=UC(GC,e.__scopeNavigationMenu),s=_.useRef(null),c=j(s,o.triggerRef,t),l=_w(a.baseId,o.value),u=vw(a.baseId,o.value),d=_.useRef(!1),f=_.useRef(!1),p=o.value===a.value;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(CC.ItemSlot,{scope:n,value:o.value,children:(0,M.jsx)(dw,{asChild:!0,children:(0,M.jsx)(N.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":gw(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:A(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:A(e.onPointerMove,yw(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:A(e.onPointerLeave,yw(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:A(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:A(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];p&&e.key===t&&(o.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Ke,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:e=>{let t=o.contentRef.current,n=e.relatedTarget,r=n===s.current,i=t?.contains(n);(r||!i)&&o.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,M.jsx)(`span`,{"aria-owns":u})]})]})});KC.displayName=GC;var qC=`NavigationMenuLink`,JC=`navigationMenu.linkSelect`,YC=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,M.jsx)(dw,{asChild:!0,children:(0,M.jsx)(N.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:A(e.onClick,e=>{let t=e.target,n=new CustomEvent(JC,{bubbles:!0,cancelable:!0});t.addEventListener(JC,e=>i?.(e),{once:!0}),ge(t,n),!n.defaultPrevented&&!e.metaKey&&ge(t,new CustomEvent(nw,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});YC.displayName=qC;var XC=`NavigationMenuIndicator`,ZC=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=MC(XC,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?k.createPortal((0,M.jsx)(Re,{present:n||a,children:(0,M.jsx)(QC,{...r,ref:t})}),i.indicatorTrack):null});ZC.displayName=XC;var QC=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=MC(XC,n),a=wC(n),[o,s]=_.useState(null),[c,l]=_.useState(null),u=i.orientation===`horizontal`,d=!!i.value;_.useEffect(()=>{let e=a().find(e=>e.value===i.value)?.ref.current;e&&s(e)},[a,i.value]);let f=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return hw(o,f),hw(i.indicatorTrack,f),c?(0,M.jsx)(N.div,{"aria-hidden":!0,"data-state":d?`visible`:`hidden`,"data-orientation":i.orientation,...r,ref:t,style:{position:`absolute`,...u?{left:0,width:c.size+`px`,transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+`px`,transform:`translateY(${c.offset}px)`},...r.style}}):null}),$C=`NavigationMenuContent`,ew=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=MC($C,e.__scopeNavigationMenu),a=UC($C,e.__scopeNavigationMenu),o=j(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,M.jsx)(tw,{forceMount:n,...c,ref:o}):(0,M.jsx)(Re,{present:n||s,children:(0,M.jsx)(rw,{"data-state":gw(s),...c,ref:o,onPointerEnter:A(e.onPointerEnter,i.onContentEnter),onPointerLeave:A(e.onPointerLeave,yw(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});ew.displayName=$C;var tw=_.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=MC($C,e.__scopeNavigationMenu);return Pe(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Pe(()=>()=>r(e.value),[e.value,r]),null}),nw=`navigationMenu.rootContentDismiss`,rw=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=MC($C,n),d=_.useRef(null),f=j(d,t),p=_w(u.baseId,r),m=vw(u.baseId,r),h=wC(n),g=_.useRef(null),{onItemDismiss:v}=u;return _.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{v(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(nw,t),()=>e.removeEventListener(nw,t)}},[u.isRootMenu,e.value,i,v,s]),(0,M.jsx)(cw,{asChild:!0,children:(0,M.jsx)(Te,{id:m,"aria-labelledby":p,"data-motion":_.useMemo(()=>{let e=h().map(e=>e.value);u.dir===`rtl`&&e.reverse();let t=e.indexOf(u.value),n=e.indexOf(u.previousValue),i=r===u.value,a=n===e.indexOf(r);if(!i&&!a)return g.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return g.current=o,o},[u.previousValue,u.value,u.dir,h,r]),"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(nw,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:A(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:A(e.onPointerDownOutside,e=>{let t=e.target,n=h().some(e=>e.ref.current?.contains(t)),r=u.isRootMenu&&u.viewport?.contains(t);(n||r||!u.isRootMenu)&&e.preventDefault()}),onKeyDown:A(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=fw(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);pw(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:A(e.onEscapeKeyDown,e=>{o.current=!0})})})}),iw=`NavigationMenuViewport`,aw=_.forwardRef((e,t)=>
78{let{forceMount:n,...r}=e,i=!!MC(iw,e.__scopeNavigationMenu).value;return(0,M.jsx)(Re,{present:n||i,children:(0,M.jsx)(ow,{...r,ref:t})})});aw.displayName=iw;var ow=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=MC(iw,n),o=j(t,a.onViewportChange),s=PC($C,e.__scopeNavigationMenu),[c,l]=_.useState(null),[u,d]=_.useState(null),f=c?c?.width+`px`:void 0,p=c?c?.height+`px`:void 0,m=!!a.value,h=m?a.value:a.previousValue;return hw(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,M.jsx)(N.div,{"data-state":gw(m),"data-orientation":a.orientation,...i,ref:o,style:{pointerEvents:!m&&a.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...i.style},onPointerEnter:A(e.onPointerEnter,a.onContentEnter),onPointerLeave:A(e.onPointerLeave,yw(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,M.jsx)(Re,{present:n||i,children:(0,M.jsx)(rw,{...r,ref:ne(t,e=>{i&&e&&d(e)})})},e)})})}),sw=`FocusGroup`,cw=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=MC(sw,n);return(0,M.jsx)(EC.Provider,{scope:n,children:(0,M.jsx)(EC.Slot,{scope:n,children:(0,M.jsx)(N.div,{dir:i.dir,...r,ref:t})})})}),lw=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],uw=`FocusGroupItem`,dw=_.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=DC(n),a=MC(uw,n);return(0,M.jsx)(EC.ItemSlot,{scope:n,children:(0,M.jsx)(N.button,{...r,ref:t,onKeyDown:A(e.onKeyDown,e=>{if([`Home`,`End`,...lw].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),lw.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>pw(t)),e.preventDefault()}})})})});function fw(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pw(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}function mw(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function hw(e,t){let n=_e(t);Pe(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function gw(e){return e?`open`:`closed`}function _w(e,t){return`${e}-trigger-${t}`}function vw(e,t){return`${e}-content-${t}`}function yw(e){return t=>t.pointerType===`mouse`?e(t):void 0}var bw=FC,xw=BC,Sw=WC,Cw=KC,ww=ZC,Tw=ew,Ew=aw,Dw=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsxs)(bw,{ref:r,className:F(`relative z-10 flex max-w-max flex-1 items-center justify-center`,e),...n,children:[t,(0,M.jsx)(Nw,{})]}));Dw.displayName=bw.displayName;var Ow=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(xw,{ref:n,className:F(`group flex flex-1 list-none items-center justify-center space-x-1`,e),...t}));Ow.displayName=xw.displayName;var kw=Sw,Aw=Kt(`group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50`),jw=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsxs)(Cw,{ref:r,className:F(Aw(),`group`,e),...n,children:[t,` `,(0,M.jsx)(fn,{className:`relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]}));jw.displayName=Cw.displayName;var Mw=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(Tw,{ref:n,className:F(`left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto `,e),...t}));Mw.displayName=Tw.displayName;var Nw=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{className:F(`absolute left-0 top-full flex justify-center`),children:(0,M.jsx)(Ew,{className:F(`origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]`,e),ref:n,...t})}));Nw.displayName=Ew.displayName;var Pw=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(ww,{ref:n,className:F(`top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in`,e),...t,children:(0,M.jsx)(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`})}));Pw.displayName=ww.displayName;var Fw=()=>{let e=Fu(),t=Ru(),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),m=t=>t===`/`?e.pathname===`/`:e.pathname.startsWith(t);(0,_.useEffect)(()=>{let t=()=>{window.scrollY>20?a(!0):a(!1)};return l(e.pathname===`/about`||e.pathname===`/updates`||e.pathname===`/scorecard`||e.pathname.includes(`/course`)||e.pathname.includes(`/achievements`)||e.pathname.includes(`/about/board-members`)),d(e.pathname.includes(`/events`)),window.addEventListener(`scroll`,t),()=>{window.removeEventListener(`scroll`,t)}},[e.pathname]);let h=n=>{if(n.preventDefault(),e.pathname===`/`){let e=document.getElementById(`course-section`);e&&e.scrollIntoView({behavior:`smooth`})}else t(`/#course-section`);r(!1)};return(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(`nav`,{className:`fixed left-0 right-0 bg-white border-b border-gray-200 shadow-lg z-[50] py-3 transition-all duration-300`,style:{to
78p:`var(--banner-offset, 0px)`},children:[(0,M.jsxs)(`div`,{className:`container mx-auto flex justify-between items-center px-4 md:px-8`,children:[(0,M.jsxs)(L,{to:`/`,className:`flex items-center gap-2`,children:[(0,M.jsx)(`img`,{src:`/lovable-uploads/ed4ee0f9-6867-41fc-b95e-12b9ec553b7f.png`,alt:`Belvedere Golf Club Logo`,className:`h-8 w-auto`}),(0,M.jsx)(`span`,{className:`font-playfair text-xl font-bold text-golf-green`,children:`Belvedere Golf Club`})]}),(0,M.jsxs)(`div`,{className:`hidden md:flex items-center space-x-1`,children:[(0,M.jsx)(Dw,{children:(0,M.jsx)(Ow,{children:(0,M.jsxs)(kw,{children:[(0,M.jsx)(jw,{className:F(`bg-transparent hover:bg-transparent focus:bg-transparent text-gray-800 hover:text-golf-green text-base font-normal px-3 py-2`,{"text-golf-green":e.pathname.includes(`/about`)||f,"text-gray-800":!e.pathname.includes(`/about`)&&!f}),children:`About`}),(0,M.jsx)(Mw,{className:`bg-white`,children:(0,M.jsxs)(`ul`,{className:`grid w-[220px] gap-3 p-4 bg-white shadow-lg rounded-md`,children:[(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/about`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/about`)&&e.pathname===`/about`?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`About the Club`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/about/history`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/about/history`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`History`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/dining-room`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/dining-room`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Dining Room`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/about/board-members`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/about/board-members`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Board Members`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/staff`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/staff`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Staff`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/about/social-updates`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/about/social-updates`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Social Updates`})})})]})})]})})}),(0,M.jsx)(Dw,{children:(0,M.jsx)(Ow,{children:(0,M.jsxs)(kw,{children:[(0,M.jsx)(jw,{className:F(`bg-transparent hover:bg-transparent focus:bg-transparent text-gray-800 hover:text-golf-green text-base font-normal px-3 py-2`,{"text-golf-green":e.pathname.includes(`/scorecard`)||f,"text-gray-800":!e.pathname.includes(`/scorecard`)&&!f}),children:`The Course`}),(0,M.jsx)(Mw,{className:`bg-white`,children:(0,M.jsxs)(`ul`,{className:`grid w-[220px] gap-3 p-4 bg-white shadow-lg rounded-md`,children:[(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#course-section`,onClick:h,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Course Overview`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/scorecard`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/scorecard`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Scorecard`})})})]})})]})})}),(0,M.jsx)(L,{to:`/lessons`,className:`text-gray-800 hover:text-golf-green transition-colors px-3 py-2 ${m(`/lessons`)?`text-accent font-medium`:``}`,children:`Lessons`}),(0,M.jsx)(Dw,{children:(0,M.jsx)(Ow,{children:(0,M.jsxs)(kw,{children:[(0,M.jsx)(jw,{className:F(`bg-transparent hover:bg-transparent focus:bg-transparent text-gray-800 hover:text-golf-green text-base font-normal px-3 py-2`,{"text-golf-green":e.pathname.includes(`/membership`)||e.pathname.includes(`/join-waitlist`)||f,"text-gray-800":!e.pathname.includes(`/membership`)&&!e.pathname.includes(`/join-waitlist`)&&!f}),children:`Members`}),(0,M.jsxs)(Mw,{className:`bg-white`,children:[(0,M.jsxs)(`ul`,{className:`grid w-[220px] gap-3 p-4 bg-white shadow-lg rounded-md`,children:[(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/join-waitlist`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/join-waitlist`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Join the Waitlist`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/membership`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/membership`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Membership Info`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/corporate-passes`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/corporate-passes`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Corporate Passes`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/junior-meetings`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/junior-meetings`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Junior Initiation`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`https://w.cps.golf/BelvedereGCBilling/`,target:`_blank`,rel:`noopener noreferrer`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Account Login`})})})]}),(0,M.jsx)(`div`,{className:`h-px bg-gray-200 mx-4 my-2`}),(0,M.jsxs)(`div`,{className:`px-4 pb-3 space-y-2`,children:[(0,M.jsx)(`h4`,{className:`font-medium text-sm text-gray-500 px-3`,children:`Member Events`}),(0,M.jsx)(`ul`,{className:`grid gap-2`,children:(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/match-play`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/match-play`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`2026 Art MacKenzie Match Play`})})})})]})]})]})})}),(0,M.jsx)(L,{to:`/social-calendar`,className:`text-gray-800 hover:text-golf-green transition-colors px-3 py-2 ${m(`/social-calendar`)?`text-accent font-medium`:``}`,children:`Calendar`}),(0,M.jsx)(Dw,{children:(0,M.jsx)(Ow,{children:(0,M.jsxs)(kw,{children:[(0,M.jsx)(jw,{className:F(`bg-transparent hover:bg-transparent focus:bg-transparent text-gray-800 hover:text-golf-green text-base font-normal px-3 py-2`,{"text-golf-green":u||f,"text-gray-800":!u&&!f}),children:`Book an Event`}),(0,M.jsx)(Mw,{className:`bg-white`,children:(0,M.jsxs)(`div`,{className:`grid w-[400px] gap-3 p-4 bg-white shadow-lg rounded-md`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`h4`,{className:`font-medium text-sm text-gray-500 px-3`,children:`Private Functions`}),(0,M.jsxs)(`ul`,{className:`grid gap-2`,children:[(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/events/weddings`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/events/weddings`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Weddings`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/events/parties`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/events/parties`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Parties & Socials`})})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/meeting-room`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/meeting-room`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Meeting Room`})})})]})]}),(0,M.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`h4`,{className:`font-medium text-sm text-gray-500 px-3`,children:`Golf Events`}),(0,M.jsx)(`ul`,{className:`grid gap-2`,children:(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/events/tournaments`,className:`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground text-gray-800 ${m(`/events/tournaments`)?`text-accent`:``}`,children:(0,M.jsx)(`div`,{className:`text-sm font-medium leading-none`,children:`Tournaments`})})})})]})]})})]})})}),(0,M.jsx)(L,{to:`/contact`,className:`text-gray-800 hover:text-golf-green transition-colors px-3 py-2 ${m(`/contact`)?`text-accent font-medium`:``}`,children:`Contact`}),(0,M.jsx)(`a`,{href:`https://belvederegc.cps.golf/`,target:`_blank`,rel:`noopener noreferrer`,className:`ml-3`,children:(0,M.jsx)(R,{variant:`default`,className:`bg-golf-green hover:bg-golf-green-dark`,children:`Book a Tee Time`})})]}),(0,M.jsx)(`button`,{className:`md:hidden text-gray-800`,onClick:()=>r(!n),children:n?(0,M.jsx)(gr,{size:24}):(0,M.jsx)(Gn,{size:24})})]}),n&&(0,M.jsx)(`div`,{className:`md:hidden bg-white absolute top-full left-0 w-full shadow-md py-4 px-4 animate-fade-in max-h-[calc(100dvh-4rem)] overflow-y-auto overscroll-contain`,children:(0,M.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,M.jsxs)(`div`,{className:`py-2 px-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between ${c?`text-accent`:`text-gray-800`}`,children:[(0,M.jsx)(`span`,{children:`About`}),(0,M.jsx)(fn,{size:16})]}),(0,M.jsxs)(`div`,{className:`ml-4 mt-2 flex flex-col space-y-1 border-l-2 border-gray-200 pl-4`,children:[(0,M.jsx)(L,{to:`/about`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/about`)&&e.pathname===`/about`?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`About the Club`}),(0,M.jsx)(L,{to:`/about/history`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/about/history`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`History`}),(0,M.jsx)(L,{to:`/dining-room`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/dining-room`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Dining Room`}),(0,M.jsx)(L,{to:`/about/board-members`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/about/board-members`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Board Members`}),(0,M.jsx)(L,{to:`/staff`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/staff`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Staff`}),(0,M.jsx)(L,{to:`/updates`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/updates`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Club Updates`}),(0,M.jsx)(L,{to:`/about/social-updates`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/about/social-updates`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Social Updates`})]})]}),(0,M.jsxs)(`div`,{className:`py-2 px-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between ${e.pathname.includes(`/scorecard`)?`text-accent`:`text-gray-800`}`,children:[(0,M.jsx)(`span`,{children:`The Course`}),(0,M.jsx)(fn,{size:16})]}),(0,M.jsxs)(`div`,{className:`ml-4 mt-2 flex flex-col space-y-1 border-l-2 border-gray-200 pl-4`,children:[(0,M.jsx)(`a`,{href:`/#course-section`,onClick:h,className:`text-gray-800 hover:text-golf-green transition-colors py-1`,children:`Course Overview`}),(0,M.jsx)(L,{to:`/scorecard`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/scorecard`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Scorecard`})]})]}),(0,M.jsxs)(`div`,{className:`py-2 px-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between ${e.pathname.includes(`/membership`)||e.pathname.includes(`/join-waitlist`)?`text-accent`:`text-gray-800`}`,children:[(0,M.jsx)(`span`,{children:`Members`}),(0,M.jsx)(fn,{size:16})]}),(0,M.jsxs)(`div`,{className:`ml-4 mt-2 flex flex-col space-y-1 border-l-2 border-gray-200 pl-4`,children:[(0,M.jsx)(L,{to:`/join-waitlist`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/join-waitlist`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Join the Waitlist`}),(0,M.jsx)(L,{to:`/membership`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/membership`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Membership Info`}),(0,M.jsx)(`a`,{href:`https://w.cps.golf/BelvedereGCBilling/`,target:`_blank`,rel:`noopener noreferrer`,className:`text-gray-800 hover:text-golf-green transition-colors py-1`,onClick:()=>r(!1),children:`Account Login`}),(0,M.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`h4`,{className:`font-medium text-sm text-gray-500`,children:`Member Events`}),(0,M.jsx)(L,{to:`/match-play`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/match-play`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`2026 Art MacKenzie Match Play`})]})]})]}),(0,M.jsx)(L,{to:`/lessons`,className:`text-gray-800 hover:text-golf-green transition-colors py-2 px-4 ${m(`/lessons`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Lessons`}),(0,M.jsx)(L,{to:`/social-calendar`,className:`text-gray-800 hover:text-golf-green transition-colors py-2 px-4 ${m(`/social-calendar`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Social Calendar`}),(0,M.jsxs)(`div`,{className:`py-2 px-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between ${u?`text-ac
78cent`:`text-gray-800`}`,children:[(0,M.jsx)(`span`,{children:`Book an Event`}),(0,M.jsx)(fn,{size:16})]}),(0,M.jsxs)(`div`,{className:`ml-4 mt-2 flex flex-col space-y-1 border-l-2 border-gray-200 pl-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`h4`,{className:`font-medium text-sm text-gray-500`,children:`Private Functions`}),(0,M.jsx)(L,{to:`/events/weddings`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/events/weddings`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Weddings`}),(0,M.jsx)(L,{to:`/events/parties`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/events/parties`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Parties & Socials`}),(0,M.jsx)(L,{to:`/meeting-room`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/meeting-room`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Meeting Room`})]}),(0,M.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`h4`,{className:`font-medium text-sm text-gray-500`,children:`Golf Events`}),(0,M.jsx)(L,{to:`/events/tournaments`,className:`text-gray-800 hover:text-golf-green transition-colors py-1 ${m(`/events/tournaments`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Tournaments`})]})]})]}),(0,M.jsx)(L,{to:`/contact`,className:`text-gray-800 hover:text-golf-green transition-colors py-2 px-4 ${m(`/contact`)?`text-accent font-medium`:``}`,onClick:()=>r(!1),children:`Contact`}),(0,M.jsx)(`a`,{href:`https://belvederegc.cps.golf/`,target:`_blank`,rel:`noopener noreferrer`,children:(0,M.jsx)(R,{variant:`default`,className:`bg-golf-green hover:bg-golf-green-dark w-full mt-2`,children:`Book a Tee Time`})})]})})]})})};function Iw(e){return Object.prototype.toString.call(e)===`[object Object]`}function Lw(e){return Iw(e)||Array.isArray(e)}function Rw(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function zw(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!Lw(r)||!Lw(i)?r===i:zw(r,i)})}function Bw(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Vw(e,t){if(e.length!==t.length)return!1;let n=Bw(e),r=Bw(t);return n.every((e,t)=>{let n=r[t];return zw(e,n)})}function Hw(e){return typeof e==`number`}function Uw(e){return typeof e==`string`}function Ww(e){return typeof e==`boolean`}function Gw(e){return Object.prototype.toString.call(e)===`[object Object]`}function Kw(e){return Math.abs(e)}function qw(e){return Math.sign(e)}function Jw(e,t){return Kw(e-t)}function Yw(e,t){return e===0||t===0||Kw(e)<=Kw(t)?0:Kw(Jw(Kw(e),Kw(t))/e)}function Xw(e){return Math.round(e*100)/100}function Zw(e){return nT(e).map(Number)}function Qw(e){return e[$w(e)]}function $w(e){return Math.max(0,e.length-1)}function eT(e,t){return t===$w(e)}function tT(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function nT(e){return Object.keys(e)}function rT(e,t){return[e,t].reduce((e,t)=>(nT(t).forEach(n=>{let r=e[n],i=t[n];e[n]=Gw(r)&&Gw(i)?rT(r,i):i}),e),{})}function iT(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function aT(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return Uw(e)?n[e](r):e(t,r,i)}return{measure:o}}function oT(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function sT(e,t,n,r){let i=oT(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function cT(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function lT(e=0,t=0){let n=Kw(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}
78function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function uT(e,t,n){let{constrain:r}=lT(0,e),i=e+1,a=o(t);function o(e){return n?Kw((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return uT(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function dT(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=oT(),w=oT(),T=lT(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,ee=!1,k=0,A=0,te=!1,ne=!1,j=!1,re=!1;function M(e){if(!v)return;function n(t){(Ww(v)||v(e,t))&&le(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,de).add(r,`contextmenu`,de).add(r,`click`,fe,!0)}function ie(){C.clear(),w.clear()}function ae(){let e=re?n:t;w.add(e,`touchmove`,ue,S).add(e,`touchend`,de).add(e,`mousemove`,ue,S).add(e,`mouseup`,de)}function oe(e){let t=e.nodeName||``;return x.includes(t)}function se(){return(m?D:E)[re?`mouse`:`touch`]}function ce(e,t){let n=d.add(qw(e)*-1),r=u.byDistance(e,!m).distance;return m||Kw(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function le(e){let t=iT(e,r);re=t,j=m&&t&&!e.buttons&&ee,ee=Jw(i.get(),o.get())>=2,!(t&&e.button!==0)&&(oe(e.target)||(te=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),ae(),k=a.readPoint(e),A=a.readPoint(e,y),f.emit(`pointerDown`)))}function ue(e){if(!iT(e,r)&&e.touches.length>=2)return de(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=Jw(t,k),c=Jw(n,A);if(!ne&&!re&&(!e.cancelable||(ne=o>c,!ne)))return de(e);let u=a.pointerMove(e);o>h&&(j=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function de(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*se(),r=ce(b(n),t),i=Yw(n,r),o=O-10*i,s=_+i/50;ne=!1,te=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),re=!1,f.emit(`pointerUp`)}function fe(e){j&&=(e.stopPropagation(),e.preventDefault(),!1)}function pe(){return te}return{init:M,destroy:ie,pointerDown:pe}}function fT(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(iT(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&Kw(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function pT(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function mT(e){function t(t){return t/100*e}return{measure:t}}function hT(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(Kw(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(Ww(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function gT(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=qw(a),d=u,x}function p(){return Kw(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function _T(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=lT(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=Kw(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&Kw(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function vT(e,t,n,r,i){let a=lT(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return Jw(e,t)<=1}function u(){let e=o[0],t=Qw(o);return lT(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=eT(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function yT(e,t,n){let r=t[0];return{limit:lT(n?r-e:Qw(t),r)}}function bT(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=lT(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;
78r.forEach(e=>e.add(n))}return{loop:c}}function xT(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function ST(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>Qw(e)[o]-e[0][a]).map(Kw)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-Kw(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function CT(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=eT(n,t);return r?tT(Qw(n[0])+1):i?tT($w(a)-Qw(n)[0]+1,Qw(n)[0]):e})}return{slideRegistry:l}}function wT(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>Kw(e)-Kw(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>Kw(e.diff)-Kw(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>qw(e)===r);return a.length?c(a):Qw(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function TT(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();
78a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function ET(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));Hw(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(Ww(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function DT(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return Hw(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function OT(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=Xw(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function kT(e,t,n,r,i,a,o,s,c){let l=.5,u=Zw(i),d=Zw(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:DT(-1),translate:OT(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function AT(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(Ww(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function jT(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return nT(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];
vendor: 4,255 bytes, line 78
78return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function MT(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return Kw(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(Qw(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=eT(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(Kw)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function NT(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=Hw(n);function p(e,t){return Zw(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?Zw(e).reduce((n,f,p)=>{let m=Qw(n)||0,h=m===0,g=f===$w(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=Kw(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function PT(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=pT(),w=C.measure(t),T=n.map(C.measure),E=cT(c,l),D=E.measureSize(w),O=mT(D),ee=aT(s,D),k=!d&&!!v,{slideSizes:A,slideSizesWithGaps:te,startGap:ne,endGap:j}=MT(E,w,T,n,d||!!v,i),re=NT(E,D,g,d,w,T,ne,j,2),{snaps:M,snapsAligned:ie}=ST(E,ee,w,T,re),ae=-Qw(M)+Qw(te),{snapsContained:oe,scrollContainLimit:se}=vT(D,ae,ie,v,2),ce=k?oe:ie,{limit:le}=yT(ae,ce,d),ue=uT($w(ce),u,d),de=ue.clone(),fe=Zw(n),pe=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},me=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},he=sT(r,i,()=>pe(ke),e=>me(ke,e)),N=.68,ge=ce[ue.get()],_e=DT(ge),ve=DT(ge),ye=DT(ge),be=DT(ge),xe=gT(_e,ye,ve,be,f,N),Se=wT(d,ce,ae,le,be),Ce=TT(he,ue,de,xe,Se,be,o),we=xT(le),Te=oT(),Ee=jT(t,n,o,h),{slideRegistry:De}=CT(k,v,ce,se,re,fe),Oe=ET(e,n,De,Ce,xe,Te,o,S),ke={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:he,axis:E,dragHandler:dT(E,e,r,i,be,fT(E,i),_e,he,Ce,xe,Se,ue,o,O,p,m,_,N,x),eventStore:Te,percentOfView:O,index:ue,indexPrevious:de,limit:le,location:_e,offsetLocation:ye,previousLocation:ve,options:a,resizeHandler:hT(t,o,i,n,E,y,C),scrollBody:xe,scrollBounds:_T(le,ye,be,xe,O),scrollLooper:bT(ae,le,ye,[_e,ye,ve,be]),scrollProgress:we,scrollSnapList:ce.map(we.get),scrollSnaps:ce,scrollTarget:Se,scrollTo:Ce,slideLooper:kT(E,D,ae,A,te,M,ce,ye,n),slideFocus:Oe,slidesHandler:AT(t,o,b),slidesInView:Ee,slideIndexes:fe,slideRegistry:De,slidesToScroll:re,target:be,translate:OT(E,t)};return ke}function FT(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var IT={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function LT(e){function t(e,t){return rT(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,nT(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>nT(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function RT(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>
78Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function zT(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=LT(i),o=RT(a),s=oT(),c=FT(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(IT,zT.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(Uw(t)?e.querySelector(t):t)||e.children[0];let r=Uw(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=PT(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(pe),_.eventHandler.init(pe),_.resizeHandler.init(pe),_.slidesHandler.init(pe),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(pe),x=o.init(pe,b)))}function D(e,t){let n=ie();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function ee(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function k(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function A(e){k(_.index.add(1).get(),e,-1)}function te(e){k(_.index.add(-1).get(),e,1)}function ne(){return _.index.add(1).get()!==ie()}function j(){return _.index.add(-1).get()!==ie()}function re(){return _.scrollSnapList}function M(){return _.scrollProgress.get(_.offsetLocation.get())}function ie(){return _.index.get()}function ae(){return _.indexPrevious.get()}function oe(){return _.slidesInView.get()}function se(){return _.slidesInView.get(!1)}function ce(){return x}function le(){return _}function ue(){return e}function de(){return S}function fe(){return C}let pe={canScrollNext:ne,canScrollPrev:j,containerNode:de,internalEngine:le,destroy:ee,off:p,on:f,emit:m,plugins:ce,previousScrollSnap:ae,reInit:h,rootNode:ue,scrollNext:A,scrollPrev:te,scrollProgress:M,scrollSnapList:re,scrollTo:k,selectedScrollSnap:ie,slideNodes:fe,slidesInView:oe,slidesNotInView:se};return E(t,n),setTimeout(()=>c.emit(`init`),0),pe}zT.globalOptions=void 0;function BT(e={},t=[]){let n=(0,_.useRef)(e),r=(0,_.useRef)(t),[i,a]=(0,_.useState)(),[o,s]=(0,_.useState)(),c=(0,_.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,_.useEffect)(()=>{zw(n.current,e)||(n.current=e,c())},[e,c]),(0,_.useEffect)(()=>{Vw(r.current,t)||(r.current=t,c())},[t,c]),(0,_.useEffect)(()=>{if(Rw()&&o){zT.globalOptions=BT.globalOptions;let e=zT(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}BT.globalOptions=void 0;var VT=_.createContext(null);function HT(){let e=_.useContext(VT);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var UT=_.forwardRef(({orientation:e=`horizontal`,opts:t,setApi:n,plugins:r,className:i,children:a,...o},s)=>{let[c,l]=BT({...t,axis:e===`horizontal`?`x`:`y`},r),[u,d]=_.useState(!1),[f,p]=_.useState(!1),m=_.useCallback(e=>{e&&(d(e.canScrollPrev()),p(e.canScrollNext()))},[]),h=_.useCallback(()=>{l?.scrollPrev()},[l]),g=_.useCallback(()=>{l?.scrollNext()},[l]),v=_.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),h()):e.key===`ArrowRight`&&(e.preventDefault(),g())},[h,g]);return _.useEffect(()=>{!l||!n||n(l)},[l,n]),_.useEffect(()=>{if(l)return m(l),l.on(`reInit`,m),l.on(`select`,m),()=>{l?.off(`select`,m)}},[l,m]),(0,M.jsx)(VT.Provider,{value:{carouselRef:c,api:l,opts:t,orientation:e||(t?.axis===`y`?`vertical`:`horizontal`),scrollPrev:h,scrollNext:g,canScrollPrev:u,canScrollNext:f},children:(0,M.jsx)(`div`,{ref:s,onKeyDownCapture:v,className:F(`relative`,i),role:`region`,"aria-roledescription":`carousel`,...o,children:a})})});UT.displayName=`Carousel`;var WT=_.forwardRef(({className:e,...t},n)=>{let{carouselRef:r,orientation:i}=HT();return(0,M.jsx)(`div`,{ref:r,className:`overflow-hidden`,children:(0,M.jsx)(`div`,{ref:n,className:F(`flex`,i===`horizontal`?`-ml-4`:`-mt-4 flex-col`,e),...t})})});WT.displayName=`CarouselContent`;var GT=_.forwardRef(({className:e,...t},n)=>{let{orientation:r}=HT();return(0,M.jsx)(`div`,{ref:n,role:`group`,"aria-roledescription":`slide`,className:F(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`pl-4`:`pt-4`,e),...t})});GT.displayName=`CarouselItem`;var KT=_.forwardRef(({className:e,variant:t=`outline`,size:n=`icon`,...r},i)=>{let{orientation:a,scrollPrev:o,canScrollPrev:s}=HT();return(0,M.jsxs)(R,{ref:i,variant:t,size:n,className:F(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-left-12 top-1/2 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,M.jsx)(Qt,{className:`h-4 w-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})});KT.displayName=`CarouselPrevious`;var qT=_.forwardRef(({className:e,variant:t=`outline`,size:n=`icon`,...r},i)=>{let{orientation:a,scrollNext:o,canScrollNext:s}=HT();return(0,M.jsxs)(R,{ref:i,variant:t,size:n,className:F(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-right-12 top-1/2 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,M.jsx)($t,{className:`h-4 w-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})});qT.displayName=`CarouselNext`;var JT=()=>{let[e,t]=(0,_.useState)([]);return(0,_.useEffect)(()=>{(async()=>{let{data:e}=await wb.from(`staff`).select(`*`).order(`display_order`,{ascending:!0});e&&t(e)})()},[]),(0,M.jsxs)(`main`,{className:`min-h-screen bg-background`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pb-16 px-4 md:px-8 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-6 text-golf-green`,children:`About Belvedere Golf Club`}),(0,M.jsx)(`p`,{className:`text-lg md:text-xl text-gray-700 mb-8`,children:`A historic gem in the heart of Charlottetown, Prince Edward Island`})]})})}),(0,M.jsx)(`section`,{className:`py-12 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(UT,{className:`mx-auto max-w-4xl`,children:[(0,M.jsxs)(WT,{children:[(0,M.jsx)(GT,{children:(0,M.jsx)(`div`,{className:`aspect-[16/9] w-full overflow-hidden rounded-lg`,children:(0,M.jsx)(`img`,{src:`/lovable-uploads/7b95b060-251e-47e2-9259-933777c5fe0e.jpg`,alt:`Belvedere Golf Club`,className:`w-full h-full object-cover`})})}),(0,M.jsx)(GT,{children:(0,M.jsx)(`div`,{className:`aspect-[16/9] w-full overflow-hidden rounded-lg`,children:(0,M.jsx)(`img`,{src:`/lovable-uploads/d24d4814-ce23-4ab3-bfa3-9cd92e3f1ae6.jpg`,alt:`Belvedere Golf Course`,className:`w-full h-full object-cover`})})}),(0,M.jsx)(GT,{children:(0,M.jsx)(`div`,{className:`aspect-[16/9] w-full overflow-hidden rounded-lg`,children:(0,M.jsx)(`img`,{src:`/lovable-uploads/52573c2d-1e4c-4882-bfd8-3b39905670d6.png`,alt:`Golf Course View`,className:`w-full h-full object-cover`})})})]}),(0,M.jsxs)(`div`,{className:`hidden md:block`,children:[(0,M.jsx)(KT,{className:`absolute -left-12 top-1/2`}),(0,M.jsx)(qT,{className:`absolute -right-12 top-1/2`})]})]})})}),(0,M.jsx)(`section`,{className:`py-16 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl md:text-4xl font-bold mb-6 text-golf-green`,children:`A Storied Legacy`}),(0,M.jsxs)(`div`,{className:`prose prose-lg max-w-none text-gray-700`,children:[(0,M.jsx)(`p`,{className:`mb-6`,children:`Established in the early 1900s, Belvedere Golf Club has grown to become a historic gem in the heart of Charlottetown, Prince Edward Island. With origins dating back to 1902 and ties to both the Charlottetown and Belvidere Golf Clubs, Belvedere is one of Canada's most storied clubs.`}),(0,M.jsx)(`p`,{children:`Throughout its rich history, the Club has successfully blended over a century of tradition with contemporary excellence, creating a timeless golfing experience that honors its past while embracing the future.`})]})]})})}),(0,M.jsx)(`section`,{className:`py-16 px-4 md:px-8 bg-golf-sand/10`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl md:text-4xl font-bold mb-6 text-golf-green`,children:`The Course`}),(0,M.jsx)(`div`,{className:`prose prose-lg max-w-none text-gray-700 mb-10`,children:(0,M.jsx)(`p`,{children:`Set along rolling terrain with scenic views of the Hillsborough River, Belvedere features an 18-hole championship layout that challenges and delights golfers of all skill levels.`})}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(jn,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Strategic Design`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`A blend of classic and modern golf architecture`})]})]})})}),(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(jn,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Meticulous Maintenance`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Expertly maintained greens and fairways`})]})]})})}),(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(jn,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Recent Renovations`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Including tree management and future updates with input from leading architect Christine Fraser`})]})]})})})]})]})})}),(0,M.jsx)(`section`,{className:`py-16 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl md:text-4xl font-bold mb-6 text-golf-green`,children:`Facilities and Amenities`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:[(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(In,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Modern Clubhouse`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Full-service dining in a welcoming atmosphere`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(tr,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Pro Shop`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Offering top gear and expert advice`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(jn,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Practice Facilities`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Including driving range and short game area`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(jn,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Golf Simulators`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`For year-round play and improvement`})]})]})]})]})})}),(0,M.jsx)(`section`,{className:`py-16 px-4 md:px-8 bg-golf-sand/10`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl md:text-4xl font-bold mb-6 text-golf-green`,children:`Signature Events`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 mb-10`,children:`Belvedere is proud host to major tournaments throughout the year:`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:[(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(lr,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`The Rose Bowl`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`The ultimate golf team competition, competed for since 1925`})]})]})})}),(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(lr,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Annual Club Championships`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Showcasing the best talent from our membership`})]})]})})}),(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(an,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`Women's Fun Day`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Celebrated for community and camaraderie`})]})]})})}),(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(lr,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`The Island Open`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Showcasing PEI's Top Talent on the Island's Iconic Greens.`})]})]})})}),(0,M.jsx)(Bm,{className:`hover:shadow-lg transition-shadow`,children:(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`flex items-start`,children:[(0,M.jsx)(pr,{className:`h-6 w-6 text-golf-green mr-4 mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-2`,children:`The Kenmac Family Classic`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`An incredible tradition of family golf`})]})]})})})]})]})})}),(0,M.jsx)(`section`,{className:`py-16 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl md:text-4xl font-bold mb-6 text-golf-green`,children:`Membership and Community`}),(0,M.jsxs)(`div`,{className:`prose prose-lg max-w-none text-gray-700`,children:[(0,M.jsx)(`p`,{className:`mb-6`,children:`Whether you're a life-long local or a seasonal visitor, Belvedere offers membership options for everyone. The Club is deeply rooted in the Charlottetown community and continues to foster a welcoming, inclusive golf experience.`}),(0,M.jsxs)(`div`,{className:`flex items-center justify-center mt-10`,children:[(0,M.jsx)(pr,{className:`h-6 w-6 text-golf-green mr-2`}),(0,M.jsx)(`span`,{className:`text-xl font-medium text-golf-green`,children:`Join our community today!`})]})]})]})})})]})},YT=s({ACCURACY:()=>10,APP_VERSION:()=>XT,BASE_PATH:()=>VE,BASE_PATH_IS_MIN:()=>HE,BR:()=>`br`,CLIPBOARD_ID:()=>GE,COMMAND_KEYS:()=>EE,EMULATE_DBLCLICK_TIMEOUT:()=>300,ES:()=>ZT,FAT_MODE:()=>!0,HOMEPAGE:()=>$T,INSEPARABLE_TAGS:()=>mE,INSERT_AS_HTML:()=>ME,INSE
78RT_AS_TEXT:()=>PE,INSERT_CLEAR_HTML:()=>NE,INSERT_ONLY_TEXT:()=>FE,INVISIBLE_SPACE:()=>``,INVISIBLE_SPACE_REG_EXP:()=>nE,INVISIBLE_SPACE_REG_EXP_END:()=>rE,INVISIBLE_SPACE_REG_EXP_START:()=>iE,IS_BLOCK:()=>uE,IS_ES_MODERN:()=>!0,IS_ES_NEXT:()=>!0,IS_IE:()=>DE,IS_INLINE:()=>dE,IS_MAC:()=>IE,IS_PROD:()=>!0,IS_TEST:()=>QT,KEY_ALIASES:()=>LE,KEY_ALT:()=>`Alt`,KEY_BACKSPACE:()=>_E,KEY_DELETE:()=>TE,KEY_DOWN:()=>CE,KEY_ENTER:()=>vE,KEY_ESC:()=>yE,KEY_F3:()=>`F3`,KEY_LEFT:()=>bE,KEY_META:()=>gE,KEY_RIGHT:()=>SE,KEY_SPACE:()=>wE,KEY_TAB:()=>`Tab`,KEY_UP:()=>xE,LIST_TAGS:()=>fE,MARKER_CLASS:()=>jE,MODE_SOURCE:()=>2,MODE_SPLIT:()=>3,MODE_WYSIWYG:()=>1,NBSP_SPACE:()=>`\xA0`,NEARBY:()=>5,NO_EMPTY_TAGS:()=>hE,PARAGRAPH:()=>`p`,PASSIVE_EVENTS:()=>qE,SAFE_COUNT_CHANGE_CALL:()=>10,SET_TEST:()=>eE,SOURCE_CONSUMER:()=>KE,SPACE_REG_EXP:()=>aE,SPACE_REG_EXP_END:()=>sE,SPACE_REG_EXP_START:()=>oE,TEMP_ATTR:()=>UE,TEXT_HTML:()=>kE,TEXT_PLAIN:()=>OE,TEXT_RTF:()=>AE,TOKENS:()=>tE,globalDocument:()=>lE,globalWindow:()=>cE,lang:()=>WE}),XT=`4.13.20`,ZT=`es2020`,QT=!1,$T=`https://xdsoft.net/jodit/`,eE=()=>QT=!0,tE={},nE=()=>/[\uFEFF]/g,rE=()=>/[\uFEFF]+$/g,iE=()=>/^[\uFEFF]+/g,aE=()=>/[\s\n\t\r\uFEFF\u200b]+/g,oE=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,sE=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,cE=typeof window<`u`?window:void 0,lE=typeof document<`u`?document:void 0,uE=/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,dE=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,fE=new Set([`ul`,`ol`]),pE=[`img`,`video`,`svg`,`iframe`,`script`,`input`,`textarea`,`link`,`jodit`,`jodit-media`],mE=new Set([...pE,`br`,`hr`]),hE=new Set(pE),gE=`Meta`,_E=`Backspace`,vE=`Enter`,yE=`Escape`,bE=`ArrowLeft`,xE=`ArrowUp`,SE=`ArrowRight`,CE=`ArrowDown`,wE=`Space`,TE=`Delete`,EE=[gE,_E,TE,xE,CE,SE,bE,vE,yE,`F3`,`Tab`],DE=typeof navigator<`u`&&(navigator.userAgent.indexOf(`MSIE`)!==-1||/rv:11.0/i.test(navigator.userAgent)),OE=DE?`text`:`text/plain`,kE=DE?`html`:`text/html`,AE=DE?`rtf`:`text/rtf`,jE=`jodit-selection_marker`,ME=`insert_as_html`,NE=`insert_clear_html`,PE=`insert_as_text`,FE=`insert_only_text`,IE=cE!==void 0&&/Mac|iPod|iPhone|iPad/.test(cE.navigator.platform),LE={add:`+`,break:`pause`,cmd:`meta`,command:`meta`,ctl:`control`,ctrl:`control`,del:`delete`,down:`arrowdown`,esc:`escape`,ins:`insert`,left:`arrowleft`,mod:IE?`meta`:`control`,opt:`alt`,option:`alt`,return:`enter`,right:`arrowright`,space:`space`,spacebar:`space`,up:`arrowup`,win:`meta`,windows:`meta`},RE=e=>{let t=e.split(`/`);return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join(`/`)+`/`,isMin:!1}:{basePath:e,isMin:!1}},{basePath:zE,isMin:BE}=(()=>{if(typeof document>`u`)return{basePath:``,isMin:!1};let e=lE.currentScript;if(e)return RE(e.src);let t=lE.querySelectorAll(`script[src]`);return t&&t.length?RE(t[t.length-1].src):RE(cE.location.href)})(),VE=zE,HE=BE,UE=`data-jodit-temp`,WE={},GE=`clipboard`,KE=`source-consumer`,qE=new Set([`touchstart`,`touchend`,`scroll`,`mousewheel`,`mousemove`,`touchmove`]);function V(e){return typeof e==`function`}function H(e,t,n){if(!V(n.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let r=n.value;return{configurable:!0,get(){let e=r.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}var JE={beforeInit:`beforeInit`,ready:`ready`,beforeDestruct:`beforeDestruct`,destructed:`destructed`};function YE(e){return!!e&&(typeof e).toLowerCase()===`function`&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(e)))}function XE(e){return Array.isArray(e)}function U(e){return typeof e==`string`}function ZE(e){return XE(e)&&U(e[0])}function QE(e){return e==null}function $E(e,t){if(!U(e)||!e.length)return null;let n=e.split(`.`),r=t;try{for(let e of n){if(QE(r[e]))return null;r=r[e]}}catch{return null}return QE(r)?null:r}var eD={};function tD(e){var t;if(!(e in eD)){let n=lE.createElement(`iframe`);try{if(n.src=`about:blank`,lE.body.appendChild(n),!n.contentWindow)return null;let t=$E(e,n.contentWindow),r=$E(e.split(`.`).slice(0,-1).join(`.`),n.contentWindow);V(t)&&(eD[e]=t.bind(r))}catch{}finally{(t=n.parentNode)==null||t.removeChild(n)}}return eD[e]??null}var nD=function(...e){return(YE(Array.from)?Array.from:tD(`Array.from`)??Array.from).apply(Array,e)},rD=e=>U(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,``));function iD(e){return!!e&&V(e.has)&&V(e.add)&&V(e.delete)}function aD(e){return e.replace(sE(),``).replace(oE(),``)}function oD(e,t){return e.replace(RegExp(`[${t}]+$`),``).replace(RegExp(`^[${t}]+`),``)}function sD(e){return e.replace(rE(),``).replace(iE(),``)}
78var cD=class extends Error{constructor(e){super(e),this.name=`AssertionError`}};function lD(e,t){if(!e)throw new cD(`Assertion failed: ${t}`)}function uD(e){return e!=null&&e===e.window}function dD(e){return!e||typeof e!=`object`||e.nodeType||uD(e)?!1:!(e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,`isPrototypeOf`))}var fD=e=>e.replace(/([A-Z])([A-Z])([a-z])/g,`$1-$2$3`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),pD=e=>e.replace(/([A-Z])([A-Z])([a-z])/g,`$1-$2$3`).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase();function mD(e){return typeof e==`boolean`}function hD(e){if(U(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return typeof e==`number`&&!isNaN(e)&&isFinite(e)}var gD=e=>{if(e===`rgba(0, 0, 0, 0)`||e===``)return!1;if(!e)return`#000000`;if(e.substr(0,1)===`#`)return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return`#000000`;let n=parseInt(t[2],10),r=parseInt(t[3],10),i=(parseInt(t[4],10)|r<<8|n<<16).toString(16).toUpperCase();for(;i.length<6;)i=`0`+i;return t[1]+`#`+i},_D=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function vD(e,t){return!QE(t)&&_D.test(e)&&hD(t.toString())?parseInt(t.toString(),10)+`px`:t}function yD(e,t){switch(fD(e)){case`font-weight`:switch(t.toString().toLowerCase()){case`700`:case`bold`:return 700;case`400`:case`normal`:return 400;case`900`:case`heavy`:return 900}return hD(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&gD(t.toString())||t}var bD=e=>e.replace(/([-_])(.)/g,(e,t,n)=>n.toUpperCase());function W(e,t,n,r=!1){if(mD(n)&&(r=n,n=void 0),dD(t)||n!==void 0){let r=(e,t,n)=>{n=vD(t,n),n!==void 0&&(n==null||W(e,t,!0)!==yD(t,n))&&(e.style[t]=n)};if(dD(t)){let n=Object.keys(t);for(let i=0;i<n.length;i+=1)r(e,bD(n[i]),t[n[i]])}else r(e,bD(t),n);return``}let i=fD(t),a=e.ownerDocument||document,o=a?a.defaultView||a.parentWindow:!1,s=e.style[t],c=``;return s!==void 0&&s!==``?c=s:o&&!r&&(c=o.getComputedStyle(e).getPropertyValue(i)),_D.test(t)&&/^[-+]?[0-9.]+px$/.test(c.toString())&&(c=parseInt(c.toString(),10)),yD(t,c)}var xD=e=>{W(e,`display`)===`block`&&W(e,`display`,``);let{style:t}=e;t.marginLeft===`auto`&&t.marginRight===`auto`&&(t.marginLeft=``,t.marginRight=``)};function G(e,t,n){if(!e||!V(e.getAttribute))return null;if(!U(t))return Object.keys(t).forEach(n=>{let r=t[n];dD(r)&&n===`style`?W(e,r):(n===`className`&&(n=`class`),G(e,n,r))}),null;let r=pD(t);if(/^-/.test(r)){let t=G(e,`data${r}`);if(t)return t;r=r.substr(1)}if(n!==void 0)if(n==null)e.hasAttribute(r)&&e.removeAttribute(r);else{let t=n.toString();return e.nodeName===`IMG`&&(r===`width`||r===`height`)&&(t=t.replace(`px`,``)),e.setAttribute(r,t),t}return e.getAttribute(r)}function SD(e){return!!(e&&e instanceof Object&&V(e.constructor)&&e.isView)}var CD=new WeakMap,wD=(e,t,n)=>{let r=CD.get(e);if(!r){r={},CD.set(e,r);let t=null;SD(e.j)&&(t=e.j.e),SD(e)&&(t=e.e),t&&t.on(`beforeDestruct`,()=>{CD.delete(e)})}return n===void 0?r[t]:(r[t]=n,n)};function TD(e=`Aborted`){return new DOMException(e,`AbortError`)}var ED=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},DD=class e extends TypeError{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};function OD(e){return TypeError(e)}function kD(e){return new ED(e)}function AD(e){return new DD(e)}function jD(e){return e&&typeof e.then==`function`}function MD(e,...t){return e(...t)}function ND(e,t,...n){return e.apply(t,n)}function PD(e,t){G(t,`data-editor_id`,e.id),!t.component&&Object.defineProperty(t,"jodit",{value:e})}function FD(e,t){return jD(e)?e.then(e=>e,()=>null).finally(t):t?.()}var ID=(e,t)=>t.async.promise((n,r)=>{let i=new Image,a=()=>{t.e.off(i),r?.()},o=()=>{t.e.off(i),n(i)};t.e.one(i,`load`,o).one(i,`error`,a).one(i,`abort`,a),i.src=e,i.complete&&o()}),LD=(e,t=!0)=>{if(t)return Object.keys(e);let n=[];for(let t in e)n.push(t);return n},RD=(e,t,{control:n},r)=>{let i=`button${n.command}`,a=(n.args&&n.args[0])??wD(e,i);if(QE(a))return!1;wD(e,i,a),r&&(a=r(a)),e.execCommand(n.command,!1,a??void 0)},zD=e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch{return null}};function BD(e,t){let n;do n=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!n&&e);return n}var VD=RegExp(`<([a-z]+)[^>]+${UE}[^>]*>(.+?)</\\1>`,`gi`),K=class e{constructor(){throw Error(`Dom is static module`)}static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(t,n,r){let i,a=t,o=t;r.s.save();let s=!1;do s=!1,i=o.nextSibling,i&&!e.isBlock(i)&&!e.isTag(i,`br`)&&(s=!0,o=i);while(s);return e.__wrapElements(n,r,a,o)}static __wrapElements(e,t,n,r){let i=U(e)?t.createInside.element(e):e;n.parentNode&&n.parentNode.insertBefore(i,n);let a=n;for(;a&&(a=n.nextSibling,i.appendChild(n),!(n===r||!a));)n=a;
78return t.s.restore(),i}static wrapInline(t,n,r){let i,a=t,o=t;r.s.save();let s=!1;do s=!1,i=a.previousSibling,i&&!e.isBlock(i)&&(s=!0,a=i);while(s);do s=!1,i=o.nextSibling,i&&!e.isBlock(i)&&(s=!0,o=i);while(s);return e.__wrapElements(n,r,a,o)}static wrap(t,n,r){let i=U(n)?r.element(n):n;if(e.isNode(t)){if(!t.parentNode)throw OD(`Element should be in DOM`);t.parentNode.insertBefore(i,t),i.appendChild(t)}else{let e=t.extractContents();t.insertNode(i),i.appendChild(e)}return i}static unwrap(t){let n=t.parentNode;if(n){for(;t.firstChild;)n.insertBefore(t.firstChild,t);e.safeRemove(t)}}static between(e,t,n){let r=e;for(;r&&r!==t&&!(e!==r&&n(r));){let e=r.firstChild||r.nextSibling;if(!e){for(;r&&!r.nextSibling;)if(r=r.parentNode,r===t)return;e=r?.nextSibling}r=e}}static replace(t,n,r,i=!1,a=!1){rD(n)&&(lD(r,`Need create instance for new tag`),n=r.fromHTML(n));let o;if(U(n)?(lD(r,`Need create instance for new tag`),o=r.element(n)):o=n,!a)for(;t.firstChild;)o.appendChild(t.firstChild);return i&&e.isElement(t)&&e.isElement(o)&&nD(t.attributes).forEach(e=>{o.setAttribute(e.name,e.value)}),t.parentNode&&t.parentNode.replaceChild(o,t),o}static isEmptyTextNode(t){return e.isText(t)&&(!t.nodeValue||t.nodeValue.replace(nE(),``).trim().length===0)}static isEmptyContent(t){return e.each(t,t=>e.isEmptyTextNode(t))}static isContentEditable(t,n){return e.isNode(t)&&!e.closest(t,t=>e.isElement(t)&&t.getAttribute(`contenteditable`)===`false`,n)}static isEmpty(t,n=hE){if(!t)return!0;let r;r=V(n)?n:e=>n.has(e.nodeName.toLowerCase());let i=e=>e.nodeValue==null||aD(e.nodeValue).length===0;return e.isText(t)?i(t):!(e.isElement(t)&&r(t))&&e.each(t,t=>{if(e.isText(t)&&!i(t)||e.isElement(t)&&r(t))return!1})}static isNode(e){return!!(e&&U(e.nodeName)&&typeof e.nodeType==`number`&&e.childNodes&&V(e.appendChild))}static isCell(t){return e.isNode(t)&&(t.nodeName===`TD`||t.nodeName===`TH`)}static isList(t){return e.isTag(t,fE)}static isLeaf(t){return e.isTag(t,`li`)}static isImage(t){return e.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)}static isBlock(t){return!QE(t)&&typeof t==`object`&&e.isNode(t)&&uE.test(t.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(t){return e.isNode(t)?t.nodeType===Node.ELEMENT_NODE:!1}static isFragment(t){return e.isNode(t)?t.nodeType===Node.DOCUMENT_FRAGMENT_NODE:!1}static isHTMLElement(t){if(!e.isNode(t))return!1;let n=t.ownerDocument?.defaultView;return t instanceof(n?n.HTMLElement:HTMLElement)}static isInlineBlock(t){return e.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&[`inline`,`inline-block`].indexOf(W(t,`display`).toString())!==-1}static canSplitBlock(t){return!QE(t)&&e.isHTMLElement(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&t.style!==void 0&&!/^(fixed|absolute)/i.test(t.style.position)}static first(e,t){let n=e?.firstChild;if(!n)return null;do{if(t(n))return n;let r=n.firstChild;if(r||=n.nextSibling,!r&&n.parentNode!==e){do n=n.parentNode;while(n&&!n?.nextSibling&&n.parentNode!==e);r=n?.nextSibling}n=r}while(n);return null}static last(e,t){let n=e?.lastChild;if(!n)return null;do{if(t(n))return n;let r=n.lastChild;if(r||=n.previousSibling,!r&&n.parentNode!==e){do n=n.parentNode;while(n&&!n?.previousSibling&&n.parentNode!==e);r=n?.previousSibling}n=r}while(n);return null}static prev(t,n,r,i=!0){return e.find(t,n,r,!1,i)}static next(t,n,r,i=!0){return e.find(t,n,r,!0,i)}static prevWithClass(t,n){return e.prev(t,t=>e.isElement(t)&&t.classList.contains(n),t.parentNode)}static nextWithClass(t,n){return e.next(t,t=>e.isElement(t)&&t.classList.contains(n),t.parentNode)}static find(e,t,n,r=!0,i=!0){let a=this.nextGen(e,n,r,i),o=a.next();for(;!o.done;){if(t(o.value))return o.value;o=a.next()}return null}static*nextGen(e,t,n=!0,r=!0){let i=[],a=e;do{let t=n?a.nextSibling:a.previousSibling;for(;t;)i.push(t),t=n?t.nextSibling:t.previousSibling;i.reverse(),yield*this.runInStack(e,i,n,r),a=a.parentNode}while(a&&a!==t);return null}static each(e,t,n=!0){let r=this.eachGen(e,n),i=r.next();for(;!i.done;){if(t(i.value)===!1)return!1;i=r.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,n,r=!0){for(;t.length;){let i=t.pop();if(r){let e=n?i.lastChild:i.firstChild;for(;e;)t.push(e),e=n?e.previousSibling:e.nextSibling}e!==i&&(yield i)}}static findWithCurrent(t,n,r,i=`nextSibling`,a=`firstChild`){let o=t;do{if(n(o))return o||null;
78if(a&&o&&o[a]){let t=e.findWithCurrent(o[a],n,o,i,a);if(t)return t}for(;o&&!o[i]&&o!==r;)o=o.parentNode;o&&o[i]&&o!==r&&(o=o[i])}while(o&&o!==r);return null}static findSibling(t,n=!0,r=t=>!e.isEmptyTextNode(t)){let i=e.sibling(t,n);for(;i&&!r(i);)i=e.sibling(i,n);return i&&r(i)?i:null}static findNotEmptySibling(t,n){return e.findSibling(t,n,t=>!e.isEmptyTextNode(t)&&!!(!e.isText(t)||t.nodeValue?.length&&aD(t.nodeValue)))}static findNotEmptyNeighbor(t,n,r){return MD(n?e.prev:e.next,t,t=>!!(t&&(!(e.isText(t)||e.isComment(t))||aD(t?.nodeValue||``).length)),r)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,n,r=!1){let i=e;if(!i)return null;do{if(t(i))return i;if(i===n||!i.parentNode)break;i=i.parentNode}while(i&&i!==n);return i===n&&r&&t(i)?i:null}static closest(t,n,r){let i,a=e=>e.toLowerCase();if(V(n))i=n;else if(XE(n)||iD(n)){let e=iD(n)?n:new Set(n.map(a));i=t=>!!(t&&e.has(a(t.nodeName)))}else i=e=>!!(e&&a(n)===a(e.nodeName));return e.up(t,i,r)}static furthest(e,t,n){let r=null,i=e?.parentElement;for(;i&&i!==n;)t(i)&&(r=i),i=i?.parentElement;return r}static appendChildFirst(e,t){let n=e.firstChild;n?n!==t&&e.insertBefore(t,n):e.appendChild(t)}static after(e,t){let{parentNode:n}=e;n&&(n.lastChild===e?n.appendChild(t):n.insertBefore(t,e.nextSibling))}static before(e,t){let{parentNode:n}=e;n&&n.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){XE(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(t,n,r=!1,i=()=>!0){let a=(t.ownerDocument||lE).createDocumentFragment();nD(t.childNodes).filter(t=>i(t)?!0:(e.safeRemove(t),!1)).forEach(e=>{a.appendChild(e)}),!r||!n.firstChild?n.appendChild(a):n.insertBefore(a,n.firstChild)}static isOrContains(e,t,n=!1){return e===t?!n:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...t){t.forEach(t=>e.isNode(t)&&t.parentNode&&t.parentNode.removeChild(t))}static safeInsertNode(t,n){t.collapsed||t.deleteContents();let r=e.isFragment(n)?n.lastChild:n;t.startContainer===t.endContainer&&t.collapsed&&e.isTag(t.startContainer,mE)?e.after(t.startContainer,n):(t.insertNode(n),r&&t.setStartBefore(r)),t.collapse(!0),[n.nextSibling,n.previousSibling].forEach(t=>e.isText(t)&&!t.nodeValue&&e.safeRemove(t))}static hide(e){e&&(wD(e,`__old_display`,e.style.display),e.style.display=`none`)}static show(e){if(!e)return;let t=wD(e,`__old_display`);e.style.display===`none`&&(e.style.display=t||``)}static isTag(e,t){if(Array.isArray(t))throw TypeError(`Dom.isTag does not support array`);if(!this.isElement(e))return!1;let n=e.tagName.toLowerCase();return t instanceof Set?t.has(n)||t.has(e.tagName.toUpperCase()):n===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&G(e,t),G(e,UE,!0),e}static isTemporary(t){return e.isElement(t)?e.isMarker(t)||G(t,`data-jodit-temp`)===`true`:!1}static isMarker(t){return e.isNode(t)&&e.isTag(t,`span`)&&t.hasAttribute(`data-jodit-selection_marker`)}static replaceTemporaryFromString(e){return e.replace(VD,`$2`)}static temporaryList(e){return nD(e.querySelectorAll(`[${UE}]`))}};function HD(){let e=!0;try{let t=lE.createElement(`input`);t.type=`color`,t.value=`!`,e=t.type===`color`&&t.value!==`!`}catch{e=!1}return e}function UD(e){return!!e&&e instanceof DOMException&&e.name===`AbortError`}function WD(e,t={}){if(typeof e!=`object`)return String(e);let n=new Set(t.excludeKeys),r=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!n.has(e)){if(typeof t==`object`&&t){if(r.get(t))return`[refObject]`;r.set(t,!0)}return t}},t.prettify)}function GD(e,t){return e===t||WD(e)===WD(t)}function KD(e,t){return e===t}function qD(e){return e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)!==-1||e.search(/<meta.*?Microsoft Word\s[\d].*?>/)!==-1||e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)!==-1||e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)!==-1||e.search(/urn:schemas-microsoft-com:office:(word|excel)/)!==-1||e.search(/<\w[^>]*\sclass=("|')?Mso/)!==-1||e.search(/style='[^']*mso-/)!==-1||e.search(/style="[^"]*mso-/)!==-1&&e.search(/<font/)!==-1}function JD(e){return!QE(e)&&V(e.init)}function YD(e){return!QE(e)&&V(e.destruct)}function XD(e){return!QE(e)&&K.isElement(e.container)}function ZD(e){return U(e)&&hD(e)&&(e=parseFloat(e)),typeof e==`number`&&Number.isFinite(e)&&!(e%1)}function QD(e){return!!(e&&e instanceof Object&&V(e.constructor)&&(typeof Jodit<`u`&&e instanceof Jodit||e.isJodit))}var $D=e=>U(e)&&e.length===23&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e);function eO(e){return K.isMarker(e)}function tO(e){return typeof e==`number`&&!isNaN(e)&&isFinite(e)}function nO(e){if(e.includes(` `))return!1;if(typeof URL<`u`)try{let t=new URL(e);return[`https:`,`http:`,`ftp:`,`file:`,`rtmp:`].includes(t.protocol)}catch{return!1}let t=lE.createElement(`a`);return t.href=e,!!t.hostname}function rO(e){return e.length?!/[^0-9A-Za-zа-ÑÐ-ЯÐÑ\w\-_. ]/.test(e)&&e.trim().length>0:!1}function iO(e,t){let n=Object.getOwnPropertyDescriptor(e,t);return!n||V(n.get)?null:n.value}function aO(e,t,n){let r=n.get;if(!r)throw OD(`Getter property descriptor expected`);n.get=function(){let e=r.call(this);return e&&e.noCache===!0||Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:!1,value:e}),e}}function oO(e,t,n){let r=n.value;if(!V(r))throw OD(`Handler must be a Function`);let i=!0,a=new WeakMap;n.value=function(...e){if(i&&a.has(this.constructor))return a.get(this.constructor)?.cloneNode(!0);let t=r.apply(this,e);return i&&K.isElement(t)&&a.set(this.constructor,t),i?t.cloneNode(!0):t},e.hookStatus(JE.ready,e=>{i=!!(SD(e)?e:e.jodit).options.cache})}var sO=new Map,cO=e=>{if(V(e.className))return e.className();let t=e.constructor?.originalConstructor||e.constructor;if(sO.has(t))return sO.get(t);if(t.name)return t.name;let n=new RegExp(/^\s*function\s*(\S*)\s*\(/),r=t.toString().match(n);return r?r[1]:``},lO=new Map;function uO(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus(`ready`))}}let n=cO(e.prototype);return lO.has(n),lO.set(n,t),t}function dO(e){return lO.get(e)}function fO(e,t,...n){if(!t)e.call(null,...n);else return cE.setTimeout(e,t,...n);return 0}function pO(e){cE.clearTimeout(e)}var mO=class{constructor(){this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=(queueMicrotask==null?void 0:queueMicrotask.bind(window))??Promise.resolve().then.bind(Prom
78ise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=window.requestIdleCallback?.bind(window)??((e,t)=>{let n=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},t?.timeout??1)}),this.__cancelIdleCallbackNative=window.cancelIdleCallback?.bind(window)??(e=>{this.clearTimeout(e)}),this.isDestructed=!1}delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...n){if(this.isDestructed)return 0;let r={};QE(t)&&(t=0),tO(t)||(r=t,t=r.timeout||0),r.label&&this.clearLabel(r.label);let i=fO(e,t,...n),a=r.label||i;return this.timers.set(a,i),this.__callbacks.set(a,e),i}updateTimeout(e,t){if(lD(e&&this.timers.has(e),`Label does not exist`),!e||!this.timers.has(e))return null;let n=this.__callbacks.get(e);return lD(V(n),`Callback is not a function`),this.setTimeout(n,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&(pO(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if(U(e))return this.clearLabel(e);pO(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,n=!1){let r=0,i=!1,a=[],o=(...t)=>{if(!i){r=0;let n=e(...t);if(i=!0,a.length){let e=()=>{a.forEach(e=>e()),a.length=0};jD(n)?n.finally(e):e()}}},s=(...a)=>{i=!1,t?(!r&&n&&o(...a),pO(r),r=this.setTimeout(()=>o(...a),V(t)?t():t),this.timers.set(e,r)):o(...a)};return dD(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{a.push(e)}).catch(e=>{if(UD(e))return null;throw e});return s(...e),t}:s}microDebounce(e,t=!1){let n=!1,r=!0,i;return((...a)=>{if(i=a,n){r=!0;return}r=!0,t&&(r=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&r&&e(...i)})})}throttle(e,t,n=!1){let r=null,i,a,o;return(...n)=>{if(i=!0,o=n,!t){e(...o);return}r||(a=()=>{i?(e(...o),i=!1,r=this.setTimeout(a,V(t)?t():t),this.timers.set(a,r)):r=null},a())}}promise(e){let t=()=>{},n=new Promise((n,r)=>{t=()=>r(TD(`Abort async`)),this.promisesRejections.add(t),e(n,r)});return n.finally,n.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),n.rejectCallback=t,n}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t(`fulfilled`),e),e=>{throw t(`rejected`),e}),this.setTimeout(()=>{t(`pending`)},100)});let t={};return Promise.race([e,t]).then(e=>e===t?`pending`:`fulfilled`,()=>`rejected`)}requestIdleCallback(e,t={timeout:100}){let n=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(n),n}requestIdlePromise(e){return this.promise(t=>{let n=this.requestIdleCallback(()=>t(n),e)})}schedulerPostTask(e,t={delay:0,priority:`user-visible`}){let n=new AbortController;if(t.signal&&t.signal.addEventListener(`abort`,()=>n.abort()),this.__controllers.add(n),globalThis.scheduler!==void 0){let r=globalThis.scheduler.postTask(e,{...t,signal:n.signal});return r.finally(()=>{this.__controllers.delete(n)}).catch(()=>null),r}return this.promise((r,i)=>{let a=this.setTimeout(()=>{try{r(e())}catch(e){i(e)}this.__controllers.delete(n)},t.delay||1);n.signal.addEventListener(`abort`,()=>{this.clearTimeout(a),this.__controllers.delete(n),i(TD())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:`user-visible`})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>pO(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}};function hO(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}var gO=`JoditEventDefaultNamespace`,_O=class{constructor(){this.__store=new Map}get(e,t){if(this.__store.has(t)){let n=this.__store.get(t);return lD(n,`-`),n[e]}}indexOf(e,t,n){let r=this.get(e,t);if(r){for(let e=0;e<r.length;e+=1)if(r[e].originalCallback===n)return e}return!1}
78namespaces(e=!1){let t=nD(this.__store.keys());return e?t.filter(e=>e!==gO):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,n,r=!1){let i=this.__store.get(t);i||(i={},this.__store.set(t,i)),i[e]===void 0&&(i[e]=[]),r?i[e].unshift(n):i[e].push(n)}clear(){this.__store.clear()}clearEvents(e,t){let n=this.__store.get(e);n&&n[t]&&(delete n[t],Object.keys(n).length||this.__store.delete(e))}isEmpty(){return this.__store.size===0}},vO=class{mute(e){return this.__mutedEvents.add(e??`*`),this}isMuted(e){return e&&this.__mutedEvents.has(e)?!0:this.__mutedEvents.has(`*`)}unmute(e){return this.__mutedEvents.delete(e??`*`),this}__eachEvent(e,t){hO(e).map(e=>e.trim()).forEach(e=>{let n=e.split(`.`),r=n[1]||`JoditEventDefaultNamespace`;t.call(this,n[0],r)})}__getStore(e){if(!e)throw OD(`Need subject`);if(e[this.__key]===void 0){let t=new _O;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){e[this.__key]!==void 0&&delete e[this.__key]}__triggerNativeEvent(e,t){let n=this.__doc.createEvent(`HTMLEvents`);U(t)?n.initEvent(t,!0,!0):(n.initEvent(t.type,t.bubbles,t.cancelable),[`screenX`,`screenY`,`clientX`,`clientY`,`target`,`srcElement`,`currentTarget`,`timeStamp`,`which`,`keyCode`].forEach(e=>{Object.defineProperty(n,e,{value:t[e],enumerable:!0})}),Object.defineProperty(n,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(n)}get current(){return this.currents[this.currents.length-1]}on(e,t,n,r){let i,a,o,s;if(U(e)||ZE(e)?(i=this,a=e,o=t,s=n):(i=e,a=t,o=n,s=r),!(U(a)||ZE(a))||a.length===0)throw OD(`Need events names`);if(!V(o))throw OD(`Need event handler`);if(XE(i))return i.forEach(e=>{this.on(e,a,o,s)}),this;let c=i,l=this.__getStore(c),u=this,d=function(e,...t){if(!u.isMuted(e))return o&&o.call(this,...t)};return yO(c)&&(d=function(e){if(!u.isMuted(e.type)&&(u.__prepareEvent(e),o&&o.call(this,e)===!1))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(a,(e,t)=>{if(e.length===0)throw OD(`Need event name`);if(l.indexOf(e,t,o)===!1){let n={event:e,originalCallback:o,syntheticCallback:d};if(l.set(e,t,n,s?.top),yO(c)){let t=qE.has(e)?{passive:!0,capture:s?.capture??!1}:s?.capture??!1;d.options=t,c.addEventListener(e,d,t),this.__memoryDOMSubjectToHandler(c,d)}}}),this}__memoryDOMSubjectToHandler(e,t){let n=this.__domEventsMap.get(e)||new Set;n.add(t),this.__domEventsMap.set(e,n)}__unmemoryDOMSubjectToHandler(e,t){let n=this.__domEventsMap,r=n.get(e)||new Set;r.delete(t),r.size?n.set(e,r):n.delete(e)}one(e,t,n,r){let i,a,o,s;U(e)||ZE(e)?(i=this,a=e,o=t,s=n):(i=e,a=t,o=n,s=r);let c=(...e)=>(this.off(i,a,c),o(...e));return this.on(i,a,c,s),this}off(e,t,n){let r,i,a;if(U(e)||ZE(e)?(r=this,i=e,a=t):(r=e,i=t,a=n),XE(r))return r.forEach(e=>{this.off(e,i,a)}),this;let o=r,s=this.__getStore(o);if(!(U(i)||ZE(i))||i.length===0)return s.namespaces().forEach(e=>{this.off(o,`.`+e)}),this.__removeStoreFromSubject(o),this;let c=e=>{yO(o)&&(o.removeEventListener(e.event,e.syntheticCallback,e.syntheticCallback.options??!1),this.__unmemoryDOMSubjectToHandler(o,e.syntheticCallback))},l=(e,t)=>{if(e===``){s.events(t).forEach(e=>{e!==``&&l(e,t)});return}let n=s.get(e,t);if(!(!n||!n.length))if(!V(a))n.forEach(c),n.length=0,s.clearEvents(t,e);else{let r=s.indexOf(e,t,a);r!==!1&&(c(n[r]),n.splice(r,1),n.length||s.clearEvents(t,e))}};return this.__eachEvent(i,(e,t)=>{t===`JoditEventDefaultNamespace`?s.namespaces().forEach(t=>{l(e,t)}):l(e,t)}),s.isEmpty()&&this.__removeStoreFromSubject(o),this}stopPropagation(e,t){let n=U(e)?this:e,r=U(e)?e:t;if(typeof r!=`string`)throw OD(`Need event names`);let i=this.__getStore(n);this.__eachEvent(r,(e,t)=>{let r=i.get(e,t);r&&this.__stopped.push(r),t===`JoditEventDefaultNamespace`&&i.namespaces(!0).forEach(t=>this.stopPropagation(n,e+`.`+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);t!==-1&&this.__stopped.splice(0,t+1)}}__isStopped(e){return e!==void 0&&this.__stopped.indexOf(e)!==-1}fire(e,t,...n){let r,i,a=U(e)?this:e,o=U(e)?e:t,s=U(e)?[t,...n]:n;if(!yO(a)&&!U(o))throw OD(`Need events names`);let c=this.__getStore(a);return!U(o)&&yO(a)?this.__triggerNativeEvent(a,t):this.__eachEvent(o,(e,t)=>{if(yO(a))this.__triggerNativeEvent(a,e);else{let n=c.get(e,t);if(n)try{[...n].every(t=>this.__isStopped(n)?!1:(this.currents.push(e),i=t.syntheticCallback.call(a,e,...s),this.currents.pop(),i!==void 0&&(r=i),!0))}finally{this.__removeStop(n)}t===`JoditEventDefaultNamespace`&&!yO(a)&&c.namespaces().filter(e=>e!==t).forEach(t=>{let n=this.fire.apply(this,[a,e+`.`+t,...s]);n!==void 0&&(r=n)})}}),r}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key=`__JoditEventEmitterNamespaces`,this.__doc=lE,this.__prepareEvent=e=>{e.cancelBubble||(e.composed&&V(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&[`clientX`,`clientY`,`pageX`,`pageY`].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||=e,e.type===`paste`&&e.clipboardData===void 0&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEac
78h((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}};function yO(e){return e&&V(e.addEventListener)}var bO=new vO,xO=e=>(cE.location.protocol===`file:`&&/^\/\//.test(e)&&(e=`https:`+e),e),SO=new Map,CO=e=>(t,n)=>{if(SO.has(n))return SO.get(n);let r=e(t,n);return SO.set(n,r),r},wO=CO((e,t)=>e.async.promise((n,r)=>{if(e.isInDestruct)return r();let i=e.c.element(`script`,{type:`text/javascript`,crossorigin:`anonymous`,referrerpolicy:`no-referrer`,async:!0,src:xO(t)});e.o.nonce&&i.setAttribute(`nonce`,e.o.nonce),e.e.one(i,`error`,r).one(i,`load`,n),e.od.body.appendChild(i)})),TO=CO((e,t)=>e.async.promise((n,r)=>{if(e.isInDestruct)return r();let i=e.c.element(`link`);i.rel=`stylesheet`,i.media=`all`,i.crossOrigin=`anonymous`,e.o.nonce&&i.setAttribute(`nonce`,e.o.nonce),!e.isInDestruct&&e.e.on(i,`load`,()=>n(i)).on(i,`error`,r),i.href=xO(t),e.o.shadowRoot?e.o.shadowRoot.appendChild(i):e.od.body.appendChild(i)}));function EO(e,t,n=0){return U(t[n])?wO(e,t[n]).then(()=>EO(e,t,n+1)):Promise.resolve()}function DO(e,t,n=0){return U(t[n])?TO(e,t[n]).then(()=>DO(e,t,n+1)):Promise.resolve()}function OO(e){return fD(e).toLowerCase()}var kO=new Set;async function AO(e,t){let n=jO(e,t,!1);if(!kO.has(n))return kO.add(n),TO(e,n)}function jO(e,t,n){t=fD(t);let r=e.minified?`.min`:``;return e.basePath+`plugins/`+t+`/`+t+r+`.`+(n?`js`:`css`)}function MO(e,t,n,r){try{let i=n.filter(t=>!e.has(OO(t.name)));i.length&&NO(t,i,r)}catch{}}function NO(e,t,n){t.map(t=>wO(e,t.url||jO(e,t.name,!0)).then(n).catch(()=>null))}function PO(e,t,n,r,i,a,o){if(JD(r))try{r.init(e)}catch(e){console.error(e)}if(i.set(t,r),a.delete(t),r.hasStyle&&AO(e,t).catch(e=>{}),r.styles){let n=o(e,t,`style`);n.innerHTML=r.styles}}function FO(e,t){try{try{return V(t)?new t(e):t}catch{if(V(t)&&!t.prototype)return t(e)}}catch(e){console.error(e)}return null}var IO=class{constructor(e){this.opts=e,this.__items=new Map}get size(){return this.__items.size}add(e,t){this.__items.set(OO(e),t),bO.fire(`plugin:${e}:ready`)}get(e){return this.__items.get(OO(e))}remove(e){this.__items.delete(OO(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((n,r)=>{(!e||e.has(r))&&t.push([r,n])}),t}__init(e){let{extraList:t,disableList:n,filter:r}=RO(e),i=new Map,a={},o=new Set;e.__plugins=a;let s=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(r).forEach(([r,s])=>{if(n.has(r)||i.has(r))return;let c=s?.requires;if(c&&XE(c)&&c.length){if(c.some(e=>n.has(e)))return;if(!c.every(e=>i.has(e))){o.add(r);return}}t=!0;let l=FO(e,s);if(!l){i.set(r,null),o.delete(r);return}PO(e,r,s,l,i,o,this.opts.getContainer),a[r]=l}),t&&(e.e.fire(`updatePlugins`),s())};t&&t.length&&MO(this.__items,e,t,s),s(),LO(e,a)}wait(e){return new Promise(t=>{if(this.get(e))return t();let n=()=>{t(),bO.off(`plugin:${e}:ready`,n)};bO.on(`plugin:${e}:ready`,n)})}};function LO(e,t){e.e.on(`beforeDestruct`,()=>{Object.keys(t).forEach(n=>{let r=t[n];YD(r)&&r.destruct(e),delete t[n]}),delete e.__plugins})}function RO(e){return{extraList:e.o.extraPlugins.map(e=>U(e)?{name:e}:e),disableList:new Set(hO(e.o.disablePlugins).map(OO)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null}}var zO=class{constructor(){this.__map=new Map}on(e,t){var n;return this.__map.has(e)||this.__map.set(e,new Set),(n=this.__map.get(e))==null||n.add(t),this}off(e,t){var n;return this.__map.has(e)&&((n=this.__map.get(e))==null||n.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var n;let r;return this.__map.has(e)&&((n=this.__map.get(e))==null||n.forEach(e=>{r=e(...t)})),r}},BO=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},VO=class extends zO{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=K.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}
78break(e){this.isWorked&&(this.stop(),this.emit(`break`,e))}end(){this.isWorked&&(this.stop(),this.emit(`end`,this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,(e=this.__schedulerController)==null||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){this.isWorked=!0;let e=0,t=this.options.timeoutChunkSize??50;for(;!this.isFinished&&e<t;){let t=this.workNodes.next();if(e+=1,this.visitNode(t.value)&&(this.hadAffect=!0),t.done){this.end();return}}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){return!e||this.options.whatToShow!==void 0&&e.nodeType!==this.options.whatToShow?!1:this.emit(`visit`,e)??!1}};BO([H],VO.prototype,`__workPerform`,null);var HO={},UO=1,WO=new Set;function GO(){function e(){return UO+=10*(Math.random()+1),Math.round(UO).toString(16)}let t=e();for(;WO.has(t);)t=e();return WO.add(t),t}var q=new IO({getContainer:YO}),KO={},qO=e=>{Object.keys(e).forEach(t=>{WE[t]?Object.assign(WE[t],e[t]):WE[t]=e[t]})},JO=new WeakMap;function YO(e,t,n=`div`,r=!1){let i=U(t)?t:t?cO(t.prototype):`jodit-utils`,a=JO.get(e)||{},o=i+n,s=SD(e)?e:e.j,c=null;if(!a[o]){let t=s.c;if(c=XO(s.o,s.container,e.od.body),r&&QD(e)&&e.od!==e.ed){t=e.createInside;let r=n===`style`?e.ed.head:e.ed.body;c=QD(e)&&e.o.shadowRoot?e.o.shadowRoot:r}let l=t.element(n,{className:`jodit jodit-${fD(i)}-container jodit-box`});s.o.nonce&&(n===`style`||n===`script`)&&l.setAttribute(`nonce`,s.o.nonce),l.classList.add(`jodit_theme_${s.o.theme||`default`}`),c.appendChild(l),a[o]=l,e.hookStatus(`beforeDestruct`,()=>{s.events.off(l),K.safeRemove(l),delete a[o],Object.keys(a).length&&JO.delete(e)}),JO.set(e,a),s.events.fire(`getContainer`,l)}return a[o].classList.remove(`jodit_theme_default`,`jodit_theme_dark`),a[o].classList.add(`jodit_theme_${s.o.theme||`default`}`),a[o]}function XO(e,t,n){return e.popupRoot??e.shadowRoot??K.closest(t,e=>K.isHTMLElement(e)&&(K.isTag(e,`dialog`)||[`fixed`,`absolute`].includes(W(e,`position`))),n)??n}var ZO=bO,QO=e=>XE(e)?e:[e];function $O(e,t){let n;return n=t.querySelectorAll(e),[].slice.call(n)}var ek=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return``;if(e.id)return`//*[@id='`+e.id+`']`;let n=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return ek(e.parentNode,t)+`/`+e.nodeName.toLowerCase()+(n.length>1?`[`+(nD(n).indexOf(e)+1)+`]`:``)},tk=e=>(`container`in e&&(e=e.container),$O(`[ref],[data-ref]`,e).reduce((e,t)=>{let n=G(t,`-ref`);return n&&U(n)&&(e[bD(n)]=t,e[n]=t),e},{})),nk=e=>{if(!K.isElement(e))return null;let t=[],n=e;for(;n&&n.nodeType===Node.ELEMENT_NODE;){let e=n.nodeName.toLowerCase();if(n.id){e+=`#`+n.id,t.unshift(e);break}else{let t=n,r=1;do t=t.previousElementSibling,t&&t.nodeName.toLowerCase()===e&&r++;while(t);e+=`:nth-of-type(`+r+`)`}t.unshift(e),n=n.parentNode}return t.join(` > `)};function rk(e,t){let n=e;if(U(e))try{n=t.querySelector(e)}catch{throw OD(`String "`+e+`" should be valid HTML selector`)}if(!n||typeof n!=`object`||!K.isElement(n)||!n.cloneNode)throw OD(`Element "`+e+`" should be string or HTMLElement instance`);return n}function ik(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,``).replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,``).replace(/border[a-z-]*:[\s]*[^;]+;/gi,``).replace(/([0-9.]+)(pt|cm)/gi,(e,t,n)=>{switch(n.toLowerCase()){case`pt`:return(parseFloat(t)*1.328).toFixed(0)+`px`;case`cm`:return(parseFloat(t)*.02645833).toFixed(0)+`px`}return e})}function ak(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;e=e.substring(t.index);let n=e.toLowerCase().lastIndexOf(`</html>`);n!==-1&&(e=e.substring(0,n+7));let r=lE.createElement(`iframe`);r.style.display=`none`,lE.body.appendChild(r);let i=``,a=[];try{let t=r.contentDocument||(r.contentWindow?r.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),K.each(t.body,e=>{K.isElement(e)&&/mso-list:\s*ignore/i.test(e.getAttribute(`style`)||``)&&K.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let n=t.styleSheets[e].cssRules;for(let e=0;e<n.length;e+=1)n[e].selectorText!==``&&(a=$O(n[e].selectorText,t.body),a.forEach(t=>{t.style.cssText=ik(n[e].style.cssText+`;`+t.style.cssText)}))}}catch{}K.each(t.body,e=>{if(K.isElement(e)){let t=e,n=t.getAttribute(`style`);n&&(t.style.cssText=ik(n)),t.hasAttribute(`style`)&&!t.getAttribute(`style`)&&t.removeAttribute(`style`)}}),i=t.firstChild?aD(t.body.innerHTML):``}}catch{}finally{K.safeRemove(r)}return i&&(e=i),aD(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,``).replace(/<!--[^>]*>/g,``))}function ok(e){e.indexOf(`<html `)!==-1&&(e=e.substring(e.indexOf(`<html `),e.length),e=e.substring(0,e.lastIndexOf(`</html>`)+7));let t=``;try{let n=lE.createElement(`div`);n.innerHTML=e;let r=[];n.firstChild&&K.each(n,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case`STYLE`:case`LINK`:case`META`:r.push(e);break;case`W:SDT`:case`W:SDTPR`:case`FONT`:K.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test(e.getAttribute(`style`)||``)){r.push(e);break}
78nD(e.attributes).forEach(t=>{[`src`,`href`,`rel`,`content`].indexOf(t.name.toLowerCase())===-1&&e.removeAttribute(t.name)})}break;case Node.TEXT_NODE:break;default:r.push(e)}}),K.safeRemove.apply(null,r),t=n.innerHTML}catch{}return t&&(e=t),e=e.split(/(\n)/).filter(aD).join(` 79`),e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,``).replace(/<!--[^>]*>/g,``)}function sk(e){let t=lE.createElement(`div`);return t.textContent=e,t.innerHTML}function ck(e){return e.replace(/\r\n|\r|\n/g,`<br/>`)}function lk(e,t){t&&t!==`normal`?t===`center`?W(e,{float:``,display:`block`,marginLeft:`auto`,marginRight:`auto`}):(W(e,`float`,t),xD(e)):(W(e,`float`)&&[`right`,`left`].indexOf(W(e,`float`).toString().toLowerCase())!==-1&&W(e,`float`,``),xD(e))}function uk(e){K.each(e,e=>{K.isHTMLElement(e)&&e.style.textAlign&&(e.style.textAlign=``,e.style.cssText.trim().length||e.removeAttribute(`style`))})}function dk(e,t){if(K.isNode(t)&&K.isElement(t))switch(uk(t),e.toLowerCase()){case`justifyfull`:t.style.textAlign=`justify`;break;case`justifyright`:t.style.textAlign=`right`;break;case`justifyleft`:t.style.textAlign=`left`;break;case`justifycenter`:t.style.textAlign=`center`;break}}var fk=e=>{let t=navigator.userAgent.toLowerCase(),n=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||t.indexOf(`compatible`)<0||[];return e===`version`?n[2]:e===`webkit`?n[1]===`chrome`||n[1]===`webkit`:e===`ff`?n[1]===`firefox`:e===`msie`?n[1]===`trident`||n[1]===`msie`:n[1]===e},pk=(e,t)=>{let n=[],r=encodeURIComponent;for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=t?t+`[`+i+`]`:i,o=e[i];n.push(dD(o)?pk(o,a):r(a)+`=`+r(o))}return n.join(`&`)},mk={},J=class e{constructor(){this.cache=!0,this.defaultTimeout=100,this.namespace=``,this.safeMode=!1,this.width=`auto`,this.height=`auto`,this.safePluginsList=[`about`,`enter`,`backspace`,`size`,`bold`,`hotkeys`],this.license=``,this.preset=`custom`,this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument=lE,this.ownerWindow=cE,this.shadowRoot=null,this.nonce=``,this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=[`source`,`fullsize`,`print`,`about`,`dots`,`selectall`],this.allowCommandsInReadOnly=[`selectall`,`preview`,`print`],this.toolbarButtonSize=`middle`,this.allowTabNavigation=!1,this.inline=!1,this.theme=`default`,this.saveModeInStorage=!1,this.asyncStorage={},this.editorClassName=!1,this.className=!1,this.style=!1,this.containerStyle=!1,this.styleValues={},this.triggerChangeEvent=!0,this.direction=``,this.language=`auto`,this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=200,this.useNativeTooltip=!1,this.defaultActionOnPaste=ME,this.enter=`p`,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock=this.enter===`br`?`p`:this.enter,this.defaultMode=1,this.useSplitMode=!1,this.colors={greyscale:[`#000000`,`#434343`,`#666666`,`#999999`,`#B7B7B7`,`#CCCCCC`,`#D9D9D9`,`#EFEFEF`,`#F3F3F3`,`#FFFFFF`],palette:[`#980000`,`#FF0000`,`#FF9900`,`#FFFF00`,`#00F0F0`,`#00FFFF`,`#4A86E8`,`#0000FF`,`#9900FF`,`#FF00FF`],full:`#E6B8AF.#F4CCCC.#FCE5CD.#FFF2CC.#D9EAD3.#D0E0E3.#C9DAF8.#CFE2F3.#D9D2E9.#EAD1DC.#DD7E6B.#EA9999.#F9CB9C.#FFE599.#B6D7A8.#A2C4C9.#A4C2F4.#9FC5E8.#B4A7D6.#D5A6BD.#CC4125.#E06666.#F6B26B.#FFD966.#93C47D.#76A5AF.#6D9EEB.#6FA8DC.#8E7CC3.#C27BA0.#A61C00.#CC0000.#E69138.#F1C232.#6AA84F.#45818E.#3C78D8.#3D85C6.#674EA7.#A64D79.#85200C.#990000.#B45F06.#BF9000.#38761D.#134F5C.#1155CC.#0B5394.#351C75.#733554.#5B0F00.#660000.#783F04.#7F6000.#274E13.#0C343D.#1C4587.#073763.#20124D.#4C1130`.split(`.`)},this.colorPickerDefaultTab=`background`,this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={table:{style:`border-collapse:collapse;width: 100%;`}},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:`font-style`,buttons:[]},{group:`list`,buttons:[]},{group:`font`,buttons:[]},`---`,{group:`script`,buttons:[]},{group:`media`,buttons:[]},` 80`,{group:`state`,buttons:[]},{group:`clipboard`,buttons:[]},{group:`insert`,buttons:[]},{group:`indent`,buttons:[]},{group:`color`,buttons:[]},{group:`form`,buttons:[]},`---`,{group:`history`,buttons:[]},{group:`search`,buttons:[]},{group:`source`,buttons:[]},{group:`other`,buttons:[]},{group:`info`,buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,mk)}static get defaultOptions(){return e.__defaultOptions||=new e,e.__defaultOptions}};mk=J.prototype,J.prototype.controls={};function hk(e){return e&&e.isAtom}function gk(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function _k(e){return JSON.parse(WD(e))}var vk=[`__proto__`,`constructor`,`prototype`];function yk(e){return vk.indexOf(e)!==-1}function bk(e,t,n=0){if(Object.getPrototypeOf(e)!==Object.prototype)return e;let r=J.defaultOptions;if(U(e.preset)){if(r.presets[e.preset]!==void 0){let t=r.presets[e.preset];Object.keys(t).forEach(n=>{QE(e[n])&&(e[n]=t[n])})}delete e.preset}let i={};return Object.keys(e).forEach(r=>{if(yk(r))return;let a=e[r],o=t?t[r]:null;if(dD(a)&&dD(o)&&!hk(a)){i[r]=bk(a,o,n+1);return}if(n!==0&&XE(a)&&!hk(a)&&XE(o)){i[r]=[...a,...o.slice(a.length)];return}i[r]=a}),Object.setPrototypeOf(i,t),i}function xk(e){return LD(e,!1).reduce((t,n)=>(t[n]=e[n],t),{})}function Sk(e,t){Object.keys(t).forEach(n=>{if(yk(n))return;let r=t[n],i=e[n];dD(r)&&dD(i)&&!hk(r)?Sk(i,r):e[n]=r})}function Ck(e){return LD(e,!1).reduce((t,n)=>(t[n]=dD(e[n])?Ck(e[n]):e[n],t),{})}var wk=e=>{let t={},n=e.substring(1).split(`&`);for(let e=0;e<n.length;e+=1){let r=n[e].split(`=`);
80t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]||``)}return t},Tk=(e,{width:t=400,height:n=345}={})=>{if(!nO(e))return e;let r=lE.createElement(`a`);r.href=e,t||=400,n||=345;let i=r.protocol||``;switch(r.hostname){case`www.vimeo.com`:case`vimeo.com`:{let a=r.pathname.split(`/`).filter(Boolean),o=a.findIndex(e=>/^\d+$/.test(e));if(o===-1)return e;let s=a[o],c=a[o+1];return c&&o===0&&(s+=`/`+c),`<iframe width="`+t+`" height="`+n+`" src="`+i+`//player.vimeo.com/video/`+s+`" frameborder="0" allowfullscreen></iframe>`}case`youtube.com`:case`www.youtube.com`:case`m.youtube.com`:case`music.youtube.com`:case`youtu.be`:case`www.youtu.be`:{let a=(r.search?wk(r.search):{}).v||r.pathname.substring(1);return a=a.replace(/^(watch|embed|shorts|live|v)\//,``).replace(/\/$/,``),a?`<iframe width="`+t+`" height="`+n+`" src="`+i+`//www.youtube.com/embed/`+a+`" frameborder="0" allowfullscreen></iframe>`:e}}return e},Ek=e=>{if(typeof navigator<`u`&&navigator.userAgent.indexOf(`Mac OS X`)!==-1){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1},Dk=(e,t=`en`)=>e!==`auto`&&U(e)?e:lE.documentElement&&lE.documentElement.lang?lE.documentElement.lang:navigator.language?navigator.language.substring(0,2):t,Ok=e=>
80{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),n=[`KB`,`MB`,`GB`,`TB`],r=parseFloat(e.substr(0,e.length-2));return n.indexOf(t)===-1?parseInt(e,10):r*1024**(n.indexOf(t)+1)},kk=console;function Ak(e,t=[``],n=null){return(...r)=>(kk.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:``)),e.call(n,...r))}function jk(e,t){let n=[];try{$O(`img`,e.editor).forEach(r=>{let i=[G(r,`width`),G(r,`height`),r.src];G(r,{width:r.offsetWidth+t,height:r.offsetHeight+t});let a=e.createInside.a();e.ed.body.appendChild(a),a.href=r.src,r.src=a.href,K.safeRemove(a),n.push(()=>{r.src=i[2]??``,G(r,{width:i[0]||null,height:i[1]||null})})})}catch(e){throw n.forEach(e=>e()),n.length=0,e}return n}function Mk(e,t,n=`px`,r=null){let i=[],a=jk(e,n);try{let a=e.e.fire(`beforePreviewBox`,t,n);if(a!=null)return a;let o=e.c.div(`jodit__preview-box jodit-context`);r&&r.appendChild(o),W(o,{position:`relative`,padding:16});let s=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n(`Empty`)}</div>`;if(e.iframe){let t=e.create.element(`iframe`);W(t,{minWidth:800,minHeight:600,border:0}),o.appendChild(t);let n=t.contentWindow;if(n&&(e.e.fire(`generateDocumentStructure.iframe`,n.document,e),o=n.document.body,typeof ResizeObserver==`function`)){let r=!1,a=n.document.body,o=new ResizeObserver(e.async.debounce(()=>{o.unobserve(a),t.style.height=`${a.offsetHeight+20}px`,e.async.requestAnimationFrame(()=>{!r&&o.observe(a)})},100)),s=()=>{r=!0,o.unobserve(a),o.disconnect(),e.e.off(`beforeDestruct`,s)};i.push(s),e.e.on(`beforeDestruct`,s)}}else W(o,{minWidth:1024,minHeight:600,border:0});let c=(t,n)=>{let r=U(n)?e.c.div():n;U(n)&&(r.innerHTML=n);for(let e=0;e<r.childNodes.length;e+=1){let n=r.childNodes[e];if(K.isElement(n)){let e=t.ownerDocument.createElement(n.nodeName);for(let t=0;t<n.attributes.length;t+=1)G(e,n.attributes[t].nodeName,n.attributes[t].nodeValue);if(n.childNodes.length===0||K.isTag(n,`table`))switch(n.nodeName){case`SCRIPT`:n.textContent&&(e.textContent=n.textContent);break;default:n.innerHTML&&(e.innerHTML=n.innerHTML);break}else c(e,n);try{t.appendChild(e)}catch{}}else try{t.appendChild(n.cloneNode(!0))}catch{}}};return c(o,s),e.e.fire(`afterPreviewBox`,o),[o,()=>{i.forEach(e=>e())}]}finally{a.forEach(e=>e())}}var Nk=1;function Pk(e,t,n){let r=e.getBoundingClientRect(),i=e,a=r.top,o=r.height;for(;i&&i!==t&&i.parentNode;)if(i=i.parentNode,r=i.getBoundingClientRect(),a+o>r.bottom+Nk&&a>r.top||a+o<=r.top)return!1;let s=n.documentElement&&n.documentElement.clientHeight||0;return(a+o<=s+Nk||a<=0)&&a+o>=0}function Fk(e,t,n){if(K.isHTMLElement(e)&&!Pk(e,t,n)){if(t.clientHeight!==t.scrollHeight){let n=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<n?n:e.offsetTop}Pk(e,t,n)||e.scrollIntoView()}}function Ik(e,t,n){if(!U(e)||!e.length)return;let r=e.split(`.`);if(r.some(yk))return;let i=n,a=r[0];for(let e=0;e<r.length-1;e+=1)a=r[e],!XE(i[a])&&!dD(i[a])&&(i[a]=hD(r[e+1])?[]:{}),i=i[a];i&&(i[r[r.length-1]]=t)}var Lk=class{constructor(e){this.limit=e,this.stack=[]}push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}},Rk=`http://www.w3.org/1999/xhtml`,zk=new Set([`foreignobject`,`annotation-xml`,`desc`,`title`]);function Bk(e){if(e.namespaceURI!==Rk||e.closest(`math,svg`)==null)return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if(e===`math`||e===`svg`)break;if(zk.has(e))return!1}return!0}function Vk(e,t){if(!K.isElement(e)&&!K.isFragment(e))return;let n=e.querySelectorAll(`math *, svg *`);for(let t=0;t<n.length;t++)e.contains(n[t])&&Bk(n[t])&&K.safeRemove(n[t]);let r=t.removeEventAttributes??t.removeOnError,i=e=>{if(K.isElement(e)&&(r&&Hk(e),Kk(e,t),t.safeLinksTarget&&e.nodeName===`A`&&e.getAttribute(`target`)===`_blank`)){let t=(e.getAttribute(`rel`)||``).split(/\s+/).filter(Boolean);t.includes(`noopener`)||t.push(`noopener`),t.includes(`noreferrer`)||t.push(`noreferrer`),G(e,`rel`,t.join(` `))}};i(e),K.each(e,i)}function Hk(e){if(!K.isElement(e))return!1;let t=!1,n=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith(`on`)&&n.push(e.attributes[t].name);for(let r of n)e.removeAttribute(r),t=!0;return t}var Uk=[`src`,`data`,`action`,`formaction`,`poster`,`background`,`xlink:href`],Wk=new Set([`iframe`,`frame`,`object`,`embed`]);function Gk(e,t){let n=e.replace(/[\u0000-\u0020]+/g,``).toLowerCase();return/^(?:javascript|vbscript|livescript|mocha):/.test(n)||/^data:(?:text\/html|application\/xhtml)/.test(n)?!0:/^data:image\/svg/.test(n)&&Wk.has(t)}function Kk(e,{safeJavaScriptLink:t,removeOnError:n}={safeJavaScriptLink:!0,removeOnError:!0}){if(!K.isElement(e))return!1;let r=!1;n&&e.hasAttribute(`onerror`)&&(G(e,`onerror`,null),r=!0);let i=e.nodeName.toLowerCase(),a=e.getAttribute(`href`);if(t&&a&&Gk(a,i)&&(G(e,`href`,(typeof location<`u`?location.protocol:`http:`)+`//`+a),r=!0),t){e.hasAttribute(`srcdoc`)&&(G(e,`srcdoc`,null),r=!0);for(let t of Uk){let n=e.getAttribute(t);n&&Gk(n,i)&&(G(e,t,null),r=!0)}}return r}var qk=new Set([`div`,`p`,`br`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`hr`]),Jk=new Set([`script`,`style`]),Yk=new Set([`br`,`hr`,`input`]);function Xk(e,t=document,n=null,r=!1){let i=t.createElement(`div`);
80return U(e)?i.innerHTML=e:i.appendChild(e),$O(`*`,i).forEach(e=>{let i=e.parentNode;if(!i)return;if(n&&K.isTag(e,n)){let i=e.nodeName.toLowerCase(),a=K.isTag(e,Yk)?`%%%jodit-single-${i}%%%`:`%%%jodit-${i}%%%${Xk(e.innerHTML,t,n,r)}%%%/jodit-${i}%%%`;K.before(e,t.createTextNode(a)),K.safeRemove(e);return}if(K.isTag(e,Jk)){K.safeRemove(e);return}if(!K.isTag(e,qk))return;let a=e.nextSibling;K.isText(a)&&/^\s/.test(a.nodeValue||``)||a&&i.insertBefore(t.createTextNode(r?`%%%jodit-single-br%%%`:` `),a)}),Zk(aD(i.innerText))}function Zk(e){return e.replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,n,r)=>`<${t?`/`:``}${r}>`)}var Qk=e=>{let t=[`#`],n=gD(e);if(!n)return!1;if(n=aD(n.toUpperCase()),n=n.substring(1),n.length===3){for(let e=0;e<3;e+=1)t.push(n[e]),t.push(n[e]);return t.join(``)}return n.length>6&&(n=n.slice(0,6)),`#`+n};function $k(e){let t={},n={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,`+add`).split(/[\s]*\+[\s]*/).map(e=>aD(e.toLowerCase())).map(e=>LE[e]||e).sort((e,t)=>n[e]&&!n[t]?-1:!n[e]&&n[t]?1:n[e]&&n[t]?n[e]-n[t]:e>t?1:-1).filter(e=>!t[e]&&e!==``&&(t[e]=!0)).join(`+`)}var eA=(e,t=8)=>{let n=[];for(;e.length;)n.push(e.substr(0,t)),e=e.substr(t);return n[1]=n[1].replace(/./g,`*`),n[2]=n[2].replace(/./g,`*`),n.join(`-`)},tA=(...e)=>e.filter(e=>aD(e).length).map((t,n)=>(t=t.replace(/([^:])[\\/]+/g,`$1/`),n&&(t=t.replace(/^\//,``)),n!==e.length-1&&(t=t.replace(/\/$/,``)),t)).join(`/`),nA=e=>e.split(`/`).reduce((e,t)=>{switch(t){case``:break;case`.`:break;case`..`:e.pop();break;default:e.push(t);break}return e},[]).join(`/`)+(e.endsWith(`/`)?`/`:``),rA=(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString(),iA=(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,``)).join(`/`).replace(/([^:])[\\/]+/g,`$1/`),aA=(e,t)=>{let n=e=>parseInt(e,10),r=t.getComputedStyle(e),i=e.offsetWidth,a=n(r.getPropertyValue(`padding-left`)||`0`),o=n(r.getPropertyValue(`padding-right`)||`0`);return i-a-o};function oA(e){return e.transform!==``&&e.transform!==`none`||e.perspective!==``&&e.perspective!==`none`||e.filter!==``&&e.filter!==`none`||e.willChange===`transform`||e.willChange===`perspective`||e.willChange===`filter`||e.contain===`paint`||e.contain===`layout`||e.contain===`strict`||e.contain===`content`}function sA(e){let t=e.ownerDocument?.defaultView,n=e.parentElement;for(;t&&n;){if(oA(t.getComputedStyle(n))){let e=n.getBoundingClientRect();return{x:e.left,y:e.top}}n=n.parentElement}return{x:0,y:0}}function cA(e){if(!e)return null;let t=K.isHTMLElement(e),n=t&&W(e,`overflowY`);return t&&n!==`visible`&&n!==`hidden`&&e.scrollHeight>=e.clientHeight?e:cA(e.parentNode)||lE.scrollingElement||lE.body}var lA=(e,t)=>{let n=t.getComputedStyle(e),r=e.clientWidth;return r-=parseFloat(n.paddingLeft||`0`)+parseFloat(n.paddingRight||`0`),r};function uA(e){return U(e)||XE(e)?e.length:dD(e)?Object.keys(e).length:0}var dA=(e,t,n,r=!1)=>{let i;try{i=e.getBoundingClientRect()}catch{i={top:0,bottom:0,left:0,right:0,width:0,height:0}}let a=n.body,o=n.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},s=n.defaultView||n.parentWindow,c=s.pageYOffset||o.scrollTop||a.scrollTop,l=s.pageXOffset||o.scrollLeft||a.scrollLeft,u=o.clientTop||a.clientTop||0,d=o.clientLeft||a.clientLeft||0,f,p,m=t.iframe;if(!r&&t&&t.options&&t.o.iframe&&m){let{top:e,left:n}=dA(m,t,t.od,!0);f=i.top+e,p=i.left+n}else f=i.top+c-u,p=i.left+l-d;return{top:Math.round(f),left:Math.round(p),width:i.width,height:i.height}};function fA(e,t,n=!1){let r=e.getBoundingClientRect(),i=r.left,a=r.top;if(QD(t)&&t.iframe&&t.ed.body.contains(e)&&!n){let{left:e,top:n}=fA(t.iframe,t,!0);i+=e,a+=n}return{left:Math.round(i),top:Math.round(a),width:Math.round(e.offsetWidth??r.width),height:Math.round(e.offsetHeight??r.height)}}function pA(e,t,n=0,r=1){let i=0,a=0,o=-1,s=0,c=0;for(a=n;i<e.length&&a<t.length;)e[i].toLowerCase()===t[a].toLowerCase()?(i++,s++,c=0,o===-1&&(o=a)):i>0&&(c>=r&&t[a]!==``?(i=0,o=-1,s=0,c=0,a--):(c++,s++)),a++;return i===e.length?[o,s]:[-1,0]}function mA(e){return e.length?e[0].toUpperCase()+e.substring(1):``}var hA=(e,t)=>{if(!t||!t.length)return e;let n=/%([sd])/g,r=n.exec(e),i=e,a=0;for(;r&&t[a]!==void 0;)i=i.replace(r[0],t[a].toString()),a+=1,r=n.exec(e);return i};function gA(e,t,n){if(!U(e))throw OD(`i18n: Need string in first argument`);if(!e.length)return e;let r=!!n?.debugLanguage,i={},a=e=>t&&t.length?hA(e,t):e,o=Dk(J.defaultOptions.language,J.defaultOptions.language),s=Dk(n?.language,o),c=t=>{if(!t)return;if(U(t[e]))return a(t[e]);let n=e.toLowerCase();if(U(t[n]))return a(t[n]);let r=mA(e);
80if(U(t[r]))return a(t[r])};WE[s]===void 0?r||(i=WE[o]===void 0?WE.en:WE[o]):i=WE[s];let l=n?.i18n;if(l&&l[s]){let e=c(l[s]);if(e)return e}return c(i)||(!r&&WE.en&&U(WE.en[e])&&WE.en[e]?a(WE.en[e]):r?`{`+e+`}`:a(e))}var _A=s({$$:()=>$O,CamelCaseToKebabCase:()=>pD,ConfigDeepFlatten:()=>Ck,ConfigFlatten:()=>xk,ConfigMerge:()=>Sk,ConfigProto:()=>bk,ConnectionError:()=>ED,LimitedStack:()=>Lk,NUMBER_FIELDS_REG:()=>_D,OptionsError:()=>DD,UNSAFE_PROTO_KEYS:()=>vk,abort:()=>TD,alignElement:()=>dk,alreadyLoadedList:()=>SO,appendScriptAsync:()=>wO,appendStyleAsync:()=>TO,applyStyles:()=>ak,asArray:()=>QO,assert:()=>lD,attr:()=>G,browser:()=>fk,buildQuery:()=>pk,call:()=>MD,callPromise:()=>FD,callThis:()=>ND,camelCase:()=>bD,cleanFromWord:()=>ok,clearAlign:()=>uk,clearCenterAlign:()=>xD,clearTimeout:()=>pO,cns:()=>kk,colorToHex:()=>gD,completeUrl:()=>xO,connection:()=>kD,convertMediaUrlToVideoEmbed:()=>Tk,css:()=>W,cssPath:()=>nk,ctrlKey:()=>Ek,dataBind:()=>wD,defaultLanguage:()=>Dk,error:()=>OD,fastClone:()=>_k,fuzzySearchIndex:()=>pA,get:()=>$E,getClassName:()=>cO,getContentWidth:()=>aA,getDataTransfer:()=>zD,getFixedPositionOffset:()=>sA,getPropertyDescriptor:()=>BD,getScrollParent:()=>cA,getXPathByElement:()=>ek,hAlignElement:()=>lk,hasBrowserColorPicker:()=>HD,hasContainer:()=>XD,htmlspecialchars:()=>sk,humanSizeToBytes:()=>Ok,i18n:()=>gA,inView:()=>Pk,innerWidth:()=>lA,isAbortError:()=>UD,isArray:()=>XE,isAtom:()=>hk,isBoolean:()=>mD,isDestructable:()=>YD,isEqual:()=>GD,isFastEqual:()=>KD,isFunction:()=>V,isHTML:()=>rD,isHtmlFromWord:()=>qD,isInitable:()=>JD,isInt:()=>ZD,isJoditObject:()=>QD,isLicense:()=>$D,isMarker:()=>eO,isNativeFunction:()=>YE,isNumber:()=>tO,isNumeric:()=>hD,isPlainObject:()=>dD,isPromise:()=>jD,isSet:()=>iD,isString:()=>U,isStringArray:()=>ZE,isURL:()=>nO,isUnsafeProtoKey:()=>yk,isValidName:()=>rO,isViewObject:()=>SD,isVoid:()=>QE,isWindow:()=>uD,kebabCase:()=>fD,keepNames:()=>sO,keys:()=>LD,loadImage:()=>ID,loadNext:()=>EO,loadNextStyle:()=>DO,markAsAtomic:()=>gk,markDeprecated:()=>Ak,markOwner:()=>PD,memorizeExec:()=>RD,nl2br:()=>ck,normalizeColor:()=>Qk,normalizeCssNumericValue:()=>vD,normalizeCssValue:()=>yD,normalizeKeyAliases:()=>$k,normalizeLicense:()=>eA,normalizePath:()=>tA,normalizeRelativePath:()=>nA,normalizeSize:()=>rA,normalizeUrl:()=>iA,offset:()=>dA,options:()=>AD,parseQuery:()=>wk,position:()=>fA,previewBox:()=>Mk,refs:()=>tk,reset:()=>tD,resolveElement:()=>rk,safeHTML:()=>Vk,sanitizeHTMLElement:()=>Kk,scrollIntoViewIfNeeded:()=>Fk,set:()=>Ik,setTimeout:()=>fO,size:()=>uA,splitArray:()=>hO,sprintf:()=>hA,stringify:()=>WD,stripTags:()=>Xk,toArray:()=>nD,trim:()=>aD,trimChars:()=>oD,trimInv:()=>sD,ucfirst:()=>mA}),vA=new Map,yA=class{get componentName(){return this.__componentName||=`jodit-`+fD((V(this.className)?this.className():``)||cO(this)),this.__componentName}getFullElName(e,t,n){let r=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,`-`),r.push(`__${e}`)),t&&(r.push(`_`,t),r.push(`_`,QE(n)?`true`:n.toString())),r.join(``)}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return $E(e,t||this)}get isReady(){return this.componentStatus===JE.ready}get isDestructed(){return this.componentStatus===JE.destructed}get isInDestruct(){return JE.beforeDestruct===this.componentStatus||JE.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(JE.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}constructor(){this.async=new mO,this.ownerWindow=window,this.__componentStatus=JE.beforeInit,this.uid=`jodit-uid-`+GO()}destruct(){this.setStatus(JE.destructed),this.async&&=(this.async.destruct(),void 0),vA.get(this)&&vA.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let n=Object.getPrototypeOf(this);n&&V(n.setStatusComponent)&&n.setStatusComponent(e,t);let r=vA.get(this)?.[e];
80r&&r.length&&r.forEach(e=>e(t))}hookStatus(e,t){let n=vA.get(this);n||(n={},vA.set(this,n)),n[e]||(n[e]=[]),n[e].push(t)}static isInstanceOf(e,t){return e instanceof t}};yA.STATUSES=JE;var bA=class extends yA{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}constructor(e){super(),this.setParentView(e)}destruct(){return this.j.components.delete(this),super.destruct()}};function xA(e,t=!1,n=`debounce`){return(r,i)=>{let a=r[i];if(!V(a))throw OD(`Handler must be a Function`);return r.hookStatus(JE.ready,r=>{let{async:a}=r;lD(a!=null,`Component ${r.componentName||r.constructor.name} should have "async:IAsync" field`);let o=V(e)?e(r):e,s=tO(o)||dD(o)?o:r.defaultTimeout;Object.defineProperty(r,i,{configurable:!0,value:a[n](r[i].bind(r),s,t)})}),{configurable:!0,get(){return a.bind(this)}}}}function SA(e,t=!1){return xA(e,t,`throttle`)}function CA(...e){return t=>{let n=t.prototype;for(let t=0;t<e.length;t++){let r=e[t],i=Object.getOwnPropertyNames(r.prototype);for(let e=0;e<i.length;e++){let t=i[e],a=Object.getOwnPropertyDescriptor(r.prototype,t);a!=null&&V(a.value)&&!V(n[t])&&Object.defineProperty(n,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return a.value.call(this,...e)}})}}}}function wA(e){return(t,n)=>{if(!V(t[n]))throw OD(`Handler must be a Function`);t.hookStatus(e,e=>{e[n].call(e)})}}function TA(){return(e,t)=>{if(!V(e[t]))throw OD(`Handler must be a Function`);e.hookStatus(JE.ready,e=>{let{async:n}=e,r=e[t];e[t]=(...t)=>n.requestIdleCallback(r.bind(e,...t))})}}var EA=(e,t)=>{(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable!==!1&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})};function DA(e,t){e.hookStatus(JE.ready,e=>{let n=SD(e)?e:e.jodit,r=`${n.options.namespace}${e.componentName}_prop_${t}`,i=e[t];Object.defineProperty(e,t,{get(){return n.storage.get(r)??i},set(e){n.storage.set(r,e)}})})}function OA(e){return(t,n)=>{let r=t[n];if(!V(r))throw OD(`Handler must be a Function`);t.hookStatus(JE.ready,t=>{let{async:r}=t,i=t[n],a=0;Object.defineProperty(t,n,{configurable:!0,value:function n(...o){r.clearTimeout(a),e(t)?i.apply(t,o):a=r.setTimeout(()=>n(...o),10)}})})}}var kA=Symbol(`observable-object`);function AA(e){return e[kA]!==void 0}function jA(e){if(AA(e))return e;let t={},n={},r=(t,i)=>XE(t)?(t.map(e=>r(e,i)),e):(n[t]||(n[t]=[]),n[t].push(i),e),i=(r,...a)=>{if(XE(r)){r.map(e=>i(e,...a));return}try{!t[r]&&n[r]&&(t[r]=!0,n[r].forEach(t=>t.call(e,...a)))}finally{t[r]=!1}},a=(t,n=[])=>{let o={};AA(t)||(Object.defineProperty(t,kA,{enumerable:!1,value:!0}),Object.keys(t).forEach(r=>{let s=r,c=n.concat(s).filter(e=>e.length);o[s]=t[s];let l=BD(t,s);Object.defineProperty(t,s,{set:t=>{let n=o[s];if(!KD(o[s],t)){i([`beforeChange`,`beforeChange.${c.join(`.`)}`],s,t),dD(t)&&a(t,c),l&&l.set?l.set.call(e,t):o[s]=t;let r=[];i([`change`,...c.reduce((e,t)=>(r.push(t),e.push(`change.${r.join(`.`)}`),e),[])],c.join(`.`),n,t?.valueOf?t.valueOf():t)}},get:()=>l&&l.get?l.get.call(e):o[s],enumerable:!0,configurable:!0}),dD(o[s])&&a(o[s],c)}),Object.defineProperty(e,"on",{value:r}))};return a(e),e}function Y(e,t){return(n,r)=>{if(!V(n[r]))throw OD(`Handler must be a Function`);let i=t?.immediately??!0,a=t?.context,o=t=>{let o=SD(t)?t:t.jodit,s=(e,...n)=>{if(!t.isInDestruct)return t[r](e,...n)};i||(s=t.async.microDebounce(s,!0)),hO(e).forEach(e=>{if(/:/.test(e)){let[n,r]=e.split(`:`),i=a;n.length&&(i=t.get(n)),V(i)&&(i=i(t)),o.events.on(i||t,r,s),i||o.events.on(r,s),t.hookStatus(`beforeDestruct`,()=>{o.events.off(i||t,r,s).off(r,s)});return}let r=e.split(`.`),[i]=r,c=r.slice(1),l=t[i];dD(l)&&jA(l).on(`change.${c.join(`.`)}`,s);let u=BD(n,i);Object.defineProperty(t,i,{configurable:!0,set(e){let n=l;n!==e&&(l=e,u&&u.set&&u.set.call(t,e),dD(l)&&(l=jA(l),l.on(`change.${c.join(`.`)}`,s)),s(i,n,l))},get(){return u&&u.get?u.get.call(t):l}})})};V(n.hookStatus)?n.hookStatus(JE.ready,o):o(n)}}var MA=s({autobind:()=>H,cache:()=>aO,cacheHTML:()=>oO,cached:()=>iO,component:()=>uO,debounce:()=>xA,derive:()=>CA,getComponentClass:()=>dO,hook:()=>wA,idle:()=>TA,nonenumerable:()=>EA,persistent:()=>DA,throttle:()=>SA,wait:()=>OA,watch:()=>Y});J.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:`GET`,url:``,data:null,contentType:`application/x-www-form-urlencoded; charset=UTF-8`,headers:{"X-REQUESTED-WITH":`XMLHttpRequest`},withCredentials:!1,xhr(){return new XMLHttpRequest}};var NA=class{get url(){return this.request.url}constructor(e,t,n,r){this.request=e,this.status=t,this.statusText=n,this.body=r}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}},PA=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},FA=class e{className(){return`Ajax`}constructor(e,t=J.prototype.defaultAjaxOptions){this.__async=new mO,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=bk(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}__buildParams(e,t){return dD(e)&&this.options.contentType&&this.options.contentType.includes(`application/json`)?JSON.stringify(e):V(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):U(e)||e instanceof cE.FormData||typeof e==`object`&&e&&V(e.append)?e:pk(e)}get o(){return this.options}
80abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch{}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,n=this.prepareRequest();return this.__async.promise(async(r,i)=>{let a=()=>{this.__isFulfilled=!0,i(kD(`Connection error`))},o=()=>{this.__isFulfilled=!0,r(new NA(n,e.status,e.statusText,e.responseType?e.response:e.responseText))};e.onload=o,e.onabort=()=>{this.__isFulfilled=!0,i(TD(`Abort connection`))},e.onerror=a,e.ontimeout=a,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,n;let r=0;e.lengthComputable&&(r=e.loaded/e.total*100),(n=(t=this.options).onProgress)==null||n.call(t,r)},e.onreadystatechange=()=>{var n,r;(r=(n=this.options).onProgress)==null||r.call(n,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?o():e.statusText&&(this.__isFulfilled=!0,i(kD(e.statusText))))},e.withCredentials=t.withCredentials??!1;let{url:s,data:c,method:l}=n;e.open(l,s,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader(`Content-type`,t.contentType);let{headers:u}=t;V(u)&&(u=await u.call(this)),u&&e.setRequestHeader&&Object.keys(u).forEach(t=>{e.setRequestHeader(t,u[t])}),this.__async.setTimeout(()=>{e.send(c?this.__buildParams(c):void 0)},0)})}async*stream(){this.__activated=!0;let{xhr:e,o:t}=this,n=this.prepareRequest(),r=0,i=``,a=[],o=null,s=!1,c=null,l=()=>{if(o){let e=o;o=null,e()}},u=t=>{let n=e.responseText;i+=n.substring(r),r=n.length;let o=i.split(` 81 82`);i=t?``:o.pop()??``;for(let e of o){let t=e.trim();if(!t)continue;let n=[];for(let e of t.split(` 83`))e.startsWith(`data: `)?n.push(e.slice(6)):e.startsWith(`data:`)&&n.push(e.slice(5));n.length&&a.push(n.join(` 84`))}l()};e.onprogress=()=>u(!1),e.onload=()=>{u(!0),s=!0,this.__isFulfilled=!0,l()},e.onerror=()=>{c=kD(`Connection error`),s=!0,this.__isFulfilled=!0,l()},e.onabort=()=>{c=TD(`Abort connection`),s=!0,this.__isFulfilled=!0,l()},e.withCredentials=t.withCredentials??!1;let{url:d,data:f,method:p}=n;e.open(p,d,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader(`Content-type`,t.contentType);let{headers:m}=t;V(m)&&(m=await m.call(this)),m&&e.setRequestHeader&&Object.keys(m).forEach(t=>{e.setRequestHeader(t,m[t])}),e.send(f?this.__buildParams(f):void 0);try{for(;;)if(a.length>0)yield a.shift();else if(s)break;else await new Promise(e=>{o=e})}finally{this.__isFulfilled||this.abort()}if(c)throw c}prepareRequest(){if(!this.o.url)throw OD(`Need URL for AJAX request`);let t=this.o.url,n=this.o.data,r=(this.o.method||`get`).toLowerCase();if(r===`get`&&n&&dD(n)){let e=t.indexOf(`?`);if(e!==-1){let r=wk(t.substring(e));t=t.substring(0,e)+`?`+pk({...r,...n})}else t+=`?`+pk(this.o.data)}let i={url:t,method:r,data:n};return e.log.splice(100),e.log.push(i),i}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}};FA.log=[],PA([H],FA.prototype,`destruct`,null);var IA=class{getElm(e){return this.container.querySelector(`.${this.getFullElName(e)}`)}getElms(e){return nD(this.container.querySelectorAll(`.${this.getFullElName(e)}`))}},LA=class{afterSetMod(e,t){}setMod(e,t,n){e=e.toLowerCase();let r=this.mods[e];if(r===t)return this;let i=`${this.componentName}_${e}_`,a=(n||this.container).classList;return r!=null&&a.remove(`${i}${r.toString().toLowerCase()}`),!QE(t)&&t!==``&&a.add(`${i}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){return this.mods[e]??null}},RA=class e{static getIcon(t){return/<svg/i.test(t)?t:e.icons[t]||e.icons[t.replace(/-/g,`_`)]||e.icons[t.replace(/_/g,`-`)]||e.icons[bD(t)]||e.icons[fD(t)]||e.icons[t.toLowerCase()]}static exists(e){return this.getIcon(e)!==void 0}static get(e,t=`<span></span>`){return this.getIcon(e)||t}static set(e,t){return this.icons[e.replace(`_`,`-`)]=t,this}static makeIcon(t,n){var r;if(!n)return;let i,{name:a,iconURL:o,fill:s,scale:c}=n,l=a.replace(/[^a-zA-Z0-9]/g,`_`),u;/<svg/.test(a)||(u=(r=t.o).getIcon?.call(r,a,l));let d=`${a}${o}${s}${c??``}${u??``}`;if(t.o.cache&&this.__cache.has(d))return this.__cache.get(d)?.cloneNode(!0);if(o)i=t.c.span(),W(i,`backgroundImage`,`url(`+o.replace(`{basePath}`,t?.basePath||``)+`)`);else{let n=u||e.get(a,``)||t.o.extraIcons?.[a];n&&(i=e.toIconElement(t,n.trim()),/^<svg/i.test(a)||i.classList.add(`jodit-icon_`+l))}return i&&(i.classList.add(`jodit-icon`),i.style.fill=s,c!=null&&(i.style.transform=`scale(${c})`),t.o.cache&&this.__cache.set(d,i.cloneNode(!0))),i}static toIconElement(e,t){let n=e.c.fromHTML(t);return K.isElement(n)?n:e.c.span(`jodit-icon_text`,n)}};RA.icons={},RA.__cache=new Map;var zA=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},BA,VA=BA=class extends bA{getRole(){return this.options?.role||``}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus(`beforeDestruct`,()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){var t;return(t=this.__parentElement)==null||t.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t=typeof e==`object`?t=>t===e:t=>yA.isInstanceOf(t,e),n=this.__parentElement;for(;n;){if(t(n))return n;n=!n.parentElement&&n.container.parentElement?BA.closestElement(n.container.parentElement,BA):n.parentElement}return null}static closestElement(e,t){let n=K.up(e,e=>
84{if(e){let{component:n}=e;return n&&yA.isInstanceOf(n,t)}return!1});return n?n?.component:null}update(){}appendTo(e){return e.appendChild(this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,`_`)}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if(U(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>RA.get(t)||``).replace(/&_/g,this.componentName+`_`).replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}constructor(e,t){super(e),this.name=``,this.__parentElement=null,this.mods={},this.options=t,this.container=this.createContainer(t);let n=this.getRole();n&&G(this.container,`role`,n),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}destruct(){return K.safeRemove(this.container),this.parentElement=null,super.destruct()}};VA=BA=zA([CA(LA,IA)],VA);var HA=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},UA=()=>({size:`middle`,type:`button`,role:`button`,name:``,value:``,variant:`initial`,disabled:!1,activated:!1,icon:{name:`empty`,fill:``,iconURL:``,scale:void 0},tooltip:``,text:``,tabIndex:void 0}),WA=class extends VA{className(){return`UIButton`}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm(`text`);return lD(e,`Text element not found`),e}get icon(){let e=this.getElm(`icon`);return lD(e,`Icon element not found`),e}onChangeSize(){this.setMod(`size`,this.state.size)}onChangeType(){G(this.container,`type`,this.state.type)}onChangeRole(){G(this.container,`role`,this.state.role)}updateSize(){let e=dO(`UIList`),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod(`variant`,this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod(`text-icons`,!!this.state.text.trim().length)}onChangeDisabled(){G(this.container,`disabled`,this.state.disabled||null)}onChangeActivated(){G(this.container,`aria-pressed`,this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,G(this.container,`data-ref`,this.state.name),G(this.container,`ref`,this.state.name)}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get(`j.o.useNativeTooltip`)&&G(this.container,`title`,e),G(this.container,`aria-label`,e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;G(this.container,`aria-label`,t),G(this.button,`aria-label`,e?null:t)}onChangeTabIndex(){G(this.container,`tabindex`,this.state.tabIndex)}onChangeIcon(){let e=this.get(`j.o.textIcons`);if(e===!0||V(e)&&e(this.state.name))return;K.detach(this.icon);let t=RA.makeIcon(this.j,this.state.icon);t&&this.icon.appendChild(t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&K.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element(`button`,{class:e,type:`button`,role:`button`,ariaPressed:!1}),n=this.j.c.span(e+`__icon`),r=this.j.c.span(e+`__text`);return t.appendChild(n),t.appendChild(r),t}constructor(e,t){super(e),this.isButton=!0,this.state=UA(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(JE.ready,()=>{this.setState(t)})}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,`click`,e)}};HA([aO],WA.prototype,`text`,null),HA([aO],WA.prototype,`icon`,null),HA([Y(`state.size`,{immediately:!1})],WA.prototype,`onChangeSize`,null),HA([Y(`state.type`,{immediately:!1})],WA.prototype,`onChangeType`,null),HA([Y(`state.role`,{immediately:!1})],WA.prototype,`onChangeRole`,null),HA([Y(`parentElement`)],WA.prototype,`updateSize`,null),HA([Y(`state.variant`,{immediately:!1})],WA.prototype,`onChangeStatus`,null),HA([Y(`state.text`,{immediately:!1})],WA.prototype,`onChangeText`,null),HA([Y(`state.text`,{immediately:!1})],WA.prototype,`onChangeTextSetMode`,null),HA([Y(`state.disabled`)],WA.prototype,`onChangeDisabled`,null),HA([Y(`state.activated`)],WA.prototype,`onChangeActivated`,null),HA([Y(`state.name`,{immediately:!1})],WA.prototype,`onChangeName`,null),HA([Y(`state.tooltip`,{immediately:!1})],WA.prototype,`onChangeTooltip`,null),HA([Y(`state.tabIndex`,{immediately:!1})],WA.prototype,`onChangeTabIndex`,null),HA([Y(`state.icon`,{immediately:!1})],WA.prototype,`onChangeIcon`,null),HA([oO],WA.prototype,`createContainer`,null),HA([Y(`button:click`)],WA.prototype,`__onActionFire`,null),WA=HA([uO],WA);function GA(e,t,n,r){let i=new WA(e);return i.state.tabIndex=e.o.allowTabNavigation?0:-1,U(t)?(i.state.icon.name=t,i.state.name=t,r&&(i.state.variant=r),n&&(i.state.text=n)):i.setState(t),i}var KA=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qA,JA=qA=class extends VA{className(){return`UIGroup`}getRole(){return this.options?.role||`list`}get allChildren(){let e=[],t=[...this.elements];for(;t.length;){let n=t.shift();XE(n)?t.push(...n):yA.isInstanceOf(n,qA)?t.push(...n.elements):n&&e.push(n)}return e}
84update(){this.elements.forEach(e=>e.update()),this.setMod(`size`,this.buttonSize)}append(e,t){if(XE(e)){if(typeof t==`number`)throw Error(`You can not use index when append array of elements`);return e.forEach(e=>this.append(e,t)),this}let n=e,r;if(typeof t==`number`?(r=Math.min(Math.max(0,t),this.elements.length),this.elements.splice(r,0,n)):this.elements.push(n),n.name&&n.container.classList.add(this.getFullElName(n.name)),t&&typeof t==`string`){let e=this.getElm(t);if(e==null)throw Error(`Element does not exist`);e.appendChild(n.container)}else this.appendChildToContainer(n.container,r);return n.parentElement=this,this}afterSetMod(e,t){this.syncMod&&this.elements.forEach(n=>n.setMod(e,t))}appendChildToContainer(e,t){t===void 0||t<0||t>this.elements.length-1||this.container.children[t]==null?this.container.appendChild(e):this.container.insertBefore(e,this.container.children[t])}remove(e){let t=this.elements.indexOf(e);return t!==-1&&(this.elements.splice(t,1),K.safeRemove(e.container),e.parentElement=null),this}clear(){return this.elements.forEach(e=>e.destruct()),this.elements.length=0,this}constructor(e,t,n){super(e,n),this.options=n,this.syncMod=!1,this.elements=[],this.buttonSize=`middle`,t?.forEach(e=>e&&this.append(e)),n?.name&&(this.name=n.name)}setParentView(e){var t;return(t=this.elements)==null||t.forEach(t=>t.setParentView(e)),super.setParentView(e)}destruct(){return this.clear(),super.destruct()}};KA([Y(`buttonSize`)],JA.prototype,`update`,null),JA=qA=KA([uO],JA);var YA=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},XA=class extends JA{className(){return`UIButtonGroup`}render(e){return`<div> 85 <div class="&__label">~${e.label}~</div> 86 <div class="&__options"></div> 87 </div>`}appendChildToContainer(e){let t=this.getElm(`options`);lD(t!=null,`Options does not exist`),t.appendChild(e)}constructor(e,t={radio:!0}){super(e,t.options?.map(t=>{let n=new WA(e,{text:t.text,value:t.value,variant:`primary`});return n.onAction(()=>{this.select(t.value)}),n}),t),this.options=t,this.select(t.value??0)}select(e){var t,n;this.elements.forEach((t,n)=>{n===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let r=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,`select`,r),(n=(t=this.options).onChange)==null||n.call(t,r)}};XA=YA([uO],XA);var ZA=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},QA,$A=[`scroll.tooltip`,`joditCloseDialog`,`mouseleave.tooltip`],ej=[`escape.tooltip`,`change.tooltip`,`changePlace.tooltip`,`afterOpenPopup.tooltip`,`hidePopup.tooltip`,`beforePopupClose.tooltip`,`closeAllPopups.tooltip`],tj=QA=class extends VA{className(){return`UITooltip`}render(){return`<div><div class="&__content"></div></div>`}constructor(e){super(e),this.__isOpened=!1,this.__attachedContainers=new Set,this.__listenClose=!1,this.__currentTarget=null,this.__delayShowTimeout=0,this.__hideTimeout=0,!e.o.textIcons&&e.o.showTooltip&&!e.o.useNativeTooltip&&(this.j.e.on(`getContainer`,e=>{this.__onAttach(e)}),e.hookStatus(JE.ready,()=>{this.__onAttach(this.j.container)}))}__onAttach(e){YO(this.j,QA).appendChild(this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,`mouseenter.tooltip`,this.__onMouseEnter,{capture:!0}).on(e,`mouseleave.tooltip`,this.__onMouseLeave,{capture:!0}).on(this.j.container,`mouseleave.tooltip`,this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let e=this.j;e.e.on(e.ow,$A,this.__hide).on(ej,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,$A,this.__hide).off(ej,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!K.isHTMLElement(e.target))return;let t=G(e.target,`aria-label`);
87if(!t||G(e.target,`disabled`)||!e.target.className.includes(`jodit`))return;this.__currentTarget=e.target;let n=e.target;this.__open(()=>{let e=fA(n);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let n=this.j.o.showTooltipDelay||this.j.defaultTimeout;if(!n){this.__show(e,t);return}this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(e,t),n)}__show(e,t){this.setMod(`visible`,!0),this.setMod(`above`,!1),this.getElm(`content`).innerHTML=t;let n=e(),r=sA(this.container);W(this.container,{left:n.x-r.x,top:n.y-r.y});let i=fA(this.container),a=this.j.ow.innerHeight;if(i.top+i.height>a){let e=fA(this.__currentTarget);this.setMod(`above`,!0),W(this.container,{top:e.top-i.height-r.y})}}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod(`visible`,!1),this.getElm(`content`).innerHTML=``,W(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(e=>{this.j.e.off(e,`mouseenter.tooltip`,this.__onMouseEnter).off(e,`mouseleave.tooltip`,this.__onMouseLeave)}),this.__hide(),super.destruct()}};ZA([H],tj.prototype,`__onMouseLeave`,null),ZA([H],tj.prototype,`__onMouseEnter`,null),ZA([H],tj.prototype,`__hide`,null),ZA([H],tj.prototype,`__hideDelay`,null),tj=QA=ZA([uO],tj);var nj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},rj=class extends JA{className(){return`UIBlock`}constructor(e,t,n={align:`left`}){super(e,t),this.options=n,this.setMod(`align`,this.options.align||`left`),this.setMod(`width`,this.options.width||``),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),G(this.container,`data-ref`,n.ref),G(this.container,`ref`,n.ref)}};rj=nj([uO],rj);var ij=s({required:()=>aj,url:()=>oj}),aj=function(e){return aD(e.value).length?!0:(e.error=`Please fill out this field`,!1)},oj=function(e){return nO(aD(e.value))?!0:(e.error=`Please enter a web address`,!1)},sj=function(e){return aD(e.value).length?!0:(e.error=`Please fill out this field`,!1)},cj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lj,uj=lj=class extends VA{className(){return`UIInput`}onChangeClear(){this.state.clearButton?K.after(this.nativeInput,this.clearButton):K.safeRemove(this.clearButton)}onChangeClassName(e,t){t&&this.container.classList.remove(t),this.state.className&&this.container.classList.add(this.state.className)}onChangeState(){this.name=this.state.name;let e=this.nativeInput,{name:t,icon:n,type:r,ref:i,required:a,placeholder:o,autocomplete:s,label:c}=this.state;G(e,`name`,t),G(e,`type`,r),G(e,`data-ref`,i||t),G(e,`ref`,i||t),G(e,`required`,a||null),G(e,`autocomplete`,s?null:`off`),G(e,`placeholder`,o?this.j.i18n(o):``),n&&RA.exists(n)?(K.before(e,this.icon),this.icon.innerHTML=RA.get(n)):K.safeRemove(this.icon),c?(K.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(c)):K.safeRemove(this.label),this.updateValidators()}updateValidators(){var e;this.validators.clear(),this.state.required&&this.validators.add(aj),(e=this.state.validators)==null||e.forEach(e=>{let t=ij[e];t&&this.validators.add(t)})}set error(e){this.setMod(`has-error`,!!e),e?(this.__errorBox.innerText=this.j.i18n(e,this.j.i18n(this.state.label||``)),this.container.appendChild(this.__errorBox)):K.safeRemove(this.__errorBox)}get value(){return this.nativeInput.value}set value(e){this.value!==e&&(this.nativeInput.value=e,this.onChangeValue())}onChangeStateValue(){let e=this.state.value.toString();e!==this.value&&(this.value=e)}onChangeValue(){var e,t;let{value:n}=this;this.state.value!==n&&(this.state.value=n,this.j.e.fire(this,`change`,n),(t=(e=this.state).onChange)==null||t.call(e,n))}validate(){this.error=``;let e=nD(this.validators).every(e=>e(this));return this.__markInputInvalid(),e}__markInputInvalid(){var e,t,n,r;this.error?(this.nativeInput.setAttribute(`aria-invalid`,`true`),(t=(e=this.nativeInput).setCustomValidity)==null||t.call(e,this.error)):(this.nativeInput.removeAttribute(`aria-invalid`),(r=(n=this.nativeInput).setCustomValidity)==null||r.call(n,``))}createContainer(e){let t=super.createContainer();this.wrapper=this.j.c.div(this.getFullElName(`wrapper`)),this.nativeInput||=this.createNativeInput();let{nativeInput:n}=this;return n.classList.add(this.getFullElName(`input`)),this.wrapper.appendChild(n),t.appendChild(this.wrapper),G(n,`dir`,this.j.o.direction||`auto`),t}createNativeInput(e){return this.j.create.element(`input`)}constructor(e,t){super(e,t),this.label=this.j.c.span(this.getFullElName(`label`)),this.icon=this.j.c.span(this.getFullElName(`icon`)),this.clearButton=this.j.c.span(this.getFullElName(`clear`),RA.get(`cancel`)),this.state={...lj.defaultState},this.__errorBox=this.j.c.span(this.getFullElName(`error`)),this.validators=new Set([]),t?.value!==void 0&&(t.value=t.value.toString()),Object.assign(this.state,t),this.state.clearButton!==void 0&&(this.j.e.on(this.clearButton,`click`,e=>{e.preventDefault(),this.nativeInput.value=``,this.j.e.fire(this.nativeInput,`input`),this.focus()}).on(this.nativeInput,`input`,()=>{this.state.clearButton=!!this.value.length}),this.state.clearButton=!!this.value.length),this.j.e.on(this.nativeInput,`focus blur`,()=>{this.onChangeFocus()}).on(this.nativeInput,`input change`,this.onChangeValue),this.onChangeState(),this.onChangeClassName(),this.onChangeStateValue()}focus(){this.nativeInput.focus()}get isFocused(){return this.nativeInput===this.j.od.activeElement}onChangeFocus(){this.setMod(`focused`,this.isFocused)}};uj.defaultState={className:``,autocomplete:!0,name:``,value:``,icon:``,label:``,ref:``,type:`text`,placeholder:``,required:!1,validators:[]},cj([Y(`state.clearButton`)],uj.prototype,`onChangeClear`,null),cj([Y(`state.className`)],uj.prototype,`onChangeClassName`,null),cj([Y([`state.name`,`state.type`,`state.label`,`state.placeholder`,`state.autocomplete`,`state.icon`],{immediately:!1}),xA()],uj.prototype,`onChangeState`,null),cj([Y(`state.value`)],uj.prototype,`onChangeStateValue`,null),cj([H],uj.prototype,`onChangeValue`,null),uj=lj=cj([uO],uj);var dj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},fj,pj=fj=class extends uj{className(){return`UISelect`}createContainer(e){var t;let n=super.createContainer(e),{j:r}=this,{nativeInput:i}=this,a=()=>r.create.element(`option`);if(e.placeholder!==void 0){let t=a();t.value=``,t.text=r.i18n(e.placeholder),i.add(t)}
87return(t=e.options)==null||t.forEach(e=>{let t=a();t.value=e.value.toString(),t.text=r.i18n(e.text),i.add(t)}),e.size&&e.size>0&&G(i,`size`,e.size),e.multiple&&G(i,`multiple`,``),n}createNativeInput(){return this.j.create.element(`select`)}updateValidators(){super.updateValidators(),this.state.required&&(this.validators.delete(aj),this.validators.add(sj))}constructor(e,t){super(e,t),this.state={...fj.defaultState},Object.assign(this.state,t)}};pj.defaultState={...uj.defaultState,options:[],size:1,multiple:!1},pj=fj=dj([uO],pj);var mj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},hj=class extends JA{className(){return`UIForm`}submit(){this.j.e.fire(this.container,`submit`)}validate(){let e=this.allChildren.filter(e=>yA.isInstanceOf(e,uj));for(let t of e)if(!t.validate())return!1;let t=this.allChildren.filter(e=>yA.isInstanceOf(e,pj));for(let e of t)if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,`submit`,()=>{let t=this.allChildren.filter(e=>yA.isInstanceOf(e,uj));return this.validate()&&e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1}),this}createContainer(){let e=this.j.c.element(`form`);return e.classList.add(this.componentName),G(e,`dir`,this.j.o.direction||`auto`),G(e,`novalidate`,``),e}constructor(...e){super(...e),this.options?.className&&this.container.classList.add(this.options?.className)}};hj=mj([uO],hj);var gj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_j,vj=_j=class extends uj{className(){return`UITextArea`}createNativeInput(e){return this.j.create.element(`textarea`)}constructor(e,t){super(e,t),this.state={..._j.defaultState},Object.assign(this.state,t),this.state.resizable===!1&&(this.nativeInput.style.resize=`none`)}onChangeStateSize(){let{size:e,resizable:t}=this.state;this.nativeInput.style.resize=t?`auto`:`none`,this.nativeInput.rows=e??5}};vj.defaultState={...uj.defaultState,size:5,resizable:!0},gj([Y([`state.size`,`state.resizable`])],vj.prototype,`onChangeStateSize`,null),vj=_j=gj([uO],vj);var yj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},bj,xj=bj=class extends uj{className(){return`UICheckbox`}render(){return this.j.c.element(`label`,{className:this.componentName})}constructor(e,t){super(e,{...t,type:`checkbox`}),this.state={...bj.defaultState},Object.assign(this.state,t)}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod(`checked`,this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod(`switch`,this.state.switch);let e=this.getElm(`switch-slider`);this.state.switch?(e||=this.j.c.div(this.getFullElName(`switch-slider`)),K.after(this.nativeInput,e)):K.safeRemove(e)}};xj.defaultState={...uj.defaultState,checked:!1,switch:!1},yj([Y(`state.checked`),wA(`ready`)],xj.prototype,`onChangeChecked`,null),yj([Y(`nativeInput:change`)],xj.prototype,`onChangeNativeCheckBox`,null),yj([Y(`state.switch`),wA(`ready`)],xj.prototype,`onChangeSwitch`,null),xj=bj=yj([uO],xj);var Sj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}
87,Cj=class extends uj{className(){return`UIFileInput`}createContainer(e){this.button=new WA(this.j,{tooltip:e.tooltip,icon:{name:`plus`}});let{container:t}=this.button;this.nativeInput||=this.createNativeInput(e);let{nativeInput:n}=this;return n.classList.add(this.getFullElName(`input`)),t.classList.add(this.componentName),t.appendChild(n),t}createNativeInput(e){return this.j.create.fromHTML(`<input 88 type="file" 89 accept="${e.onlyImages?`image/*`:`*`}" 90 tabindex="-1" 91 dir="auto" 92 multiple="" 93 />`)}constructor(e,t){super(e,{type:`file`,...t}),this.state={...uj.defaultState,type:`file`,onlyImages:!0}}};Cj=Sj([uO],Cj);var wj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Tj=class extends VA{className(){return`UISeparator`}};Tj=wj([uO],Tj);var Ej=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Dj=class extends VA{className(){return`UISpacer`}};Dj=Ej([uO],Dj);var Oj=e=>XE(e.buttons);function kj(e,t){let n=t.getRegisteredButtonGroups();return new Set(e.reduce((e,t)=>
93(Oj(t)?e=e.concat([...t.buttons,...n[t.group]??[]]):e.push(t),e),[]))}function Aj(e,t){let n;return t||=J.defaultOptions.controls,U(e)?n=jj(e,t)||{name:e,command:e,tooltip:e}:(n={name:`empty`,...xk(e)},t[n.name]!==void 0&&(n={...xk(t[n.name]),...xk(n)})),n}function jj(e,t){let[n,r]=e.split(/\./),i=t;return r==null?r=n:t[n]!==void 0&&(i=t[n]),i[r]?{name:r,...xk(i[r])}:void 0}function Mj(e,t){return(XE(e)?e:LD(e,!1).map(t=>{let n=e[t]||{};return bk({name:t},n)})).map(e=>Aj(e,t||J.defaultOptions.controls))}var Nj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Pj=class extends JA{constructor(){super(...arguments),this.mode=`horizontal`,this.removeButtons=[]}className(){return`UIList`}getRole(){return`list`}__onChangeMode(){this.setMod(`mode`,this.mode)}makeGroup(e){return new JA(this.jodit,[],e?{role:e}:void 0)}get buttons(){return this.allChildren.filter(e=>yA.isInstanceOf(e,WA))}getButtonsNames(){return this.buttons.map(e=>e instanceof WA&&e.state.name||``).filter(e=>e!==``)}setRemoveButtons(e){return this.removeButtons=e||[],this}build(e,t=null){e=hO(e),this.clear();let n=!1,r=this.makeGroup(`group`);this.append(r),r.setMod(`line`,!0);let i,a=e=>{let a=null;switch(e.name){case` 94`:r=this.makeGroup(`group`),r.setMod(`line`,!0),i=this.makeGroup(),r.append(i),this.append(r);break;case`|`:n||(n=!0,a=new Tj(this.j));break;case`---`:{i.setMod(`before-spacer`,!0);let e=new Dj(this.j);r.append(e),i=this.makeGroup(),r.append(i),n=!1;break}default:switch(n=!1,e.component){case`select`:a=this.makeSelect(e,t);break;default:a=this.makeButton(e,t)}}a&&(i||(i=this.makeGroup(),r.append(i)),i.append(a))},o=e=>!this.removeButtons.includes(e.name)&&(!e.isVisible||e.isVisible?.call(e,this.j,e));return e.forEach(e=>{if(Oj(e)){let t=e.buttons.filter(e=>e);t.length&&(i=this.makeGroup(),i.setMod(`separated`,!0).setMod(`group`,e.group),r.append(i),Mj(t,this.j.o.controls).filter(o).forEach(a))}else{i||(i=this.makeGroup(),r.append(i));let t=Aj(e,this.j.o.controls);o(t)&&a(t)}}),this.update(),this}makeSelect(e,t){throw Error(`Not implemented behaviour`)}makeButton(e,t){return new WA(this.j,{name:e.name})}};Nj([Y(`mode`),wA(`ready`)],Pj.prototype,`__onChangeMode`,null),Pj=Nj([uO],Pj);var Fj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ij=[`escape`,`cut`,`delete`,`backSpaceAfterDelete`,`beforeCommandDelete`],Lj=class e extends JA{className(){return`Popup`}appendChildToContainer(e){let t=this.getElm(`content`);lD(t,`Content element should exist`),t.appendChild(e)}updateParentElement(t){return t!==this&&yA.isInstanceOf(t,e)&&(this.__childrenPopups.forEach(e=>{!t.closest(e)&&e.isOpened&&e.close()}),this.__childrenPopups.has(t)||this.j.e.on(t,`beforeClose`,()=>{this.__childrenPopups.delete(t)}),this.__childrenPopups.add(t)),super.updateParentElement(t)}setContent(e){if(this.allChildren.length)throw Error(`Remove children`);if(yA.isInstanceOf(e,VA))this.append(e);else{let t=U(e)?this.j.c.fromHTML(e):e;this.appendChildToContainer(t)}return this.updatePosition(),this}open(t,n=!1,r){if(PD(this.jodit,this.container),this.container.classList.add(`jodit_theme_${this.jodit.o.theme}`),this.__calculateZIndex(),this.isOpened=!0,this.__addGlobalListeners(),this.__targetBound=n?this.getKeepBound(t):t,r)r.appendChild(this.container);else{let t=YO(this.jodit,e);r!==this.container.parentElement&&t.appendChild(this.container)}return this.updatePosition(),this.j.e.fire(this,`afterOpen`),this.j.e.fire(`afterOpenPopup`,this),this}__calculateZIndex(){if(this.container.style.zIndex)return;let e=e=>{let t=e.container.style.zIndex||e.o.zIndex;return t?(this.setZIndex(1+parseInt(t.toString(),10)),!0):!1},{j:t}=this;if(e(t))return;let n=this.parentElement;for(;n;){if(e(n.j))return;if(n.container.style.zIndex){this.setZIndex(1+parseInt(n.container.style.zIndex.toString(),10));return}if(!n.parentElement&&n.container.parentElement){let e=VA.closestElement(n.container.parentElement,VA);
94if(e){n=e;continue}}n=n.parentElement}}getKeepBound(e){let t=e(),n=(this.j.o.shadowRoot??this.od).elementFromPoint(t.left,t.top);if(!n)return e;let r=K.isHTMLElement(n)?n:n.parentElement,i=fA(r,this.j);return()=>{let t=e(),n=fA(r,this.j);return{...t,top:t.top+(n.top-i.top),left:t.left+(n.left-i.left)}}}updatePosition(){if(!this.isOpened)return this;let[e,t]=this.__calculatePosition(this.__targetBound(),this.viewBound(),fA(this.container,this.j));this.setMod(`strategy`,t);let n=sA(this.container);return W(this.container,{left:e.left-n.x,top:e.top-n.y}),this.__childrenPopups.forEach(e=>e.updatePosition()),this}__throttleUpdatePosition(){this.updatePosition()}__calculatePosition(t,n,r,i=this.strategy){let a={left:t.left,right:t.left-(r.width-t.width)},o={bottom:t.top+t.height,top:t.top-r.height},s=Object.keys(a).reduce((e,t)=>e.concat(Object.keys(o).map(e=>`${t}${mA(e)}`)),[]),c=e=>{let[t,n]=fD(e).split(`-`);return{left:a[t],top:o[n],width:r.width,height:r.height}},l=t=>{let n=null;return n=e.boxInView(c(i),t)?i:s.find(n=>{if(e.boxInView(c(n),t))return n})||null,n},u=l(fA(this.j.container,this.j));return(!u||!e.boxInView(c(u),n))&&(u=l(n)||u||i),[c(u),u]}static boxInView(e,t){return e.top-t.top>=-2&&e.left-t.left>=-2&&t.top+t.height-(e.top+e.height)>=-2&&t.left+t.width-(e.left+e.width)>=-2}close(){return this.isOpened?(this.isOpened=!1,this.__childrenPopups.forEach(e=>e.close()),this.j.e.fire(this,`beforeClose`),this.j.e.fire(`beforePopupClose`,this),this.__removeGlobalListeners(),K.safeRemove(this.container),this):this}__closeOnOutsideClick(e){!this.isOpened||this.isOwnClick(e)||this.close()}isOwnClick(t){if(!t.target)return!1;let n=VA.closestElement(t.target,e);return!!(n&&(this===n||n.closest(this)))}__addGlobalListeners(){let e=this.__throttleUpdatePosition,t=this.ow;ZO.on(`closeAllPopups`,this.close),this.smart&&this.j.e.on(Ij,this.close).on(`mousedown touchstart`,this.__closeOnOutsideClick).on(t,`mousedown touchstart`,this.__closeOnOutsideClick),this.j.e.on(`closeAllPopups`,this.close).on(`resize`,e).on(this.container,`scroll mousewheel`,e).on(t,`scroll`,e).on(t,`resize`,e),K.up(this.j.container,t=>{t&&this.j.e.on(t,`scroll mousewheel`,e)})}__removeGlobalListeners(){let e=this.__throttleUpdatePosition,t=this.ow;ZO.off(`closeAllPopups`,this.close),this.smart&&this.j.e.off(Ij,this.close).off(`mousedown touchstart`,this.__closeOnOutsideClick).off(t,`mousedown touchstart`,this.__closeOnOutsideClick),this.j.e.off(`closeAllPopups`,this.close).off(`resize`,e).off(this.container,`scroll mousewheel`,e).off(t,`scroll`,e).off(t,`resize`,e),this.j.container.isConnected&&K.up(this.j.container,t=>{t&&this.j.e.off(t,`scroll mousewheel`,e)})}setZIndex(e){this.container.style.zIndex=e.toString()}constructor(e,t=!0){super(e),this.smart=t,this.isOpened=!1,this.strategy=`leftBottom`,this.viewBound=()=>({left:0,top:0,width:this.ow.innerWidth,height:this.ow.innerHeight}),this.__childrenPopups=new Set,G(this.container,`role`,`popup`)}render(){return`<div> 95 <div class="&__content"></div> 96 </div>`}destruct(){return this.close(),super.destruct()}};Fj([H],Lj.prototype,`updatePosition`,null),Fj([SA(10),H],Lj.prototype,`__throttleUpdatePosition`,null),Fj([H],Lj.prototype,`close`,null),Fj([H],Lj.prototype,`__closeOnOutsideClick`,null);var Rj=class e extends VA{constructor(){super(...arguments),this.__animationElement=null}className(){return`ProgressBar`}render(){return`<div><div></div></div>`}show(){return(this.j.workplace||this.j.container).appendChild(this.container),this}hide(){return K.safeRemove(this.container),this}progress(e){return this.container.style.width=e.toFixed(2)+`%`,this}showFileUploadAnimation(t,n){this.__cleanUpAnimation();let r=YO(this.j,e),i=fA(this.j.container,this.j),a=this.j.c.div(this.getFullElName(`file-animation`)),o=RA.get(`file`,``);o&&(a.innerHTML=o);let s=t??{x:i.width/2,y:0},c=n??{x:s.x+60,y:s.y-80};W(a,{left:i.left+s.x,top:i.top+s.y}),r.appendChild(a),this.__animationElement=a,a.offsetWidth,W(a,{left:i.left+c.x,top:i.top+c.y,opacity:0,transform:`scale(0.4)`});let l=()=>{a.removeEventListener(`transitionend`,l),this.__cleanUpAnimation()};a.addEventListener(`transitionend`,l)}__cleanUpAnimation(){this.__animationElement&&=(K.safeRemove(this.__animationElement),null)}destruct(){return this.__cleanUpAnimation(),this.hide(),super.destruct()}},zj=class{get doc(){return V(this.document)?this.document():this.document}constructor(e,t){this.document=e,this.createAttributes=t}element(e,t,n){let r=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(r),t&&(dD(t)?G(r,t):n=t),n&&QO(n).forEac
96h(e=>r.appendChild(U(e)?this.fromHTML(e):e)),r}div(e,t,n){let r=this.element(`div`,t,n);return e&&(r.className=e),r}sandbox(){let e=this.element(`iframe`,{sandbox:`allow-same-origin`});this.doc.body.appendChild(e);let t=e.contentWindow?.document;if(lD(t,`iframe.contentWindow.document`),!t)throw Error(`Iframe error`);return t.open(),t.write(`<!DOCTYPE html><html><head></head><body></body></html>`),t.close(),[t.body,e]}span(e,t,n){let r=this.element(`span`,t,n);return e&&(r.className=e),r}a(e,t,n){let r=this.element(`a`,t,n);return e&&(r.className=e),r}text(e){return this.doc.createTextNode(e)}fake(){return this.text(``)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let n=this.div();n.innerHTML=e.toString();let r=n.firstChild!==n.lastChild||!n.firstChild?n:n.firstChild;if(K.safeRemove(r),t){let e=tk(r);Object.keys(t).forEach(n=>{let r=e[n];r&&t[n]===!1&&K.hide(r)})}return r}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let n=t[e.tagName.toLowerCase()];V(n)?n(e):dD(n)&&G(e,n)}}}},Bj=class{constructor(e=`JoditDB`,t=`keyValueStore`){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}getDB(){return this.dbPromise||=new Promise((e,t)=>{let n=indexedDB.open(this.dbName,this.DB_VERSION);n.onerror=()=>{t(n.error)},n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}}),this.dbPromise}async performTransaction(e,t){try{let n=t((await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName));return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction(`readwrite`,n=>n.put(t,e))}catch{}return this}async delete(e){try{await this.performTransaction(`readwrite`,t=>t.delete(e))}catch{}return this}async get(e){try{return await this.performTransaction(`readonly`,t=>t.get(e))}catch{return}}async exists(e){try{return await this.performTransaction(`readonly`,t=>t.get(e))!==void 0}catch{return!1}}async clear(){try{await this.performTransaction(`readwrite`,e=>e.clear())}catch{}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch{}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction(`readonly`,e=>e.getAllKeys());return e&&typeof e==`object`&&`then`in e&&(e=await e),e.map(e=>String(e))}catch{return[]}}async values(){try{let e=await this.performTransaction(`readonly`,e=>e.getAll());return e&&typeof e==`object`&&`then`in e&&(e=await e),e}catch{return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,n)=>[e,t[n]])}catch{return[]}}},Vj=null;function Hj(){Vj=null}async function Uj(){if(Vj!=null)return Vj;try{if(typeof indexedDB>`u`)return Vj=!1,!1;let e=`___Jodit___`+Math.random().toString(),t=indexedDB.open(e);return Vj=await new Promise(n=>{t.onerror=()=>{n(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),n(!0)}}),Vj}catch{return Vj=!1,!1}}var Wj=(e=`localStorage`)=>{let t=new Map;return(()=>{if(t.has(e))return t.get(e);let n=`___Jodit___`+Math.random().toString(),r=e===`sessionStorage`?sessionStorage:localStorage;try{r.setItem(n,`1`);let i=r.getItem(n)===`1`;return r.removeItem(n),t.set(e,i),i}catch{}return t.set(e,!1),!1})()},Gj=class{get storage(){return this.strategy===`sessionStorage`?sessionStorage:localStorage}set(e,t){try{let n=this.storage.getItem(this.rootKey),r=n?JSON.parse(n):{};r[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(r))}catch{}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let n=JSON.parse(t);delete n[e],this.storage.setItem(this.rootKey,JSON.stringify(n))}}catch{}return this}get(e){try{let t=this.storage.getItem(this.rootKey),n=t?JSON.parse(t):{};return n[e]===void 0?void 0:n[e]}catch{}}exists(e){return this.get(e)!=null}constructor(e,t=`localStorage`){this.rootKey=e,this.strategy=t}clear(){try{this.storage.removeItem(this.rootKey)}catch{}return this}},Kj=class{constructor(){this.data=new Map}set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}},qj=`Jodit_`,Jj=class e{set(e,t){return this.provider.set(bD(this.prefix+e),t),this}delete(e){return this.provider.delete(bD(this.prefix+e)),this}get(e){return this.provider.get(bD(this.prefix+e))}exists(e){return this.provider.exists(bD(this.prefix+e))}clear(){return this.provider.clear(),this}constructor(e,t){this.provider=e,this.prefix=qj,t&&(this.prefix+=t)}static makeStorage(t=!1,n){let r;return t===`localStorage`||t===`sessionStorage`?Wj(t)&&(r=new Gj(qj+(n||``),t)):t===!0&&Wj(`localStorage`)&&(r=new Gj(qj+(n||``))),r||=new Kj,new e(r,n)}},Yj=class e{constructor(e,t){this.provider=e,this.prefix=qj,t&&(this.prefix+=t)}async set(e,t){return await(await this.provider).set(bD(this.prefix+e),t),this}async delete(e){return await(await this.provider).delete(bD(this.prefix+e)),this}async get(e){return(await this.provider).get(bD(this.prefix+e))}async exists(e){return(await this.provider).exists(bD(this.prefix+e))}async clear(){return await(await this.provider).clear(),this}async close(){let e=await this.provider;`close`in e&&typeof e.close==`function`&&await e.close()}static makeStorage(t=!1,n,r){let i,a=null,o=r?.defaultProvider;return o==null?(t===`localStorage`||t===`sessionStorage`?Wj(t)&&(i=new Gj(qj+(n||``),t)):(t===`indexedDB`||t===!0)&&(i=Uj().then(e=>e?new Bj(qj+(n||``),`keyValueStore`):new Kj)),i||=new Kj,a=new e(Promise.resolve(i),n),a):(i=o===`local`?Wj(`localStorage`)?new Gj(qj+(n||``)):new Kj:o===`memory`?new
96Kj:o,new e(Promise.resolve(i),n))}},Xj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Zj=class extends VA{className(){return`UIMessage`}constructor(e,t){super(e),this.setMod(`active`,!0),this.setMod(`variant`,t.variant),this.container.textContent=t.text}};Zj=Xj([uO],Zj);var Qj=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},$j=class extends JA{className(){return`UIMessages`}constructor(e,t,n={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=n,this.__messages=new Set}info(e,t){this.__message(e,`info`,t)}success(e,t){this.__message(e,`success`,t)}error(e,t){this.__message(e,`error`,t)}message(e,t,n){this.__message(e,t,n)}__message(e,t=`info`,n){let r=e+`:`+t;if(this.__messages.has(r)){this.async.updateTimeout(r,n||this.options.defaultTimeout);return}if(!this.__box)throw Error(`Container is not defined: `+r);this.__box.appendChild(this.container);let i=new Zj(this.j,{text:e,variant:t});this.append(i),this.__calcOffsets(),this.__messages.add(r);let a=this.__getRemoveCallback(i,r);this.j.e.on(i.container,`pointerdown`,a),this.async.setTimeout(a,{label:r,timeout:n||this.options.defaultTimeout})}__getRemoveCallback(e,t){let n=r=>{r&&r.preventDefault(),!e.isInDestruct&&(this.async.clearTimeout(t),this.j.e.off(e.container,`pointerdown`,n),this.__messages.delete(t),e.setMod(`active`,!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return n}__calcOffsets(){let e=5;this.elements.forEach(t=>{W(t.container,`bottom`,e+`px`),e+=t.container.offsetHeight+this.options.defaultOffset})}};$j=Qj([uO],$j);var eM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},tM,nM=tM=class extends yA{constructor(e,t=!1){super(),this.isJodit=t,this.isView=!0,this.parent=null,this.mods={},this.components=new Set,this.OPTIONS=tM.defaultOptions,this.__isFullSize=!1,this.__whoLocked=``,this.isLockedNotBy=e=>this.isLocked&&this.__whoLocked!==e,this.__modulesInstances=new Map,this.id=new Date().getTime().toString(),this.initOptions(e),this.initOwners(),this.events=e?.eventEmmiter??new vO(this.od),this.create=new zj(this.od),this.__container=this.c.div(`jodit ${this.componentName}`)}get basePath(){return this.o.basePath?this.o.basePath:VE}get minified(){return this.o.minified===void 0?HE:this.o.minified}get defaultTimeout(){return QE(this.o.defaultTimeout)?100:this.o.defaultTimeout}get buffer(){return Jj.makeStorage()}get message(){return this.getMessageModule(this.container)}getMessageModule(e){return new $j(this,e)}get storage(){return Jj.makeStorage(!0,this.id)}get asyncStorage(){return Yj.makeStorage(!0,this.id,this.o.asyncStorage)}get c(){return this.create}get container(){return this.__container}set container(e){this.__container=e}get e(){return this.events}get progressbar(){return new Rj(this)}get options(){return this.__options}set options(e){this.__options=e}get o(){return this.options}i18n(e,...t){return gA(e,t,this.options)}toggleFullSize(e){e===void 0&&(e=!this.__isFullSize),e!==this.__isFullSize&&(this.__isFullSize=e,this.e.fire(`toggleFullSize`,e))}get isLocked(){return this.__whoLocked!==``}lock(e=`any`){return this.isLocked?!1:(this.__whoLocked=e,!0)}unlock(){return this.isLocked?(this.__whoLocked=``,!0):!1}get isFullSize(){return this.__isFullSize}getVersion(){return tM.version}static getVersion(){return tM.version}initOptions(e){this.options=bk(e||{},bk(this.options||{},tM.defaultOptions))}initOwners(){this.ownerWindow=this.o.ownerWindow??window}attachEvents(e){if(!e)return;let t=e?.events;
96t&&Object.keys(t).forEach(e=>this.e.on(e,t[e]))}getInstance(e,t){let n=V(e)?e.prototype.className():e,r=this.e.fire(bD(`getInstance_`+n),t);if(r)return r;let i=V(e)?e:KO[n],a=this.__modulesInstances;if(!V(i))throw OD(`Need real module name`);if(!a.has(n)){let e=i.prototype instanceof bA?new i(this,t):new i(t);this.components.add(e),a.set(n,e)}return a.get(n)}addDisclaimer(e){this.container.appendChild(e)}beforeDestruct(){this.e.fire(JE.beforeDestruct,this),this.components.forEach(e=>{YD(e)&&!e.isInDestruct&&e.destruct()}),this.components.clear()}destruct(){var e,t,n,r;this.isDestructed||((e=iO(this,`progressbar`))==null||e.destruct(),(t=iO(this,`message`))==null||t.destruct(),(n=iO(this,`asyncStorage`))==null||n.close(),this.events&&=(this.events.destruct(),void 0),(r=iO(this,`buffer`))==null||r.clear(),K.safeRemove(this.container),super.destruct())}};nM.ES=ZT,nM.version=XT,nM.esNext=!0,nM.esModern=!0,eM([aO],nM.prototype,`buffer`,null),eM([aO],nM.prototype,`message`,null),eM([aO],nM.prototype,`storage`,null),eM([aO],nM.prototype,`asyncStorage`,null),eM([aO],nM.prototype,`c`,null),eM([aO],nM.prototype,`e`,null),eM([aO],nM.prototype,`progressbar`,null),eM([wA(JE.beforeDestruct)],nM.prototype,`beforeDestruct`,null),nM=tM=eM([CA(LA,IA)],nM),nM.defaultOptions={extraButtons:[],cache:!0,textIcons:!1,namespace:``,removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0,language:`auto`};function rM(e,t){let n=dO(`ToolbarCollection`),r=dO(`ToolbarEditorCollection`),i=QD(e)?new r(e):new n(e);return e.o.textIcons&&i.container.classList.add(`jodit_text_icons`),t&&(i.parentElement=t),e.o.toolbarButtonSize&&(i.buttonSize=e.o.toolbarButtonSize),i}function iM(e,t,n=null){if(V(t.getContent))return new(dO(`ToolbarContent`))(e,t,n);let r=new(dO(`ToolbarButton`))(e,t,n);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}
96function aM(e,t,n=null){return new(dO(`ToolbarSelect`))(e,t,n)}var oM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},sM=class extends nM{get toolbarContainer(){return!this.o.fullsize&&(U(this.o.toolbar)||K.isHTMLElement(this.o.toolbar))?rk(this.o.toolbar,this.o.shadowRoot||this.od):(this.o.toolbar&&this.__appendToolbarBox(),this.__defaultToolbarContainer)}__appendToolbarBox(){let e=this.__defaultToolbarContainer,t=this.container.firstElementChild;for(;t&&t!==e&&t.hasAttribute(`data-jodit-above-toolbar`);)t=t.nextElementSibling;t!==e&&this.container.insertBefore(e,t)}setPanel(e){this.o.toolbar=e,this.buildToolbar()}buildToolbar(){var e;if(!this.o.toolbar)return;let t=this.o.buttons?hO(this.o.buttons):[];(e=this.toolbar)==null||e.setRemoveButtons(this.o.removeButtons).build(t.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}getRegisteredButtonGroups(){return this.groupToButtons}registerButton(e){this.registeredButtons.add(e);let t=e.group??`other`;return this.groupToButtons[t]||(this.groupToButtons[t]=[]),e.position==null?this.groupToButtons[t].push(e.name):this.groupToButtons[t][e.position]=e.name,this}unregisterButton(e){this.registeredButtons.delete(e);let t=e.group??`other`,n=this.groupToButtons[t];if(n){let r=n.indexOf(e.name);r!==-1&&n.splice(r,1),n.length===0&&delete this.groupToButtons[t]}return this}beforeToolbarBuild(e){if(Object.keys(this.groupToButtons).length)return e.map(e=>Oj(e)&&e.group&&this.groupToButtons[e.group]?{group:e.group,buttons:[...e.buttons,...this.groupToButtons[e.group]]}:e)}constructor(e,t=!1){super(e,t),this.toolbar=rM(this),this.__defaultToolbarContainer=this.c.div(`jodit-toolbar__box`),this.registeredButtons=new Set,this.groupToButtons={},this.isJodit=!1,this.__tooltip=new tj(this),this.isJodit=t,this.e.on(`beforeToolbarBuild`,this.beforeToolbarBuild)}destruct(){this.isDestructed||(this.setStatus(JE.beforeDestruct),this.e.off(`beforeToolbarBuild`,this.beforeToolbarBuild),this.__tooltip.destruct(),this.toolbar.destruct(),this.toolbar=void 0,super.destruct())}};oM([Y(`:rebuildToolbar`)],sM.prototype,`buildToolbar`,null),oM([H],sM.prototype,`beforeToolbarBuild`,null);var cM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lM;J.prototype.dialog={namespace:``,extraButtons:[],resizable:!0,draggable:!0,buttons:[`dialog.close`],removeButtons:[],toolbarButtonSize:`middle`,zIndex:`inherit`},J.prototype.controls.dialog={close:{icon:`cancel`,exec:e=>{e.close()}}};var uM=lM=class extends sM{className(){return`Dialog`}get destination(){let{popupRoot:e,shadowRoot:t}=this.o;return e||t||this.od.body}setElements(e,t){let n=[];QO(t).forEach(t=>{if(XE(t)){let r=this.c.div(this.getFullElName(`column`));return n.push(r),e.appendChild(r),this.setElements(r,t)}let r;r=U(t)?this.c.fromHTML(t):XD(t)?t.container:t,n.push(r),r.parentNode!==e&&e.appendChild(r)}),nD(e.childNodes).forEach(t=>{n.indexOf(t)===-1&&e.removeChild(t)})}__onMouseUp(){(this.draggable||this.resizable)&&(this.__removeGlobalResizeListeners(),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.__removeGlobalResizeListeners(),this.e.fire(this,`endResize endMove`)))}__onHeaderMouseDown(e){let t=e.target;!this.o.draggable||t&&t.nodeName.match(/^(INPUT|SELECT)$/)||(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=W(this.dialog,`left`),this.startPoint.y=W(this.dialog,`top`),this.setMaxZIndex(),e.cancelable&&e.preventDefault(),this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&(this.e.fire(this,`startMove`),this.e.fire(`closeAllPopups`)))}__onMouseMove(e){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.e&&this.e.fire(this,`move`,e.clientX-this.startX,e.clientY-this.startY),e.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(Math.max(this.startPoint.w+e.clientX-this.startX,this.minSize.w),Math.max(this.startPoint.h+e.clientY-this.startY,this.minSize.h)),this.e&&this.e.fire(this,`resizeDialog`,e.clientX-this.startX,e.clientY-this.startY))}__onEsc(e){if(this.o.closeOnEsc&&this.isOpened&&e.key===`Escape`&&this.getMod(`static`)!==!0){let t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}}__onResizerMouseDown(e){this.resizable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight;let t=this.getElm(`header`),n=this.getElm(`footer`),r=this.getElm(`content`),i=r&&parseFloat(this.ow.getComputedStyle(r).minHeight)||0;this.minSize.w=tO(this.o.minWidth)?this.o.minWidth:Math.max(100,n?.scrollWidth??0),this.minSize.h=tO(this.o.minHeight)?this.o.minHeight:(t?.offsetHeight??0)+(n?.offsetHeight??0)+i+this.resizer.offsetHeight,this.lockSelect(),this.__addGlobalResizeListeners(),this.e&&this.e.fire(this,`startResize`)}__addGlobalResizeListeners(){let e=this;e.e.on(e.ow,`pointermove touchmove`,e.__onMouseMove).on(e.ow,`pointerup touchend`,e.__onMouseUp)}__removeGlobalResizeListeners(){let e=this;e.e.off(e.ow,`mousemove pointermove`,e.__onMouseMove).off(e.ow,`mouseup pointerup`,e.__onMouseUp)}setSize(e,t){return e??=this.dialog.offsetWidth,t??=this.dialog.offsetHeight,W(this.dialog,{width:e,height:t}),this}calcAutoSize(){return this.setSize(`auto`,`auto`),this.setSize(),this}setPosition(e,t){let n=this.ow.innerWidth,r=this.ow.innerHeight,i=n/2-this.dialog.offsetWidth/2,a=r/2-this.dialog.offsetHeight/2;return i<0&&(i=0),a<0&&(a=0),e!==void 0&&t!==void 0&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-i)>100||Math.abs(t-a)>100),this.dialog.style.left=(e||i)+`px`,this.dialog.style.top=(t||a)+`px`,this}setHeader(e){return this.setElements(this.dialogbox_header,e),this}setContent(e){return this.setElements(this.dialogbox_content,e),this}setFooter(e){return this.setElements(this.dialogbox_footer,e),this.setMod(`footer`,!!e),this}getZIndex(){return parseInt(W(this.container,`zIndex`),10)||0}
96getMaxZIndexDialog(){let e=0,t,n,r=this;return $O(`.jodit-dialog`,this.destination).forEach(i=>{t=i.component,n=parseInt(W(i,`zIndex`),10),t.isOpened&&!isNaN(n)&&n>e&&(r=t,e=n)}),r}setMaxZIndex(){if(this.getMod(`static`))return;let e=20000004,t=0;$O(`.jodit-dialog`,this.destination).forEach(n=>{t=parseInt(W(n,`zIndex`),10),e=Math.max(isNaN(t)?0:t,e)}),this.container.style.zIndex=(e+1).toString()}toggleFullSize(e){QE(e)&&(e=!this.getMod(`fullsize`)),this.setMod(`fullsize`,e),super.toggleFullSize(e)}open(e,t,n,r){if(ZO.fire(`closeAllPopups hideHelpers`),this.e.fire(this,`beforeOpen`)===!1)return this;mD(e)&&(n=e),mD(t)&&(r=t),this.destroyAfterClose=n===!0;let i=mD(e)?void 0:e,a=mD(t)?void 0:t;return a!==void 0&&this.setHeader(a),i&&this.setContent(i),this.setMod(`active`,!0),this.isOpened=!0,this.setModal(r),this.destination.appendChild(this.container),this.getMod(`static`)===!0?this.container.style.removeProperty(`z-index`):(this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex()),this.o.fullsize&&this.toggleFullSize(!0),this.e.fire(`afterOpen`,this),this}setModal(e){return this.isModal=!!e,this.setMod(`modal`,this.isModal),this}close(){if(this.isDestructed||!this.isOpened||this.getMod(`static`)===!0)return this;let{e}=this;return e.fire(this,`beforeClose`)===!1||e.fire(`beforeClose`,this)===!1?this:(this.setMod(`active`,!1),this.isOpened=!1,this.isFullSize&&this.toggleFullSize(!1),K.safeRemove(this.container),this.__removeGlobalResizeListeners(),e.fire(this,`afterClose`),this.isInDestruct||e.fire(this.ow,`joditCloseDialog`),this.destroyAfterClose&&this.destruct(),this)}constructor(e={}){super(e),this.destroyAfterClose=!1,this.moved=!1,this.resizable=!1,this.draggable=!1,this.startX=0,this.startY=0,this.startPoint={x:0,y:0,w:0,h:0},this.lockSelect=()=>{this.setMod(`moved`,!0)},this.unlockSelect=()=>{this.setMod(`moved`,!1)},this.__onResize=()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()},this.minSize={w:0,h:0},this.isModal=!1,this.isOpened=!1;let t=this;t.options=bk(e,bk(J.prototype.dialog,lM.defaultOptions)),t.attachEvents(t.options),K.safeRemove(t.container);let n=this.getFullElName.bind(this);t.container=this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}"> 97 <div class="${n(`overlay`)}"></div> 98 <div class="${this.getFullElName(`panel`)}"> 99 <div class="${n(`header`)}"> 100 <div class="${n(`header-title`)}"></div> 101 <div class="${n(`header-toolbar`)}"></div> 102 </div> 103 <div class="${n(`content`)}"></div> 104 <div class="${n(`footer`)}"></div> 105 <div class="${n(`resizer`)}">${RA.get(`resize_handler`)}</div> 106 </div> 107 </div>`),t.options.direction===`rtl`&&(t.container.style.direction=`rtl`,t.container.setAttribute(`dir`,`rtl`)),this.o.zIndex&&(this.container.style.zIndex=this.o.zIndex.toString()),G(t.container,`role`,`dialog`),Object.defineProperty(t.container,"component",{value:this}),t.setMod(`theme`,t.o.theme||`default`).setMod(`resizable`,!!t.o.resizable);let r=t.getElm(`panel`);lD(r!=null,`Panel element does not exist`);let i=t.getElm(`resizer`);lD(i!=null,`Resizer element does not exist`);let a=t.getElm(`header-title`);lD(a!=null,`header-title element does not exist`);let o=t.getElm(`content`);lD(o!=null,`Content element does not exist`);let s=t.getElm(`footer`);lD(s!=null,`Footer element does not exist`);let c=t.getElm(`header-toolbar`);lD(c!=null,`header-toolbar element does not exist`),this.dialog=r,this.resizer=i,this.dialogbox_header=a,this.dialogbox_content=o,this.dialogbox_footer=s,this.dialogbox_toolbar=c,W(t.dialog,{maxWidth:t.options.maxWidth,minHeight:t.options.minHeight,minWidth:t.options.minWidth});let l=t.getElm(`header`);l&&t.e.on(l,`pointerdown touchstart`,t.__onHeaderMouseDown),t.e.on(t.resizer,`mousedown touchstart`,t.__onResizerMouseDown);let u=q.get(`fullsize`);if(V(u)&&u(t),this.e.on(t.container,`close_dialog`,t.close).on(this.ow,`keydown`,this.__onEsc).on(this.ow,`resize`,this.__onResize),this.o.closeOnClickOverlay){let e=t.getElm(`overlay`);lD(e!=null,`Overlay element does not exist`),this.e.on(e,`click`,t.close)}}buildToolbar(){this.o.buttons&&this.toolbar.build(hO(this.o.buttons)).setMod(`mode`,`header`).appendTo(this.dialogbox_toolbar)}destruct(){this.isInDestruct||(this.setStatus(JE.beforeDestruct),this.isOpened&&this.close(),this.events&&(this.__removeGlobalResizeListeners(),this.events.off(this.container,`close_dialog`,self.close).off(this.ow,`key
107down`,this.__onEsc).off(this.ow,`resize`,this.__onResize)),super.destruct())}};uM.defaultOptions={...nM.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0},cM([H],uM.prototype,`__onMouseUp`,null),cM([H],uM.prototype,`__onHeaderMouseDown`,null),cM([H],uM.prototype,`__onMouseMove`,null),cM([H],uM.prototype,`__onEsc`,null),cM([H],uM.prototype,`__onResizerMouseDown`,null),cM([H],uM.prototype,`close`,null),cM([wA(`ready`)],uM.prototype,`buildToolbar`,null),uM=lM=cM([uO],uM);function dM(e,t,n,r=`jodit-dialog_alert`){V(t)&&(n=t,t=void 0);let i=this instanceof uM?this:new uM({closeOnClickOverlay:!0}),a=i.c.div(r),o=GA(i,`ok`,`Ok`);return QO(e).forEach(e=>{a.appendChild(K.isNode(e)?e:i.c.fromHTML(e))}),o.onAction(()=>{(!n||!V(n)||n(i)!==!1)&&i.close()}),i.setFooter([o]),i.open(a,t||` `,!0,!0),o.focus(),i}function fM(e,t,n){let r=this instanceof uM?this:new uM({closeOnClickOverlay:!0}),i=r.c.fromHTML(`<form class="jodit-dialog_prompt"></form>`),a=r.c.element(`label`);V(t)&&(n=t,t=void 0),a.appendChild(r.c.fromHTML(e)),i.appendChild(a);let o=e=>()=>{(!n||n(e)!==!1)&&r.close()},s=GA(r,`cancel`,`Cancel`),c=GA(r,`ok`,`Yes`);return s.onAction(o(!1)),c.onAction(o(!0)),r.e.on(i,`submit`,()=>(o(!0)(),!1)),r.setFooter([c,s]),r.open(i,t||` `,!0,!0),c.focus(),r}function pM(e,t,n,r,i){let a=this instanceof uM?this:new uM({closeOnClickOverlay:!0}),o=GA(a,`cancel`,`Cancel`),s=GA(a,`ok`,`Ok`),c=a.c.element(`form`,{class:`jodit-dialog_prompt`}
107),l=a.c.element(`input`,{autofocus:!0,class:`jodit-input`}),u=a.c.element(`label`);V(t)&&(n=t,t=void 0),r&&G(l,`placeholder`,r),u.appendChild(a.c.text(e)),c.appendChild(u),c.appendChild(l),o.onAction(a.close);let d=()=>{(!n||!V(n)||n(l.value)!==!1)&&a.close()};return s.onAction(d),a.e.on(c,`submit`,()=>(d(),!1)),a.setFooter([s,o]),a.open(c,t||` `,!0,!0),l.focus(),i!==void 0&&i.length&&(l.value=i,l.select()),a}var mM=class{dlg(e){let t=XO(this.o,this.container,this.od.body),n=new uM({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return PD(this,n.container),n.parent=this,n.bindDestruct(this)}confirm(e,t,n){return e=hM(e,this),t=hM(t,this),fM.call(this.dlg({closeOnClickOverlay:!0}),e,t,n)}prompt(e,t,n,r,i){return e=hM(e,this),t=hM(t,this),r=hM(r,this),pM.call(this.dlg({closeOnClickOverlay:!0}),e,t,n,r,i)}alert(e,t,n,r){return e=hM(e,this),t=hM(t,this),dM.call(this.dlg({closeOnClickOverlay:!0}),e,t,n,r)}};function hM(e,t){return U(e)&&!rD(e)&&(e=t.i18n(e)),e}var gM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_M=class extends Lj{className(){return`ContextMenu`}show(e,t,n){let r=this;r.clear(),XE(n)&&(n.forEach(e=>{if(!e)return;let t=GA(this.jodit,e.icon||`empty`,e.title);this.jodit&&t.setParentView(this.jodit),t.setMod(`context`,`menu`),t.onAction(t=>{var n;return(n=e.exec)==null||n.call(r,t),r.clear(),r.close(),!1}),this.append(t)}),this.open(()=>({left:e,top:t,width:0,height:0}),!0))}};_M=gM([uO],_M),J.prototype.filebrowser={namespace:``,cache:!0,extraButtons:[],filter(e,t){return t=t.toLowerCase(),U(e)?e.toLowerCase().indexOf(t)!==-1:U(e.name)?e.name.toLowerCase().indexOf(t)!==-1:U(e.file)?e.file.toLowerCase().indexOf(t)!==-1:!0},sortBy:`changed-desc`,sort(e,t,n){let[r,i]=n.toLowerCase().split(`-`),a=i===`asc`,o=(e,t)=>e<t?a?-1:1:e>t?a?1:-1:0;if(U(e))return o(e.toLowerCase(),t.toLowerCase());if(e[r]===void 0||r===`name`)return U(e.name)?o(e.name.toLowerCase(),t.name.toLowerCase()):U(e.file)?o(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(r){case`changed`:{let n=new Date(e.changed).getTime(),r=new Date(t.changed).getTime();return a?n-r:r-n}case`size`:{let n=Ok(e.size),r=Ok(t.size);return a?n-r:r-n}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,permissionsPresets:{allowFileDownload:void 0,allowFileMove:void 0,allowFileRemove:void 0,allowFileRename:void 0,allowFileUpload:void 0,allowFileUploadRemote:void 0,allowFiles:void 0,allowFolderCreate:void 0,allowFolderMove:void 0,allowFolderRemove:void 0,allowFolderRename:void 0,allowFolderTree:void 0,allowFolders:void 0,allowGeneratePdf:void 0,allowImageCrop:void 0,allowImageResize:void 0},showFoldersPanel:!0,storeLastOpenedFolder:!0,width:859,height:400,buttons:[`filebrowser.upload`,`filebrowser.remove`,`filebrowser.update`,`filebrowser.select`,`filebrowser.edit`,`|`,`filebrowser.tiles`,`filebrowser.list`,`|`,`filebrowser.filter`,`|`,`filebrowser.sort`],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess(e){return e.success},getMessage(e){return e.data.messages!==void 0&&XE(e.data.messages)?e.data.messages.join(` `):``},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:{storeLastOpenedFolder:!0,storeView:!0,storeSortBy:!0},pixelOffsetLoadNewChunk:200,getThumbTemplate(e,t,n){let r=this.options,i=this.files.getFullElName(`item`),a=r.showFileName,o=r.showFileSize&&e.size,s=r.showFileChangeTime&&e.time,c=``;e.file!==void 0&&(c=e.file);let l=`<div class="${i}-info">${a?`<span class="${i}-info-filename">${c}</span>`:``}${o?`<span class="${i}-info-filesize">${e.size}</span>`:``}${s?`<span class="${i}-info-filechanged">${s}</span>`:``}</div>`;return`<a 108 data-jodit-file-browser-item="true" 109 data-is-file="${+!e.isImage}" 110 draggable="true" 111 class="${i}" 112 href="${e.fileURL}" 113 data-source="${n}" 114 data-path="${e.path}" 115 data-name="${c}" 116 title="${c}" 117 data-url="${e.fileURL}"> 118 <img 119 data-is-file="${+!e.isImage}" 120 data-src="${e.fileURL}" 121 src="${e.imageURL}" 122 alt="${c}" 123 loading="lazy" 124 /> 125 ${a||o||s?l:``} 126 </a>`},ajax:{...J.prototype.defaultAjaxOptions,url:``,data:{},cache:!0,contentType:`application/x-www-form-urlencoded; charset=UTF-8`,method:`POST`,processData:!0,headers:{},prepareData(e){return e},process(e){return e}},create:{data:{action:`folderCreate`}},getLocalFileByUrl:{data:{action:`getLocalFileByUrl`}},resize:{data:{action:`imageResize`}},crop:{data:{action:`imageCrop`}},fileMove:{data:{action:`fileMove`}},folderMove:{data:{action:`folderMove`}},fileRename:{data:{action:`fileRename`}},folderRename:{data:{action:`folderRename`}},fileRemove:{data:{action:`fileRemove`}},folderRemove:{data:{action:`folderRemove`}},items:{data:{action:`files`}},folder:{data:{action:`folders`}},permissions:{data:{action:`permissions`}}},J.prototype.controls.filebrowser={upload:{icon:`plus`,tooltip:`Upload file`,isInput:!0,isDisabled:e=>!e.dataProvider.canI(`FileUpload`),getContent:(e,t)=>
126{let n=new Cj(e,{tooltip:t.control.tooltip,onlyImages:e.state.onlyImages});return e.e.fire(`bindUploader.filebrowser`,n.container),n.container}},remove:{icon:`bin`,tooltip:`Remove file`,isDisabled:e=>!e.state.activeElements.length||!e.dataProvider.canI(`FileRemove`),exec:e=>{e.e.fire(`fileRemove.filebrowser`)}},update:{tooltip:`Update file list`,exec:e=>{e.e.fire(`update.filebrowser`)}},select:{tooltip:`Select file`,icon:`check`,isDisabled:e=>!e.state.activeElements.length,exec:e=>{e.e.fire(`select.filebrowser`)}},edit:{tooltip:`Edit image`,icon:`pencil`,isDisabled:e=>{let t=e.state.activeElements;return t.length!==1||!t[0].isImage||!(e.dataProvider.canI(`ImageCrop`)||e.dataProvider.canI(`ImageResize`))},exec:e=>{e.e.fire(`edit.filebrowser`)}},tiles:{tooltip:`Tiles view`,icon:`th`,isActive:e=>e.state.view===`tiles`,exec:e=>{e.e.fire(`view.filebrowser`,`tiles`)}},list:{tooltip:`List view`,icon:`th-list`,isActive:e=>e.state.view===`list`,exec:e=>{e.e.fire(`view.filebrowser`,`list`)}},filter:{isInput:!0,getContent:(e,t)=>
126{let n=t.container.querySelector(`.jodit-input`);if(n)return n;let r=e.c.element(`input`,{class:`jodit-input`,placeholder:e.i18n(`Filter`)});return r.value=e.state.filterWord,e.e.on(r,`keydown mousedown`,e.async.debounce(()=>{e.e.fire(`filter.filebrowser`,r.value)},e.defaultTimeout)),r}},sort:{isInput:!0,getContent:e=>{let t=e.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${e.i18n(`Sort by changed`)} (â¬)</option><option value="changed-desc">${e.i18n(`Sort by changed`)} (â¬)</option><option value="name-asc">${e.i18n(`Sort by name`)} (â¬)</option><option value="name-desc">${e.i18n(`Sort by name`)} (â¬)</option><option value="size-asc">${e.i18n(`Sort by size`)} (â¬)</option><option value="size-desc">${e.i18n(`Sort by size`)} (â¬)</option></select>`);return t.value=e.state.sortBy,e.e.on(`sort.filebrowser`,e=>{t.value!==e&&(t.value=e)}).on(t,`change`,()=>{e.e.fire(`sort.filebrowser`,t.value)}),t}}};function vM(e){return e.files.setMod(`active`,!0),e.files.setMod(`loading`,!0),e.dataProvider.items(e.state.currentPath,e.state.currentSource,{sortBy:e.state.sortBy,onlyImages:e.state.onlyImages,filterWord:e.state.filterWord}).then(t=>{t&&(e.state.elements=t,e.state.activeElements=[])}).catch(e.status).finally(()=>e.files.setMod(`loading`,!1))}async function yM(e){e.tree.setMod(`active`,!0),K.detach(e.tree.container);let t=vM(e);if(e.o.showFoldersPanel){e.tree.setMod(`loading`,!0);let n=e.dataProvider.tree(e.state.currentPath,e.state.currentSource).then(t=>{e.state.sources=t}).catch(e.status).finally(()=>e.tree.setMod(`loading`,!1));return Promise.all([n,t])}return e.tree.setMod(`active`,!1),t}var bM=new WeakMap,xM=e=>{let t=bM.get(e);return t||(t={},bM.set(e,t)),t},SM=(e,t,n=`a`)=>K.closest(e,e=>K.isTag(e,n),t),CM=(e,t)=>{let{key:n}=e.dataset,{item:r}=t[n||``];return r},wM=class e{constructor(e){this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}static create(t){return t instanceof e?t:new e(t)}get path(){return tA(this.data.source.path?this.data.source.path+`/`:`/`)}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:n,thumb:r,file:i}=this.data,a=r||i;return t&&a?a:iA(n.baseurl,n.path,a||``)+`?_tmst=`+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:n,source:r}=this.data;return t!==void 0&&(e=t),n&&e?e:iA(r.baseurl,r.path,e||``)}get time(){let{changed:e}=this.data;return e&&(typeof e==`number`?new Date(e).toLocaleString():e)||``}get uniqueHashKey(){let e=this.data,t=[e.sourceName,e.name,e.file,this.time,e.thumb].join(`_`);return t=t.toLowerCase().replace(/[^0-9a-z\-.]/g,`-`),t}toJSON(){return this.data}},TM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},EM=`default`;new Set([`allowFiles`,`allowFileMove`,`allowFileUpload`,`allowFileUploadRemote`,`allowFileRemove`,`allowFileRename`,`allowFolders`,`allowFolderMove`,`allowFolderCreate`,`allowFolderRemove`,`allowFolderRename`,`allowImageResize`,`allowImageCrop`]);var DM=class{constructor(e,t){this.parent=e,this.options=t,this.__currentPermissions=null,this.__ajaxInstances=new Map,this.progressHandler=e=>{}}get o(){return this.options}get(e){let t=this.__ajaxInstances;t.has(e)&&(t.get(e)?.abort(),t.delete(e));let n=bk(this.options[e]===void 0?{}:this.options[e],bk({onProgress:this.progressHandler},this.o.ajax));n.prepareData&&(n.data=n.prepareData.call(this,n.data));let r=new FA(n);t.set(e,r);let i=r.send();return i.finally(()=>{r.destruct(),t.delete(e),this.progressHandler(100)}).catch(()=>null),i.then(e=>e.json()).then(e=>{if(e&&!this.isSuccess(e))throw Error(this.getMessage(e));return e})}onProgress(e){this.progressHandler=e}async permissions(e,t){return this.o.permissions?(this.o.permissions.data.path=e,this.o.permissions.data.source=t,this.o.permissions.url?this.get(`permissions`).then(e=>{if(this.parent.isInDestruct)throw TD();let t=this.o.permissions.process;if(t||=this.o.ajax.process,t){let n=t.call(self,e);n.data.permissions&&(this.parent.events.fire(this,`changePermissions`,this.__currentPermissions,n.data.permissions),this.__currentPermissions=n.data.permissions)}return this.__currentPermissions}):null):null}canI(e){let t=`allow`+e,n=this.o.permissionsPresets[t];return n===void 0?this.__currentPermissions==null||this.__currentPermissions[t]===void 0||this.__currentPermissions[t]:n}__items(e,t,n,r){let i=this.options;return i.items?(i.items.data.path=e,i.items.data.source=t,i.items.data.mods=n,this.get(`items`).then(e=>{let t=this.o.items.process;return t||=this.o.ajax.process,t&&(e=t.call(self,e)),r(e)})):Promise.reject(Error(`Set Items api options`))}items(e,t,n={}){return this.__items(e,t,n,e=>this.__generateItemsList(e.data.sources,n))}itemsEx(e,t,n={}){let r=e=>e.reduce((e,t)=>
126e+t.files.length,0);return this.__items(e,t,n,e=>({items:this.__generateItemsList(e.data.sources,n),loadedTotal:r(e.data.sources)}))}__generateItemsList(e,t={}){let n=[],r=e=>e.type===`folder`||!t.onlyImages||e.isImage===void 0||e.isImage,i=e=>!t.filterWord?.length||this.o.filter===void 0||this.o.filter(e,t.filterWord);return e.forEach(e=>{if(e.files&&e.files.length){let{sort:a}=this.o;V(a)&&t.sortBy&&e.files.sort((e,n)=>a(e,n,t.sortBy)),e.files.forEach(t=>{i(t)&&r(t)&&n.push(wM.create({...t,sourceName:e.name,source:e}))})}}),n}async tree(e,t){return e=nA(e),this.o.folder?(await this.permissions(e,t),this.o.folder.data.path=e,this.o.folder.data.source=t,this.get(`folder`).then(e=>{let t=this.o.folder.process;return t||=this.o.ajax.process,t&&(e=t.call(self,e)),e.data.sources})):Promise.reject(Error(`Set Folder Api options`))}getPathByUrl(e){return Ik(`options.getLocalFileByUrl.data.url`,e,this),this.get(`getLocalFileByUrl`).then(e=>{if(this.isSuccess(e))return e.data;throw OD(this.getMessage(e))})}createFolder(e,t,n){let{create:r}=this.o;if(!r)throw OD(`Set Create api options`);return r.data.source=n,r.data.path=t,r.data.name=e,this.get(`create`).then(e=>{if(this.isSuccess(e))return!0;throw OD(this.getMessage(e))})}move(e,t,n,r){let i=r?`fileMove`:`folderMove`,a=this.options[i];if(!a)throw OD(`Set Move api options`);return a.data.from=e,a.data.path=t,a.data.source=n,this.get(i).then(e=>{if(this.isSuccess(e))return!0;throw OD(this.getMessage(e))})}__remove(e,t,n,r){let i=this.o[e];if(!i)throw OD(`Set "${e}" api options`);return i.data.path=t,i.data.name=n,i.data.source=r,this.get(e).then(e=>(i.process&&(e=i.process.call(this,e)),this.getMessage(e)))}fileRemove(e,t,n){return this.__remove(`fileRemove`,e,t,n)}folderRemove(e,t,n){return this.__remove(`folderRemove`,e,t,n)}__rename(e,t,n,r,i){let a=this.o[e];if(!a)throw OD(`Set "${e}" api options`);return a.data.path=t,a.data.name=n,a.data.newname=r,a.data.source=i,this.get(e).then(e=>(a.process&&(e=a.process.call(self,e)),this.getMessage(e)))}folderRename(e,t,n,r){return this.__rename(`folderRename`,e,t,n,r)}fileRename(e,t,n,r){return this.__rename(`fileRename`,e,t,n,r)}__changeImage(e,t,n,r,i,a){this.o[e]||(this.o[e]={data:{}});let o=this.o[e];return o.data===void 0&&(o.data={action:e}),o.data.newname=i||r,a&&(o.data.box=a),o.data.path=t,o.data.name=r,o.data.source=n,this.get(e).then(e=>e.data.newPath||!0)}crop(e,t,n,r,i){return this.__changeImage(`crop`,e,t,n,r,i)}resize(e,t,n,r,i){return this.__changeImage(`resize`,e,t,n,r,i)}getMessage(e){return this.options.getMessage(e)}isSuccess(e){return this.options.isSuccess(e)}destruct(){this.__ajaxInstances.forEach(e=>e.destruct()),this.__ajaxInstances.clear()}};TM([H],DM.prototype,`onProgress`,null),TM([H],DM.prototype,`permissions`,null),TM([H],DM.prototype,`canI`,null),TM([H],DM.prototype,`items`,null),TM([H],DM.prototype,`itemsEx`,null),TM([H],DM.prototype,`tree`,null),TM([H],DM.prototype,`getPathByUrl`,null),TM([H],DM.prototype,`createFolder`,null),TM([H],DM.prototype,`move`,null),TM([H],DM.prototype,`fileRemove`,null),TM([H],DM.prototype,`folderRemove`,null),TM([H],DM.prototype,`folderRename`,null),TM([H],DM.prototype,`fileRename`,null),TM([H],DM.prototype,`crop`,null),TM([H],DM.prototype,`resize`,null),TM([H],DM.prototype,`getMessage`,null),TM([H],DM.prototype,`isSuccess`,null),TM([H],DM.prototype,`destruct`,null);function OM(e,t){return new DM(e,t)}function kM(e){return new _M(e)}function AM(e,t,n){return e.dataProvider.fileRemove(e.state.currentPath,t,n).then(n=>{e.status(n||e.i18n(`File "%s" was deleted`,t),!0)}).catch(e.status)}var jM=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M621 1280h595v-595zm-45-45l595-595h-595v595zm1152 77v192q0 14-9 23t-23 9h-224v224q0 14-9 23t-23 9h-192q-14 0-23-9t-9-23v-224h-864q-14 0-23-9t-9-23v-864h-224q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h224v-224q0-14 9-23t23-9h192q14 0 23 9t9 23v224h851l246-247q10-9 23-9t23 9q9 10 9 23t-9 23l-247 246v851h224q14 0 23 9t9 23z"/> </svg> `,MM=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24"> <g transform="translate(-251.000000, -443.000000)"> <g transform="translate(215.000000, 119.000000)"/> <path d="M252,448 L256,448 L256,444 L252,444 L252,448 Z M257,448 L269,448 L269,446 L257,446 L257,448 Z M257,464 L269,464 L269,462 L257,462 L257,464 Z M270,444 L270,448 L274,448 L274,444 L270,444 Z M252,462 L252,466 L256,466 L256,462 L252,462 Z M270,462 L270,466 L274,466 L274,462 L270,462 Z M254,461 L256,461 L256,449 L254,449 L254,461 Z M270,461 L272,461 L272,449 L270,449 L270,461 Z"/> </g> </svg> `;J.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:`85%`,height:`85%`,crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:`70%`,cropDefaultHeight:`70%`},RA.set(`crop`,jM).set(`resize`,MM);var NM=`jodit-image-editor`,PM=RA.get.bind(RA),FM=(e,t=`jodti-image-editor_active`)=>e?t:``,IM=(e,t)=>{let n=e.i18n.bind(e),r=(e,t,r=!0)=>`<div class="jodit-form__group"> 127 <label class="jodit-switcher-wrapper"> 128 <span class='jodit-switcher'> 129 <input ${FM(r,`checked`)} data-ref="${t}" type="checkbox"/> 130 <span class="jodit-switcher__slider"></span> 131 </span> 132 <span>${n(e)}</span> 133 </label> 134 </div>`;return e.create.fromHTML(`<form class="${NM} jodit-properties"> 135 <div class="jodit-grid jodit-grid_xs-column"> 136 <div class="jodit_col-lg-3-4 jodit_col-sm-5-5"> 137 ${t.resize?`<div class="${NM}__area ${NM}__area_resize ${NM}_active"> 138 <div data-ref="resizeBox" class="${NM}__box"></div> 139 <div class="${NM}__resizer"> 140 <i class="jodit_bottomright"></i> 141 </div> 142 </div>`:``} 143 ${t.crop?`<div class="${NM}__area ${NM}__area_crop ${FM(!t.resize)}"> 144 <div data-ref="cropBox" class="${NM}__box"> 145 <div class="${NM}__croper"> 146 <i class="jodit_bottomright"></i> 147 <i class="${NM}__sizes"></i> 148 </div> 149 </div> 150 </div>`:``} 151 </div> 152 <div class="jodit_col-lg-1-4 jodit_col-sm-5-5"> 153 ${t.resize?`<div data-area="resize" class="${NM}__slider ${NM}_active"> 154 <div class="${NM}__slider-title"> 155 ${PM(`resize`)} 156 ${n(`Resize`)} 157 </div> 158 <div class="${NM}__slider-content"> 159 <div class="jodit-form__group"> 160 <label> 161 ${n(`Width`)} 162 </label> 163 <input type="number" data-ref="widthInput" class="jodit-input"/> 164 </div> 165 <div class="jodit-form__group"> 166 <label> 167 ${n(`Height`)} 168 </label> 169 <input type="number" data-ref="heightInput" class="jodit-input"/> 170 </div> 171 ${r(`Keep Aspect Ratio`,`keepAspectRatioResize`)} 172 </div> 173 </div>`:``} 174 ${t.crop?`<div data-area="crop" class="${NM}__slider ${FM(!t.resize)}'"> 175 <div class="${NM}__slider-title"> 176 ${PM(`crop`)} 177 ${n(`Crop`)} 178 </div> 179 <div class="${NM}__slider-content"> 180 ${r(`Keep Aspect Ratio`,`keepAspectRatioCrop`)} 181 </div> 182 </div>`:``} 183 </div> 184 </div> 185 </form>`)}
185,LM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},RM,zM=`jodit-image-editor`,BM={resize:`resize`,crop:`crop`},VM=RM=class extends bA{className(){return`ImageEditor`}get o(){return this.options}hide(){this._dialog.close()}open(e,t){return this.j.async.promise(n=>{let r=new Date().getTime();this.image=this.j.c.element(`img`),$O(`img,.jodit-icon_loader`,this.resize_box).forEach(K.safeRemove),$O(`img,.jodit-icon_loader`,this.crop_box).forEach(K.safeRemove),W(this.cropHandler,`background`,`transparent`),this.onSave=t,this.resize_box.appendChild(this.j.c.element(`i`,{class:`jodit-icon_loader`})),this.crop_box.appendChild(this.j.c.element(`i`,{class:`jodit-icon_loader`})),/\?/.test(e)?e+=`&_tst=`+r:e+=`?_tst=`+r,this.image.setAttribute(`src`,e),this._dialog.open();let{widthInput:i,heightInput:a}=tk(this.editor),o=()=>{this.isDestructed||(this.image.removeEventListener(`load`,o),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,i.value=this.naturalWidth.toString(),a.value=this.naturalHeight.toString(),this.ratio=this.naturalWidth/this.naturalHeight,this.resize_box.appendChild(this.image),this.cropImage=this.image.cloneNode(!0),this.crop_box.appendChild(this.cropImage),K.safeRemove.apply(null,$O(`.jodit-icon_loader`,this.editor)),this.activeTab===BM.crop&&this.showCrop(),this.j.e.fire(this.resizeHandler,`updatesize`),this.j.e.fire(this.cropHandler,`updatesize`),this._dialog.setPosition(),this.j.e.fire(`afterImageEditor`),n(this._dialog))};this.image.addEventListener(`load`,o),this.image.complete&&o()})}onTitleModeClick(e){let t=this,n=e.target?.parentElement;if(!n)return;$O(`.${zM}__slider,.${zM}__area`,t.editor).forEach(e=>e.classList.remove(`${zM}_active`)),n.classList.add(`${zM}_active`),this.activeTab=G(n,`-area`)||BM.resize;let r=t.editor.querySelector(`.${zM}__area.${zM}__area_`+t.activeTab);r&&r.classList.add(`${zM}_active`),t.activeTab===BM.crop&&t.showCrop()}onChangeSizeInput(e){let t=this,n=e.target,{widthInput:r,heightInput:i}=tk(this.editor),a=G(n,`data-ref`)===`widthInput`,o=parseInt(n.value,10),s=a?t.o.min_width:t.o.min_height,c=a?t.o.min_height:t.o.min_width,l;o>s&&(W(t.image,a?`width`:`height`,o),t.resizeUseRatio&&(l=Math.round(a?o/t.ratio:o*t.ratio),l>c&&(W(t.image,a?`height`:`width`,l),a?i.value=l.toString():r.value=l.toString()))),this.j.e.fire(t.resizeHandler,`updatesize`)}onResizeHandleMouseDown(e){let t=this;t.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),t.clicked=!0,t.start_x=e.clientX,t.start_y=e.clientY,t.activeTab===BM.crop?(t.top_x=W(t.cropHandler,`left`),t.top_y=W(t.cropHandler,`top`),t.width=t.cropHandler.offsetWidth,t.height=t.cropHandler.offsetHeight):(t.width=t.image.offsetWidth,t.height=t.image.offsetHeight),t.j.e.on(this.j.ow,`mousemove`,this.onGlobalMouseMove).one(this.j.ow,`mouseup`,this.onGlobalMouseUp)}onGlobalMouseUp(e){this.clicked&&(this.clicked=!1,e.stopImmediatePropagation(),this.j.e.off(this.j.ow,`mousemove`,this.onGlobalMouseMove))}onGlobalMouseMove(e){let t=this;if(!t.clicked)return;let{widthInput:n,heightInput:r}=tk(this.editor);t.diff_x=e.clientX-t.start_x,t.diff_y=e.clientY-t.start_y,t.activeTab===BM.resize&&t.resizeUseRatio||t.activeTab===BM.crop&&t.cropUseRatio?t.diff_x?(t.new_w=t.width+t.diff_x,t.new_h=Math.round(t.new_w/t.ratio)):(t.new_h=t.height+t.diff_y,t.new_w=Math.round(t.new_h*t.ratio)):(t.new_w=t.width+t.diff_x,t.new_h=t.height+t.diff_y),t.activeTab===BM.resize?(t.new_w>t.o.resizeMinWidth&&(W(t.image,`width`,t.new_w+`px`),n.value=t.new_w.toString()),t.new_h>t.o.resizeMinHeight&&(W(t.image,`height`,t.new_h+`px`),r.value=t.new_h.toString()),this.j.e.fire(t.resizeHandler,`updatesize`)):(t.target===t.cropHandler?(t.top_x+t.diff_x+t.cropHandler.offsetWidth>t.cropImage.offsetWidth&&(t.diff_x=t.cropImage.offsetWidth-t.top_x-t.cropHandler.offsetWidth),W(t.cropHandler,`left`,t.top_x+t.diff_x),t.top_y+t.diff_y+t.cropHandler.offsetHeight>t.cropImage.offsetHeight&&(t.diff_y=t.cropImage.offsetHeight-t.top_y-t.cropHandler.offsetHeight),W(t.cropHandler,`top`,t.top_y+t.diff_y)):(t.top_x+t.new_w>
185t.cropImage.offsetWidth&&(t.new_w=t.cropImage.offsetWidth-t.top_x),t.top_y+t.new_h>t.cropImage.offsetHeight&&(t.new_h=t.cropImage.offsetHeight-t.top_y),W(t.cropHandler,{width:t.new_w,height:t.new_h})),this.j.e.fire(t.cropHandler,`updatesize`))}constructor(e){super(e),this.resizeUseRatio=!0,this.cropUseRatio=!0,this.clicked=!1,this.start_x=0,this.start_y=0,this.top_x=0,this.top_y=0,this.width=0,this.height=0,this.activeTab=BM.resize,this.naturalWidth=0,this.naturalHeight=0,this.ratio=0,this.new_h=0,this.new_w=0,this.diff_x=0,this.diff_y=0,this.cropBox={x:0,y:0,w:0,h:0},this.resizeBox={w:0,h:0},this.calcCropBox=()=>{let e=this.crop_box.parentNode,t=e.offsetWidth*.8,n=e.offsetHeight*.8,r=t,i=n,{naturalWidth:a,naturalHeight:o}=this;t>a&&n>o?(r=a,i=o):this.ratio>t/n?(r=t,i=t/a*o):(r=n/o*a,i=n),W(this.crop_box,{width:r,height:i})},this.showCrop=()=>{if(!this.cropImage)return;this.calcCropBox();let e=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=RM.calcValueByPercent(e,this.o.cropDefaultWidth);let t=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.cropUseRatio?this.new_h=this.new_w/this.ratio:this.new_h=RM.calcValueByPercent(t,this.o.cropDefaultHeight),W(this.cropHandler,{backgroundImage:`url(`+G(this.cropImage,`src`)+`)`,width:this.new_w,height:this.new_h,left:e/2-this.new_w/2,top:t/2-this.new_h/2}),this.j.e.fire(this.cropHandler,`updatesize`)},this.updateCropBox=()=>{if(!this.cropImage)return;let e=this.cropImage.offsetWidth/this.naturalWidth,t=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=W(this.cropHandler,`left`)/e,this.cropBox.y=W(this.cropHandler,`top`)/t,this.cropBox.w=this.cropHandler.offsetWidth/e,this.cropBox.h=this.cropHandler.offsetHeight/t,this.sizes.textContent=this.cropBox.w.toFixed(0)+`x`+this.cropBox.h.toFixed(0)},this.updateResizeBox=()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight},this.setHandlers=()=>{let e=this,{widthInput:t,heightInput:n}=tk(this.editor);e.j.e.on([e.editor.querySelector(`.jodit_bottomright`),e.cropHandler],`mousedown.${zM}`,this.onResizeHandleMouseDown).on(this.j.ow,`resize.${zM}`,()=>{this.j.e.fire(e.resizeHandler,`updatesize`),e.showCrop(),this.j.e.fire(e.cropHandler,`updatesize`)}),e.j.e.on(nD(this.editor.querySelectorAll(`.${zM}__slider-title`)),`click`,this.onTitleModeClick).on([t,n],`input`,this.onChangeSizeInput);let{keepAspectRatioResize:r,keepAspectRatioCrop:i}=tk(this.editor);r&&r.addEventListener(`change`,()=>{this.resizeUseRatio=r.checked}),i&&i.addEventListener(`change`,()=>{this.cropUseRatio=i.checked}),e.j.e.on(e.resizeHandler,`updatesize`,()=>{W(e.resizeHandler,{top:0,left:0,width:e.image.offsetWidth||e.naturalWidth,height:e.image.offsetHeight||e.naturalHeight}),this.updateResizeBox()}).on(e.cropHandler,`updatesize`,()=>{if(!e.cropImage)return;let t=W(e.cropHandler,`left`),n=W(e.cropHandler,`top`),r=e.cropHandler.offsetWidth,i=e.cropHandler.offsetHeight;t<0&&(t=0),n<0&&(n=0),t+r>e.cropImage.offsetWidth&&(r=e.cropImage.offsetWidth-t,e.cropUseRatio&&(i=r/e.ratio)),n+i>e.cropImage.offsetHeight&&(i=e.cropImage.offsetHeight-n,e.cropUseRatio&&(r=i*e.ratio)),W(e.cropHandler,{width:r,height:i,left:t,top:n,backgroundPosition:-t-1+`px `+(-n-1)+`px`,backgroundSize:e.cropImage.offsetWidth+`px `+e.cropImage.offsetHeight+`px`}),e.updateCropBox()}),Object.values(e.buttons).forEach(r=>{r.onAction(()=>{let i={action:e.activeTab,box:e.activeTab===BM.resize?e.resizeBox:e.cropBox};switch(r){case e.buttons.saveas:e.j.prompt(`Enter new name`,`Save in new file`,t=>{if(!aD(t))return e.j.alert(`The name should not be empty`),!1;e.j.e.fire(`afterImageEditorSave`,i,t),e.onSave(t,i,e.hide,t=>{e.j.alert(t.message)})});break;case e.buttons.save:e.j.e.fire(`afterImageEditorSave`,i),e.onSave(void 0,i,e.hide,t=>{e.j.alert(t.message)});break;case e.buttons.reset:e.activeTab===BM.resize?(W(e.image,{width:null,height:null}),t.value=e.naturalWidth.toString(),n.value=e.naturalHeight.toString(),e.j.e.fire(e.resizeHandler,`updatesize`)):e.showCrop();break}})})},this.options=e&&e.o&&e.o.imageeditor?e.o.imageeditor:J.defaultOptions.imageeditor;let t=this.options;this.resizeUseRatio=t.resizeUseRatio,this.cropUseRatio=t.cropUseRatio,this.buttons={reset:GA(this.j,`update`,`Reset`),save:GA(this.j,`save`,`Save`),saveas:GA(this.j,{icon:{name:`save`},name:`save-as`,text:`Save as ...`})},this.activeTab=t.resize?BM.resize:BM.crop,this.editor=IM(this.j,this.options);let{resizeBox:n,cropBox:r}=tk(this.editor);this.resize_box=n,this.crop_box=r,this.sizes=this.editor.querySelector(`.${zM}__area.${zM}__area_crop .jodit-image-editor__sizes`),this.resizeHandler=this.editor.querySelector(`.${zM}__resizer`),this.cropHandler=this.editor.querySelector(`.${zM}__croper`),this._dialog=this.j.dlg({buttons:[`fullsize`,`dialog.close`]}),this._dialog.setContent(this.editor),this._dialog.setSize(this.o.width,this.o.height),this._dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}destruct(){this.isDestructed||(this._dialog&&!this._dialog.isInDestruct&&this._dialog.destruct(),K.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,`mousemove`,this.onGlobalMouseMove).off(this.j.ow,`mouseup`,this.onGlobalMouseUp).off(this.ow,`.${zM}`).off(`.${zM}`),super.destruct())}};
185VM.calcValueByPercent=(e,t)=>{let n=t.toString(),r=parseFloat(e.toString()),i;return i=/^[-+]?[0-9]+(px)?$/.exec(n),i?parseInt(n,10):(i=/^([-+]?[0-9.]+)%$/.exec(n),i?Math.round(r*(parseFloat(i[1])/100)):r||0)},LM([H],VM.prototype,`hide`,null),LM([H],VM.prototype,`open`,null),LM([H],VM.prototype,`onTitleModeClick`,null),LM([xA(),H],VM.prototype,`onChangeSizeInput`,null),LM([H],VM.prototype,`onResizeHandleMouseDown`,null),LM([H],VM.prototype,`onGlobalMouseUp`,null),LM([SA(10)],VM.prototype,`onGlobalMouseMove`,null),VM=RM=LM([uO],VM);function HM(e,t,n,r,i,a){return this.getInstance(`ImageEditor`,this.o).open(e,(e,o,s,c)=>{if(o.action===`saved`){s(),i&&i(o.newPath);return}MD(o.action===`resize`?this.dataProvider.resize:this.dataProvider.crop,n,r,t,e,o.box).then(e=>{e&&(s(),i&&i(typeof e==`string`?e:void 0))}).catch(e=>{c(e),a&&a(e)})})}var UM=`jodit-file-browser-preview`,WM=(e=`next`,t=`right`)=>`<div class="${UM}__navigation ${UM}__navigation_arrow_${e}">`+RA.get(`angle-`+t)+`</a>`,GM=e=>{if(!e.o.contextMenu)return()=>{};let t=kM(e);return n=>{let r=SM(n.target,e.container);if(!r)return;let i=r,a=e.options,o=e=>G(i,e)||``;return e.async.setTimeout(()=>{let s=CM(r,xM(e));s&&(e.state.activeElements=[s],t.show(n.clientX,n.clientY,[o(`data-is-file`)!==`1`&&a.editImage&&(e.dataProvider.canI(`ImageResize`)||e.dataProvider.canI(`ImageCrop`))?{icon:`pencil`,title:`Edit`,exec:()=>HM.call(e,o(`href`),o(`data-name`),o(`data-path`),o(`data-source`))}:!1,e.dataProvider.canI(`FileRename`)?{icon:`italic`,title:`Rename`,exec:()=>{e.e.fire(`fileRename.filebrowser`,o(`data-name`),o(`data-path`),o(`data-source`))}}:!1,e.dataProvider.canI(`FileRemove`)?{icon:`bin`,title:`Delete`,exec:async()=>{try{await AM(e,o(`data-name`),o(`data-source`))}catch(t){return e.status(t)}return e.state.activeElements=[],yM(e).catch(e.status)}}:!1,a.preview?{icon:`eye`,title:`Preview`,exec:()=>{let t=e.dlg({buttons:[`fullsize`,`dialog.close`]}),n=e.c.div(UM,`<div class="jodit-icon_loader"></div>`),r=e.c.div(`jodit-file-browser-preview__box`),s=e.c.fromHTML(WM()),c=e.c.fromHTML(WM(`prev`,`left`)),l=o=>{let l=e.c.element(`img`);l.setAttribute(`src`,o);let u=()=>{var o;e.isInDestruct||(e.e.off(l,`load`),K.detach(n),a.showPreviewNavigation&&(K.prevWithClass(i,e.files.getFullElName(`item`))&&n.appendChild(c),K.nextWithClass(i,e.files.getFullElName(`item`))&&n.appendChild(s)),n.appendChild(r),r.appendChild(l),t.setPosition(),(o=e?.events)==null||o.fire(`previewOpenedAndLoaded`))};e.e.on(l,`load`,u),l.complete&&u()};e.e.on([s,c],`click`,function(){if(i=this===s?K.nextWithClass(i,e.files.getFullElName(`item`)):K.prevWithClass(i,e.files.getFullElName(`item`)),!i)throw OD(`Need element`);K.detach(n),K.detach(r),n.innerHTML=`<div class="jodit-icon_loader"></div>`,l(o(`href`))}),e.e.on(`beforeDestruct`,()=>{t.destruct()}),t.container.classList.add(`jodit-file-browser-preview__dialog`),t.setContent(n),t.setPosition(),t.open(),l(o(`href`)),e.events.on(`beforeDestruct`,()=>{t.destruct()}).fire(`previewOpened`)}}:!1,{icon:`upload`,title:`Download`,exec:()=>
185{let t=o(`href`);t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on(`beforeClose`,()=>{t.close()}).on(`beforeDestruct`,()=>t.destruct()),n.stopPropagation(),n.preventDefault(),!1}};function KM(){let e=!1,t=xM(this),n=this;n.e.on(n.tree.container,`dragstart`,t=>{let r=SM(t.target,n.container);r&&n.o.moveFolder&&(e=r)}).on(n.tree.container,`drop`,t=>{if((n.o.moveFile||n.o.moveFolder)&&e){let r=G(e,`-path`)||``;if(!n.o.moveFolder&&e.classList.contains(this.tree.getFullElName(`item`))||e.classList.contains(this.files.getFullElName(`item`))&&(r+=G(e,`-name`),!n.o.moveFile))return!1;let i=SM(t.target,n.container);if(!i)return;n.dataProvider.move(r,G(i,`-path`)||``,G(i,`-source`)||``,e.classList.contains(this.files.getFullElName(`item`))).then(()=>yM(this)).catch(n.status),e=!1}}).on(n.files.container,`contextmenu`,GM(n)).on(n.files.container,`click`,e=>{Ek(e)||(this.state.activeElements=[])}).on(n.files.container,`click`,e=>{let r=SM(e.target,n.container);if(!r)return;let i=CM(r,t);if(i)return Ek(e)?n.state.activeElements=[...n.state.activeElements,i]:n.state.activeElements=[i],e.stopPropagation(),!1}).on(n.files.container,`dragstart`,t=>{if(n.o.moveFile){let r=SM(t.target,n.container);if(!r)return;e=r}}).on(n.container,`drop`,e=>e.preventDefault())}function qM(){let e=this.state,t=this.dataProvider,n=this;n.e.on(`view.filebrowser`,t=>{t!==e.view&&(e.view=t)}).on(`sort.filebrowser`,t=>{t!==e.sortBy&&(e.sortBy=t,vM(n))}).on(`filter.filebrowser`,t=>{t!==e.filterWord&&(e.filterWord=t,vM(n))}).on(`openFolder.filebrowser`,e=>{let t;t=e.name===`..`?e.path.split(`/`).filter(e=>e.length).slice(0,-1).join(`/`):tA(e.path,e.name),n.state.currentPath=t,n.state.currentSource=e.name===`.`?EM:e.source}).on(`removeFolder.filebrowser`,e=>{n.confirm(`Are you sure?`,`Delete`,r=>{r&&t.folderRemove(e.path,e.name,e.source).then(e=>(n.status(e,!0),yM(n))).catch(n.status)})}).on(`renameFolder.filebrowser`,e=>{n.prompt(`Enter new name`,`Rename`,r=>{if(!rO(r))return n.status(n.i18n(`Enter new name`)),!1;t.folderRename(e.path,e.name,r,e.source).then(e=>(n.state.activeElements=[],n.status(e,!0),yM(n))).catch(n.status)},`type name`,e.name)}).on(`addFolder.filebrowser`,e=>{n.prompt(`Enter Directory name`,`Create directory`,r=>{t.createFolder(r,e.path,e.source).then(()=>yM(n)).catch(n.status)},`type dir name`)}).on(`fileRemove.filebrowser`,()=>{n.state.activeElements.length&&n.confirm(`Are you sure?`,``,e=>{if(e){let e=[];n.state.activeElements.forEach(t=>{e.push(AM(n,t.file||t.name||``,t.sourceName))}),n.state.activeElements=[],Promise.all(e).then(()=>yM(n).catch(n.status),n.status)}})}).on(`edit.filebrowser`,()=>{if(n.state.activeElements.length===1){let[e]=this.state.activeElements;HM.call(n,e.fileURL,e.file||``,e.path,e.sourceName)}}).on(`fileRename.filebrowser`,(e,r,i)=>{n.state.activeElements.length===1&&n.prompt(`Enter new name`,`Rename`,a=>{if(!rO(a))return n.status(n.i18n(`Enter new name`)),!1;t.fileRename(r,e,a,i).then(e=>{n.state.activeElements=[],n.status(e,!0),vM(n)}).catch(n.status)},`type name`,e)}).on(`update.filebrowser`,()=>{yM(this).then(this.status,this.status)})}var JM=`default`;function YM(){let e=xM(this),{state:t,files:n,create:r,options:i}=this,a=t=>{let n=t.uniqueHashKey;if(e[n])return e[n].elm;let a=r.fromHTML(i.getThumbTemplate.call(this,t,t.source,t.sourceName.toString()));return a.dataset.key=n,e[n]={item:t,elm:a},e[n].elm};t.on([`change.currentPath`,`change.currentSource`],this.async.debounce(()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeLastOpenedFolder&&this.storage.set(`currentPath`,this.state.currentPath).set(`currentSource`,this.state.currentSource),yM(this).catch(this.status)},this.defaultTimeout)).on(`beforeChange.activeElements`,()=>{t.activeElements.forEach(t=>{let{elm:r}=e[t.uniqueHashKey];r&&r.classList.remove(n.getFullElName(`item`,`active`,!0))})}).on(`change.activeElements`,()=>{this.e.fire(`changeSelection`),t.activeElements.forEach(t=>{let{elm:r}=e[t.uniqueHashKey];r&&r.classList.add(n.getFullElName(`item`,`active`,!0))})}).on(`change.view`,()=>{n.setMod(`view`,t.view),this.o.saveStateInStorage&&this.o.saveStateInStorage.storeView&&this.storage.set(`view`,t.view)}).on(`change.sortBy`,()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeSortBy&&this.storage.set(`sortBy`,t.sortBy)}).on(`change.elements`,this.async.debounce(()=>
185{K.detach(n.container),t.elements.length?t.elements.forEach(e=>{this.files.container.appendChild(a(e))}):n.container.appendChild(r.div(this.componentName+`_no-files_true`,this.i18n(`There are no files`)))},this.defaultTimeout)).on(`change.sources`,this.async.debounce(()=>{K.detach(this.tree.container),t.sources.forEach(e=>{let t=e.name;if(t&&t!==JM&&this.tree.container.appendChild(r.div(this.tree.getFullElName(`source-title`),t)),e.folders.forEach(n=>{let a=r.a(this.tree.getFullElName(`item`),{draggable:`draggable`,href:`#`,"data-path":tA(e.path,n+`/`),"data-name":n,"data-source":t,"data-source-path":e.path},r.span(this.tree.getFullElName(`item-title`),n)),o=r=>i=>{this.e.fire(`${r}.filebrowser`,{name:n,path:tA(e.path+`/`),source:t}),i.stopPropagation(),i.preventDefault()};if(this.e.on(a,`click`,o(`openFolder`)),this.tree.container.appendChild(a),!(n===`..`||n===`.`)){if(i.renameFolder&&this.dataProvider.canI(`FolderRename`)){let e=GA(this,{icon:{name:`pencil`},name:`rename`,tooltip:`Rename`,size:`tiny`});e.onAction(o(`renameFolder`)),a.appendChild(e.container)}if(i.deleteFolder&&this.dataProvider.canI(`FolderRemove`)){let e=GA(this,{icon:{name:`cancel`},name:`remove`,tooltip:`Delete`,size:`tiny`});e.onAction(o(`removeFolder`)),a.appendChild(e.container)}}}),i.createNewFolder&&this.dataProvider.canI(`FolderCreate`)){let n=GA(this,`plus`,`Add folder`,`secondary`);n.onAction(()=>{this.e.fire(`addFolder`,{path:tA(e.path+`/`),source:t})}),this.tree.append(n)}})},this.defaultTimeout))}var XM=class extends JA{className(){return`FileBrowserFiles`}},ZM=class extends JA{className(){return`FileBrowserTree`}},QM=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},$M=class extends sM{className(){return`FileBrowser`}get dataProvider(){return OM(this,this.options)}onSelect(e){return()=>{if(this.state.activeElements.length){let t=[],n=[];this.state.activeElements.forEach(e=>{let r=e.fileURL;r&&(t.push(r),n.push(e.isImage||!1))}),this.close();let r={baseurl:``,files:t,isImages:n};V(e)&&e(r),this.close()}return!1}}get _dialog(){let e=this.dlg({minWidth:Math.min(700,screen.width),minHeight:300,buttons:this.o.headerButtons??[`fullsize`,`dialog.close`]});return[`beforeClose`,`afterClose`,`beforeOpen`].forEach(t=>e.events.on(e,t,()=>this.e.fire(t))),e.setSize(this.o.width,this.o.height),e}get storage(){return Jj.makeStorage(!!this.o.saveStateInStorage,this.componentName)}get isOpened(){return this._dialog.isOpened&&this.browser.style.display!==`none`}status(e,t){!e||UD(e)||(U(e)||(e=e.message),!(!U(e)||!aD(e).length)&&this.message.message(e,t?`success`:`error`,this.o.howLongShowMsg))}open(e=this.o.defaultCallback,t=!1){return this.state.onlyImages=t,this.async.promise((t,n)=>{var r;if(!this.o.items||!this.o.items.url)throw OD(`Need set options.filebrowser.ajax.url`);let i=0;this.e.off(this.files.container,`dblclick`).on(this.files.container,`dblclick`,this.onSelect(e)).on(this.files.container,`touchstart`,()=>{let t=new Date().getTime();t-i<300&&this.onSelect(e)(),i=t}).off(`select.filebrowser`).on(`select.filebrowser`,this.onSelect(e));let a=this.c.div();(r=this.toolbar)==null||r.appendTo(a),this.__updateToolbarButtons(),this._dialog.open(this.browser,a),this.e.fire(`sort.filebrowser`,this.state.sortBy),yM(this).then(t,n).finally(()=>{var e;this.isInDestruct||(e=this===null||this===void 0?void 0:this.e)==null||e.fire(`fileBrowserReady.filebrowser`)})}).catch(e=>{UD(e)})}__getButtons(){return(this.o.buttons??[]).filter(e=>{if(!U(e))return!0;switch(e){case`filebrowser.upload`:return this.dataProvider.canI(`FileUpload`);case`filebrowser.edit`:return this.dataProvider.canI(`ImageResize`)||this.dataProvider.canI(`ImageCrop`);case`filebrowser.remove`:return this.dataProvider.canI(`FileRemove`)}return!0})}initUploader(e){let t=this,n=bk(e?.options?.uploader||{},J.defaultOptions.uploader),r=()=>vM(this);t.uploader=t.getInstance(`Uploader`,n),t.uploader.setPath(t.state.currentPath).setSource(t.state.currentSource).bind(t.browser,r,t.errorHandler),this.state.on([`change.currentPath`,`change.currentSource`],()=>{this.uploader.setPath(this.state.currentPath).setSource(this.state.currentSource)}),t.e.on(`bindUploader.filebrowser`,e=>{t.uploader.bind(e,r,t.errorHandler)})}constructor(e){super(e),this.browser=this.c.div(this.componentName),this.status_line=this.c.div(this.getFullElName(`status`)),this.tree=new ZM(this),this.files=new XM(this),this.state=jA({currentPath:``,currentSource:EM,currentBaseUrl:``,activeElements:[],elements:[],sources:[],view:`tiles`,sortBy:`changed-desc`,filterWord:``,onlyImages:!1}),this.errorHandler=e=>{UD(e)||(e instanceof Error?this.status(this.i18n(e.message)):this.status(this.dataProvider.getMessage(e)))},this.close=()=>{this._dialog.close()},this.__prevButtons=[],this.attachEvents(e);let t=this;t.options=bk(e||{},J.defaultOptions.filebrowser),t.browser.component=this,t.container=t.browser,t.o.showFoldersPanel&&t.browser.appendChild(t.tree.container),t.browser.appendChild(t.files.container),t.browser.appendChild(t.status_line),qM.call(t),KM.call(t),YM.call(t),[`getLocalFileByUrl`,`crop`,`resize`,`create`,`fileMove`,`folderMove`,`fileRename`,`folderRename`,`fileRemove`,`folderRemove`,`folder`,`items`,`permissions`].forEach(e
185=>{this.options[e]!=null&&(this.options[e]=bk(this.options[e],this.o.ajax))});let{storeView:n,storeSortBy:r,storeLastOpenedFolder:i}=this.o.saveStateInStorage||{storeLastOpenedFolder:!1,storeView:!1,storeSortBy:!1},a=n&&this.storage.get(`view`);a&&this.o.view==null?t.state.view=a===`list`?`list`:`tiles`:t.state.view=t.o.view===`list`?`list`:`tiles`,t.files.setMod(`view`,t.state.view);let o=r&&t.storage.get(`sortBy`);if(o){let e=o.split(`-`);t.state.sortBy=[`changed`,`name`,`size`].includes(e[0])?o:`changed-desc`}else t.state.sortBy=t.o.sortBy||`changed-desc`;if(i){let e=t.storage.get(`currentPath`),n=t.storage.get(`currentSource`);t.state.currentPath=e??``,t.state.currentSource=n??``}t.initUploader(t),t.setStatus(JE.ready)}destruct(){var e;this.isInDestruct||((e=iO(this,`_dialog`))==null||e.destruct(),super.destruct(),this.events&&this.e.off(`.filebrowser`),this.uploader&&this.uploader.destruct())}__updateToolbarButtons(){var e;let t=this.__getButtons();eN(this.__prevButtons,t)||(this.__prevButtons=t,(e=this.toolbar)==null||e.build(t))}};QM([aO],$M.prototype,`dataProvider`,null),QM([aO],$M.prototype,`_dialog`,null),QM([aO],$M.prototype,`storage`,null),QM([H],$M.prototype,`status`,null),QM([H],$M.prototype,`open`,null),QM([Y(`dataProvider:changePermissions`)],$M.prototype,`__updateToolbarButtons`,null),$M=QM([CA(mM)],$M);function eN(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var tN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},nN=class extends bA{className(){return`Plugin`}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on(`afterPluginSystemInit`,this.__afterPluginSystemInit).on(`afterInit`,this.__afterInit).on(`beforeDestruct`,this.__beforeDestruct)}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&QD(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(JE.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire(`rebuildToolbar`))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off(`afterPluginSystemInit`,this.__afterPluginSystemInit).off(`afterInit`,this.__afterInit).off(`beforeDestruct`,this.destruct),this.setStatus(JE.beforeDestruct),!this.__inited)return super.destruct();QD(t)&&((e=this.buttons)==null||e.forEach(e=>{t?.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}};nN.requires=[],tN([H],nN.prototype,`__afterPluginSystemInit`,null),tN([H],nN.prototype,`__afterInit`,null),tN([H],nN.prototype,`__beforeDestruct`,null);var rN=class{undo(){this.history.snapshot.restore(this.oldValue)}redo(){this.history.snapshot.restore(this.newValue)}constructor(e,t,n,r){this.oldValue=e,this.newValue=t,this.history=n,this.tick=r}},iN=class e extends bA{constructor(){super(...arguments),this.__isBlocked=!1,this.__levelOfTransaction=0}className(){return`Snapshot`}static equal(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)}static countNodesBeforeInParent(e){if(!e.parentNode)return 0;let t=e.parentNode.childNodes,n=0,r=null;for(let i=0;i<t.length;i+=1){if(r&&!this.isIgnoredNode(t[i])&&!(K.isText(r)&&K.isText(t[i]))&&(n+=1),t[i]===e)return n;r=t[i]}return 0}static strokeOffset(e,t){for(;K.isText(e);)e=e.previousSibling,K.isText(e)&&e.nodeValue&&(t+=e.nodeValue.length);return t}calcHierarchyLadder(t){let n=[];if(!t||!t.parentNode||!K.isOrContains(this.j.editor,t))return[];for(;t&&t!==this.j.editor;)t&&!e.isIgnoredNode(t)&&n.push(e.countNodesBeforeInParent(t)),t=t.parentNode;return n.reverse()}getElementByLadder(e){let t=this.j.editor,n;for(n=0;t&&n<e.length;n+=1)t=t.childNodes[e[n]];return t}get isBlocked(){return this.__isBlocked}__block(e){this.__isBlocked=e}transaction(e){this.__block(!0),this.__levelOfTransaction+=1;try{e()}catch{}finally{--this.__levelOfTransaction,this.__levelOfTransaction===0&&this.__block(!1)}}make(){let t={html:``,range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};t.html=this.__getCleanedEditorValue(this.j.editor);let n=this.j.s.sel;if(n&&n.rangeCount){let r=n.getRangeAt(0),i=this.calcHierarchyLadder(r.startContainer),a=this.calcHierarchyLadder(r.endContainer),o=e.strokeOffset(r.startContainer,r.startOffset),s=e.strokeOffset(r.endContainer,r.endOffset);!i.length&&r.startContainer!==this.j.editor&&(o=0),!a.length&&r.endContainer!==this.j.editor&&(s=0),t.range={startContainer:i,startOffset:o,endContainer:a,endOffset:s}}return t}restore(e){this.transaction(()=>{let t=this.storeScrollState();this.__getCleanedEditorValue(this.j.editor)!==e.html&&(this.j.value=e.html),this.restoreOnlySelection(e),this.restoreScrollState(t)})}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(e){let{j:t}=this,{ow:n}=t;n.scrollTo(n.scrollX,e[0]),t.editor.scrollTop=e[1]}restoreOnlySelection(e){try{if(e.range){let t=this.j.ed.createRange();t.setStart(this.getElementByLadder(e.range.startContainer),e.range.startOffset),t.setEnd(this.getElementByLadder(e.range.endContainer),e.range.endOffset),this.j.s.selectRange(t)}}catch{this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild)}}destruct(){this.__block(!1),super.destruct()}static isIgnoredNode(e){return K.isText(e)&&!e.nodeValue||K.isTemporary(e)}__getCleanedEditorValue(e){let t=e.cloneNode(!0);return K.temporaryList(t).forEach(K.unwrap),t.innerHTML}},aN=class{constructor(e){this.size=e,this.commands=[],this.stackPosition=-1}get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),--this.stackPosition)}replace(e){this.commands[this.stackPosition]=e}current(){return this.commands[this.stackPosition]}undo(){return this.canUndo()?(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),--this.stackPosition,!0):!1}redo(){return this.canRedo()?(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0):!1}canUndo(){return this.stackPosition>=0}canRedo(){return this.stackPosition<this.commands.length-1}},oN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};J.prototype.history={enable:!0,maxHistoryLength:1/0,timeout:1e3};var sN=class extends bA{className(){return`History`}redo(){this.__stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canRedo(){return this.__stack.canRedo()}undo(){this.__stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canUndo(){return this.__stack.canUndo()}clear(){this.startValue=this.snapshot.make(),this.__stack.clear(),this.fireChangeStack()}get length(){return this.__stack.length}get startValue(){return this.__startValue}set startValue(e){this.__startValue=e}constructor(e,t=new aN(e.o.history.maxHistoryLength),n=new iN(e)){super(e),this.updateTick=0,this.__stack=t,this.snapshot=n,e.o.history.enable&&e.e.on(`afterAddPlace.history`,()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),e.events.on(`internalChange internalUpdate`,()=>{this.startValue=this.snapshot.make()}).on(e.editor,[`changeSelection`,`selectionstart`,`selectionchange`,`mousedown`,`mouseup`,`keydown`,`keyup`].map(e=>e+`.history`).join(` `),()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())}).on(this,`change.history`,this.onChange))})}__upTick(){this.updateTick+=1}onChange(){this.__processChanges()}__processChanges(){this.snapshot.isBlocked||!this.j.o.history.enable||this.updateStack()}updateStack(e=!1){let t=this.snapshot.make();if(!iN.equal(t,this.startValue)){let n=new rN(this.startValue,t,this,this.updateTick);if(e){let e=this.__stack.current();e&&this.updateTick===e.tick&&this.__stack.replace(n)}else this.__stack.push(n);this.startValue=t,this.fireChangeStack()}}fireChangeStack(){var e;this.j&&!this.j.isInDestruct&&((e=this.j.events)==null||e.fire(`changeStack`))}destruct(){this.isInDestruct||(this.j.events&&this.j.e.off(`.history`),this.snapshot.destruct(),super.destruct())}};oN([xA()],sN.prototype,`onChange`,null);var cN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lN=class extends bA{className(){return`StatusBar`}hide(){this.container.classList.add(`jodit_hidden`)}show(){this.container.classList.remove(`jodit_hidden`)}get isShown(){return!this.container.classList.contains(`jodit_hidden`)}
185getHeight(){return this.container?.offsetHeight??0}findEmpty(e=!1){let t=this.getElms(e?`item-right`:`item`);for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){var n;let r=this.findEmpty(t)||this.j.c.div(this.getFullElName(`item`));t&&r.classList.add(this.getFullElName(`item-right`)),r.appendChild(e),(n=this.container)==null||n.appendChild(r),this.j.o.statusbar&&this.show(),this.j.e.fire(`resize`)}constructor(e,t){super(e),this.target=t,this.mods={},this.container=e.c.div(`jodit-status-bar`),t.appendChild(this.container),this.hide()}destruct(){this.isInDestruct||(this.setStatus(JE.beforeDestruct),K.safeRemove(this.container),super.destruct())}};lN=cN([uO,CA(LA,IA)],lN);var uN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},dN=new WeakMap,fN=class e extends bA{constructor(){super(...arguments),this.selected=new Set}className(){return`Table`}__recalculateStyles(){let t=YO(this.j,e,`style`,!0),n=[];this.selected.forEach(e=>{let t=nk(e);t&&n.push(t)}),t.innerHTML=n.length?n.join(`,`)+`{${this.jodit.options.table.selectionCellStyle}}`:``}addSelection(t){this.selected.add(t),this.__recalculateStyles();let n=K.closest(t,`table`,this.j.editor);if(n){let r=e.__selectedByTable.get(n)||new Set;r.add(t),e.__selectedByTable.set(n,r)}}removeSelection(t){this.selected.delete(t),this.__recalculateStyles();let n=K.closest(t,`table`,this.j.editor);if(n){let r=e.__selectedByTable.get(n);r&&(r.delete(t),r.size||e.__selectedByTable.delete(n))}}getAllSelectedCells(){return nD(this.selected)}static __getSelectedCellsByTable(t){let n=e.__selectedByTable.get(t);return n?nD(n):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(t){return e.__getRowsCount(t)}static __getColumnsCount(t){return e.__formalMatrix(t).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(t){return e.__getColumnsCount(t)}static __formalMatrix(e,t){let n=[[]],r=nD(e.rows),i=(e,r)=>{n[r]===void 0&&(n[r]=[]);let i=e.colSpan,a=e.rowSpan,o,s,c=0;for(;n[r][c];)c+=1;for(s=0;s<a;s+=1)for(o=0;o<i;o+=1){if(n[r+s]===void 0&&(n[r+s]=[]),t&&t(e,r+s,c+o,i,a)===!1)return!1;n[r+s][c+o]=e}};for(let e=0;e<r.length;e+=1){let t=nD(r[e].cells);for(let r=0;r<t.length;r+=1)if(i(t[r],e)===!1)return n}return n}formalMatrix(t,n){return e.__formalMatrix(t,n)}static __formalCoordinate(t,n,r=!1){let i=0,a=0,o=1,s=1;return e.__formalMatrix(t,(e,t,c,l,u)=>{if(n===e)return i=t,a=c,o=l||1,s=u||1,r&&(a+=(l||1)-1,i+=(u||1)-1),!1}),[i,a,o,s]}formalCoordinate(t,n,r=!1){return e.__formalCoordinate(t,n,r)}static __appendRow(t,n,r,i){let a;if(n)a=n.cloneNode(!0),$O(`td,th`,n).forEach(e=>{let t=G(e,`rowspan`);if(t&&parseInt(t,10)>1){let n=parseInt(t,10)-1;G(e,`rowspan`,n>1?n:null)}}
185),$O(`td,th`,a).forEach(e=>{e.innerHTML=``});else{let n=e.__getColumnsCount(t);a=i.element(`tr`);for(let e=0;e<n;e+=1)a.appendChild(i.element(`td`))}r&&n&&n.nextSibling?n.parentNode&&n.parentNode.insertBefore(a,n.nextSibling):!r&&n?n.parentNode&&n.parentNode.insertBefore(a,n):(t.getElementsByTagName(`tbody`)?.[0]||t).appendChild(a)}appendRow(t,n,r){return e.__appendRow(t,n,r,this.j.createInside)}static __removeRow(t,n){let r=e.__formalMatrix(t),i,a=t.rows[n];r[n].forEach((e,o)=>{if(i=!1,n-1>=0&&r[n-1][o]===e)i=!0;else if(r[n+1]&&r[n+1][o]===e){if(e.parentNode===a&&e.parentNode.nextSibling){i=!0;let a=o+1;for(;r[n+1][a]===e;)a+=1;let s=K.next(e.parentNode,e=>K.isTag(e,`tr`),t);if(s){let t=null;for(let e=a;e<r[n+1].length;e+=1){let i=r[n+1][e];if(i&&i.parentNode===s){t=i;break}}t?s.insertBefore(e,t):s.appendChild(e)}}}else K.safeRemove(e);if(i&&(e.parentNode===a||e!==r[n][o-1])){let t=e.rowSpan;G(e,`rowspan`,t-1>1?t-1:null)}}),K.safeRemove(a)}removeRow(t,n){return e.__removeRow(t,n)}appendColumn(t,n,r=!0){let i=e.__formalMatrix(t);if(!r&&K.isCell(n.previousElementSibling))return this.appendColumn(t,n.previousElementSibling,!0);let[,a]=e.__formalCoordinate(t,n,r),o=a,s=r?o+1:o;for(let e=0;e<i.length;){let t=i[e];if(t[o]!==t[s]||o===s){let e=this.j.createInside.element(`td`);r?K.after(t[o],e):K.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(t,n){let r=e.__formalMatrix(t),i;r.forEach((e,t)=>{let a=e[n];if(i=!1,n-1>=0&&r[t][n-1]===a||n+1<e.length&&r[t][n+1]===a?i=!0:K.safeRemove(a),i&&(t-1<0||a!==r[t-1][n])){let e=a.colSpan;G(a,`colspan`,e-1>1?(e-1).toString():null)}})}removeColumn(t,n){return e.__removeColumn(t,n)}static __getSelectedBound(t,n){let r=[[1/0,1/0],[0,0]],i=e.__formalMatrix(t),a,o,s;for(a=0;a<i.length;a+=1)for(o=0;i[a]&&o<i[a].length;o+=1)n.includes(i[a][o])&&(r[0][0]=Math.min(a,r[0][0]),r[0][1]=Math.min(o,r[0][1]),r[1][0]=Math.max(a,r[1][0]),r[1][1]=Math.max(o,r[1][1]));for(a=r[0][0];a<=r[1][0];a+=1)for(s=1,o=r[0][1];o<=r[1][1];o+=1){for(;i[a]&&i[a][o-s]&&i[a][o]===i[a][o-s];)r[0][1]=Math.min(o-s,r[0][1]),r[1][1]=Math.max(o-s,r[1][1]),s+=1;for(s=1;i[a]&&i[a][o+s]&&i[a][o]===i[a][o+s];)r[0][1]=Math.min(o+s,r[0][1]),r[1][1]=Math.max(o+s,r[1][1]),s+=1;for(s=1;i[a-s]&&i[a][o]===i[a-s][o];)r[0][0]=Math.min(a-s,r[0][0]),r[1][0]=Math.max(a-s,r[1][0]),s+=1;for(s=1;i[a+s]&&i[a][o]===i[a+s][o];)r[0][0]=Math.min(a+s,r[0][0]),r[1][0]=Math.max(a+s,r[1][0]),s+=1}return r}getSelectedBound(t,n){return e.__getSelectedBound(t,n)}static __normalizeTable(t){let n=[],r=e.__formalMatrix(t);e.__removeExtraColspans(r,n),e.__removeExtraRowspans(r,n);for(let e=0;e<r.length;e+=1)for(let t=0;t<r[e].length;t+=1)r[e][t]!==void 0&&(r[e][t].hasAttribute(`rowspan`)&&r[e][t].rowSpan===1&&G(r[e][t],`rowspan`,null),r[e][t].hasAttribute(`colspan`)&&r[e][t].colSpan===1&&G(r[e][t],`colspan`,null),r[e][t].hasAttribute(`class`)&&!G(r[e][t],`class`)&&G(r[e][t],`class`,null));e.__unmark(n)}static __removeExtraColspans(t,n){for(let r=0;r<t[0].length;r+=1){let i=1e6,a=!1;for(let e=0;e<t.length;e+=1)if(t[e][r]!==void 0){if(t[e][r].colSpan<2){a=!0;break}i=Math.min(i,t[e][r].colSpan)}if(!a)for(let a=0;a<t.length;a+=1)t[a][r]!==void 0&&e.__mark(t[a][r],`colspan`,t[a][r].colSpan-i+1,n)}}static __removeExtraRowspans(t,n){let r=0,i=0;for(r=0;r<t.length;r+=1){let a=1e6,o=!1;for(i=0;i<t[r].length;i+=1)if(t[r][i]!==void 0){if(t[r][i].rowSpan<2){o=!0;break}a=Math.min(a,t[r][i].rowSpan)}if(!o)for(i=0;i<t[r].length;i+=1)t[r][i]!==void 0&&e.__mark(t[r][i],`rowspan`,t[r][i].rowSpan-a+1,n)}}normalizeTable(t){return e.__normalizeTable(t)}static __mergeSelected(t,n){let r=[],i=e.__getSelectedBound(t,e.__getSelectedCellsByTable(t)),a=0,o=null,s=0,c,l=0,u=0,d=new Set,f=[];i&&(i[0][0]-i[1][0]||i[0][1]-i[1][1])&&(e.__formalMatrix(t,(t,p,m,h,g)=>{if(p>=i[0][0]&&p<=i[1][0]&&m>=i[0][1]&&m<=i[1][1]){if(c=t,d.has(c))return;d.add(c),p===i[0][0]&&c.style.width&&(a+=c.offsetWidth),aD(t.innerHTML.replace(/<br(\/)?>/g,``))!==``&&r.push(t.innerHTML),h>1&&(l+=h-1),g>1&&(u+=g-1),o?(e.__mark(c,`remove`,1,f),pN(n).removeSelection(c)):(o=t,s=m)}}),l=i[1][1]-i[0][1]+1,u=i[1][0]-i[0][0]+1,o&&(l>1&&e.__mark(o,`colspan`,l,f),u>1&&e.__mark(o,`rowspan`,u,f),a&&(e.__mark(o,`width`,(a/t.offsetWidth*100).toFixed(10)+`%`,f),s&&e.__setColumnWidthByDelta(t,s,0,!0,f)),o.innerHTML=r.join(`<br/>`),pN(n).addSelection(o),d.delete(o),e.__unmark(f),e.__normalizeTable(t),nD(t.rows).forEac
185h(e=>{e.cells.length||K.safeRemove(e)})))}mergeSelected(t){return e.__mergeSelected(t,this.j)}static __splitHorizontal(t,n){let r,i,a,o,s,c=[];e.__getSelectedCellsByTable(t).forEach(l=>{i=n.createInside.element(`td`),i.appendChild(n.createInside.element(`br`)),a=n.createInside.element(`tr`),r=e.__formalCoordinate(t,l),l.rowSpan<2?(e.__formalMatrix(t,(t,n,i)=>{r[0]===n&&r[1]!==i&&t!==l&&e.__mark(t,`rowspan`,t.rowSpan+1,c)}),K.after(K.closest(l,`tr`,t),a),a.appendChild(i)):(e.__mark(l,`rowspan`,l.rowSpan-1,c),e.__formalMatrix(t,(e,n,i)=>{n>r[0]&&n<r[0]+l.rowSpan&&r[1]>i&&e.parentNode.rowIndex===n&&(s=e),r[0]<n&&e===l&&(o=t.rows[n])}),s?K.after(s,i):o.insertBefore(i,o.firstChild)),l.colSpan>1&&e.__mark(i,`colspan`,l.colSpan,c),e.__unmark(c),pN(n).removeSelection(l)}),this.__normalizeTable(t)}splitHorizontal(t){return e.__splitHorizontal(t,this.j)}static __splitVertical(t,n){let r,i,a,o=[];e.__getSelectedCellsByTable(t).forEach(s=>{r=e.__formalCoordinate(t,s),s.colSpan<2?e.__formalMatrix(t,(t,n,i)=>{r[1]===i&&r[0]!==n&&t!==s&&e.__mark(t,`colspan`,t.colSpan+1,o)}):e.__mark(s,`colspan`,s.colSpan-1,o),i=n.createInside.element(`td`),i.appendChild(n.createInside.element(`br`)),s.rowSpan>1&&e.__mark(i,`rowspan`,s.rowSpan,o);let c=s.offsetWidth;K.after(s,i),a=c/t.offsetWidth/2,e.__mark(s,`width`,(a*100).toFixed(10)+`%`,o),e.__mark(i,`width`,(a*100).toFixed(10)+`%`,o),e.__unmark(o),pN(n).removeSelection(s)}),e.__normalizeTable(t)}splitVertical(t){return e.__splitVertical(t,this.j)}static __setColumnWidthByDelta(t,n,r,i,a){let o=e.__formalMatrix(t),s=0;for(let i=0;i<o.length;i+=1){let c=o[i][n];if(c.colSpan>1&&o.length>1)continue;let l=(c.offsetWidth+r)/t.offsetWidth*100;e.__mark(c,`width`,l.toFixed(10)+`%`,a),s=i;break}for(let t=s+1;t<o.length;t+=1){let r=o[t][n];e.__mark(r,`width`,null,a)}i||e.__unmark(a)}setColumnWidthByDelta(t,n,r,i,a){return e.__setColumnWidthByDelta(t,n,r,i,a)}static __mark(e,t,n,r){r.push(e);let i=dN.get(e)??{};i[t]=n===void 0?1:n,dN.set(e,i)}static __unmark(e){e.forEach(e=>{let t=dN.get(e);t&&(Object.keys(t).forEach(n=>{let r=t[n];switch(n){case`remove`:K.safeRemove(e);break;case`rowspan`:G(e,`rowspan`,tO(r)&&r>1?r:null);break;case`colspan`:G(e,`colspan`,tO(r)&&r>1?r:null);break;
185case`width`:r==null?(e.style.removeProperty(`width`),G(e,`style`)||G(e,`style`,null)):e.style.width=r.toString();break}delete t[n]}),dN.delete(e))})}};fN.__selectedByTable=new WeakMap,uN([xA()],fN.prototype,`__recalculateStyles`,null);var pN=e=>e.getInstance(`Table`,e.o),mN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},hN=class extends WA{className(){return`ToolbarButton`}getRole(){return`listitem`}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;G(this.trigger,`aria-label`,e)}}get toolbar(){let e=dO(`ToolbarCollection`);return this.closest(e)}update(){var e;let{control:t,state:n}=this,r=this.toolbar;if(!r)return;let i=t.value?.call(t,r.jodit,this);i!==void 0&&(n.value=i),n.disabled=this.__calculateDisabledStatus(r),n.activated=this.__calculateActivatedStatus(r),(e=t.update)==null||e.call(t,r.jodit,this)}__calculateActivatedStatus(e){var t;return QD(this.j)&&!this.j.editorIsActive?!1:(t=this.control).isActive?.call(t,this.j,this)?!0:!!(e&&e.shouldBeActive(this))}__calculateDisabledStatus(e){var t;return this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(t=this.control).isDisabled?.call(t,this.j,this)?!0:!!(e&&e.shouldBeDisabled(this))}onChangeActivated(){G(this.button,`aria-pressed`,this.state.activated),super.onChangeActivated()}onChangeText(){V(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod(`text-icons`,!!this.text.innerText.trim().length)}onChangeTabIndex(){G(this.button,`tabindex`,this.state.tabIndex),G(this.trigger,`tabindex`,this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),n=super.createContainer();n.classList.remove(e),n.classList.add(e+`__button`),Object.defineProperty(n,"component",{value:this,configurable:!0}),t.appendChild(n);let r=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${RA.get(`chevron`)}</span>`);return n.appendChild(r),t}focus(){var e;(e=this.container.querySelector(`button`))==null||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):K.safeRemove(this.trigger),this.setMod(`with-trigger`,this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?`disabled`:null;G(this.trigger,`disabled`,e),G(this.button,`disabled`,e),G(this.container,`disabled`,e)}constructor(e,t,n=null){super(e),this.control=t,this.target=n,this.state={...UA(),theme:`toolbar`,currentValue:``,hasTrigger:!1},this.openedPopup=null;let r=this.getElm(`button`);lD(r,`Element button should exists`),this.button=r,Object.defineProperty(r,"component",{value:this,configurable:!0});let i=this.getElm(`trigger`);lD(i,`Element trigger should exists`),this.trigger=i,i.remove(),e.e.on([this.button,this.trigger],`mousedown`,e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(JE.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=V(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}__initIconFromControl(){let{control:e,state:t}=this,{textIcons:n}=this.j.o;if(n===!0||V(n)&&n(e.name)||e.template){t.icon=UA().icon,t.text=e.text||e.name;return}if(!U(e.icon)&&e.icon!=null){t.icon={name:e.icon.name||e.name,iconURL:e.icon.iconURL||``,fill:e.icon.fill||``,scale:e.icon.scale};return}if(e.iconURL)t.icon.iconURL=e.iconURL;else{let n=e.icon||e.name;t.icon.name=RA.exists(n)||this.j.o.extraIcons?.[n]?n:``}!e.iconURL&&!t.icon.name&&(t.text=e.text||e.name)}onTriggerClick(e){if(this.openedPopup){this.__closePopup();return}let{control:t}=this;if(G(this.trigger,`aria-expanded`,!0),e.buffer={actionTrigger:this},t.list)return this.__openControlList(t);if(V(t.popup)){let e=this.openPopup();e.parentElement=this;try{if(this.j.e.fire(bD(`before-${t.name}-open-popup`),this.target,t,e)!==!1){let n=this.toolbar?.getTarget(this)??this.target??null,r=t.popup(this.j,n,this.__closePopup,this);r?e.setContent(U(r)?this.j.c.fromHTML(r):r).open(()=>fA(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(e){throw this.__closePopup(),e}
185this.j.e.fire(bD(`after-${t.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||![`Enter`,`Space`,` `].includes(e.key)||(e.preventDefault(),this.trigger.click())}__openControlList(e){let t=this.jodit.options.controls??{},n=e=>jj(e,t),r=e.list,i=this.openPopup(),a=rM(this.j);i.parentElement=this,a.parentElement=i,a.mode=`vertical`;let o=e=>dD(e)&&`title`in e&&`value`in e,s=(t,r)=>{if(U(r)&&n(r))return{name:r.toString(),...n(r)};if(U(t)&&n(t))return{name:t.toString(),...n(t),...typeof r==`object`?r:{}};o(t)&&(r=t.value,t=t.title);let{childTemplate:i}=e,a={name:t.toString(),template:i&&((e,t,n)=>i(e,t,n,this)),exec:e.childExec?(t,n,r)=>e.childExec?.call(e,t,n,{...r,parentControl:e}):e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,r]};return U(r)&&(a.text=r),a};a.build(XE(r)?r.map(s):LD(r,!1).map(e=>s(e,r[e])),this.target),i.setContent(a).open(()=>fA(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(!e||!K.isNode(e.target)||!K.isOrContains(this.container,e.target)&&!this.openedPopup.isOwnClick(e))&&this.__closePopup()}openPopup(){return this.__closePopup(),this.openedPopup=new Lj(this.j,!1),this.j.e.on(this.ow,`mousedown touchstart`,this.onOutsideClick).on(`escape closeAllPopups`,this.onOutsideClick),this.openedPopup}__closePopup(){this.openedPopup&&(this.j.e.off(this.ow,`mousedown touchstart`,this.onOutsideClick).off(`escape closeAllPopups`,this.onOutsideClick),this.state.activated=!1,this.openedPopup.close(),this.openedPopup.destruct(),this.openedPopup=null,this.trigger&&G(this.trigger,`aria-expanded`,!1))}onClick(e){var t,n;let{control:r}=this;if(V(r.exec)){let i=this.toolbar?.getTarget(this)??this.target??null,a=r.exec(this.j,i,{control:r,originalEvent:e,button:this});if(a!==!1&&a!==!0&&((t=this.j?.e)==null||t.fire(`synchro`),this.parentElement&&this.parentElement.update(),(n=this.j?.e)==null||n.fire(`closeAllPopups afterExec`)),a!==!1)return}if(r.list)return this.__openControlList(r);if(V(r.popup))return this.onTriggerClick(e);(r.command||r.name)&&(MD(QD(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),r.command||r.name,!1,r.args&&r.args[0]),this.j.e.fire(`closeAllPopups`))}destruct(){return this.__closePopup(),super.destruct()}};mN([oO],hN.prototype,`createContainer`,null),mN([Y(`state.hasTrigger`,{immediately:!1})],hN.prototype,`onChangeHasTrigger`,null),mN([Y(`trigger:click`)],hN.prototype,`onTriggerClick`,null),mN([Y(`trigger:keydown`)],hN.prototype,`onTriggerKeyDown`,null),mN([H],hN.prototype,`onOutsideClick`,null),mN([H],hN.prototype,`__closePopup`,null),hN=mN([uO],hN);var gN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_N=class extends WA{className(){return`ToolbarContent`}update(){var e;let{control:t}=this,n=t.getContent(this.j,this);(U(n)||n.parentNode!==this.container)&&(K.detach(this.container),this.container.appendChild(U(n)?this.j.create.fromHTML(n):n)),this.state.disabled=!!t.isDisabled?.call(t,this.j,this),this.state.activated=!!t.isActive?.call(t,this.j,this),(e=t.update)==null||e.call(t,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),this.container.querySelectorAll(`input,button,select,textarea`).forEach(e=>G(e,`disabled`,this.state.disabled||null))}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,n=null){super(e),this.control=t,this.target=n,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`),G(this.container,`role`,`content`)}};_N=gN([uO],_N);var vN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},yN=class extends hN{className(){return`ToolbarSelect`}update(){var e;
185super.update(),this.state.icon.name=``;let{list:t,data:n}=this.control;if(t){let r=this.state.value||(n&&U(n.currentValue)?n.currentValue:void 0);r||=Object.keys(t)[0];let i=(dD(t)&&t[r.toString()]||r).toString();this.state.text=(e=this.control).textTemplate?.call(e,this.jodit,i)??i}}};yN=vN([uO],yN);var bN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},xN=class extends Pj{className(){return`ToolbarCollection`}getRole(){return`toolbar`}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return iM(this.j,e,t)}makeSelect(e,t=null){return aM(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire(`afterUpdateToolbar`,this))}update(){this.__immediateUpdate()}setDirection(e){this.container.style.direction=e,this.container.setAttribute(`dir`,e)}constructor(e){super(e),this.__listenEvents=`updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur`}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on(`afterSetMode focus`,this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw OD(`The method is not implemented for this class.`)}build(e,t=null){let n=this.j.e.fire(`beforeToolbarBuild`,e);return n&&(e=n),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off(`afterSetMode focus`,this.__immediateUpdate),super.destruct())}};bN([Y(`:afterInit`),H],xN.prototype,`__immediateUpdate`,null),bN([xA(e=>e.j.defaultTimeout,!0)],xN.prototype,`update`,null),bN([wA(`ready`)],xN.prototype,`__initEvents`,null),xN=bN([uO],xN);var SN=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},CN=class extends xN{className(){return`ToolbarEditorCollection`}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(t!==void 0)return t;let n=e.control.mode===void 0?1:e.control.mode;return!(n===3||n===this.j.getRealMode())}shouldBeActive(e){let t=super.shouldBeActive(e);if(t!==void 0)return t;let n=this.j.selection?this.j.s.current():null;if(!n)return!1;let r;if(e.control.tags){let t=e.control.tags;if(r=n,K.up(r,e=>{if(e&&t.indexOf(e.nodeName.toLowerCase())!==-1)return!0},this.j.editor))return!0}if(e.control.css){let t=e.control.css;if(r=n,K.up(r,e=>{if(e&&!K.isText(e)&&!K.isComment(e))return this.checkActiveStatus(t,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}constructor(e){super(e),this.checkActiveStatus=(e,t)=>{let n=0,r=0;return Object.keys(e).forEach(i=>{let a=e[i];V(a)?a(this.j,W(t,i).toString())&&(n+=1):a.indexOf(W(t,i).toString())!==-1&&(n+=1),r+=1}),r===n},this.prependInvisibleInput(this.container)}prependInvisibleInput(e){let t=this.j.create.element(`input`,{name:`jodit-toolbar-focus-helper_`+this.j.id,tabIndex:-1,disabled:!0,style:`width: 0; height:0; position: absolute; visibility: hidden;`});K.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire(`showInlineToolbar`,e)}hide(){this.jodit.e.fire(`hidePopup`),super.hide(),this.jodit.e.fire(`toggleToolbar`)}show(){super.show(),this.jodit.e.fire(`toggleToolbar`)}};CN=SN([uO],CN);function wN(e,t){if(V(e.o.buildData))return e.o.buildData.call(e,t);let n=e.ow.FormData;if(n!==void 0){if(t instanceof n||U(t))return t;let e=new n,r=t;return Object.keys(r).forEach(t=>{e.append(t,r[t])}),e}return t}var TN=new WeakMap;function EN(e,t){let n=wN(e,t),r=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},i=(t,n)=>{let r=new FA({xhr:()=>{let t=new XMLHttpRequest;return e.j.ow.FormData!==void 0&&t.upload?(n(10),t.upload.addEventListener(`progress`,e=>{if(e.lengthComputable){let t=e.loaded/e.total;t*=100,n(t)}},!1)):n(100),t},method:e.o.method||`POST`,data:t,url:V(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),i=TN.get(e);
185return i||(i=new Set,TN.set(e,i)),i.add(r),e.j.e.one(`beforeDestruct`,r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),i?.delete(r)})};return V(e.o.customUploadFunction)&&(i=e.o.customUploadFunction),jD(n)?n.then(e=>i(e,r)).catch(t=>{e.o.error.call(e,t)}):i(n,r)}function DN(e,t,n,r,i){if(!t)return Promise.reject(OD(`Need files`));let{o:a}=e,o=nD(t);if(!o.length)return Promise.reject(OD(`Need files`));if(V(a.beforeUpload)&&a.beforeUpload.call(e,o)===!1){let t=OD(`Upload canceled`);return(r||a.defaultHandlerError).call(e,t),Promise.reject(t)}let s=[];if(a.insertImageAsBase64URI&&ON(o,a.imagesExtensions,s,e,n,a.defaultHandlerSuccess),o=o.filter(e=>e),o.length){let t=new FormData;t.append(a.pathVariableName,e.path),t.append(`source`,e.source);let c;for(let n=0;n<o.length;n+=1)if(c=o[n],c){let r=/\.\w+$/.test(c.name),i=c.type.match(/\/([a-z0-9]+)/i),s=i&&i[1]?i[1].toLowerCase():``,l=o[n].name||Math.random().toString().replace(`.`,``);if(!r&&s){let e=s;[`jpeg`,`jpg`].includes(e)&&(e=`jpeg|jpg`),RegExp(`.(`+e+`)$`,`i`).test(l)||(l+=`.`+s)}let[u,d,f]=a.processFileName.call(e,a.filesVariableName(n),o[n],l);t.append(u,d,f)}i&&i(t),a.data&&dD(a.data)&&Object.keys(a.data).forEach(e=>{t.append(e,a.data[e])}),a.prepareData.call(e,t),s.push(EN(e,t).then(t=>a.isSuccess.call(e,t)?((V(n)?n:a.defaultHandlerSuccess).call(e,a.process.call(e,t)),t):((V(r)?r:a.defaultHandlerError).call(e,OD(a.getMessage.call(e,t))),t)).then(()=>{e.j.events&&e.j.e.fire(`filesWereUploaded`)}))}return Promise.all(s)}function ON(e,t,n,r,i,a){let o=[],s,c;for(c=0;c<e.length;c+=1)if(s=e[c],s&&s.type){let l=s.type.match(/\/([a-z0-9]+)/i),u=l[1]?l[1].toLowerCase():``;if(!t.includes(u))continue;let d=new FileReader,f=r.j.async.promise((e,t)=>{d.onerror=t,d.onloadend=()=>{let t={baseurl:``,files:[d.result],isImages:[!0]};(V(i)?i:a).call(r,t),e(t)},d.readAsDataURL(s)});o.push(f),n.push(f),e[c]=null}o.length&&Promise.all(o).then(()=>{r.j.events&&r.j.e.fire(`filesWereUploaded`)}).catch(()=>{})}function kN(e){return!!(e&&e.files&&e.files.length>0)}function AN(e){return!!(e&&e.items&&e.items.length>0)}J.prototype.enableDragAndDropFileToEditor=!0,J.prototype.uploader={url:``,insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:[`jpg`,`jpeg`,`png`,`gif`,`webp`,`bmp`,`svg`,`tiff`,`avif`],headers:null,data:null,filesVariableName(e){return`files[${e}]`},withCredentials:!1,pathVariableName:`path`,format:`json`,method:`POST`,prepareData(e){return e},isSuccess(e){return e.success},getMessage(e){return e.data.messages!==void 0&&XE(e.data.messages)?e.data.messages.join(` `):``},processFileName(e,t,n){return[e,t,n]},process(e){return e.data},error(e){this.j.message.error(e.message,4e3)},getDisplayName(e,t){return e+t},defaultHandlerSuccess(e){let t=this.j||this;QD(t)&&e.files&&e.files.length&&e.files.forEach((n,r)=>{let[i,a]=e.isImages&&e.isImages[r]?[`img`,`src`]:[`a`,`href`],o=t.createInside.element(i);o.setAttribute(a,e.baseurl+n),i===`a`&&(o.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,n)),i===`img`?t.s.insertImage(o,null,t.o.imageDefaultWidth):t.s.insertNode(o)})},defaultHandlerError(e){this.j.message.error(e.message)},contentType(e){return this.ow.FormData!==void 0&&typeof e!=`string`?!1:`application/x-www-form-urlencoded; charset=UTF-8`}};var jN=class extends bA{get j(){return this.jodit}className(){return`Uploader`}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,n){let r=()=>{e.classList.remove(`jodit_drag_hover`)},i=this,a=e=>{let a,o,s,c=e.clipboardData,l=e=>{o&&(e.append(`extension`,s),e.append(`mimetype`,o.type))};if(!DE&&kN(c))return DN(i,c.files,t,n).finally(r),!1;if(AN(c)){let{items:u}=c;for(a=0;a<u.length;a+=1)if(u[a].kind===`file`&&u[a].type===`image/png`){if(o=u[a].getAsFile(),o){let e=o.type.match(/\/([a-z0-9]+)/i);s=e[1]?e[1].toLowerCase():``,DN(i,[o],t,n,l).finally(r)}e.preventDefault();break}}};i.j&&i.j.editor!==e?i.j.e.on(e,`paste`,a):i.j.e.on(`beforePaste`,a),this.attachEvents(e,t,n,r)}attachEvents(e,t,n,r){let i=this;i.j.e.on(e,`dragend dragover dragenter dragleave drop`,e=>{e.preventDefault()}).on(e,`dragover`,t=>{(kN(t.dataTransfer)||AN(t.dataTransfer))&&(e.classList.add(`jodit_drag_hover`),t.preventDefault())}).on(e,`dragend dragleave`,t=>{e.classList.remove(`jodit_drag_hover`),kN(t.dataTransfer)&&t.preventDefault()}).on(e,`drop`,a=>{e.classList.remove(`jodit_drag_hover`),kN(a.dataTransfer)&&(a.preventDefault(),a.stopImmediatePropagation(),DN(i,a.dataTransfer.files,t,n).finally(r))});let a=e.querySelector(`input[type=file]`);a&&i.j.e.on(a,`change`,()=>{DN(i,a.files,t,n).then(()=>
185{a.value=``,/safari/i.test(navigator.userAgent)||(a.type=``,a.type=`file`)}).finally(r)})}uploadRemoteImage(e,t,n){let r=this,{o:i}=r,a=V(n)?n:i.defaultHandlerError;EN(r,{action:`fileUploadRemote`,url:e}).then(e=>{if(i.isSuccess.call(r,e)){(V(t)?t:i.defaultHandlerSuccess).call(r,i.process.call(r,e));return}a.call(r,OD(i.getMessage.call(r,e)))}).catch(e=>a.call(r,e))}upload(e){return this.async.promise((t,n)=>{DN(this,e,t,n)})}constructor(e,t){super(e),this.path=``,this.source=`default`,this.options=bk(t||{},bk(J.defaultOptions.uploader,QD(e)?e.o.uploader:{}))}destruct(){this.setStatus(JE.beforeDestruct);let e=TN.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch{}}),e.clear()),super.destruct()}};function MN(e,t,n){let r=e;for(;r&&r!==n;){if(K.findSibling(r,t))return;if(K.isBlock(r.parentElement))break;r=r.parentElement,r&&r!==n&&(t?K.before(r,e):K.after(r,e))}}var NN=`wrap`,PN=`unwrap`,FN=`change`,IN=`unset`,LN=`initial`,RN=`replace`,zN=`commitStyle`;function BN(e,t,n){let r=n.s.createRange(),i=eO(t.previousSibling)?t.previousSibling:t;r.setStartBefore(e),r.setEndBefore(i),VN(e,r,!0);let a=eO(t.nextSibling)?t.nextSibling:t;r.setStartAfter(a),r.setEndAfter(e),VN(e,r,!1)}function VN(e,t,n){let r=t.extractContents();(!r.textContent||!aD(r.textContent).length)&&r.firstChild&&K.unwrap(r.firstChild),e.parentNode&&MD(n?K.before:K.after,e,r)}var HN=class{setState(e){lD(!this.__previewsStates.has(e),`Circled states`),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}dispatch(e,t){let n=this.transitions[this.getState()][e];if(n){let e=n.call(this,t);return lD(e&&e!==t,`Action should return new value`),lD(U(e.next),`Value should contain the next state`),lD(e.next!==this.getState(),`The new state should not be equal to the old one.`),this.setState(e.next),e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}};function UN(e){return!!(e&&!K.isEmptyTextNode(e)&&!K.isTemporary(e)&&!eO(e))}function WN(e,t){return!!(!K.isTag(e,`font`)&&K.isHTMLElement(e)&&Object.keys(t).every(n=>{let r=W(e,n,!0);return r===``&&(t[n]===``||t[n]==null)?!0:!QE(r)&&r!==``&&!QE(t[n])&&yD(n,t[n]).toString().toLowerCase()===r.toString().toLowerCase()}))}if(lE){let e=lE.createElement(`div`);e.style.color=`red`,lD(WN(e,{color:`red`}),`Style test`),lD(WN(e,{fontSize:null}),`Style test`),lD(WN(e,{fontSize:``}),`Style test`)}function GN(e,t){return!!(!K.isTag(e,`font`)&&K.isHTMLElement(e)&&Object.keys(t).every(t=>W(e,t,!0)!==``))}if(lE){let e=lE.createElement(`div`);e.style.color=`red`,lD(GN(e,{color:`red`}),`Style test`),lD(!GN(e,{font:`Arial`,color:`red`}),`Style test`),lD(!GN(e,{border:`1px solid #ccc`}),`Style test`)}function KN(e,t,n,r=!0){if(!t||!UN(t))return!1;let{element:i,elementIsDefault:a,options:o}=e;if(K.isList(t)&&e.elementIsList)return!0;let s=K.isTag(t,i);return s&&!(a&&n)||o.attributes?.style&&(r?WN(t,o.attributes.style):GN(t,o.attributes.style))&&!e.elementIsList?!0:!s&&!n&&a&&K.isInlineBlock(t)}function qN(e,t,n){return K.closest(t,t=>KN(e,t,!0,!1),n)}function JN(e,t){let{element:n,options:r}=e;if(!t||!UN(t))return!1;let i=t.nodeName.toLowerCase()===n,a=!!(r.attributes?.style&&GN(t,r.attributes?.style));return i&&a}function YN(e,t){let{firstChild:n}=t;for(;n&&!UN(n);)if(n=n.nextSibling,!n)return null;return n&&!K.next(n,UN,t)&&KN(e,n,!1)?n:null}function XN(e,t,n){let{parentNode:r}=t;return r===n||!K.isHTMLElement(r)||K.next(t,UN,r)||K.prev(t,UN,r)?null:e.isElementCommit&&e.elementIsBlock&&!K.isBlock(r)?XN(e,r,n):KN(e,r,!1)&&(!K.isBlock(r)||e.elementIsBlock)?r:e.isElementCommit&&!K.isBlock(r)?XN(e,r,n):null}function ZN(e,t){return!!K.closest(e,[`style`,`script`],t)}function QN(e,t){return uA(t)?(lD(t,`Attrs must be a non-empty object`),Object.keys(t).every(n=>n===`class`||n===`className`?e.classList.contains(t[n]):n===`style`?WN(e,t[n]):G(e,n)===t[n])):!0}function $N(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>t.hasAttribute(e.name)&&t.getAttribute(e.name)===e.value)}var eP=`toggleAttributes`;function tP(e,t,n,r,i=!1){if(!i&&e.isApplied(t,eP))return r;!i&&e.setApplied(t,eP);let{attributes:a}=e.options;return a&&uA(a)>
1850&&Object.keys(a).forEach(o=>{let s=a[o];switch(o){case`style`:r=nP(e,n,s,t,i,r);break;case`className`:case`class`:r=rP(n,s,t,r,i);break;default:r=iP(n,s,t,o,i,r)}}),r}function nP(e,t,n,r,i,a){return lD(dD(n)&&uA(n),`Style must be an object`),Object.keys(n).forEach(o=>{let s=r.style.getPropertyValue(fD(o)),c=n[o];if(!(s===``&&c==null)){if(sP(t,r,o)===yD(o,c)){if(!s)return;!i&&W(r,o,null),a=IN,a=aP(e,r,a);return}a=FN,i||(W(r,o,c),a=aP(e,r,a))}}),a}function rP(e,t,n,r,i){lD(U(t),`Class name must be a string`);let a=e.e.fire.bind(e.e,`${zN}AfterToggleAttribute`);return n.classList.contains(t.toString())?(r=IN,i||(n.classList.remove(t),n.classList.length===0&&(G(n,`class`,null),a(r,n,`class`,null)))):(r=FN,i||(n.classList.add(t),a(r,n,`class`,t))),r}function iP(e,t,n,r,i,a){lD(U(t)||tO(t)||mD(t)||t==null,`Attribute value must be a string or number or boolean or null`);let o=e.e.fire.bind(e.e,`${zN}AfterToggleAttribute`);return G(n,r)===(t==null?t:String(t))?(!i&&G(n,r,null),a=IN,!i&&o(a,n,r,t),a):(a=FN,i||(G(n,r,t),o(a,n,r,t)),a)}function aP(e,t,n){return G(t,`style`)||(G(t,`style`,null),t.tagName.toLowerCase()===e.defaultTag&&(K.unwrap(t),n=PN)),n}function oP(e){if(wD(e,`shadowRoot`)!==void 0)return wD(e,`shadowRoot`);let t=YO(e),n=lE.createElement(`iframe`);W(n,{width:0,height:0,position:`absolute`,border:0}),n.src=`about:blank`,t.appendChild(n);let r=n.contentWindow?.document,i=r?r.body:e.od.body;return wD(e,`shadowRoot`,i),i}function sP(e,t,n){let r=oP(e),i=e.create.element(`div`);i.style.color=W(e.editor,`color`);let a=e.create.element(t.tagName.toLowerCase());a.style.cssText=t.style.cssText,i.appendChild(a),r.appendChild(i);let o=W(a,n);return K.safeRemove(i),o}function cP(e,t,n){let r=n.e.fire(`${zN}BeforeWrapList`,RN,t,e)??K.replace(t,`li`,n.createInside),i=r.previousElementSibling,a=r.nextElementSibling,o=K.isTag(i,e.element)?i:null;return o??=K.isTag(a,e.element)?a:null,(!K.isList(o)||!QN(o,e.options.attributes))&&(o=n.createInside.element(e.element),tP(e,o,n,LN),K.before(r,o)),i===o?K.append(o,r):K.prepend(o,r),K.isTag(o.nextElementSibling,e.element)&&$N(o,o.nextElementSibling)&&(K.append(o,Array.from(o.nextElementSibling.childNodes)),K.safeRemove(o.nextElementSibling)),n.e.fire(`${zN}AfterWrapList`,NN,o,e),o}function lP(e,t,n,r){if(!t)return r;let i=t.parentElement;if(!i)return r;let a=n.e.fire(`${zN}BeforeToggleList`,r,e,i);if(a!==void 0)return a;let o=n.e.fire.bind(n.e,`${zN}AfterToggleList`);if(r!==`unwrap`){let a=tP(e,t.parentElement,n,LN,!0)===FN;if(r===`replace`||a||i.tagName.toLowerCase()!==e.element)return o(RN,cP(e,uP(RN,i,t,n,e),n),e),RN}return o(PN,uP(PN,i,t,n,e),e),PN}function uP(e,t,n,r,i){let a=r.e.fire(`${zN}BeforeUnwrapList`,e,t,i);return a?(lD(K.isHTMLElement(a),`${zN}BeforeUnwrapList hook must return HTMLElement`),a):(BN(t,n,r),lD(K.isHTMLElement(n.parentElement),`Element should be inside the list`),K.unwrap(n.parentElement),e===`replace`?n:K.replace(n,r.o.enter.toLowerCase()===`br`?r.createInside.fragment():r.o.enter,r.createInside))}function dP(e,t){let n=[],r=[],i,a=e.options.attributes?.style;if(t.firstChild){let o=K.eachGen(t),s=o.next();for(;!s.done;){let t=s.value;KN(e,t,!0)&&(!a||GN(t,a))?(i===void 0&&(i=!0),n.push(t)):a&&JN(e,t)?(i===void 0&&(i=!1),r.push(()=>{W(t,Object.keys(a).reduce((e,t)=>(e[t]=null,e),{})),G(t,`style`)||G(t,`style`,null),!G(t,`style`)&&t.nodeName.toLowerCase()===e.element&&n.push(t)})):K.isEmptyTextNode(t)||i===void 0&&(i=!1),s=o.next()}}return r.forEach(e=>e()),n.forEach(K.unwrap),!!i}function fP(e,t,n){let r=n.editor,i=n.createInside,a=(e,t=`previousSibling`)=>{let i=e,a=e;for(;a&&!eO(a)&&!(K.isTag(a,n.o.enter)||(i=a,a=a[t]?a[t]:a.parentNode&&!K.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,K.isBlock(a))););return i},o=a(t),s=a(t,`nextSibling`),c=n.s.createRange();c.setStartBefore(o),c.setEndAfter(s);let l=c.extractContents(),u=i.element(e.element);return u.appendChild(l),K.safeInsertNode(c,u),e.elementIsBlock&&K.isEmpty(u)&&!K.isTag(u.firstElementChild,`br`)&&u.appendChild(i.element(`br`)),u}function pP(e,t,n){let r=hP(e,t,n);if(e.elementIsList)return cP(e,r,n);let i=K.replace(r,e.element,n.createInside,!0);
185return e.elementIsBlock&&(W(i,`fontSize`,null),W(i,`fontWeight`,null),G(i,`style`)||G(i,`style`,null)),i}var mP=new Set([`td`,`th`,`tr`,`tbody`,`table`,`li`,`ul`,`ol`]);function hP(e,t,n){return e.elementIsBlock?K.up(t,e=>K.isBlock(e)&&!K.isTag(e,mP),n.editor)||fP(e,t,n):(G(t,`size`,null),t)}var gP={START:`START`,ELEMENT:`ELEMENT`,UNWRAP:`UNWRAP`,UNWRAP_CHILDREN:`UNWRAP_CHILDREN`,CHANGE:`CHANGE`,REPLACE_DEFAULT:`REPLACE_DEFAULT`,LIST:`LIST`,TOGGLE_LIST:`TOGGLE_LIST`,WRAP:`WRAP`,EXTRACT:`EXTRACT`,END:`END`},_P={[gP.START]:{exec(e){let{element:t,jodit:n,style:r,mode:i,collapsed:a}=e;if(ZN(t,n.editor)||!a&&K.isEmptyContent(t))return{...e,next:gP.END};let o=XN(r,t,n.editor)||YN(r,t);if(o)return{...e,next:gP.ELEMENT,element:o};let s=qN(r,t,n.editor);return r.elementIsList&&K.isList(s)?{...e,next:gP.LIST}:s?{...e,next:gP.EXTRACT}:{...e,next:i===`unwrap`?gP.END:gP.UNWRAP_CHILDREN}}},[gP.LIST]:{exec(e){let{element:t,jodit:n,mode:r}=e;if(r!==`initial`&&r!==`unwrap`&&r!==`replace`)return{...e,next:gP.END};let i=K.closest(t,`li`,n.editor);return i&&K.closest(t,fE,n.editor)?{...e,element:i,next:gP.TOGGLE_LIST}:{...e,next:gP.END}}},[gP.TOGGLE_LIST]:{exec(e){return{...e,mode:lP(e.style,e.element,e.jodit,e.mode),next:gP.END}}},[gP.EXTRACT]:{exec(e){let{element:t,jodit:n,style:r}=e,i=qN(r,t,n.editor);return lD(i,`This place should have an element`),!r.elementIsBlock&&r.options.attributes?.style&&K.isBlock(i)?{...e,next:gP.WRAP}:(r.elementIsBlock||BN(i,t,n),{...e,element:i,next:gP.ELEMENT})}},[gP.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:n}=e;return dP(n,t)?{...e,mode:PN,next:gP.END}:{...e,next:gP.WRAP}}},[gP.WRAP]:{exec(e){let{element:t,jodit:n,style:r}=e,i=pP(r,t,n);return{...e,next:r.elementIsList?gP.END:gP.CHANGE,mode:NN,element:i}}},[gP.ELEMENT]:{exec(e){let{style:t,element:n,jodit:r}=e;return tP(t,n,r,`initial`,!0)===`initial`?K.isTag(n,t.element)?{...e,next:gP.UNWRAP}:{...e,next:gP.END}:{...e,next:gP.CHANGE}}},[gP.CHANGE]:{exec(e){let{style:t,element:n,jodit:r,mode:i}=e,a=tP(t,n,r,e.mode);return i!==`wrap`&&a===`unset`&&!n.attributes.length&&K.isTag(n,t.element)?{...e,next:gP.UNWRAP}:{...e,mode:a,next:gP.END}}},[gP.UNWRAP]:{exec(e){return e.element.attributes.length&&K.isTag(e.element,e.style.element)?{...e,next:gP.REPLACE_DEFAULT}:(K.unwrap(e.element),{...e,mode:PN,next:gP.END})}},[gP.REPLACE_DEFAULT]:{exec(e){return K.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:RN,next:gP.END}}},[gP.END]:{exec(e){return e}}};function vP(e,t){var n;let{s:r,editor:i}=e;(n=i.firstChild)==null||n.normalize();let a=r.fakes(),o=e.s.wrapInTagGen(a),s=o.next();if(s.done)return;let c={collapsed:r.isCollapsed(),mode:LN,element:s.value,next:gP.START,jodit:e,style:t};for(;s&&!s.done;){let e=new HN(gP.START,_P);for(c.element=s.value;e.getState()!==gP.END;)c=e.dispatch(`exec`,c);s=o.next()}r.restoreFakes(a)}var yP=class{isApplied(e,t){let n=this.__applyMap.get(e);return n?!!n[t]:!1}setApplied(e,t){let n=this.__applyMap.get(e)??{};n[t]=!0,this.__applyMap.set(e,n)}get elementIsList(){return!!(this.options.element&&fE.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&uE.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?`p`:`span`}get elementIsDefault(){return this.element===this.defaultTag}constructor(e){this.options=e,this.__applyMap=new WeakMap}apply(e){let{hooks:t}=this.options,n=t?Object.keys(t):[];try{n.forEach(n=>{e.e.on(bD(zN+`_`+n),t[n])}),vP(e,this)}finally{n.forEach(n=>{e.e.off(bD(zN+`_`+n),t[n])}),this.__applyMap=new WeakMap}e.synchronizeValues(),e.e.fire(`afterCommitStyle`,this)}};function bP(e,t,n){let r=K.findSibling(t,n),i=K.findSibling(t,!n);for(;K.isElement(r)&&!K.isTag(r,mE)&&K.isContentEditable(r,e.editor)&&(!i||!K.closest(t,K.isElement,e.editor));)n||!r.firstChild?r.appendChild(t):K.before(r.firstChild,t),r=K.sibling(t,n),i=K.sibling(t,!n)}function xP(e,t,n,r){let i=e.nodeValue?.length?e.nodeValue:``;if(r&&i.replace(rE(),``).length>t)return!0;let a=iE().exec(i);return n&&(a&&a[0].length<t||!a&&t>0)}function SP(e,t,n,r,i,a){if(e=t.startContainer.childNodes[t.startOffset],e||(e=t.startContainer.childNodes[t.startOffset-1],n=!0),e&&r&&!K.isText(e)){if(!n&&K.isText(e.previousSibling))e=e.previousSibling;else if(i){let t=a(e);for(;t;){if(t&&K.isText(t)){e=t;break}t=a(t)}}}if(e&&!r&&!K.isText(e)){let t=e,n=e;do t=t.firstChild,n=n.lastChild;while(t&&n&&!K.isText(t));t===n&&t&&K.isText(t)&&(e=t)}return{node:e,rightMode:n}}var CP=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},wP=class{constructor(e){this.jodit=e,e.e.on(`removeMarkers`,()=>{this.removeMarkers()})}get j(){return this.jodit}errorNode(e){if(!K.isNode(e))throw OD(`Parameter node must be instance of Node`)}
185get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){return this.j.o.shadowRoot&&V(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this,t=e?.rangeCount?e.getRangeAt(0):null;return!(!t||!K.isOrContains(this.area,t.startContainer))}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1)e.getRangeAt(t).deleteContents(),e.getRangeAt(t).collapse(!0)}clear(){var e;this.sel?.rangeCount&&((e=this.sel)==null||e.removeAllRanges())}removeNode(e){if(!K.isOrContains(this.j.editor,e,!0))throw OD(`Selection.removeNode can remove only editor's children`);K.safeRemove(e),this.j.e.fire(`afterRemoveNode`,e)}insertCursorAtPoint(e,t){this.removeMarkers();try{let n=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){let r=this.doc.caretPositionFromPoint(e,t);if(r){n.setStart(r.offsetNode,r.offset);return}}if(this.doc.caretRangeFromPoint){let r=this.doc.caretRangeFromPoint(e,t);lD(r,`Incorrect caretRangeFromPoint behaviour`),n.setStart(r.startContainer,r.startOffset)}})(),n.collapse(!0),this.selectRange(n),!0}catch{}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return $O(`span[data-`+jE+`]`,this.area)}removeMarkers(){K.safeRemove(...this.markers)}marker(e=!1,t){let n=null;t&&(n=t.cloneRange(),n.collapse(e));let r=this.j.createInside.span();return r.id=jE+`_`+Number(new Date)+`_`+String(Math.random()).slice(2),r.style.lineHeight=`0`,r.style.display=`none`,K.markTemporary(r),G(r,`data-`+jE,e?`start`:`end`),r.appendChild(this.j.createInside.text(``)),n&&K.isOrContains(this.area,e?n.startContainer:n.endContainer)&&n.insertNode(r),r}restore(){let e=!1,t=e=>`span[data-${jE}=${e?`start`:`end`}]`,n=this.area.querySelector(t(!0)),r=this.area.querySelector(t(!1));if(n){if(e=this.createRange(),r)e.setStartAfter(n),K.safeRemove(n),e.setEndBefore(r),K.safeRemove(r);else{let t=n.previousSibling;K.isText(t)?e.setStart(t,t.nodeValue?t.nodeValue.length:0):e.setStartBefore(n),K.safeRemove(n),e.collapse(!0)}e&&this.selectRange(e)}}fakes(){let e=this.sel;if(!e||!e.rangeCount)return[];let t=e.getRangeAt(0);lD(t,`Range is null`);let n=t.cloneRange();n.collapse(!0);let r=this.j.createInside.fake();K.safeInsertNode(n,r),t.setStartBefore(r);let i=[r];if(!t.collapsed){let e=t.cloneRange();e.collapse(!1);let n=this.j.createInside.fake();K.safeInsertNode(e,n),t.setEndAfter(n),i.push(n)}return this.selectRange(t),i}restoreFakes(e){let t=e.filter(e=>e.isConnected);if(!t.length)return;let[n,r]=t,i=this.createRange();i.setStartAfter(n),r&&i.setEndBefore(r),this.selectRange(i),n.parentNode?.firstChild!==n.parentNode?.lastChild&&K.safeRemove(n),r?.parentNode?.firstChild!==r?.parentNode?.lastChild&&K.safeRemove(r)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let n=[],r=t.rangeCount,i=[];for(let e=0;e<r;e+=1)if(i[e]=t.getRangeAt(e),i[e].collapsed){let t=this.marker(!0,i[e]);n[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,i[e]),r=this.marker(!1,i[e]);n[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=r-1;e>=0;--e){let r=this.doc.getElementById(n[e].startId);if(r){if(n[e].collapsed)i[e].setStartAfter(r),i[e].collapse(!0);else if(i[e].setStartBefore(r),n[e].endId){let t=this.doc.getElementById(n[e].endId);t&&i[e].setEndAfter(t)}try{t.addRange(i[e].cloneRange())}catch{}}}}return n}focus(e={preventScroll:!0}){var t;if(!this.isFocused()){let n=cA(this.j.container),r=n?.scrollTop;this.j.iframe&&this.doc.readyState===`complete`&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),r&&n?.scrollTo&&n.scrollTo(0,r);let i=this.sel,a=i?.rangeCount?i?.getRangeAt(0):null;if(!a||!K.isOrContains(this.area,a.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||(t=this.j?.events)==null||t.fire(`focus`),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==1)return null;let t=this.sel;if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0),r=n.startContainer,i=!1,a=e=>i?e.lastChild:e.firstChild;if(K.isTag(r,`br`)&&t.isCollapsed)return r;if(!K.isText(r)){let o=SP(r,n,i,t.isCollapsed,e,a);r=o.node,i=o.rightMode}return r&&K.isOrContains(this.area,r)?r:null}insertNode(e,t=!0,n=!0){this.errorNode(e);let r=K.isFragment(e)?e.lastChild:e;this.j.e.fire(`safeHTML`,e),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore(
185));let i=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand(`Delete`),this.j.e.fire(`beforeInsertNode`,e),i&&i.rangeCount){let t=i.getRangeAt(0),{firstChild:n}=e;K.isOrContains(this.area,t.commonAncestorContainer)?K.safeInsertNode(t,e):this.area.appendChild(e),[()=>n?.previousSibling,()=>n?.previousSibling,()=>n?.previousSibling?.lastChild].forEach(e=>{let t=e();t&&K.isEmptyTextNode(t)&&K.safeRemove(t)})}else this.area.appendChild(e);let n=e=>{if(K.isBlock(e)){let t=e.lastChild;if(t)return n(t)}this.setCursorAfter(e)};t&&(K.isFragment(e)?r&&n(r):n(e)),this.j.o.scrollToPastedContent&&Fk(r??e,this.j.editor,this.doc)}),n&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire(`afterInsertNode`,K.isFragment(e)?r:e)}insertHTML(e,t=!0){if(e===``)return;let n=this.j.createInside.div(),r=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),K.isNode(e)?n.appendChild(e):n.innerHTML=e.toString(),!(!this.j.isEditorMode()&&this.j.e.fire(`insertHTML`,n.innerHTML)===!1)&&n.lastChild){for(;n.firstChild;)r.appendChild(n.firstChild);this.insertNode(r,t,!1),this.j.__imdSynchronizeValues()}}insertImage(e,t=null,n=null){let r=U(e)?this.j.createInside.element(`img`):e;if(U(e)&&r.setAttribute(`src`,e),n!=null){let e=n.toString();e&&e!==`auto`&&String(e).indexOf(`px`)<0&&String(e).indexOf(`%`)<0&&(e+=`px`),G(r,`width`,e)}t&&typeof t==`object`&&W(r,t);let i=()=>{(r.naturalHeight<r.offsetHeight||r.naturalWidth<r.offsetWidth)&&(r.style.width=``,r.style.height=``),r.removeEventListener(`load`,i)};this.j.e.on(r,`load`,i),r.complete&&i(),this.insertNode(r),this.j.e.fire(`afterInsertImage`,r)}eachSelection(e){let t=this.sel;if(!t||!t.rangeCount)return;let n=t.getRangeAt(0),r=n.commonAncestorContainer;K.isHTMLElement(r)||(r=r.parentElement);let i=[],a=n.startOffset,o=r.childNodes.length,s=a<o?a:o-1,c=n.startContainer===this.area?r.childNodes[s]:n.startContainer,l=n.endContainer===this.area?r.childNodes[n.endOffset-1]:n.endContainer;K.isText(c)&&c===n.startContainer&&n.startOffset===c.nodeValue?.length&&c.nextSibling&&(c=c.nextSibling),K.isText(l)&&l===n.endContainer&&n.endOffset===0&&l.previousSibling&&(l=l.previousSibling);let u=e=>{e&&e!==r&&!K.isEmptyTextNode(e)&&!eO(e)&&i.push(e)};u(c),c!==l&&K.isOrContains(r,c,!0)&&K.find(c,e=>(u(e),e===l||e&&e.contains&&e.contains(l)),r,!0,!1);let d=t=>{if(K.isOrContains(this.j.editor,t,!0)){if(t.nodeName.match(/^(UL|OL)$/))return nD(t.childNodes).forEach(d);if(K.isTag(t,`li`))if(t.firstChild)t=t.firstChild;else{let e=this.j.createInside.text(``);t.appendChild(e),t=e}e(t)}};i.length===0&&(K.isEmptyTextNode(c)&&i.push(c),c?.firstChild&&i.push(c.firstChild)),i.forEac
185h(d)}cursorInTheEdge(e,t,n=null){let r=!e,i=this.sel,a=i?.rangeCount?i.getRangeAt(0):null;if(n??=this.current(!1),!a||!n||!K.isOrContains(t,n,!0))return null;let o=e?a.startContainer:a.endContainer,s=e?a.startOffset:a.endOffset,c=e=>!!(e&&!K.isTag(e,`br`)&&!K.isEmptyTextNode(e)&&!K.isTemporary(e)&&!(K.isElement(e)&&this.j.e.fire(`isInvisibleForCursor`,e)===!0));if(K.isText(o)){if(xP(o,s,e,r))return!1}else{let e=nD(o.childNodes);if(r){if(e.slice(s).some(c))return!1}else if(e.slice(0,s).some(c))return!1}let l=n;for(;l&&l!==t;){let t=K.sibling(l,e);if(!t){l=l.parentNode;continue}if(l=t,l&&c(l))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){if(this.errorNode(e),!K.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw OD(`Node element must be in editor`);let n=this.createRange(),r=null;return K.isText(e)?t?n.setStart(e,0):n.setEnd(e,e.nodeValue?.length??0):(r=this.j.createInside.fake(),t?n.setStartBefore(e):n.setEndAfter(e),n.collapse(t),K.safeInsertNode(n,r),n.selectNode(r)),n.collapse(t),this.selectRange(n),r}setCursorIn(e,t=!1){if(this.errorNode(e),!K.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw OD(`Node element must be in editor`);let n=this.createRange(),r=e,i=e;do{if(K.isText(r)||K.isTag(r,mE))break;i=r,r=t?r.firstChild:r.lastChild}while(r);if(!r){let e=this.j.createInside.text(``);K.isTag(i,mE)?r=i:(i.appendChild(e),i=e)}let a=r||i;return K.isTag(a,mE)?(t||K.isTag(a,`br`)?n.setStartBefore(a):n.setEndAfter(a),n.collapse(t)):(n.selectNodeContents(a),n.collapse(t)),this.selectRange(n),i}selectRange(e,t=!0){let n=this.sel;return t&&!this.isFocused()&&this.j.e.current!==`focus`&&this.focus(),n&&(n.removeAllRanges(),n.addRange(e)),this.j.e.fire(`changeSelection`),this}select(e,t=!1){if(this.errorNode(e),!K.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw OD(`Node element must be in editor`);let n=this.createRange();return n[t?`selectNodeContents`:`selectNode`](e),this.selectRange(n)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let t=e.getRangeAt(0).cloneContents(),n=this.j.createInside.div();return n.appendChild(t),n.innerHTML}return``}__wrapSelectionFragments(){let e=this.range;this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return K.isText(t)&&(t=t.parentNode),t?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){let{startContainer:t,endContainer:n}=e,{startOffset:r,endOffset:i}=e;if(K.isText(n)&&i>0&&i<(n.nodeValue?.length??0)&&(n.splitText(i),i=n.nodeValue?.length??i),K.isText(t)&&r>0&&r<(t.nodeValue?.length??0)){let e=t.splitText(r);t===n&&(n=e,i=e.nodeValue?.length??0),t=e,r=0}e.setStart(t,r),e.setEnd(n,i),this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){let n=t?e.startContainer:e.endContainer;if(!K.isText(n))return;let r=t?e.startOffset:e.endOffset,i=n.nodeValue?.length??0;r===0?t?e.setStartBefore(n):e.setEndBefore(n):r>=i&&(t?e.setStartAfter(n):e.setEndAfter(n))}__collectContainedNodes(e,t){let n=[];return nD(e.childNodes).forEach(e=>{this.__isFullyContained(t,e)?n.push(e):e.childNodes.length&&t.intersectsNode(e)&&n.push(...this.__collectContainedNodes(e,t))}),n}__isFullyContained(e,t){let n=this.createRange();return n.selectNode(t),e.compareBoundaryPoints(Range.START_TO_START,n)<=0&&e.compareBoundaryPoints(Range.END_TO_END,n)>=0}__wrapSelectionRuns(e){let t=[],n=[],r=()=>{n.length&&(t.push(this.__wrapRunInFont(n)),n=[])};return e.forEach(e=>{K.isElement(e)&&this.__isOrContainsBlock(e)?(r(),t.push(...this.__wrapSelectionRuns(nD(e.childNodes)))):(n.length&&n[n.length-1].parentNode!==e.parentNode&&r(),n.push(e))}),r(),t}__isOrContainsBlock(e){return K.isBlock(e)?!0:nD(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){var t;let n=this.j.createInside.element(`font`),[r]=e;
185return(t=r.parentNode)==null||t.insertBefore(n,r),e.forEach(e=>n.appendChild(e)),n}*wrapInTagGen(e){if(this.isCollapsed()){let t=this.jodit.createInside.element(`font`,``);this.insertNode(t,!1,!1),e&&e[0]&&t.appendChild(e[0]),yield t,K.unwrap(t);return}let t=this.__wrapSelectionFragments();for(let e of t){let{firstChild:t,lastChild:n}=e;if(t&&t===n&&eO(t)){K.unwrap(e);continue}t&&eO(t)&&K.before(e,t),n&&eO(n)&&K.after(e,n),yield e,K.unwrap(e)}}wrapInTag(e){let t=[];for(let n of this.wrapInTagGen())try{if(n.firstChild&&n.firstChild===n.lastChild&&eO(n.firstChild))continue;V(e)?e(n):t.push(K.replace(n,e,this.j.createInside))}finally{let e=n.parentNode;e&&(K.unwrap(n),K.isEmpty(e)&&K.unwrap(e))}return t}commitStyle(e){lD(uA(e)>0,`Need to pass at least one option`),new yP(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed())return null;let n=this.createRange(),r=this.range;n.setStartBefore(e);let i=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),o=this.j.createInside.element(`br`),s=this.j.createInside.fake(),c=s.cloneNode();try{if(i||a){t?K.before(t,o):K.safeInsertNode(r,o);let e=(e,t)=>{let n=t(e);for(;n;){let e=t(n);if(n&&(K.isTag(n,`br`)||K.isEmptyTextNode(n)))K.safeRemove(n);else break;n=e}};e(o,e=>e.nextSibling),e(o,e=>e.previousSibling),K.after(o,c),K.before(o,s),i?(n.setEndBefore(o),r.setEndBefore(o)):(n.setEndAfter(o),r.setEndAfter(o))}else n.setEnd(r.startContainer,r.startOffset);let l=n.extractContents(),u=e=>K.each(e,e=>K.isEmptyTextNode(e)&&K.safeRemove(e));lD(e.parentNode,`Splitting fails`);try{if(u(l),u(e),e.parentNode.insertBefore(l,e),!t&&i&&o?.parentNode){let e=this.createRange();e.setStartBefore(o),this.selectRange(e)}}catch{}let d=e=>{var t;e?.parentNode?.firstChild===e?.parentNode?.lastChild&&((t=e?.parentNode)==null||t.appendChild(o.cloneNode()))};d(s),d(c)}finally{K.safeRemove(s),K.safeRemove(c)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed())return this;let{range:e}=this,t=e.cloneRange();if(!K.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return this;let n=t=>{let n=this.j.createInside.fake(),r=e.cloneRange();return r.collapse(t),K.safeInsertNode(r,n),MN(n,t,this.j.editor),n},r=n(!0),i=n(!1);t.setStartAfter(r),t.setEndBefore(i);let a=K.findSibling(r,!1),o=K.findSibling(i,!0);if(a!==o){let e=K.isElement(a)&&K.isOrContains(a,i),n=!e&&K.isElement(o)&&K.isOrContains(o,r);if(e||n){let n=e?a:o,s=n;for(;K.isElement(n);)n=e?n.firstElementChild:n.lastElementChild,n&&(e?K.isOrContains(n,i):K.isOrContains(n,r))&&(s=n);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(this.selectRange(t),K.safeRemove(r,i),this.isCollapsed())throw OD(`Selection is collapsed`);return this}};CP([H],wP.prototype,`createRange`,null),CP([H],wP.prototype,`focus`,null),CP([H],wP.prototype,`setCursorAfter`,null),CP([H],wP.prototype,`setCursorBefore`,null),CP([H],wP.prototype,`setCursorIn`,null);var TP=s({Ajax:()=>FA,Alert:()=>dM,Async:()=>mO,AsyncStorage:()=>Yj,Button:()=>GA,CommitStyle:()=>yP,Component:()=>yA,Confirm:()=>fM,ContextMenu:()=>_M,Create:()=>zj,Dialog:()=>uM,Dom:()=>K,EventEmitter:()=>vO,EventHandlersStore:()=>_O,Eventify:()=>zO,FileBrowser:()=>$M,Helpers:()=>_A,History:()=>sN,Icon:()=>RA,ImageEditor:()=>VM,IndexedDBProvider:()=>Bj,LazyWalker:()=>VO,LocalStorageProvider:()=>Gj,MemoryStorageProvider:()=>Kj,Plugin:()=>nN,PluginSystem:()=>IO,Popup:()=>Lj,ProgressBar:()=>Rj,Prompt:()=>pM,Response:()=>NA,STATUSES:()=>JE,Selection:()=>wP,Snapshot:()=>iN,StatusBar:()=>lN,Storage:()=>Jj,StorageKey:()=>qj,Table:()=>fN,ToolbarButton:()=>hN,ToolbarCollection:()=>xN,ToolbarContent:()=>_N,ToolbarEditorCollection:()=>CN,ToolbarSelect:()=>yN,UIBlock:()=>rj,UIButton:()=>WA,UIButtonGroup:()=>XA,UIButtonState:()=>UA,UICheckbox:()=>xj,UIElement:()=>VA,UIFileInput:()=>Cj,UIForm:()=>hj,UIGroup:()=>JA,UIInput:()=>uj,UIList:()=>Pj,UIMessages:()=>$j,UISelect:()=>pj,UISeparator:()=>Tj,UISpacer:()=>Dj,UITextArea:()=>vj,UITooltip:()=>tj,Uploader:()=>jN,View:()=>nM,ViewComponent:()=>bA,ViewWithToolbar:()=>sM,canUseIndexedDB:()=>Uj,canUsePersistentStorage:()=>Wj,clearUseIndexedDBCache:()=>Hj,defaultNameSpace:()=>gO,observable:()=>jA}),EP=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},DP,OP=`data-jodit-default-style-display`,kP=`data-jodit-default-classes`,AP={contenteditable:!1},jP=DP=class extends sM{className(){return`Jodit`}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise(e=>{this.hookStatus(`ready`,()=>e(this))})}static get ready(){return new Promise(e=>{ZO.on(`joditready`,e)})}get text(){if(this.editor)return this.editor.innerText||``;let e=this.createInside.div();return e.innerHTML=this.getElementValue(),e.innerText||``}get defaultTimeout(){return tO(this.o.defaultTimeout)?this.o.defaultTimeout:J.defaultOptions.defaultTimeout}static atom(e){return gk(e)}static make(e,t){return new this(e,t)}static isJoditAssigned(e){return e&&QD(e.component)&&!e.component.isInDestruct}static get defaultOptions(){return J.defaultOptions}static configure(e){Sk(DP.defaultOptions,e)}get createInside(){return new zj(()=>this.ed,this.o.createAttributes)}__setPlaceField(e,t){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[e]=t}
185get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(e){this.__setPlaceField(`editor`,e)}get container(){return this.currentPlace.container}set container(e){this.__setPlaceField(`container`,e)}get workplace(){return this.currentPlace.workplace}get message(){return this.getMessageModule(this.workplace)}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(e){this.__setPlaceField(`iframe`,e)}get history(){return this.currentPlace.history}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(e){this.__setPlaceField(`editorWindow`,e)}get ew(){return this.editorWindow}get editorDocument(){return this.currentPlace.editorWindow.document}get ed(){return this.editorDocument}get options(){return this.currentPlace.options}set options(e){this.__options=e,this.__setPlaceField(`options`,e)}get s(){return this.selection}get uploader(){return this.getInstance(`Uploader`,this.o.uploader)}get filebrowser(){let e=this,t=bk({defaultTimeout:e.defaultTimeout,uploader:e.o.uploader,language:e.o.language,license:e.o.license,theme:e.o.theme,shadowRoot:e.o.shadowRoot,defaultCallback(t){t.files&&t.files.length&&t.files.forEach((n,r)=>{let i=t.baseurl+n;t.isImages&&t.isImages[r]?e.s.insertImage(i,null,e.o.imageDefaultWidth):e.s.insertNode(e.createInside.fromHTML(`<a href='${i}' title='${i}'>${i}</a>`))})}},this.o.filebrowser);return e.getInstance(`FileBrowser`,t)}get mode(){return this.__mode}set mode(e){this.setMode(e)}getNativeEditorValue(){let e=this.e.fire(`beforeGetNativeEditorValue`);return U(e)?e:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(e){let t={value:e};this.e.fire(`beforeSetNativeEditorValue`,t)||this.editor&&(this.editor.innerHTML=t.value)}get value(){return this.getEditorValue()}set value(e){this.setEditorValue(e),this.history.__processChanges()}synchronizeValues(){this.__imdSynchronizeValues()}__imdSynchronizeValues(){this.setEditorValue()}getEditorValue(e=!0,t){let n;if(n=this.e.fire(`beforeGetValueFromEditor`,t),n!==void 0)return n;n=this.getNativeEditorValue().replace(nE(),``),e&&(n=n.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,``)),n===`<br>`&&(n=``);let r={value:n};return this.e.fire(`afterGetValueFromEditor`,r,t),r.value}setEditorValue(e){let t=this.e.fire(`beforeSetValueToEditor`,e);if(t===!1)return;if(U(t)&&(e=t),!this.editor){e!==void 0&&this.__setElementValue(e);return}if(!U(e)&&!QE(e))throw OD(`value must be string`);!QE(e)&&this.getNativeEditorValue()!==e&&this.setNativeEditorValue(e),this.e.fire(`postProcessSetEditorValue`);let n=this.getElementValue(),r=this.getEditorValue();if(!this.__isSilentChange&&n!==r&&this.__callChangeCount<10){this.__setElementValue(r),this.__callChangeCount+=1;try{this.history.__upTick(),this.e.fire(`change`,r,n),this.e.fire(this.history,`change`,r,n)}finally{this.__callChangeCount=0}}}updateElementValue(){this.__setElementValue(this.getEditorValue())}getElementValue(){return this.element.value===void 0?this.element.innerHTML:this.element.value}__setElementValue(e){if(!U(e))throw OD(`value must be string`);if(this.element!==this.container&&e!==this.getElementValue()){let t={value:e};FD(this.e.fire(`beforeSetElementValue`,t),()=>{this.element.value===void 0?this.element.innerHTML=t.value:this.element.value=t.value,this.e.fire(`afterSetElementValue`,t)})}}registerCommand(e,t,n){let r=e.toLowerCase(),i=this.commands.get(r);if(i===void 0&&(i=[],this.commands.set(r,i)),i.push(t),!V(t)){let i=this.o.commandToHotkeys[r]||this.o.commandToHotkeys[e]||t.hotkeys;i&&this.registerHotkeyToCommand(i,r,n?.stopPropagation)}return this}registerHotkeyToCommand(e,t,n=!0){let r=QO(e).map($k).map(e=>e+`.hotkey`).join(` `);this.e.off(r).on(r,(e,r)=>(r&&(r.shouldStop=n??!0),this.execCommand(t)))}execCommand(e,t,n,...r){if(this.s.isFocused()||this.s.focus(),this.o.readonly&&!this.o.allowCommandsInReadOnly.includes(e))return;let i;if(e=e.toLowerCase(),i=this.e.fire(`beforeCommand${mA(e)}`,t,n,...r),i!==!1&&(i=this.e.fire(`beforeCommand`,e,t,n,...r)),i!==!1&&(i=this.__execCustomCommands(e,t,n,...r)),i!==!1){this.s.focus();
185try{i=this.nativeExecCommand(e,t,n)}catch{}}return this.e.fire(`afterCommand`,e,t,n),this.__imdSynchronizeValues(),i}nativeExecCommand(e,t,n){this.__isSilentChange=!0;try{return this.ed.execCommand(e,t,n)}finally{this.__isSilentChange=!1}}__execCustomCommands(e,t,n,...r){e=e.toLowerCase();let i=this.commands.get(e);if(i!==void 0){let a;return i.forEach(i=>{let o;o=V(i)?i:i.exec;let s=o.call(this,e,t,n,...r);s!==void 0&&(a=s)}),a}}lock(e=`any`){return super.lock(e)?(this.__selectionLocked=this.s.save(),this.s.clear(),this.container.classList.add(`jodit_lock`),this.e.fire(`lock`,!0),!0):!1}unlock(){return super.unlock()?(this.container.classList.remove(`jodit_lock`),this.__selectionLocked&&this.s.restore(),this.e.fire(`lock`,!1),!0):!1}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===1}getRealMode(){if(this.getMode()!==3)return this.getMode();let e=this.od.activeElement;return e&&(e===this.iframe||K.isOrContains(this.editor,e)||K.isOrContains(this.toolbar.container,e))?1:2}setMode(e){let t=this.getMode(),n={mode:parseInt(e.toString(),10)},r=[`jodit-wysiwyg_mode`,`jodit-source__mode`,`jodit_split_mode`];this.e.fire(`beforeSetMode`,n)!==!1&&(this.__mode=[2,1,3].includes(n.mode)?n.mode:1,this.o.saveModeInStorage&&this.storage.set(`jodit_default_mode`,this.mode),r.forEach(e=>{this.container.classList.remove(e)}),this.container.classList.add(r[this.mode-1]),t!==this.getMode()&&this.e.fire(`afterSetMode`))}toggleMode(){let e=this.getMode();[2,1,this.o.useSplitMode?3:9].includes(e+1)?e+=1:e=1,this.setMode(e)}setDisabled(e){this.o.disabled=e;let t=this.__wasReadOnly;this.setReadOnly(e||t),this.__wasReadOnly=t,this.editor&&(this.editor.setAttribute(`aria-disabled`,e.toString()),this.container.classList.toggle(`jodit_disabled`,e),this.e.fire(`disabled`,e))}getDisabled(){return this.o.disabled}setReadOnly(e){this.__wasReadOnly!==e&&(this.__wasReadOnly=e,this.o.readonly=e,e?this.editor&&this.editor.removeAttribute(`contenteditable`):this.editor&&this.editor.setAttribute(`contenteditable`,`true`),this.e&&this.e.fire(`readonly`,e))}getReadOnly(){return this.o.readonly}focus(){this.getMode()!==2&&this.s.focus()}get isFocused(){return this.s.isFocused()}beforeInitHook(){}afterInitHook(){}initOptions(e){this.options=bk(e||{},J.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}constructor(e,t){super(t,!0),this.isJodit=!0,this.commands=new Map,this.__selectionLocked=null,this.__wasReadOnly=!1,this.editorIsActive=!1,this.__mode=1,this.__callChangeCount=0,this.__isSilentChange=!1,this.currentPlace={options:this.__options,container:this.__container},this.places=[],this.__elementToPlace=new Map;try{let t=rk(e,this.options.shadowRoot||this.od);if(DP.isJoditAssigned(t))return t.component}catch(e){throw this.destruct(),e}this.setStatus(JE.beforeInit),this.id=G(rk(e,this.o.shadowRoot||this.od),`id`)||new Date().getTime().toString(),HO[this.id]=this,this.attachEvents(t),this.e.on(this.ow,`resize`,()=>{this.e&&this.e.fire(`resize`)}),this.e.on(`prepareWYSIWYGEditor`,this.__prepareWYSIWYGEditor),this.selection=new wP(this),FD(this.beforeInitHook(),()=>{if(this.isInDestruct)return;this.e.fire(`beforeInit`,this),q.__init(this),this.e.fire(`afterPluginSystemInit`,this),this.e.on(`changePlace`,()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)}),this.places.length=0;let n=this.addPlace(e,t);HO[this.id]=this,FD(n,()=>{this.isInDestruct||(this.e&&this.e.fire(`afterInit`,this),FD(this.afterInitHook()),this.setStatus(JE.ready),this.e.fire(`afterConstructor`,this))})})}addPlace(e,t){let n=rk(e,this.o.shadowRoot||this.od);this.attachEvents(t),n.attributes&&nD(n.attributes).forEach(e=>{let n=e.name,r=e.value;J.defaultOptions[n]!==void 0&&(!t||t[n]===void 0)&&([`readonly`,`disabled`].indexOf(n)!==-1&&(r=r===``||r===`true`),/^[0-9]+(\.)?([0-9]+)?$/.test(r.toString())&&(r=Number(r)),this.options[n]=r)});let r=this.c.div(`jodit-container`);r.classList.add(`jodit`),r.classList.add(`jodit-container`),r.classList.add(`jodit_theme_${this.o.theme||`default`}`),MP(this.o.className,r),this.o.containerStyle&&W(r,this.o.containerStyle);let{styleValues:i}=this.o;
185Object.keys(i).forEach(e=>{let t=fD(e);r.style.setProperty(`--jd-${t}`,i[e])}),r.setAttribute(`contenteditable`,`false`);let a=null;this.o.inline&&([`TEXTAREA`,`INPUT`].indexOf(n.nodeName)===-1&&(r=n,n.setAttribute(kP,n.className.toString()),a=r.innerHTML,r.innerHTML=``),r.classList.add(`jodit_inline`),r.classList.add(`jodit-container`)),n!==r&&(n.style.display&&n.setAttribute(OP,n.style.display),n.style.display=`none`);let o=`workplace-slot`,s=this.c.div(this.getFullElName(o,`above`),AP);s.setAttribute(`data-jodit-above-toolbar`,``),K.appendChildFirst(r,s);let c=this.c.div(this.getFullElName(o,`top`),AP);r.appendChild(c);let l=this.c.div(this.getFullElName(o,`center`),AP),u=this.c.div(`jodit-workplace`,AP),d=this.c.div(this.getFullElName(o,`left`),AP),f=this.c.div(this.getFullElName(o,`right`),AP);l.appendChild(d),l.appendChild(u),l.appendChild(f),r.appendChild(l);let p=this.c.div(this.getFullElName(o,`bottom`),AP);r.appendChild(p),n.parentNode&&n!==r&&n.parentNode.insertBefore(r,n),Object.defineProperty(n,"component",{enumerable:!1,configurable:!0,value:this});let m=this.c.div(`jodit-wysiwyg`,{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});u.appendChild(m);let h={editor:m,element:n,container:r,workplace:u,slots:{above:s,top:c,bottom:p,center:l,left:d,right:f},statusbar:new lN(this,r),options:this.isReady?bk(t||{},J.defaultOptions):this.options,history:new sN(this),editorWindow:this.ow};this.__elementToPlace.set(m,h),this.setCurrentPlace(h),this.places.push(h),this.setNativeEditorValue(this.getElementValue());let g=this.__initEditor(a),_=this.options;return FD(g,()=>{_.enableDragAndDropFileToEditor&&_.uploader&&(_.uploader.url||_.uploader.insertImageAsBase64URI)?this.uploader.bind(this.editor):_.enableDragAndDropFileToEditor||this.e.on(m,`drop`,e=>{e.dataTransfer?.files?.length&&e.preventDefault()}),this.__elementToPlace.get(this.editor)||this.__elementToPlace.set(this.editor,h),this.e.fire(`afterAddPlace`,h)})}addDisclaimer(e){this.workplace.appendChild(e)}setCurrentPlace(e){this.currentPlace!==e&&(this.isEditorMode()||this.setMode(1),this.currentPlace=e,this.buildToolbar(),this.isReady&&this.e.fire(`changePlace`,e))}__initEditor(e){return FD(this.__createEditor(),()=>{if(this.isInDestruct)return;if(this.element!==this.container){let e=this.getElementValue();e!==this.getEditorValue()&&this.setEditorValue(e)}else e!=null&&this.setEditorValue(e);let t=this.o.defaultMode;if(this.o.saveModeInStorage){let e=this.storage.get(`jodit_default_mode`);typeof e==`string`&&(t=parseInt(e,10))}this.setMode(t),this.o.readonly&&(this.__wasReadOnly=!1,this.setReadOnly(!0)),this.o.disabled&&this.setDisabled(!0);try{this.ed.execCommand(`defaultParagraphSeparator`,!1,this.o.enter.toLowerCase())}catch{}})}__createEditor(){let e=this.editor,t=this.e.fire(`createEditor`,this);return FD(t,()=>{this.isInDestruct||((t===!1||jD(t))&&K.safeRemove(e),MP(this.o.editorClassName,this.editor),this.o.style&&W(this.editor,this.o.style),this.e.on(`synchro`,()=>{this.setEditorValue()}).on(`focus`,()=>{this.editorIsActive=!0}).on(`blur`,()=>this.editorIsActive=!1),this.__prepareWYSIWYGEditor(),this.o.triggerChangeEvent&&this.e.on(`change`,this.async.debounce(()=>{this.e&&this.e.fire(this.element,`change`)},this.defaultTimeout)))})}__prepareWYSIWYGEditor(){let{editor:e}=this;if(this.o.direction){let e=this.o.direction.toLowerCase()===`rtl`?`rtl`:`ltr`;this.editor.style.direction=e,this.editor.setAttribute(`dir`,e),this.container.style.direction=e,this.container.setAttribute(`dir`,e),this.toolbar.setDirection(e)}this.e.on(e,`mousedown touchstart focus`,()=>{let t=this.__elementToPlace.get(e);t&&this.setCurrentPlace(t)}).on(e,`compositionend`,this.synchronizeValues).on(e,`selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur`,e=>{if(!(this.o.readonly||this.__isSilentChange)&&!(e instanceof this.ew.KeyboardEvent&&e.isComposing)&&this.e&&this.e.fire){if(this.e.fire(e.type,e)===!1)return!1;this.synchronizeValues()}}).on(this.ow,`mouseup`,t=>{if(this.o.readonly||this.__isSilentChange)return;let n=t.target;n&&tO(n.nodeType)&&e.contains(n)||!this.s.isInsideArea||(this.e.fire(`changeSelection`),this.synchronizeValues())})}fetch(e,t){let n=new FA({url:e,...t},this.o.defaultAjaxOptions),r=()=>{this.e.off(`beforeDestruct`,r),this.progressbar.progress(100).hide(),n.destruct()};this.e.one(`beforeDestruct`,r),this.progressbar.show().progress(30);let i=n.send();return i.finally(r).catch(()=>null),i}destruct(){var e,t;if(this.isInDestruct)return;this.setStatus(JE.beforeDestruct),this.__elementToPlace.clear(),(e=iO(this,`storage`))==null||e.clear(),(t=iO(this,`buffer`))==null||t.clear(),this.commands.clear(),this.__selectionLocked=null,this.e.off(this.ow,`resize`),this.e.off(this.ow),this.e.off(this.od),this.e.off(this.od.body);let n=this.editor?this.getEditorValue():``;
185this.places.forEach(({container:e,workplace:t,statusbar:r,element:i,iframe:a,editor:o,history:s})=>{if(i){if(i!==e)if(i.hasAttribute(OP)){let e=G(i,OP);e&&(i.style.display=e,i.removeAttribute(OP))}else i.style.display=``;else i.hasAttribute(kP)&&(i.className=G(i,kP)||``,i.removeAttribute(kP));i.hasAttribute(`style`)&&!G(i,`style`)&&i.removeAttribute(`style`),r.destruct(),this.e.off(e),this.e.off(i),this.e.off(o),K.safeRemove(t),K.safeRemove(o),e!==i&&K.safeRemove(e),Object.defineProperty(i,"component",{enumerable:!1,configurable:!0,value:null}),K.safeRemove(a),e===i&&(i.innerHTML=n),s.destruct()}}),this.places.length=0,this.currentPlace={},delete HO[this.id],super.destruct()}};jP.fatMode=!0,jP.plugins=q,jP.modules=KO,jP.ns=KO,jP.decorators={},jP.constants=YT,jP.instances=HO,jP.lang=WE,jP.core={Plugin:nN},EP([aO],jP.prototype,`createInside`,null),EP([aO],jP.prototype,`message`,null),EP([aO],jP.prototype,`s`,null),EP([aO],jP.prototype,`uploader`,null),EP([aO],jP.prototype,`filebrowser`,null),EP([SA()],jP.prototype,`synchronizeValues`,null),EP([Y(`:internalChange`)],jP.prototype,`updateElementValue`,null),EP([H],jP.prototype,`__prepareWYSIWYGEditor`,null),jP=DP=EP([CA(mM)],jP);function MP(e,t){e&&e.split(/\s+/).forEach(e=>t.classList.add(e))}var NP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg> `,PP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1203 544q0 13-10 23l-393 393 393 393q10 10 10 23t-10 23l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg> `,FP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1171 960q0 13-10 23l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg> `,IP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1395 1184q0 13-10 23l-50 50q-10 10-23 10t-23-10l-393-393-393 393q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg> `,LP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z"/> </svg> `,RP=`<svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> <g stroke="none" stroke-width="1"> <path d="M14,1.4 L12.6,0 L7,5.6 L1.4,0 L0,1.4 L5.6,7 L0,12.6 L1.4,14 L7,8.4 L12.6,14 L14,12.6 L8.4,7 L14,1.4 Z"/> </g> </svg> `,zP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h896q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-640q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h640q26 0 45 19t19 45z"/> </svg> `,BP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1472 930v318q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-10 10-23 10-3 0-9-2-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-254q0-13 9-22l64-64q10-10 23-10 6 0 12 3 20 8 20 29zm231-489l-814 814q-24 24-57 24t-57-24l-430-430q-24-24-24-57t24-57l110-110q24-24 57-24t57 24l263 263 647-647q24-24 57-24t57 24l110 110q24 24 24 57t-24 57z"/> </svg> `,VP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 10 10"> <path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/> </svg> `,HP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24" > <circle cx="12" cy="12" r="2.2"/> <circle cx="12" cy="5" r="2.2"/> <circle cx="12" cy="19" r="2.2"/> </svg> `,UP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 11
1857-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z"/> </svg> `,WP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1152 512v-472q22 14 36 28l408 408q14 14 28 36h-472zm-128 32q0 40 28 68t68 28h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544z"/> </svg> `,GP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1728 608v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z"/> </svg> `,KP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/> </svg> `,qP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg> `,JP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></svg> `,YP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 32 32"> <path d="M27 4l-15 15-7-7-5 5 12 12 20-20z"/> </svg> `,XP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"/></svg> `,ZP=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M1600 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"/></svg> `,QP=`<svg viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"> <path d="M5.9814 11.8049C5.59087 11.4144 5.59087 10.7812 5.9814 10.3907L10.224 6.14806C10.6146 5.75754 11.2477 5.75754 11.6383 6.14806C12.0288 6.53859 12.0288 7.17175 11.6383 7.56228L7.39561 11.8049C7.00509 12.1954 6.37192 12.1954 5.9814 11.8049Z"/> <path d="M0.707107 12.0208C0.316582 11.6303 0.316582 10.9971 0.707107 10.6066L10.6066 0.707121C10.9971 0.316597 11.6303 0.316596 12.0208 0.707121C12.4113 1.09764 12.4113 1.73081 12.0208 2.12133L2.12132 12.0208C1.7308 12.4114 1.09763 12.4114 0.707107 12.0208Z"/> </svg> `,$P=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg> `,eF=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M512 1536h768v-384h-768v384zm896 0h128v-896q0-14-10-38.5t-20-34.5l-281-281q-10-10-34-20t-39-10v416q0 40-28 68t-68 28h-576q-40 0-68-28t-28-68v-416h-128v1280h128v-416q0-40 28-68t68-28h832q40 0 68 28t28 68v416zm-384-928v-320q0-13-9.5-22.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5-9.5t9.5-22.5zm640 32v928q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h928q40 0 88 20t76 48l280 280q28 28 48 76t20 88z"/> </svg> `,tF=`<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path stroke="null" d="m42.276011,26.302547c0.098397,-0.76605 0.172194,-1.54407 0.172194,-2.33406s-0.073797,-1.56801 -0.172194,-2.33406l5.202718,-3.961917c0.467384,-0.359086 0.602679,-1.005441 0.29519,-1.532101l-4.919828,-8.29489c-0.307489,-0.51469 -0.947067,-0.730142 -1.500548,-0.51469l-6.125186,2.405877c-1.266856,-0.945594 -2.656707,-1.747553 -4.157255,-2.357999l-0.922468,-6.343855c-0.110696,-0.562568 -0.614979,-1.005441 -1.229957,-1.005441l-9.839656,0c-0.614979,0 -1.119261,0.442873 -1.217657,1.005441l-0.922468,6.343855c-1.500548,0.610446 -2.890399,1.400436 -4.157255,2.357999l-6.125186,-2.405877c-0.553481,-0.203482 -1.193058,0 -1.500548,0.51469l-4.919828,8.29489c-0.307489,0.51469 -0.172194,1.161045 0.29519,1.532101l5.190419,3.961917c-0.098397,0.76605 -0.172194,1.54407 -0.172194,2.33406s0.073797,1.56801 0.172194,2.33406l-5.190419,3.961917c-0.467384,0.359086 -0.602679,1.005441 -0.29519,1.532101l4.919828,8.29489c0.307489,0.51469 0.947067,0.730142 1.500548,0.51469l6.125186,-2.405877c1.266856,0.945594 2.656707,1.747553 4.157255,2.357999l0.922468,6.343855c0.098397,0.562568 0.602679,1.005441 1.217657,1.005441l9.839656,0c0.614979,0 1.119261,-0.442873 1.217657,-1.005441l0.922468,-6.343855c1.500548,-0.610446 2.890399,-1.400436 4.157255,-2.357999l6.125186,2.405877c0.553481,0.203482 1.193058,0 1.500548,-0.51469l4.919828,-8.29489c0.307489,-0.51469 0.172194,-1.161045 -0.29519,-1.532101l-5.190419,-3.961917zm-18.277162,6.044617c-4.759934,0 -8.609699,-3.746465 -8.609699,-8.378677s3.849766,-8.378677 8.609699,-8.378677s8.609699,3.746465 8.609699,8.378677s-3.849766,8.378677 -8.609699,8.378677z"/> </svg> `,nF=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"/> </svg> `,rF=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z"/> </svg> `,iF=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1344 1472q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28h-1472q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h427q21 56 70.5 92t110.5 36h256q61 0 110.5-36t70.5-92h427q40 0 68 28t28 68zm-325-648q-17 40-59 40h-256v448q0 26-19 45t-45 19h-256q-26 0-45-19t-19-45v-448h-256q
185-42 0-59-40-17-39 14-69l448-448q18-19 45-19t45 19l448 448q31 30 14 69z"/> </svg> `,aF=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1216 320q0 26-19 45t-45 19h-128v1024h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-1024h-128q-26 0-45-19t-19-45 19-45l256-256q19-19 45-19t45 19l256 256q19 19 19 45z"/> </svg> `,oF=s({angle_down:()=>NP,angle_left:()=>PP,angle_right:()=>FP,angle_up:()=>IP,bin:()=>LP,cancel:()=>RP,center:()=>zP,check:()=>BP,chevron:()=>VP,dots:()=>HP,eye:()=>UP,file:()=>WP,folder:()=>GP,info_circle:()=>KP,left:()=>qP,lock:()=>JP,ok:()=>YP,pencil:()=>XP,plus:()=>ZP,resize_handler:()=>QP,right:()=>$P,save:()=>eF,settings:()=>tF,unlock:()=>nF,update:()=>rF,upload:()=>iF,valign:()=>aF}),sF={"Type something":`إبدأ Ù٠اÙÙØªØ§Ø¨Ø©...`,"About Jodit":`ØÙÙ Ø¬ÙØ¯Ùت`,"Jodit Editor":`Ù
ØØ±Ø± Ø¬ÙØ¯Ùت`,"Jodit User's Guide":`دÙÙÙ Ù
ستخدÙ
Ø¬ÙØ¯Ùت`,"contains detailed help for using":`ÙØØªÙ٠عÙÙ Ù
ساعدة Ù
ÙØµÙØ© ÙÙØ§Ø³ØªØ®Ø¯Ø§Ù
`,"For information about the license, please go to our website:":`ÙÙØØµÙ٠عÙÙ Ù
عÙÙÙ
ات ØÙÙ Ø§ÙØªØ±Ø®ÙØµØ ÙØ±Ø¬Ù Ø§ÙØ°Ùاب ÙÙ
ÙÙØ¹Ùا:`,"Buy full version":`شراء اÙÙØ³Ø®Ø© اÙÙØ§Ù
ÙØ©`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`ØÙÙÙ Ø§ÙØ·Ø¨Ø¹ ÙØ§ÙÙØ´Ø± © XDSoft.net - Chupurnov Valeriy. ÙÙ Ø§ÙØÙÙÙ Ù
ØÙÙØ¸Ø©.`,Anchor:`Ù
ÙØ±Ùساة`,"Open in new tab":`ÙØªØ ÙÙ ÙØ§Ùذة Ø¬Ø¯ÙØ¯Ø©`,"Open in fullsize":`ÙØªØ اÙÙ
ØØ±Ø± ÙÙ Ø§ÙØØ¬Ù
اÙÙØ§Ù
Ù`,"Clear Formatting":`Ù
Ø³Ø Ø§ÙØªÙسÙÙ`,"Fill color or set the text color":`Ù
ÙØ¡ اÙÙÙ٠أ٠تعÙÙÙ ÙÙ٠اÙÙØµ`,Redo:`إعادة`,Undo:`تراجع`,Bold:`Ø¹Ø±ÙØ¶`,Italic:`Ù
ائÙ`,"Insert Unordered List":`إدراج ÙØ§Ø¦Ù
Ø© ØºÙØ± Ù
رتبة`,"Insert Ordered List":`إدراج ÙØ§Ø¦Ù
Ø© Ù
رتبة`,"Align Center":`Ù
ØØ§Ø°Ø§Ø© ÙÙÙØ³Ø·`,"Align Justify":`Ù
ØØ§Ø°Ø§Ø© Ù
ثبتة`,"Align Left":`Ù
ØØ§Ø°Ø§Ø© ÙÙÙØ³Ø§Ø±`,"Align Right":`Ù
ØØ§Ø°Ø§Ø© ÙÙÙÙ
ÙÙ`,"Insert Horizontal Line":`إدراج خط Ø£ÙÙÙ`,"Insert Image":`إدراج ØµÙØ±Ø©`,"Insert file":`ادخا٠اÙÙ
ÙÙ`,"Insert youtube/vimeo video":`إدراج ÙÙØ¯ÙÙ ÙÙØªÙÙØ¨/ÙÙÙ
ÙÙ `,"Insert link":`إدراج رابط`,"Font size":`ØØ¬Ù
Ø§ÙØ®Ø·`,"Font family":`ÙÙØ¹ Ø§ÙØ®Ø·`,"Insert format block":`إدراج ÙØªÙØ© ØªÙØ³ÙÙ`,Normal:`عادÙ`,"Heading 1":`عÙÙØ§Ù 1`,"Heading 2":`عÙÙØ§Ù 2`,"Heading 3":`عÙÙØ§Ù 3`,"Heading 4":`عÙÙØ§Ù 4`,Quote:`Ø¥ÙØªØ¨Ø§Ø³`,Code:`ÙÙØ¯`,Insert:`إدراج`,"Insert table":`إدراج جدÙÙ`,"Decrease Indent":`تÙÙÙ٠اÙÙ
Ø³Ø§ÙØ© Ø§ÙØ¨Ø§Ø¯Ø¦Ø©`,"Increase Indent":`Ø²ÙØ§Ø¯Ø© اÙÙ
Ø³Ø§ÙØ© Ø§ÙØ¨Ø§Ø¯Ø¦Ø©`,"Select Special Character":`ØªØØ¯Ùد Ø£ØØ±Ù خاصة`,"Insert Special Character":`إدراج ØØ±Ù خاص`,"Paint format":`ØªÙØ³ÙÙ Ø§ÙØ±Ø³Ù
`,"Change mode":`تغÙÙØ± اÙÙØ¶Ø¹`,Margins:`ÙÙØ§Ù
Ø´`,top:`أعÙÙ`,right:`ÙÙ
ÙÙ`,bottom:`أسÙÙ`,left:`ÙØ³Ø§Ø±`,Styles:`Ø§ÙØ£ÙÙ
اط`,Classes:`Ø§ÙØ·Ø¨Ùات`,Align:`Ù
ØØ§Ø°Ø§Ø©`,Right:`اÙÙÙ
ÙÙ`,Center:`اÙÙØ³Ø·`,Left:`اÙÙØ³Ø§Ø±`,"--Not Set--":`--ØºÙØ± Ù
Ø¶Ø¨ÙØ·--`,Src:`Src`,Title:`Ø§ÙØ¹ÙÙØ§Ù`,Alternative:`Ø§ÙØ¹ÙÙØ§Ù Ø§ÙØ¨Ø¯ÙÙ`,Link:`Ø§ÙØ±Ø§Ø¨Ø·`,"Open link in new tab":`Ø§ÙØªØ Ø§ÙØ±Ø§Ø¨Ø· ÙÙ ÙØ§Ùذة Ø¬Ø¯ÙØ¯Ø©`,Image:`Ø§ÙØµÙرة`,file:`Ù
ÙÙ`,Advanced:`Ù
ØªÙØ¯Ù
`,"Image properties":`خصائص Ø§ÙØµÙرة`,Cancel:`Ø¥ÙØºØ§Ø¡`,Ok:`ØØ³Ùا`,"File Browser":`Ù
ØªØµÙØ اÙÙ
ÙÙØ§Øª`,"Error on load list":`ØØ¯Ø« خطأ Ù٠تØÙ
Ù٠اÙÙØ§Ø¦Ù
Ø© `,"Error on load folders":`ØØ¯Ø« خطأ Ù٠تØÙ
Ù٠اÙÙ
Ø¬ÙØ¯Ø§Øª`,"Are you sure?":`ÙÙ Ø£ÙØª ÙØ§Ø«ÙØ`,"Enter Directory name":`أدخ٠اسÙ
اÙÙ
Ø¬ÙØ¯`,"Create directory":`Ø¥ÙØ´Ø§Ø¡ Ù
Ø¬ÙØ¯`,"type name":`Ø£ÙØªØ¨ إسÙ
`,"type dir name":`Ø£ÙØªØ¨ إسÙ
`,"Drop image":`Ø¥Ø³ÙØ§Ø· ØµÙØ±Ø©`,"Drop file":`Ø¥Ø³ÙØ§Ø· اÙÙ
ÙÙ`,"or click":`أ٠أÙÙØ±`,"Alternative text":`اÙÙØµ Ø§ÙØ¨Ø¯ÙÙ`,Upload:`Ø±ÙØ¹`,Browse:`ØªØµÙØ`,Backgroun
185d:`Ø§ÙØ®ÙÙÙØ©`,Text:`ÙØµ`,Top:`أعÙÙ`,Middle:`اÙÙØ³Ø·`,Bottom:`Ø§ÙØ£Ø³ÙÙ`,"Insert column before":`إدراج عÙ
ÙØ¯ ÙØ¨Ù`,"Insert column after":`إدراج عÙ
ÙØ¯ بعد`,"Insert row above":`إدراج ص٠أعÙÙ`,"Insert row below":`إدراج ص٠أسÙÙ`,"Delete table":`ØØ°Ù Ø§ÙØ¬Ø¯ÙÙ`,"Delete row":`ØØ°Ù Ø§ÙØµÙ`,"Delete column":`ØØ°Ù Ø§ÙØ¹Ù
ÙØ¯`,"Empty cell":`Ø®ÙÙØ© ÙØ§Ø±ØºØ©`,"Chars: %d":`%d ØØ±Ù`,"Words: %d":`%d ÙÙØ§Ù
`,"Strike through":`اضرب Ù
Ù Ø®ÙØ§Ù`,Underline:`Ø£ÙØ¯`,superscript:`ØØ±Ù ÙÙÙÙ`,subscript:`Ù
Ø®Ø·ÙØ·Ø©`,"Cut selection":`ÙØ·Ø¹ Ø§ÙØ§Ø®ØªÙار`,"Select all":`اختر اÙÙÙ`,Break:`Ø§Ø³ØªØ±Ø§ØØ©`,"Search for":`Ø§ÙØ¨ØØ« عÙ`,"Replace with":`استبد٠ب`,Replace:`Ù
ØÙ`,Paste:`Ù
عجÙÙ`,"Choose Content to Paste":`اختر Ù
ØØªÙÙ ÙÙØµÙ`,source:`Ù
صدر`,bold:`Ø¨Ø§ÙØ®Ø· Ø§ÙØ¹Ø±Ùض`,italic:`Ù
ائÙ`,brush:`شغÙ`,link:`ØµÙØ©`,undo:`Ø¥ÙØºØ§Ø¡`,redo:`ÙØ±Ø±`,table:`طاÙÙØ©`,image:`ØµÙØ±Ø©`,eraser:`ÙØ¸ÙÙ`,paragraph:`ÙÙØ±Ø©`,fontsize:`ØØ¬Ù
Ø§ÙØ®Ø·`,video:`ÙÙØ¯ÙÙ`,font:`Ø§ÙØ®Ø·`,about:`ØÙ٠اÙÙ
ØØ±Ø±`,print:`طباعة`,underline:`Ø£ÙØ¯`,strikethrough:`شطب`,indent:`اÙÙ
Ø³Ø§ÙØ© Ø§ÙØ¨Ø§Ø¯Ø¦Ø©`,outdent:`ÙØªÙØ¡`,fullsize:`Ù
ÙØ¡ Ø§ÙØ´Ø§Ø´Ø©`,shrink:`Ø§ÙØØ¬Ù
Ø§ÙØªÙÙÙØ¯Ù`,hr:`Ø§ÙØ®Ø·`,ul:`ÙØ§Ø¦Ù
Ø©`,ol:`ÙØ§Ø¦Ù
Ø© Ù
رÙÙ
Ø©`,cut:`ÙØ·Ø¹`,selectall:`اختر اÙÙÙ`,"Embed code":`ÙØ§ÙÙÙ`,"Open link":`ÙØªØ Ø§ÙØ±Ø§Ø¨Ø·`,"Edit link":`تعدÙÙ Ø§ÙØ±Ø§Ø¨Ø·`,"No follow":`سÙ
Ø© Nofollow`,Unlink:`Ø¥Ø²Ø§ÙØ© Ø§ÙØ±Ø§Ø¨Ø·`,Update:`ØªØØ¯ÙØ«`,pencil:`ÙØªØØ±Ùر`,Eye:`Ù
راجعة`," URL":`URL`,Edit:`ØªØØ±Ùر`,"Horizontal align":`Ù
ØØ§Ø°Ø§Ø© Ø£ÙÙÙØ©`,Filter:`ÙÙØªØ±`,"Sort by changed":`ع٠طرÙÙ Ø§ÙØªØºÙÙØ±`,"Sort by name":`Ø¨Ø§ÙØ§Ø³Ù
`,"Sort by size":`ØØ³Ø¨ Ø§ÙØØ¬Ù
`,"Add folder":`Ø¥Ø¶Ø§ÙØ© Ù
Ø¬ÙØ¯`,Reset:`إعادة`,Save:`Ø§ØØªÙظ`,"Save as ...":`ØÙظ باسÙ
`,Resize:`تغÙÙØ± Ø§ÙØØ¬Ù
`,Crop:`ØØ¬Ù
اÙÙØ·Ø¹`,Width:`عرض`,Height:`Ø§Ø±ØªÙØ§Ø¹`,"Keep Aspect Ratio":`ØØ§Ùظ عÙ٠اÙÙØ³Ø¨`,Yes:`Ø£Ù`,No:`ÙØ§`,Remove:`ØØ°Ù`,Select:`تÙ
ÙØ²`,"Select %s":`تÙ
ÙØ² %s`,"Vertical align":`Ù
ØØ§Ø°Ø§Ø© عÙ
ÙØ¯ÙØ©`,Split:`Ø§ÙØ´ÙØ Ù
زÙ`,Merge:`Ø§Ø°ÙØ¨`,"Add column":`Ø£Ø¶Ù Ø§ÙØ¹Ù
ÙØ¯`,"Add row":`اض٠سطر`,"License: %s":`رخصة %s`,Delete:`ØØ°Ù`,"Split vertical":`اÙÙØ³Ø§Ù
عÙ
ÙØ¯Ù`,"Split horizontal":`ØªÙØ³ÙÙ
Ø£ÙÙÙ`,Border:`Ø§ÙØØ¯ÙØ¯`,"Your code is similar to HTML. Keep as HTML?":`ÙØ´Ø¨Ù اÙÙÙØ¯ Ø§ÙØ®Ø§Øµ ب٠HTML. تبÙÙ ÙÙ
ا HTMLØ`,"Paste as HTML":`Ø§ÙØµÙ Ù HTML`,Keep:`Ø§ØØªÙظ`,"Insert as Text":`إدراج ÙÙØµ`,"Insert only Text":`إدراج اÙÙØµ ÙÙØ·`,"You can only edit your own images. Download this image on the host?":`ÙÙ
ÙÙÙ ÙÙØ· ØªØØ±Ùر ØµÙØ±Ù Ø§ÙØ®Ø§ØµØ©. تØÙ
ÙÙ ÙØ°Ù Ø§ÙØµÙرة عÙ٠اÙÙ
ضÙÙØ`,"The image has been successfully uploaded to the host!":`تÙ
تØÙ
ÙÙ Ø§ÙØµÙرة Ø¨ÙØ¬Ø§Ø عÙÙ Ø§ÙØ®Ø§Ø¯Ù
!`,palette:`ÙÙØØ©`,"There are no files":`ÙØ§ ØªÙØ¬Ø¯ Ù
ÙÙØ§Øª ÙÙ ÙØ°Ø§ Ø§ÙØ¯ÙÙÙ.`,Rename:`إعادة تسÙ
ÙØ©`,"Enter new name":`أدخ٠اسÙ
Ø¬Ø¯ÙØ¯`,preview:`Ù
عاÙÙØ©`,download:`تØÙ
ÙÙ`,"Paste from clipboard":`ÙØµÙ Ù
Ù Ø§ÙØØ§ÙØ¸Ø©`,"Your browser doesn't support direct access to the clipboard.":`Ù
ØªØµÙØÙ ÙØ§ ÙØ¯Ø¹Ù
Ø¥Ù
ÙØ§ÙÙØ© اÙÙØµÙ٠اÙÙ
باشر Ø¥ÙÙ Ø§ÙØØ§ÙØ¸Ø©.`,"Copy selection":`ÙØ³Ø® Ø§ÙØªØØ¯Ùد`,copy:`ÙØ³Ø®`,"Border radius":`دائرة ÙØµÙ ÙØ·Ø±Ùا Ø§ÙØØ¯ÙØ¯`,"Show all":`عرض ÙÙ`,Apply:`تطبÙÙ`,"Please fill out this field":`ÙØ±Ø¬Ù Ù
ÙØ¡ ÙØ°Ø§ اÙÙ
جاÙ`,"Please enter a web address":`ÙØ±Ø¬Ù إدخا٠عÙÙØ§Ù ÙÙØ¨`,Default:`Ø§ÙØ§ÙتراضÙ`,Circle:`دائرة`,Dot:`ÙÙØ·Ø©`,Quadrate:`اÙÙ
ربعة`,Find:`Ø§ÙØ¨ØØ«`,"Find Previous":`تجد Ø§ÙØ³Ø§Ø¨ÙØ©`,"Find Next":`تجد Ø§ÙØªØ§ÙÙ`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`ÙÙØµÙ اÙÙ
ØØªÙÙ ÙØ§Ø¯Ù
Ù
Ù Microsoft Word/Excel اÙÙØ«ÙÙØ©. ÙÙ ØªØ±ÙØ¯ أ٠تبÙÙ Ø´ÙÙ Ø£Ù ØªÙØ¸ÙÙÙ Ø `,"Word Paste Detected":`ÙÙÙ
Ø© ÙØµÙ اÙÙØ´Ù عÙ`,Clean:`ÙØ¸ÙÙØ©`,"Insert className":`أدخ٠اسÙ
اÙÙØµÙ`,"Press Alt for custom resizing":`اضغط Ø§ÙØ¨Ø¯ÙÙ ÙØªØºÙÙØ± ØØ¬Ù
Ù
خصص`,"Line height":`Ø§Ø±ØªÙØ§Ø¹ Ø§ÙØ®Ø·`,spellcheck:`Ø§ÙØªØ¯ÙÙÙ Ø§ÙØ¥Ù
ÙØ§Ø¦Ù`,"Speech Recognize":`Ø§ÙØªØ¹Ø±Ù عÙ٠اÙÙÙØ§Ù
`,All:`ØªØØ¯Ùد اÙÙÙ`},cF={"Type something":`NapiÅ¡ nÄco`,"About Jodit":`O Jodit`,"Jodit Editor":`Editor Jodit`,"Free Non-commercial Version":`Verze pro nekomerÄnà použitÃ`,"Jodit User's Guide":`Jodit Uživatelská pÅÃruÄka`,"contains detailed help for using":`obsahuje detailnà nápovÄdu`,"For information about the license, please go to our website:":`Pro informace o licenci, prosÃm, pÅejdÄte na naÅ¡i stránku:`,"Buy full version":`Koupit plnou verzi`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. VÅ¡echna práva vyhrazena.`,Anchor:`Anchor`,"Open in new tab":`OtevÅÃt v nové záložce`,"Open in fullsize":`OtevÅÃt v celoobrazovkovém režimu`,"Clear Formatting":`VyÄistit formátovánÃ`,"Fill color or set the text color":`Barva výplnÄ a pÃsma`,Redo:`VpÅed`,Undo:`ZpÄt`,Bold:`TuÄné`,Italic:`KurzÃva`,"Insert Unordered List":`Odrážky`,"Insert Ordered List":`ÄÃslovaný seznam`,"Align Center":`Zarovnat na stÅed`,"Align Justify":`Zarovnat do bloku`,"Align Left":`Zarovnat vlevo`,"Align Right":`Zarovnat vpravo`,"Insert Horizontal Line":`Vložit horizontálnà linku`,"Insert Image":`Vložit obrázek`,"Insert file":`Vložit soubor`,"Insert youtube/vimeo video":`Vložit video (YT/Vimeo)`,"Insert link":`Vložit odkaz`,"Font size":`Velikost pÃsma`,"Font family":`Typ pÃsma`,"Insert format block":`Formátovat blok`,Normal:`Normálnà text`,"Heading 1":`Nadpis 1`,"Heading 2":`Nadpis 2`,"Heading 3":`Nadpis 3`,"Heading 4":`Nadpis 4`,Quote:`Citát`,Code:`Kód`,Insert:`Vložit`,"Insert table":`Vložit tabulku`,"Decrease Indent":`ZmenÅ¡it odsazenÃ`,"Increase Indent":`ZvÄtÅ¡it odsazenÃ`,"Select Special Character":`Vybrat speciálnà symbol`,"Insert Special Character":`Vložit speciálnà symbol`,"Paint format":`PoužÃt formát`,"Change mode":`ZmÄnit mód`,Margins:`Okraje`,top:`hornÃ`,right:`pravý`,bottom:`spodnÃ`,left:`levý`,Styles:`Styly`,Classes:`TÅÃdy`,Align:`ZarovnánÃ`,Right:`Vpravo`,Center:`Na stÅed`,Left:`Vlevo`,"--Not Set--":`--nenastaveno--`,Src:`src`,Title:`Titulek`,Alternative:`Alternativnà text (alt)`,Link:`Link`,"Open link in new tab":`OtevÅÃt link v nové záložce`,Image:`Obrázek`,file:`soubor`,Advanced:`RozÅ¡ÃÅené`,"Image properties":`Vlastnosti obrázku`,Cancel:`ZpÄt`,Ok:`Ok`,"Your code is similar to HTML. Keep as HTML?":`Váš text se podobá HTML. Vložit ho jako HTML?`,"Paste as HTML":`Vložit jako HTML`,Keep:`Ponechat originál`,Clean:`VyÄistit`,"Insert as Text":`Vložit jako TEXT`,"Insert only Text":`Vložit pouze TEXT`,"Word Paste Detected":`Detekován fragment z Wordu nebo Excelu`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Obsah, který vkládáte, je pravdÄpodobnÄ z Microsoft Word / Excel. Chcete ponechat formát nebo vložit pouze text?`,"File Browser":`ProhlÞeÄ souborů`,"Error on load list":`Chyba pÅi naÄÃtánà seznamu souborů`,"Error on load folders":`Chyba pÅi naÄÃtánà složek`,"Are you sure?":`Jste si jistý(á)?`,"Enter Directory name":`Název složky`,"Create directory":`VytvoÅit složku`,"type name":`název`,"type dir name":`název`,"Drop image":`PÅetáhnÄte sem obrázek`,"Drop file":`PÅetáhnÄte sem soubor`,"or click":`nebo kliknÄte`,"Alternative text":`Alternativnà text`,Browse:`Server`,Upload:`Nahrát`,Backgroun
185d:`PozadÃ`,Text:`Text`,Top:`Nahoru`,Middle:`Na stÅed`,Bottom:`Dolu`,"Insert column before":`Vložit sloupec pÅed`,"Insert column after":`Vložit sloupec za`,"Insert row above":`Vložit Åádek nad`,"Insert row below":`Vložit Åádek pod`,"Delete table":`Vymazat tabulku`,"Delete row":`Vymazat Åádku`,"Delete column":`Vymazat sloupec`,"Empty cell":`VyÄistit buÅku`,source:`HTML`,bold:`tuÄnÄ`,italic:`kurzÃva`,brush:`Å¡tÄtec`,link:`odkaz`,undo:`zpÄt`,redo:`vpÅed`,table:`tabulka`,image:`obrázek`,eraser:`guma`,paragraph:`odstavec`,fontsize:`velikost pÃsma`,video:`video`,font:`pÃsmo`,about:`о editoru`,print:`tisk`,underline:`podtrženo`,strikethrough:`pÅeÅ¡krtnuto`,indent:`zvÄtÅ¡it odsazenÃ`,outdent:`zmenÅ¡it odsazenÃ`,fullsize:`celoobrazovkový režim`,shrink:`smrsknout`,hr:`Linka`,ul:`Odrážka`,ol:`ÄÃslovaný seznam`,cut:`Vyjmout`,selectall:`OznaÄit vÅ¡e`,"Embed code":`Kód`,"Open link":`OtevÅÃt odkaz`,"Edit link":`Upravit odkaz`,"No follow":`Atribut no-follow`,Unlink:`Odstranit odkaz`,Eye:`Zobrazit`,pencil:`Chcete-li upravit`,Update:`Aktualizovat`," URL":`URL`,Edit:`Editovat`,"Horizontal align":`Horizontálnà zarovnánÃ`,Filter:`Filtr`,"Sort by changed":`Dle poslednà zmÄny`,"Sort by name":`Dle názvu`,"Sort by size":`Dle velikosti`,"Add folder":`PÅidat složku`,Reset:`Reset`,Save:`Uložit`,"Save as ...":`Uložit jako...`,Resize:`ZmÄnit rozmÄr`,Crop:`OÅezat`,Width:`Å ÃÅka`,Height:`Výška`,"Keep Aspect Ratio":`Ponechat pomÄr`,Yes:`Ano`,No:`Ne`,Remove:`Vyjmout`,Select:`OznaÄit`,"Chars: %d":`Znaky: %d`,"Words: %d":`Slova: %d`,All:`VÅ¡e`,"Select %s":`OznaÄit %s`,"Select all":`OznaÄit vÅ¡e`,"Vertical align":`Vertikálnà zarovnánÃ`,Split:`RozdÄlit`,"Split vertical":`RozdÄlit vertikálnÄ`,"Split horizontal":`RozdÄlit horizontálnÄ`,Merge:`Spojit`,"Add column":`PÅidat sloupec`,"Add row":`PÅidat Åádek`,Delete:`Vymazat`,Border:`Okraj`,"License: %s":`Licence: %s`,"Strike through":`PÅeÅ¡krtnuto`,Underline:`Podtrženo`,superscript:`Hornà index`,subscript:`Dolnà index`,"Cut selection":`Vyjmout oznaÄené`,Break:`ZalomenÃ`,"Search for":`Najdi`,"Replace with":`Nahradit za`,Replace:`VymÄÅte`,Paste:`Vložit`,"Choose Content to Paste":`Vyber obsah pro vloženÃ`,"You can only edit your own images. Download this image on the host?":`Můžete upravovat pouze své obrázky. NaÄÃst obrázek?`,"The image has been successfully uploaded to the host!":`Obrázek byl úspÄÅ¡nÄ nahrán!`,palette:`paleta`,"There are no files":`V tomto adresáÅi nejsou žádné soubory.`,Rename:`pÅejmenovat`,"Enter new name":`Zadejte nový název`,preview:`náhled`,download:`StaženÃ`,"Paste from clipboard":`Vložit ze schránky`,"Your browser doesn't support direct access to the clipboard.":`Váš prohlÞeÄ nepodporuje pÅÃmý pÅÃstup do schránky.`,"Copy selection":`KopÃrovat výbÄr`,copy:`kopÃrovánÃ`,"Border radius":`Border radius`,"Show all":`Zobrazit vÅ¡echny`,Apply:`PlatÃ`,"Please fill out this field":`ProsÃm, vyplÅte toto pole`,"Please enter a web address":`ProsÃm, zadejte webovou adresu`,Default:`VýchozÃ`,Circle:`Kruh`,Dot:`Dot`,Quadrate:`Quadrate`,Find:`NajÃt`,"Find Previous":`NajÃt PÅedchozÃ`,"Find Next":`NajÃt DalÅ¡Ã`,"Insert className":`Vložte název tÅÃdy`,"Press Alt for custom resizing":`StisknÄte Alt pro vlastnà zmÄnu velikosti`},lF={"Type something":`Bitte geben Sie einen Text ein`,Advanced:`Fortgeschritten`,"About Jodit":`Ãber Jodit`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Das Jodit Benutzerhandbuch`,"contains detailed help for using":`beinhaltet ausführliche Informationen wie Sie den Editor verwenden können.`,"For information about the license, please go to our website:":`Für Informationen zur Lizenz, besuchen Sie bitte unsere Web-Präsenz:`,"Buy full version":`Vollversion kaufen`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.`,Anchor:`Anker`,"Open in new tab":`In neuer Registerkarte öffnen`,"Open in fullsize":`Editor in voller GröÃe öffnen`,"Clear Formatting":`Formatierung löschen`,"Fill color or set the text color":`Füllfarbe oder Textfarbe ändern`,Redo:`Wiederholen`,Undo:`Rückgängig machen`,Bold:`Fett`,Italic:`Kursiv`,"Insert Unordered List":`Unsortierte Liste einfügen`,"Insert Ordered List":`Nummerierte Liste einfügen`,"Align Center":`Mittig ausrichten`,"Align Justify":`Blocksatz`,"Align Left":`Links ausrichten`,"Align Right":`Rechts ausrichten`,"Insert Horizontal Line":`Horizontale Linie einfügen`,"Insert Image":`Bild einfügen`,"Insert file":`Datei einfügen`,"Insert youtube/vimeo video":`Youtube/vimeo Video einf
185ügen`,"Insert link":`Link einfügen`,"Font size":`SchriftgröÃe`,"Font family":`Schriftfamilie`,"Insert format block":`Formatblock einfügen`,Normal:`Normal`,"Heading 1":`Ãberschrift 1`,"Heading 2":`Ãberschrift 2`,"Heading 3":`Ãberschrift 3`,"Heading 4":`Ãberschrift 4`,Quote:`Zitat`,Code:`Code`,Insert:`Einfügen`,"Insert table":`Tabelle einfügen`,"Decrease Indent":`Einzug verkleinern`,"Increase Indent":`Einzug vergröÃern`,"Select Special Character":`Sonderzeichen auswählen`,"Insert Special Character":`Sonderzeichen einfügen`,"Paint format":`Format kopieren`,"Change mode":`Ãnderungsmodus`,Margins:`Ränder`,top:`Oben`,right:`Rechts`,bottom:`Unten`,left:`Links`,Styles:`CSS Stil`,Classes:`CSS Klassen`,Align:`Ausrichtung`,Right:`Rechts`,Center:`Zentriert`,Left:`Links`,"--Not Set--":`Keine`,Src:`Pfad`,Title:`Titel`,Alternative:`Alternativer Text`,Link:`Link`,"Open link in new tab":`Link in neuem Tab öffnen`,Image:`Bild`,file:`Datei`,"Image properties":`Bildeigenschaften`,Cancel:`Abbrechen`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Ihr Text ähnelt HTML-Code. Als HTML beibehalten?`,"Paste as HTML":`Als HTML einfügen?`,Keep:`Original speichern`,Clean:`Säubern`,"Insert as Text":`Als Text einfügen`,"Word Paste Detected":`In Word formatierter Text erkannt`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Der Inhalt, den Sie einfügen, stammt aus einem Microsoft Word / Excel-Dokument. Möchten Sie das Format erhalten oder bereinigen?`,"Insert only Text":`Nur Text einfügen`,"File Browser":`Dateibrowser`,"Error on load list":`Fehler beim Laden der Liste`,"Error on load folders":`Fehler beim Laden der Ordner`,"Are you sure?":`Sind Sie sicher?`,"Enter Directory name":`Geben Sie den Verzeichnisnamen ein`,"Create directory":`Verzeichnis erstellen`,"type name":`Typname`,"type dir name":`Typname`,"Drop image":`Bild hier hinziehen`,"Drop file":`Datei löschen`,"or click":`oder hier klicken`,"Alternative text":`Alternativtext`,Browse:`Auswählen`,Upload:`Hochladen`,Background:`Hintergrund`,Text:`Text`,Top:`Oben`,Middle:`Mittig`,Bottom:`Unten`,"Insert column before":`Spalte davor einfügen`,"Insert column after":`Spalte danach einfügen`,"Insert row above":`Zeile oberhalb einfügen`,"Insert row below":`Zeile unterhalb einfügen`,"Delete table":`Tabelle löschen`,"Delete row":`Zeile löschen`,"Delete column":`Spalte löschen`,"Empty cell":`Zelle leeren`,Delete:`Löschen`,"Strike through":`Durchstreichen`,Underline:`Unterstreichen`,Break:`Pause`,"Search for":`Suche nach`,"Replace with":`Ersetzen durch`,Replace:`Ersetzen`,Edit:`Bearbeiten`,"Vertical align":`Vertikale Ausrichtung`,"Horizontal align":`Horizontale Ausrichtung`,Filter:`Filter`,"Sort by changed":`Sortieren nach geändert`,"Sort by name":`Nach Name sortieren`,"Sort by size":`Nach GröÃe sortiert`,"Add folder":`Ordner hinzufügen`,"Split vertical":`Vertikal unterteilen`,"Split horizontal":`Horizontal unterteilen`,Split:`Unterteilen`,Merge:`Vereinen`,"Add column":`Spalte hinzufügen`,"Add row":`Zeile hinzufügen`,Border:`Rand`,"Embed code":`Code einbetten`,Update:`Aktualisieren`,superscript:`Hochstellen`,subscript:`Tiefstellen`,"Cut selection":`Auswahl ausschneiden`,Paste:`Einfügen`,"Choose Content to Paste":`Wählen Sie den Inhalt zum Einfügen aus`,"Chars: %d":`Zeichen: %d`,"Words: %d":`Wörter: %d`,All:`Alles markieren`,"Select %s":`Markieren: %s`,"Select all":`Alles markieren`,source:`HTML`,bold:`Fett gedruckt`,italic:`Kursiv`,brush:`Bürste`,link:`Verknüpfung`,undo:`Rückgängig machen`,redo:`Wiederholen`,table:`Tabelle`,image:`Bild`,eraser:`Radiergummi`,paragraph:`Absatz`,fontsize:`SchriftgröÃe`,video:`Video`,font:`Schriftart`,about:`Ãber`,print:`Drucken`,underline:`Unterstreichen`,strikethrough:`Durchstreichen`,indent:`Einzug`,outdent:`Herausstellen`,fullsize:`VollgröÃe`,shrink:`Schrumpfen`,hr:`die Linie`,ul:`Liste von`,ol:`Nummerierte Liste`,"Lower Alpha":`Standard, Alphabet (klein)`,"Upper Alpha":`Standard, Alphabet (gross)`,"Lower Roman":`Römisch (klein)`,"Upper Roman":`Römisch (gross)`,"Lower Greek":`Griechisch`,cut:`Schneiden`,selectall:`Wählen Sie Alle au
185s`,"Open link":`Link öffnen`,"Edit link":`Link bearbeiten`,"No follow":`Nofollow-Attribut`,Unlink:`Link entfernen`,Eye:`Ansehen`,pencil:`Bearbeiten`," URL":`URL`,Reset:`Wiederherstellen`,Save:`Speichern`,"Save as ...":`Speichern als`,Resize:`GröÃe ändern`,Crop:`GröÃe anpassen`,Width:`Breite`,Height:`Höhe`,"Keep Aspect Ratio":`Seitenverhältnis beibehalten`,Yes:`Ja`,No:`Nein`,Remove:`Entfernen`,Select:`Markieren`,"You can only edit your own images. Download this image on the host?":`Sie können nur Ihre eigenen Bilder bearbeiten. Dieses Bild auf den Host herunterladen?`,"The image has been successfully uploaded to the host!":`Das Bild wurde erfolgreich auf den Server hochgeladen!`,palette:`Palette`,"There are no files":`In diesem Verzeichnis befinden sich keine Dateien.`,Rename:`Umbenennen`,"Enter new name":`Geben Sie einen neuen Namen ein`,preview:`Vorschau`,download:`Herunterladen`,"Paste from clipboard":`Aus Zwischenablage einfügen`,"Your browser doesn't support direct access to the clipboard.":`Ihr Browser unterstützt keinen direkten Zugriff auf die Zwischenablage.`,"Copy selection":`Auswahl kopieren`,copy:`Kopieren`,"Border radius":`Radius für abgerundete Ecken`,"Show all":`Alle anzeigen`,Apply:`Anwenden`,"Please fill out this field":`Bitte füllen Sie dieses Feld aus`,"Please enter a web address":`Bitte geben Sie eine Web-Adresse ein`,Default:`Standard`,Circle:`Kreis`,Dot:`Punkte`,Quadrate:`Quadrate`,Find:`Suchen`,"Find Previous":`Suche vorherige`,"Find Next":`Weitersuchen`,"Insert className":`className (CSS) einfügen`,"Press Alt for custom resizing":`Drücken Sie Alt für benutzerdefinierte GröÃenanpassung`,"License: %s":`Lizenz: %s`},uF={"Type something":`Start writing...`,pencil:`Edit`,Quadrate:`Square`},dF={"Type something":`Escriba algo...`,Advanced:`Avanzado`,"About Jodit":`Acerca de Jodit`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`GuÃa de usuario Jodit`,"contains detailed help for using":`contiene ayuda detallada para el uso.`,"For information about the license, please go to our website:":`Para información sobre la licencia, por favor visite nuestro sitio:`,"Buy full version":`Compre la versión completa`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Todos los derechos reservados.`,Anchor:`Anclar`,"Open in new tab":`Abrir en nueva pestaña`,"Open in fullsize":`Abrir editor en pantalla completa`,"Clear Formatting":`Limpiar formato`,"Fill color or set the text color":`Color de relleno o de letra`,Redo:`Rehacer`,Undo:`Deshacer`,Bold:`Negrita`,Italic:`Cursiva`,"Insert Unordered List":`Insertar lista no ordenada`,"Insert Ordered List":`Insertar lista ordenada`,"Align Center":`Alinear Centrado`,"Align Justify":`Alinear Justificado`,"Align Left":`Alinear Izquierda`,"Align Right":`Alinear Derecha`,"Insert Horizontal Line":`Insertar lÃnea horizontal`,"Insert Image":`Insertar imagen`,"Insert file":`Insertar archivo`,"Insert youtube/vimeo video":`Insertar video de Youtube/vimeo`,"Insert link":`Insertar vÃnculo`,"Font size":`Tamaño de letra`,"Font family":`Familia de letra`,"Insert format block":`Insertar bloque`,Normal:`Normal`,"Heading 1":`Encabezado 1`,"Heading 2":`Encabezado 2`,"Heading 3":`Encabezado 3`,"Heading 4":`Encabezado 4`,Quote:`Cita`,Code:`Código`,Insert:`Insertar`,"Insert table":`Insertar tabla`,"Decrease Indent":`Disminuir sangrÃa`,"Increase Indent":`Aumentar sangrÃa`,"Select Special Character":`Seleccionar caracter especial`,"Insert Special Character":`Insertar caracter especial`,"Paint format":`Copiar formato`,"Change mode":`Cambiar modo`,Margins:`Márgenes`,top:`arriba`,right:`derecha`,bottom:`abajo`,left:`izquierda`,Styles:`Estilos CSS`,Classes:`Clases CSS`,Align:`Alinear`,Right:`Derecha`,Center:`Centrado`,Left:`Izquierda`,"--Not Set--":`--No Establecido--`,Src:`Fuente`,Title:`TÃtulo`,Alternative:`Texto Alternativo`,Filter:`Filtrar`,Link:`VÃnculo`,"Open link in new tab":`Abrir vÃnculo en nueva pestaña`,Image:`Imagen`,file:`Archivo`,"Image properties":`Propiedades de imagen`,Cancel:`Cancelar`,Ok:`Aceptar`,"Your code is similar to HTML. Keep as HTML?":`El código es similar a HTML. ¿Mantener como HTML?`,"Paste as HTML":`Pegar como HTML?`,Keep:`Mantener`,Clean:`Limpiar`,"Insert as Text":`Insertar c
185omo texto`,"Word Paste Detected":`Pegado desde Word detectado`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`El contenido pegado proviene de un documento de Microsoft Word/Excel. ¿Desea mantener el formato o limpiarlo?`,"Insert only Text":`Insertar solo texto`,"File Browser":`Buscar archivo`,"Error on load list":`Error al cargar la lista`,"Error on load folders":`Error al cargar las carpetas`,"Are you sure?":`¿Está seguro?`,"Enter Directory name":`Entre nombre de carpeta`,"Create directory":`Crear carpeta`,"type name":`Entre el nombre`,"type dir name":`Entre el nombre`,"Drop image":`Soltar imagen`,"Drop file":`Soltar archivo`,"or click":`o click`,"Alternative text":`Texto alternativo`,Browse:`Buscar`,Upload:`Subir`,Background:`Fondo`,Text:`Texto`,Top:`Arriba`,Middle:`Centro`,Bottom:`Abajo`,"Insert column before":`Insertar columna antes`,"Insert column after":`Interar columna después`,"Insert row above":`Insertar fila arriba`,"Insert row below":`Insertar fila debajo`,"Delete table":`Borrar tabla`,"Delete row":`Borrar fila`,"Delete column":`Borrar columna`,"Empty cell":`Vaciar celda`,Delete:`Borrar`,"Strike through":`Tachado`,Underline:`Subrayado`,Break:`Pausa`,"Search for":`Buscar`,"Replace with":`Reemplazar con`,Replace:`Reemplazar`,Edit:`Editar`,"Vertical align":`Alineación vertical`,"Horizontal align":`Alineación horizontal`,"Sort by changed":`Ordenar por fecha modificación`,"Sort by name":`Ordenar por nombre`,"Sort by size":`Ordenar por tamaño`,"Add folder":`Agregar carpeta`,Split:`Dividir`,"Split vertical":`Dividir vertical`,"Split horizontal":`Dividir horizontal`,Merge:`Mezclar`,"Add column":`Agregar columna`,"Add row":`Agregar fila`,Border:`Borde`,"Embed code":`Incluir código`,Update:`Actualizar`,superscript:`superÃndice`,subscript:`subÃndice`,"Cut selection":`Cortar selección`,Paste:`Pegar`,"Choose Content to Paste":`Seleccionar contenido para pegar`,"Chars: %d":`Caracteres: %d`,"Words: %d":`Palabras: %d`,All:`Todo`,"Select %s":`Seleccionar: %s`,"Select all":`Seleccionar todo`,source:`HTML`,bold:`negrita`,italic:`cursiva`,brush:`Brocha`,link:`VÃnculo`,undo:`deshacer`,redo:`rehacer`,table:`Tabla`,image:`Imagen`,eraser:`Borrar`,paragraph:`Párrafo`,fontsize:`Tamaño de letra`,video:`Video`,font:`Letra`,about:`Acerca de`,print:`Imprimir`,underline:`subrayar`,strikethrough:`tachar`,indent:`sangrÃa`,outdent:`quitar sangrÃa`,fullsize:`Tamaño completo`,shrink:`encoger`,hr:`lÃnea horizontal`,ul:`lista sin ordenar`,ol:`lista ordenada`,cut:`Cortar`,selectall:`Seleccionar todo`,"Open link":`Abrir vÃnculo`,"Edit link":`Editar vÃnculo`,"No follow":`No seguir`,Unlink:`Desvincular`,Eye:`Ver`,pencil:`Para editar`," URL":`URL`,Reset:`Resetear`,Save:`Guardar`,"Save as ...":`Guardar como...`,Resize:`Redimensionar`,Crop:`Recortar`,Width:`Ancho`,Height:`Alto`,"Keep Aspect Ratio":`Mantener relación de aspecto`,Yes:`Si`,No:`No`,Remove:`Quitar`,Select:`Seleccionar`,"You can only edit your own images. Download this image on the host?":`Solo puedes editar tus propias imágenes. ¿Descargar esta imagen en el servidor?`,"The image has been successfully uploaded to the host!":`¡La imagen se ha subido correctamente al servidor!`,palette:`paleta`,"There are no files":`No hay archivos en este directorio.`,Rename:`renombrar`,"Enter new name":`Ingresa un nuevo nombre`,preview:`avance`,download:`Descargar`,"Paste from clipboard":`Pegar desde el portapapeles`,"Your browser doesn't support direct access to the clipboard.":`Su navegador no soporta el acceso directo en el portapapeles.`,"Copy selection":`Selección de copia`,copy:`copia`,"Border radius":`Radio frontera`,"Show all":`Mostrar todos los`,Apply:`Aplicar`,"Please fill out this field":`Por favor, rellene este campo`,"Please enter a web address":`Por favor, introduzca una dirección web`,Default:`Predeterminado`,Circle:`CÃrculo`,Dot:`Punto`,Quadrate:`Cuadro`,"Lower Alpha":`Letra Minúscula`,"Lower Greek":`Griego Minúscula`,"Lower Roman":`Romano Minúscula`,"Upper Alpha":`Letra Mayúscula`,"Upper Roman":`Romano Mayúscula`,Find:`Encontrar`,"Find Previous":`Buscar Anterior`,"Find Next":`Buscar Siguiente`,"Insert className":`Insertar nombre de clase`,"Press Alt for custom resizing":`Presione Alt para cambiar el tamaño personalizado`,"License: %s":`Licencia: %s`},fF={"Type something":`ÚÛØ²Û بÙÙÛØ³Ûد`,Advanced:`Ù¾ÛØ´Ø±ÙتÙ`,"About Jodit":`دربار٠ÙÛØ±Ø§Ûشگر`,"Jodit Editor":`ÙÛØ±Ø§Ûشگر Ø¬ÙØ¯Ûت`,"Jodit User's Guide":`راÙÙÙ
Ø§Û Ú©Ø§Ø±Ø¨Ø±Ø§Ù`,"contains detailed help for using":`راÙÙÙ
اÛÛ Ø¨Ø±Ø§Û Ø§Ø³ØªÙØ§Ø¯Ù`,"For information about the license, please go to our website:":`Ø¨Ø±Ø§Û Ú©Ø³Ø¨ Ø§Ø·ÙØ§Ø¹Ø§Øª در رابط٠با ÙØ§ÛØ³ÙØ³ ÙØ·Ùا Ø¨Ù ÙØ¨ Ø³Ø§ÛØª Ù
راجع٠کÙÛØ¯:`,"Buy full version":`Ø®Ø±ÛØ¯ ÙØ³Ø®Ù کاÙ
Ù`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.`,Anchor:`ÙÛÙÚ©`,"Open in new tab":`بازکرد٠در تب Ø¬Ø¯ÛØ¯`,"Open in fullsize":`تÙ
اÙ
ØµÙØÙ Ú©Ø±Ø¯Ù ÙÛØ±Ø§Ûشگر`,"Clear Formatting":`پاک Ú©Ø±Ø¯Ù ÙØ§Ùب ÙØ§`,"Fill color or set the text color":`رÙÚ¯ را پر Ú©ÙÛØ¯ ÛØ§ رÙÚ¯ Ù
ت٠را ØªÙØ¸ÛÙ
Ú©ÙÛØ¯`,Redo:`باز Ø§ÙØ¬Ø§Ù
`,Undo:`بازگرداÙÛ`,Bold:`بÙÙØ¯`,Italic:`Ø§ÛØªØ§ÙÛÚ©`,"Insert Unordered List":`Ø§ÙØ²Ùد٠ÙÛØ³Øª بدÙÙ ØªØ±ØªÛØ¨`,"Insert Ordered List":`Ø§ÙØ²ÙÙ ÙÛØ³Øª با ØªØ±ØªÛØ¨`,"Align Center":`ÙØ³Ø· ÚÛÙ`,"Align Justify":`تراز کردÙ`,"Align Left":`ÚÙ¾ ÚÛÙ`,"Align Right":`راست ÚÛÙ`,"Insert Horizontal Line":`Ø§ÙØ²Ùد٠خط اÙÙÛ`,"Insert Image":`Ø§ÙØ²Ùد٠عکس`,"Insert file":`Ø§ÙØ²ÙØ¯Ù ÙØ§ÛÙ`,"Insert youtube/vimeo video":`Ø§ÙØ²Ùد٠ÙÛØ¯Û٠از ÛÙØªÛÙØ¨ Ù ÙØ§ÛÙ
Ù`,"Insert link":`Ø§ÙØ²Ùد٠ÙÛÙÚ©`,"Font size":`Ø§ÙØ¯Ø§Ø²Ù ÙÙÙØª`,"Font family":`ÙÙÙØª`,"Insert format block":`Ø§ÙØ²ÙØ¯Ù Ø¨ÙØ§Ú©`,Normal:`Ù
عÙ
ÙÙÛ`,"Heading 1":`Ø³Ø±ØªÛØªØ± Û±`,"Heading 2":`Ø³Ø±ØªÛØªØ± Û²`,"Heading 3":`Ø³Ø±ØªÛØªØ± Û³`,"Heading 4":`Ø³Ø±ØªÛØªØ± Û´`,Quote:`ÙÙÙ ÙÙÙ`,Code:`Ø³ÙØ±Ø³ کد`,Insert:`Ø§ÙØ²ÙدÙ`,"Insert table":`Ø§ÙØ²Ùد٠جدÙÙ`,"Decrease Indent":`Ø§ÙØ²ÙØ¯Ù ÙØ±ÙØ±ÙØªÚ¯Û`,"Increase Indent":`Ú©Ø§ÙØ´ ÙØ±ÙØ±ÙØªÚ¯Û`,"Select Special Character":`کاراکتر ÙÛÚ٠را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯`,"Insert Special Character":`Ø§ÙØ²Ùد٠کاراکتر ÙÛÚÙ`,"Paint format":`ÙØ§Ùب رÙÚ¯`,"Change mode":`تغÛÛØ± ØØ§Ùت`,Margins:`ÙØ§ØµÙÙ Ù
185ا`,top:`Ø¨Ø§ÙØ§`,right:`راست`,bottom:`پاÛÛÙ`,left:`ÚÙ¾`,Styles:`استاÛÙ ÙØ§`,Classes:`Ú©ÙØ§Ø³ ÙØ§`,Align:`تراز کردÙ`,Right:`راست`,Center:`ÙØ³Ø·`,Left:`ÚÙ¾`,"--Not Set--":`--ØªÙØ¸ÛÙ
ÙØ´Ø¯Ù--`,Src:`Ø³ÙØ±Ø³`,Title:`عÙÙØ§Ù`,Alternative:`جاÛگزÛÙ`,Link:`ÙÛÙÚ©`,"Open link in new tab":`باز کزد٠ÙÛÙÚ© در تب Ø¬Ø¯ÛØ¯`,Image:`عکس`,file:`ÙØ§ÛÙ`,"Image properties":`Ù
ÙØ§Ø¯Ûر عکس`,Cancel:`Ø¨ÛØ®ÛاÙ`,Ok:`تاÛÛØ¯`,"Your code is similar to HTML. Keep as HTML?":`Ø¨Ù ÙØ¸Ø± کد Ø´Ù
ا از ÙÙØ¹ HTML است , با ÙÙ
ÛÙ ÙØ§Ùب اداÙ
٠دÙÛÙ
Ø`,"Paste as HTML":`جاÛÚ¯Ø²Ø§Ø±Û HTML`,Keep:`Ùگ٠دار`,Clean:`تÙ
ÛØ² کزدÙ`,"Insert as Text":`ÙØ§Ø±Ø¯ کرد٠ب٠عÙÙØ§Ù Ù
ت٠عادÛ`,"Word Paste Detected":`Ø¸Ø§ÙØ± در ØØ§Ù Ú©Ù¾Û Ù¾ÛØ³Øª Ú©Ø±Ø¯Ù ÙØ³ØªÛد`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Ù
ØªÙ Ú©Ù¾Û Ø´Ø¯Ù Ø§Ø² Ù
ØØµÙÙØ§Øª Ù
اÛÚ©Ø±ÙØ³Ø§Ùت است Ù
اÛÙ ÙØ³ØªÛد استاÛÙ Ù
اÛÚ©Ø±ÙØ³Ø§Ùت Ù
ÙØªÙÙ Ø´ÙØ¯ ÛØ§ ب٠عÙÙØ§Ù Ù
ØªÙ Ø¹Ø§Ø¯Û Ø¨Ø§Ú©Ø²Ø§Ø±Û Ø´ÙØ¯ Ø`,"Insert only Text":`Ø§ÙØ²Ùد٠ب٠عÙÙØ§Ù Ù
ت٠عادÛ`,"File Browser":`Ø§ÙØªØ®Ø§Ø¨ ÙØ§ÛÙ`,"Error on load list":`خطا در Ø¨Ø§Ø±Ú¯Ø²Ø§Ø±Û ÙÛØ³Øª`,"Error on load folders":`خطا در Ø¨Ø§Ø²Ú¯Ø²Ø§Ø±Û Ù¾ÙØ´Ù ÙØ§`,"Are you sure?":`از Ø§ÙØ¬Ø§Ù
اÛÙ Ø§ÙØ¯Ø§Ù
اطÙ
ÛÙØ§Ù Ø¯Ø§Ø±ÛØ¯ Ø`,"Enter Directory name":`ÙØ§Ù
Ù
Ø³ÛØ± را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯`,"Create directory":`ساخت Ù
Ø³ÛØ±`,"type name":`ÙØ§Ù
را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯`,"type dir name":`ÙØ§Ù
را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯`,"Drop image":`عکس را Ø±ÙØ§ Ú©ÙÛØ¯`,"Drop file":`ÙØ§Û٠را Ø±ÙØ§ Ú©ÙÛØ¯`,"or click":`ÛØ§ Ú©ÙÛÚ© Ú©ÙÛØ¯`,"Alternative text":`Ù
ت٠جاÛگزÛÙ`,Browse:`جستجÙ`,Upload:`آپÙÙØ¯`,Background:`پس زÙ
ÛÙÙ`,Text:`Ù
تÙ`,Top:`Ø¨Ø§ÙØ§`,Middle:`ÙØ³Ø·`,Bottom:`پاÛÛÙ`,"Insert column before":`Ø§ÙØ²Ùد٠ستÙÙ ÙØ¨Ù از`,"Insert column after":`Ø§ÙØ²Ùد٠ستÙ٠بعد از`,"Insert row above":`Ø§ÙØ²Ùد٠خط ÙØ¨Ù از`,"Insert row below":`Ø§ÙØ²Ùد٠خط بعد از`,"Delete table":`ØØ°Ù جدÙÙ`,"Delete row":`ØØ°Ù خط`,"Delete column":`ØØ°Ù ستÙÙ`,"Empty cell":`خاÙÛ Ú©Ø¯Ù Ø¨ÙØ§Ú©`,Delete:`ØØ°Ù`,"Strike through":`خط زدÙ`,Underline:`Ø²ÛØ± خط (Underline)`,Break:`شکستÙ`,"Search for":`جستج٠براÛ`,"Replace with":`جاÛگزÛ٠با`,Replace:`جاÛگزÛÙ`,Edit:`ÙÛØ±Ø§ÛØ´`,"Vertical align":`تراز عÙ
ÙØ¯Û`,"Horizontal align":`تراز اÙÙÛ`,Filter:`ÙÛÙØªØ±`,"Sort by changed":`Ù
رتب Ø³Ø§Ø²Û Ø¨Ø± اساس تغÛÛØ±Ø§Øª`,"Sort by name":`Ù
رتب Ø³Ø§Ø²Û Ø¨Ø± اساس ÙØ§Ù
`,"Sort by size":`Ù
رتب Ø³Ø§Ø²Û Ø¨Ø± اساس Ø§ÙØ¯Ø§Ø²Ù`,"Add folder":`Ø§ÙØ²ÙØ¯Ù Ù¾ÙØ´Ù`,Split:`شکاÙ`,"Split vertical":`شکا٠عÙ
ÙØ¯Û`,"Split horizontal":`شکا٠اÙÙÛ`,Merge:`تجÙ
ÛØ¹ کردÙ`,"Add column":`Ø§ÙØ²Ùد٠ستÙÙ`,"Add row":`Ø§ÙØ²Ùد٠خط`,Border:`خط`,"Embed code":`درج کد`,Update:`Ø¨Ø±ÙØ²Ø±Ø³Ø§ÙÛ`,superscript:`Super Script`,subscript:`Sub Script`,"Cut selection":`Ø¨Ø±Ø¯Ø§Ø´ØªÙ Ø§ÙØªØ®Ø§Ø¨ Ø´Ø¯Ù ÙØ§`,Paste:`ÚØ³Ø¨Ø§ÙدÙ`,"Choose Content to Paste":`Ø§ÙØªØ®Ø§Ø¨ Ù
ØØªÙØ§Û Ø¨Ø±Ø§Û ÚØ³Ø¨Ø§ÙدÙ`,"Chars: %d":`Ú©Ø§Ø±Ø§Ú©ØªØ±ÙØ§: %d`,"Words: %d":`Ú©ÙÙ
ات: %d`,All:`ÙÙ
Ù`,"Select %s":`Ø§ÙØªØ®Ø§Ø¨: %s`,"Select all":`Ø§ÙØªØ®Ø§Ø¨ ÙÙ
Ù`,source:`Ø³ÙØ±Ø³`,bold:`بÙÙØ¯`,italic:`Ø§ÛØªØ§ÙÛÚ©`,brush:`ÙÙÙ
Ù
Ù`,link:`ÙÛÙÚ©`,undo:`بازگرداÙÛ`,redo:`باز Ø§ÙØ¬Ø§Ù
`,table:`جدÙÙ`,image:`عکس`,eraser:`پاک Ú©Ù`,paragraph:`پاراگراÙ`,fontsize:`Ø³Ø§ÛØ² ÙÙÙØª`,video:`ÙÛØ¯ÛÙ`,font:`ÙÙÙØª`,about:`دربارÙ`,print:`ÚØ§Ù¾`,underline:`خط Ø²ÛØ±ÛÙ`,strikethrough:`خط رÙÛ Ù
تÙ`,indent:`ÙØ±ÙØ±ÙØªÚ¯Û`,outdent:`ÙØ±ÙØ±ÙØªÚ¯Û از Ø¨ÛØ±ÙÙ`,fullsize:`کاÙ
٠کردÙ`,shrink:`Ú©ÙÚÚ© کردÙ`,hr:`خط`,ul:`ÙÛØ³Øª`,ol:`ÙÛØ³Øª Ø¹Ø¯ÛØ¯`,cut:`Ø¨Ø±ÛØ¯Ù`,selectall:`Ø§ÙØªØ®Ø§Ø¨ ÙÙ
Ù`,"Open link":`بازکرد٠ÙÛÙÚ©`,"Edit link":`ÙÛØ±Ø§ÛØ´ ÙÛÙÚ©`,"No follow":`No Follow`,Unlink:`ØØ°Ù ÙÛÙÚ©`,Eye:`Ù
Ø±ÙØ±`,pencil:`Ø§ØµÙØ§Ø`," URL":` URL`,Reset:`Ø±ÛØ³Øª`,Save:`Ø°Ø®ÛØ±`,"Save as ...":`Ø°Ø®ÛØ±Ù ب٠عÙÙØ§Ù...`,Resize:`تغÛÛØ± Ø§ÙØ¯Ø§Ø²Ù`,Crop:`Ø¨Ø±ÛØ¯Ù`,Width:`Ø·ÙÙ`,Height:`Ø§Ø±ØªÙØ§Ø¹`,"Keep Aspect Ratio":`ÙØ³Ø¨Øª ابعاد را ØÙظ Ú©Ù`,Yes:`بÙÙ`,No:`Ø®ÛØ±`,Remove:`ØØ°Ù`,Select:`Ø§ÙØªØ®Ø§Ø¨`,"You can only edit your own images. Download this image on the host?":`Ø´Ù
ا ÙÙØ· Ù
ÛØªÙاÙÛØ¯ عکس ÙØ§Û Ø®ÙØ¯ را ÙÛØ±Ø§ÛØ´ Ú©ÙÛØ¯ , Ù
ÛØ®ÙاÙÛØ¯ عکس را از ÙØ§Ø³Øª داÙÙÙØ¯ Ú©ÙÛÙ
Ø`,"The image has been successfully uploaded to the host!":`عکس با Ù
ÙÙÙÛØª در ÙØ§Ø³Øª آپÙÙØ¯ شد`,palette:`جعب٠رÙÚ¯ ÙÙØ§Ø´Û`,"There are no files":`در اÛÙ Ù
Ø³ÛØ± ÙØ§ÛÙ ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯`,Rename:`تغÛÛØ± اسÙ
`,"Enter new name":`اسÙ
Ø¬Ø¯ÛØ¯ را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯`,preview:`ÙÙ
Ø§ÛØ´`,download:`داÙÙÙØ¯`,"Paste from clipboard":`ÚØ³Ø¨Ø§Ùد٠از Ú©ÙÛÙ¾ Ø¨ÙØ±Ø¯`,"Your browser doesn't support direct access to the clipboard.":`Ù
Ø±ÙØ±Ú¯Ø± Ø´Ù
ا Ø§Ø¬Ø§Ø²Ù Ø¯Ø³ØªØ±Ø³Û Ø¨Ù Ú©ÙÛÙ¾ Ø¨ÙØ±Ø¯ را ÙÙ
ÛØ¯Ùد.`,"Copy selection":`Ú©Ù¾Û Ú©Ø±Ø¯Ù Ø§ÙØªØ®Ø§Ø¨ Ø´Ø¯Ù ÙØ§`,copy:`Ú©Ù¾Û`,"Border radius":`Border radius`,"Show all":`ÙÙ
Ø§ÛØ´ ÙÙ
Ù`,Apply:`Ø¯Ø±Ø®ÙØ§Ø³Øª`,"Please fill out this field":`ÙØ·Ùا با پر کرد٠اÛ٠زÙ
ÛÙÙ`,"Please enter a web address":`ÙØ·Ùا ÙØ§Ø±Ø¯ ÛÚ© آدرس ÙØ¨`,Default:`Ø¨Ù Ø·ÙØ± Ù¾ÛØ´ ÙØ±Ø¶`,Circle:`Ø¯Ø§ÛØ±Ù`,Dot:`Ù¾ÙØ±ÙÙ ÙÙØ·Ù`,Quadrate:`Quadrate`,Find:`Ù¾ÛØ¯Ø§ کردÙ`,"Find Previous":`Ù¾ÛØ¯Ø§ Ú©Ø±Ø¯Ù ÙØ¨ÙÛ`,"Find Next":`Ù¾ÛØ¯Ø§ کرد٠بعدÛ`,"Insert className":`Insertar nombre de clase`,"Press Alt for custom resizing":`Ø¨Ø±Ø§Û ØªØºÛÛØ± Ø§ÙØ¯Ø§Ø²Ù Ø³ÙØ§Ø±Ø´Û ÙØ´Ø§Ø± دÙÛØ¯`,"License: %s":`Ù
Ø¬ÙØ²: %s`},pF={"Type something":`Kirjoita jotain...`,Advanced:`Avanzado`,"About Jodit":`Tietoja Jodit:ista`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Jodit kÃ
185¤yttäjän ohje`,"contains detailed help for using":`sisältää tarkempaa tietoa käyttämiseen`,"For information about the license, please go to our website:":`Tietoa lisensoinnista, vieraile verkkosivuillamme:`,"Buy full version":`Osta täysi versio`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Kaikki oikeudet pidätetään.`,Anchor:`Ankkuri`,"Open in new tab":`Avaa uudessa välilehdessä`,"Open in fullsize":`Avaa täysikokoisena`,"Clear Formatting":`Poista muotoilu`,"Fill color or set the text color":`Täytä värillä tai aseta tekstin väri`,Redo:`Tee uudelleen`,Undo:`Peruuta`,Bold:`Lihavoitu`,Italic:`Kursiivi`,"Insert Unordered List":`Lisää järjestämätön lista`,"Insert Ordered List":`Lisää järjestetty lista`,"Align Center":`Asemoi keskelle`,"Align Justify":`Asemoi tasavälein`,"Align Left":`Asemoi vasemmalle`,"Align Right":`Asemoi oikealle`,"Insert Horizontal Line":`Lisää vaakasuuntainen viiva`,"Insert Image":`Lisää kuva`,"Insert file":`Lisää tiedosto`,"Insert youtube/vimeo video":`Lisää Youtube-/vimeo- video`,"Insert link":`Lisää linkki`,"Font size":`Kirjasimen koko`,"Font family":`Kirjasimen nimi`,"Insert format block":`Lisää muotoilualue`,Normal:`Normaali`,"Heading 1":`Otsikko 1`,"Heading 2":`Otsikko 2`,"Heading 3":`Otsikko 3`,"Heading 4":`Otsikko 4`,Quote:`Lainaus`,Code:`Koodi`,Insert:`Lisää`,"Insert table":`Lisää taulukko`,"Decrease Indent":`Pienennä sisennystä`,"Increase Indent":`Lisää sisennystä`,"Select Special Character":`Valitse erikoismerkki`,"Insert Special Character":`Lisää erikoismerkki`,"Paint format":`Maalaa muotoilu`,"Change mode":`Vaihda tilaa`,Margins:`Marginaalit`,top:`ylös`,right:`oikealle`,bottom:`alas`,left:`vasemmalle`,Styles:`CSS-tyylit`,Classes:`CSS-luokat`,Align:`Asemointi`,Right:`Oikea`,Center:`Keskellä`,Left:`Vasen`,"--Not Set--":`--Ei asetettu--`,Src:`Fuente`,Title:`Otsikko`,Alternative:`Vaihtoehtoinen teksti`,Filter:`Suodatin`,Link:`Linkki`,"Open link in new tab":`Avaa uudessa välilehdessä`,Image:`Kuva`,file:`Tiedosto`,"Image properties":`Kuvan ominaisuudet`,Cancel:`Peruuta`,Ok:`Ok`,"Your code is similar to HTML. Keep as HTML?":`Koodi on HTML:n tapaista. Säilytetäänkö HTML?`,"Paste as HTML":`Liitä HTML:nä?`,Keep:`Säilytä`,Clean:`Tyhjennä`,"Insert as Text":`Lisää tekstinä`,"Word Paste Detected":`Word liittäminen havaittu`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Liitetty sisältö tulee Microsoft Word-/Excel- tiedostosta. Haluatko säilyttää muotoilun vai poistaa sen?`,"Insert only Text":`Lisää vain teksti`,"File Browser":`Tiedostoselain`,"Error on load list":`Virhe listan latauksessa`,"Error on load folders":`Virhe kansioiden latauksessa`,"Are you sure?":`Oletko varma?`,"Enter Directory name":`Syötä hakemiston nimi`,"Create directory":`Luo hakemisto`,"type name":`Syötä nimi`,"type dir name":`Syötä nimi`,"Drop image":`Pudota kuva`,"Drop file":`Pudota tiedosto`,"or click":`tai klikkaa`,"Alternative text":`Vaihtoehtoinen teksti`,Browse:`Selaa`,Upload:`Lataa`,Background:`Tausta`,Text:`Teksti`,Top:`Ylös`,Middle:`Keskelle`,Bottom:`Alas`,"Insert column before":`Lisää sarake ennen`,"Insert column after":`Lisää sarake jälkeen`,"Insert row above":`Lisää rivi ylös`,"Insert row below":`Lisää rivi alle`,"Delete table":`Poista taulukko`,"Delete row":`Poista rivi`,"Delete column":`Poista sarake`,"Empty cell":`Tyhjennä solu`,Delete:`Poista`,"Strike through":`Yliviivaus`,Underline:`Alleviivaus`,Break:`Vaihto`,"Search for":`Etsi arvoa`,"Replace with":`Korvaa arvolla`,Replace:`Korvaa`,Edit:`Muokkaa`,"Vertical align":`Pystyasemointi`,"Horizontal align":`Vaaka-asemointi`,"Sort by changed":`Järjestä muuttuneilla`,"Sort by name":`Järjestä nimellä`,"Sort by size":`Järjestä koolla`,"Add folder":`Lisää kansio`,Split:`Jaa`,"Split vertical":`Jaa pystysuuntaisesti`,"Split horizontal":`Jaa vaakasuuntaisesti`,Merge:`Yhdistä`,"Add column":`Lisää sarake`,"Add row":`Lisää rivi`,Border:`Reuna`,"Embed code":`Sisällytä koodi`,Update:`Päivitä`,superscript:`yläviite`,subscript:`alaviite`,"Cut selection":`Leikkaa valinta`,Paste:`Liitä`,"Choose Content to Paste":`Valitse liitettävä sisältö`,"Chars: %d":`Merkit: %d`,"Words: %d":`Sanat: %d`,All:`Kaikki`,"Select %s":`Valitse: %s`,"Select all":`Valitse kaikki`,source:`HTML`,bold:`lihavoitu`,italic:`kursiivi`,brush:`sivellin`,link:`linkki`,undo:`peruuta`,redo:`tee uudelleen`,table:`taulukko`,image:`kuva`,eraser:`pyyhekumi`,paragraph:`kappale`,fontsize:`tekstin koko`,video:`video`,font:`kirjasin`,about:`tietoja`,print:`tulosta`,underline:`alleviivaa`,strikethrough:`yliviivaa`,indent:`sisennä`,outdent:`pienennä sisennystä`,fullsize:`täysikokoinen`,shrink:`pienennä`,hr:`vaakaviiva`,ul:`järjestetty lista`,ol:`järjestämätön lista`,cut:`leikkaa`,selectall:`valitse kaikki`,"Open link":`Avaa linkki`,"Edit link":`Muokkaa linkkiä`,"No follow":`Ãlä seuraa`,Unlink:`Pura linkki`,Eye:`Ver`,pencil:`Muokkaa`," URL":`URL`,Reset:`Nollaa`,Save:`Tallenna`,"Save as ...":`Tallenna nimellä ...`,Resize:`Muuta kokoa`,Crop:`Rajaa`,Width:`Leveys`,Height:`Korkeus`,"Keep Aspect Ratio":`Säilytä kuvasuhde`,Yes:`Kyllä`,No:`Ei`,Remove:`Poista`,Select:`Valitse`,"You can only edit your own images. Download this image on the host?":`Voit muokata vain om
185ia kuvia. Lataa tämä kuva palvelimelle?`,"The image has been successfully uploaded to the host!":`Kuva on onnistuneesti ladattu palvelimelle!`,palette:`paletti`,"There are no files":`Tiedostoja ei ole`,Rename:`Nimeä uudelleen`,"Enter new name":`Syötä uusi nimi`,preview:`esikatselu`,download:`Lataa`,"Paste from clipboard":`Liitä leikepöydältä`,"Your browser doesn't support direct access to the clipboard.":`Selaimesi ei tue suoraa pääsyä leikepöydälle.`,"Copy selection":`Kopioi valinta`,copy:`kopioi`,"Border radius":`Reunan pyöristys`,"Show all":`Näytä kaikki`,Apply:`Käytä`,"Please fill out this field":`Täytä tämä kenttä`,"Please enter a web address":`Annan web-osoite`,Default:`Oletus`,Circle:`Ympyrä`,Dot:`Piste`,Quadrate:`Neliö`,"Lower Alpha":`Pieni aakkosellinen`,"Lower Greek":`Pieni kreikkalainen`,"Lower Roman":`Pieni roomalainen`,"Upper Alpha":`Suuri aakkosellinen`,"Upper Roman":`Suuri roomalainen`,Find:`Hae`,"Find Previous":`Hae edellinen`,"Find Next":`Hae seuraava`,"Insert className":`Lisää luokkanimi`,"Press Alt for custom resizing":`Paina Alt muokattuun koon muuttamiseen`,"Class name":`Luokan nimi`,"License: %s":`Lisenssi: %s`},mF={"Type something":`Ecrivez ici`,"About Jodit":`A propos de Jodit`,"Jodit Editor":`Editeur Jodit`,"Jodit User's Guide":`Guide de l'utilisateur`,"contains detailed help for using":`Aide détaillée à l'utilisation`,"For information about the license, please go to our website:":`Consulter la licence sur notre site web:`,"Buy full version":`Acheter la version complète`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Tous droits réservés.`,Anchor:`Ancre`,"Open in new tab":`Ouvrir dans un nouvel onglet`,"Open in fullsize":`Ouvrir l'éditeur en pleine page`,"Clear Formatting":`Supprimer le formattage`,"Fill color or set the text color":`Modifier la couleur du fond ou du texte`,Redo:`Refaire`,Undo:`Défaire`,Bold:`Gras`,Italic:`Italique`,"Insert Unordered List":`Liste non ordonnée`,"Insert Ordered List":`Liste ordonnée`,"Align Center":`Centrer`,"Align Justify":`Justifier`,"Align Left":`Aligner à gauche `,"Align Right":`Aligner à droite`,"Insert Horizontal Line":`Insérer une ligne horizontale`,"Insert Image":`Insérer une image`,"Insert file":`Insérer un fichier`,"Insert youtube/vimeo video":`Insérer une vidéo`,"Insert link":`Insérer un lien`,"Font size":`Taille des caractères`,"Font family":`Famille des caractères`,"Insert format block":`Bloc formatté`,Normal:`Normal`,"Heading 1":`Titre 1`,"Heading 2":`Titre 2`,"Heading 3":`Titre 3`,"Heading 4":`Titre 4`,Quote:`Citation`,Code:`Code`,Insert:`Insérer`,"Insert table":`Insérer un tableau`,"Decrease Indent":`Diminuer le retrait`,"Increase Indent":`Retrait plus`,"Select Special Character":`Sélectionnez un caractère spécial`,"Insert Special Character":`Insérer un caractère spécial`,"Paint format":`Cloner le format`,"Change mode":`Mode wysiwyg <-> code html`,Margins:`Marges`,top:`haut`,right:`droite`,bottom:`Bas`,left:`gauche`,Styles:`Styles`,Classes:`Classes`,Align:`Alignement`,Right:`Droite`,Center:`Centre`,Left:`Gauche`,"--Not Set--":`--Non disponible--`,Src:`Source`,Title:`Titre`,Alternative:`Alternative`,Filter:`Filtre`,Link:`Lien`,"Open link in new tab":`Ouvrir le lien dans un nouvel onglet`,Image:`Image`,file:`fichier`,Advanced:`Avancé`,"Image properties":`Propriétés de l'image`,Cancel:`Annuler`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Votre texte que vous essayez de coller est similaire au HTML. Collez-le en HTML?`,"Paste as HTML":`Coller en HTML?`,Keep:`Sauvegarder l'original`,Clean:`Nettoyer`,"Insert as Text":`Coller en tant que texte`,"Word Paste Detected":`C'est peut-être un fragment de Word ou Excel`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Le contenu que vous insérez provient d'un document Microsoft Word / Excel. Voulez-vous enregistrer le format ou l'effacer?`,"Insert only Text":`Coller le texte seulement`,"File Browser":`Explorateur de fichiers`,"Error on load list":`Erreur de liste de chargement`,"Error on load folders":`Erreur de dossier de chargement`,"Are you sure?":`Etes-vous sûrs ?`,"Enter Directory name":`Entrer le nom de dossier`,"Create directory":`Créer un dossier`,"type name":`Nom du fichier`,"type dir name":`Nom du dossier`,"Drop image":`Coller une image`,"Drop file":`Déposer un fichier`,"or click":`ou cliquer`,"Alternative text":`Texte de remplacemement`,Browse:`Chercher`,Upload:`Charger`,Backgroun
185d:`Arrière-plan`,Border:`Bordure`,Text:`Texte`,Top:`Haut`,Middle:`Milieu`,Bottom:`Bas`,"Insert column before":`Insérer une colonne avant`,"Insert column after":`Insérer une colonne après`,"Insert row above":`Insérer une ligne au dessus`,"Insert row below":`Insérer une ligne en dessous`,"Delete table":`Supprimer le tableau`,"Delete row":`Supprimer la ligne`,"Delete column":`Supprimer la colonne`,"Empty cell":`Vider la cellule`,"Chars: %d":`Symboles: %d`,"Words: %d":`Mots: %d`,Split:`Split`,"Split vertical":`Split vertical`,"Split horizontal":`Split horizontal`,"Strike through":`Barrer`,Underline:`Souligner`,superscript:`exposant`,subscript:`indice`,"Cut selection":`Couper la sélection`,"Select all":`Tout sélectionner`,Break:`Pause`,"Search for":`Rechercher`,"Replace with":`Remplacer par`,Replace:`Remplacer`,Paste:`Coller`,"Choose Content to Paste":`Choisissez le contenu à coller`,source:`la source`,bold:`gras`,italic:`italique`,brush:`pinceau`,link:`lien`,undo:`annuler`,redo:`refaire`,table:`tableau`,image:`image`,eraser:`gomme`,paragraph:`clause`,fontsize:`taille de police`,video:`Video`,font:`police`,about:`à propos de l'éditeur`,print:`impression`,underline:`souligné`,strikethrough:`barré`,indent:`indentation`,outdent:`retrait`,fullsize:`taille réelle`,shrink:`taille conventionnelle`,hr:`la ligne`,ul:`Liste`,ol:`Liste numérotée`,cut:`Couper`,selectall:`Sélectionner tout`,"Open link":`Ouvrir le lien`,"Edit link":`Modifier le lien`,"No follow":`Attribut Nofollow`,Unlink:`Supprimer le lien`,Eye:`Voir`,pencil:`Pour éditer`," URL":`URL`,Reset:`Restaurer`,Save:`Sauvegarder`,"Save as ...":`Enregistrer sous`,Resize:`Changer la taille`,Crop:`Taille de garniture`,Width:`Largeur`,Height:`Hauteur`,"Keep Aspect Ratio":`Garder les proportions`,Yes:`Oui`,No:`Non`,Remove:`Supprimer`,Select:`Mettre en évidence`,"Select %s":`Mettre en évidence: %s`,Update:`Mettre à jour`,"Vertical align":`Alignement vertical`,Merge:`aller`,"Add column":`Ajouter une colonne`,"Add row":`Ajouter une rangée`,Delete:`Effacer`,"Horizontal align":`Alignement horizontal`,"Sort by changed":`Trier par modification`,"Sort by name":`Trier par nom`,"Sort by size":`Trier par taille`,"Add folder":`Créer le dossier`,"You can only edit your own images. Download this image on the host?":`Vous ne pouvez éditer que vos propres images. Téléchargez cette image sur l'hôte?`,"The image has been successfully uploaded to the host!":`L'image a été téléchargée avec succès sur le serveur!`,palette:`Palette`,"There are no files":`Il n'y a aucun fichier dans ce répertoire.`,Rename:`renommer`,"Enter new name":`Entrez un nouveau nom`,preview:`Aperçu`,download:`Télécharger`,"Paste from clipboard":`Coller à partir du presse-papiers`,"Your browser doesn't support direct access to the clipboard.":`Votre navigateur ne prend pas en charge l'accès direct au presse-papiers.`,"Copy selection":`Copier la sélection`,copy:`copie`,"Border radius":`Rayon des bordures`,"Show all":`Afficher tous`,Apply:`Appliquer`,"Please fill out this field":`Veuillez remplir ce champ`,"Please enter a web address":`Veuillez entrer une adresse web`,Default:`Par défaut`,Circle:`Cercle`,Dot:`Point`,Quadrate:`Quadratique`,Find:`Trouver`,"Find Previous":`Précédent`,"Find Next":`Suivant`,"Insert className":`Insérer un nom de classe`,"Press Alt for custom resizing":`Appuyez sur Alt pour un redimensionnement personnalisé`,"Embed code":`Code d'intégration`,Edit:`Modifier`,All:`Tout sélectionner`,"License: %s":`Licence: %s`},hF={"Type something":`××§×× ×ש××...`,Advanced:`×תק××`,"About Jodit":`About Jodit`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Jodit User's Guide`,"contains detailed help for using":`contains detailed help for using.`,"For information about the license, please go to our website:":`For information about the license, please go to our website:`,"Buy full version":`Buy full version`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.`,Anchor:`××§×× ×¢××××`,"Open in new tab":`×¤×ª× ××ר××ס×× ××ש×`,"Open in fullsize":`×¤×ª× ×ת ××¢××¨× ××××× ××ש`,"Clear Formatting":`× ×§× ×¢×צ××`,"Fill color or set the text color":`×©× × ×¦××¢ ××§×¡× ×× ×¨×§×¢`,Redo:`×צע ש××`,Undo:`×××`,Bold:`××××ש`,Italic:`× ×××`,"Insert Unordered List":`××× ×¡ רש××ת ת××××××`,"Insert Ordered List":`××× ×¡ רש××× ×××ספרת`,"Align Center":`×ר××`,"Align Justify":`×שר `,"Align Left":`×שר ×ש×××`,"Align Right":`×שר ×××××`,"Insert Horizontal Line":`××× ×¡ ×§× ××פק×`,"Insert Image":`××× ×¡ ת××× ×`,"Insert file":`××× ×¡ ×§×××¥`,"Insert youtube/vimeo video":`××× ×¡ סר××× ××××× ×YouTube/Vimeo`,"Insert link":`××× ×¡ ×§×ש×ר`,"Font size":`×××× ××פ×`,"Font family":`××פ×`,"Insert format block":`××¢××¦× ×ר×ש`,Normal:`ר×××`,"Heading 1":`××תרת 1`,"Heading 2":`××תרת 2`,"Heading 3":`××תרת 3`,"Heading 4":`××תרת 4`,Quote:`צ××××`,Code:`×§××`,Insert:`××× ×¡`,"Insert table":`××× ×¡ ××××`,"Decrease Indent":`××§×× ×× ×ס×`,"Increase Indent":`×××× ×× ×ס×`,"Select Special Character":`××ר ×ª× ×××××`,"Insert Special Character":`××× ×¡ ×ª× ×××××`,"Paint format":`×עתק ×¢×צ××`,"Change mode":`××××£ ×צ×`,Margins:`ר××××`,top:`×¢××××`,right:`××××`,bottom:`ת×ת××`,left:`ש×××`,Styles:`×¢×צ×× CSS`,Classes:`×××קת CSS`,Align:`××ש×ר`,Right:`××××`,Center:`×ר××`,Left:`ש×××`,"--Not Set--":`--×× × ×§××¢--`,Src:`××§×ר`,Title:`××תרת`,Alternative:`××ת×× ×××פ×`,Link:`×§×ש×ר`,"Open link in new tab":`×¤×ª× ××ר××ס×× ××ש×`,Image:`ת××× ×`,file:`×§×××¥`,"Image properties":`××פ××× × ×ª××× ×`,Cancel:`×××××`,Ok:`××ש×ר`,"Your code is similar to HTML. Keep as HTML?":`××§×× ×××× ×HTML, ××× ××ש××ר ×HTML`,"Paste as HTML":`××××§ ×HTML`,Keep:`×ש×ר`,Clean:`× ×§×`,"Insert as Text":`××× ×¡ ××קס×`,"Word Paste Detected":`××××ª× ××××§× ×"××ר×"`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`×ת××× ××××××§ ××××¢ ××ס×× ××ר×/×קס×. ××× ×רצ×× × ××ש××ר ×ת ××¢×צ×× ×× ×× ×§×ת×`,"Insert only Text":`××× ×¡ ××§×¡× ××××`,"File Browser":`ס××ר ××§×צ××`,"Error on load list":`ש×××× ×××× ××¢×× ×ª רש×××`,"Error on load folders":`ש×××× ×××× ××¢×× ×ª תק××ת`,"Are you sure?":`××× ××ª× ××××?`,"Enter Directory name":`××× ×¡ ×©× ×ª×§××`,"Create directory":`צ×ר תק××`,"type name":`ס×× ××§×××¥`,"type dir name":`ס×× ××§×××¥`,"Drop image":`×סר ת××× ×`,"Drop file":`×סר ×§×××¥`,"or click":`×× ×××¥`,"Alternative text":`××ת×× ×××פ×`,Browse:`ס××ר`,Upload:`××¢××`,Backgroun
185d:`רקע`,Text:`×קס×`,Top:`×¢××××`,Middle:`×ר××`,Bottom:`ת×ת××`,"Insert column before":`××× ×¡ ×¢×××× ××¤× ×`,"Insert column after":`××× ×¡ ×¢×××× ××ר×`,"Insert row above":`××× ×¡ ש××¨× ××¢×`,"Insert row below":`××× ×¡ ש××¨× ×ת×ת`,"Delete table":`×××§ ××××`,"Delete row":`×××§ ש×ר×`,"Delete column":`×××§ ×¢××××`,"Empty cell":`ר××§× ×ª×`,Delete:`×××§`,"Strike through":`×§× ××צ×`,Underline:`×§× ×ª×ת××`,Break:`ש××רת ש×ר×`,"Search for":`×פש`,"Replace with":`××××£ ×`,Replace:`××××××£`,Edit:`ער××`,"Vertical align":`××ש×ר ×× ××`,"Horizontal align":`××ש×ר ××פק×`,Filter:`×¡× ×`,"Sort by changed":`××× ××¤× ×©×× ××`,"Sort by name":`×××× ××¤× ×©×`,"Sort by size":`×××× ××¤× ××××`,"Add folder":`××סף תק×××`,Split:`פ×צ××`,"Split vertical":`פ×צ×× ×× ××`,"Split horizontal":`פ×צ×× ××פק×`,Merge:`×××`,"Add column":`××סף ×¢××××`,"Add row":`××סף ש×ר×`,Border:`×ס×רת`,"Embed code":`××סף ×§××`,Update:`×¢×××`,superscript:`superscript`,subscript:`subscript`,"Cut selection":`×××ר ×××ר×`,Paste:`××××§`,"Choose Content to Paste":`××ר ת××× ×××××§×`,"Chars: %d":`ת××××: %d`,"Words: %d":`×××××: %d`,All:`×××`,"Select %s":`× ××ר: %s`,"Select all":`××ר ×××`,source:`HTML`,bold:`××××ש`,italic:`× ×××`,brush:`××רשת`,link:`×§×ש×ר`,undo:`×××`,redo:`×צע ש××`,table:`××××`,image:`ת××× ×`,eraser:`×××§`,paragraph:`פסק×`,fontsize:`×××× ××פ×`,video:`×××××`,font:`××פ×`,about:`×¢××× ×`,print:`××פס`,underline:`×§× ×ª×ת××`,strikethrough:`×§× ××צ×`,indent:`×××× ×× ×ס×`,outdent:`××§×× ×× ×ס×`,fullsize:`×××× ×××`,shrink:`××××¥`,hr:`×§× ××פק×`,ul:`רש××ת ת××××××`,ol:`רש××× ×××ספרת`,cut:`×ת××`,selectall:`××ר ×××`,"Open link":`×¤×ª× ×§×ש×ר`,"Edit link":`ער×× ×§×ש×ר`,"No follow":`××× ××¢×§×`,Unlink:`××× ×§×ש×ר`,Eye:`×צ×`,pencil:`××× ×ער××`," URL":`×ת××ת`,Reset:`×פס`,Save:`ש××ר`,"Save as ...":`ש××ר ×ש×...`,Resize:`×©× × ××××`,Crop:`×ת××`,Width:`ר×××`,Height:`××××`,"Keep Aspect Ratio":`ש××ר ××ס`,Yes:`××`,No:`××`,Remove:`×סר`,Select:`××ר`,"You can only edit your own images. Download this image on the host?":`רק ×§×צ×× ××ש×××××× ×©×× × ××ª× ×× ×ער×××. ××× ×××ר×× ×ת ××§×××¥?`,"The image has been successfully uploaded to the host!":`×ת××× × ×¢××ª× ××צ×××!`,palette:`×××`,"There are no files":`××× ×§×צ×× ×ספר×× ××.`,Rename:`××× ×ר×ת`,"Enter new name":`××× ×©× ××ש`,preview:`תצ××× ××§××××`,download:`××ר×`,"Paste from clipboard":`××××××§ ×××××`,"Your browser doesn't support direct access to the clipboard.":`××פ××¤× ×©×× ×× ×ª××× ×××©× ×ש××¨× ××××.`,"Copy selection":`×עתק ×××ר×`,copy:`×עתק`,"Border radius":`ר×××ס ×××××`,"Show all":`××¦× ×ת ××`,Apply:`×××`,"Please fill out this field":`× × ×××× ×©×× ××`,"Please enter a web address":`×× × ××× ×ת××ת ××× ××¨× ×`,Default:`×ר×רת ×××××`,Circle:`××¢××`,Dot:`× ×§×××`,Quadrate:`×ר××××¢ ×××`,Find:`××צ××`,"Find Previous":`××¦× ×ת ××§×××`,"Find Next":`×פש ×ת ×××`,"Insert className":`××× ×¡ ×ת ×©× ×××ת×`,"Press Alt for custom resizing":`×××¥ ×¢× ××× ×ש×× ×× ×××× ××ת×× ××ש×ת`,"License: %s":`ר×ש×××: %s`},gF={"Type something":`Ãrjon be valamit`,Advanced:`Haladó`,"About Jodit":`Joditról`,"Jodit Editor":`Jodit Editor`,"Free Non-commercial Version":`Ingyenes változat`,"Jodit User's Guide":`Jodit útmutató`,"contains detailed help for using":`további segÃtséget tartalmaz`,"For information about the license, please go to our website:":`További licence információkért látogassa meg a weboldalunkat:`,"Buy full version":`Teljes verzió megvásárlása`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Minden jog fenntartva.`,Anchor:`Horgony`,"Open in new tab":`Megnyitás új lapon`,"Open in fullsize":`Megnyitás teljes méretben`,"Clear Formatting":`Formázás törl
185ése`,"Fill color or set the text color":`Háttér/szöveg szÃn`,Redo:`Ãjra`,Undo:`Visszavon`,Bold:`Félkövér`,Italic:`DÅlt`,"Insert Unordered List":`Pontozott lista`,"Insert Ordered List":`Számozott lista`,"Align Center":`Középre zárt`,"Align Justify":`Sorkizárt`,"Align Left":`Balra zárt`,"Align Right":`Jobbra zárt`,"Insert Horizontal Line":`VÃzszintes vonal beszúrása`,"Insert Image":`Kép beszúrás`,"Insert file":`Fájl beszúrás`,"Insert youtube/vimeo video":`Youtube videó beszúrása`,"Insert link":`Link beszúrás`,"Font size":`Betűméret`,"Font family":`BetűtÃpus`,"Insert format block":`Formázott blokk beszúrása`,Normal:`Normál`,"Heading 1":`Fejléc 1`,"Heading 2":`Fejléc 2`,"Heading 3":`Fejléc 3`,"Heading 4":`Fejléc 4`,Quote:`Idézet`,Code:`Kód`,Insert:`Beszúr`,"Insert table":`Táblázat beszúrása`,"Decrease Indent":`Behúzás csökkentése`,"Increase Indent":`Behúzás növelése`,"Select Special Character":`Speciális karakter kiválasztása`,"Insert Special Character":`Speciális karakter beszúrása`,"Paint format":`Kép formázása`,"Change mode":`Nézet váltása`,Print:`Nyomtatás`,Margins:`Szegélyek`,top:`felsÅ`,right:`jobb`,bottom:`alsó`,left:`bal`,Styles:`CSS stÃlusok`,Classes:`CSS osztályok`,Align:`IgazÃtás`,Right:`Jobbra`,Center:`Középre`,Left:`Balra`,"--Not Set--":`Nincs`,Src:`Forrás`,Title:`CÃm`,Alternative:`HelyettesÃtÅ szöveg`,Link:`Link`,"Open link in new tab":`Link megnyitása új lapon`,Image:`Kép`,file:`Fájl`,"Image properties":`Kép tulajdonságai`,Cancel:`Mégsem`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`A beillesztett szöveg HTML-nek tűnik. Megtartsuk HTML-ként?`,"Paste as HTML":`Beszúrás HTML-ként`,Keep:`Megtartás`,Clean:`Elvetés`,"Insert as Text":`Beszúrás szövegként`,"Word Paste Detected":`Word-bÅl másolt szöveg`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`A beillesztett tartalom Microsoft Word/Excel dokumentumból származik. Meg szeretné tartani a formátumát?`,"Insert only Text":`Csak szöveg beillesztése`,"File Browser":`Fájl tallózó`,"Error on load list":`Hiba a lista betöltése közben`,"Error on load folders":`Hiba a mappák betöltése közben`,"Are you sure?":`Biztosan ezt szeretné?`,"Enter Directory name":`Ãrjon be egy mappanevet`,"Create directory":`Mappa létrehozása`,"type name":`Ãrjon be bevet`,"type dir name":`Ãrjon be bevet`,"Drop image":`Húzza ide a képet`,"Drop file":`Húzza ide a fájlt`,"or click":`vagy kattintson`,"Alternative text":`HelyettesÃtÅ szöveg`,Browse:`Tallóz`,Upload:`Feltölt`,Background:`Háttér`,Text:`Szöveg`,Top:`Fent`,Middle:`Középen`,Bottom:`Lent`,"Insert column before":`Oszlop beszúrás elé`,"Insert column after":`Oszlop beszúrás utána`,"Insert row above":`Sor beszúrás fölé`,"Insert row below":`Sor beszúrás alá`,"Delete table":`Táblázat törlése`,"Delete row":`Sor törlése`,"Delete column":`Oszlop törlése`,"Empty cell":`Cella tartalmának törlése`,Delete:`Törlés`,"Strike through":`Ãthúzott`,Underline:`Aláhúzott`,Break:`Szünet`,"Search for":`Keresés`,"Replace with":`Csere erre`,Replace:`Cserélje ki`,Edit:`Szerkeszt`,"Vertical align":`FüggÅleges igazÃtás`,"Horizontal align":`VÃzszintes igazÃtás`,Filter:`SzűrÅ`,"Sort by changed":`Rendezés módosÃtás szerint`,"Sort by name":`Rendezés név szerint`,"Sort by size":`Rendezés méret szerint`,"Add folder":`Mappa hozzáadás`,"Split vertical":`FüggÅleges felosztás`,"Split horizontal":`VÃzszintes felosztás`,Merge:`Ãsszevonás`,"Add column":`Oszlop hozzáadás`,"Add row":`Sor hozzáadás`,Border:`Szegély`,"Embed code":`Beágyazott kód`,Update:`FrissÃt`,superscript:`FelsÅ index`,subscript:`Alsó index`,"Cut selection":`Kivágás`,Paste:`Beillesztés`,"Choose Content to Paste":`Válasszon tartalmat a beillesztéshez`,Split:`Felosztás`,"Chars: %d":`Karakterek száma: %d`,"Words: %d":`Szavak száma: %d`,All:`Ãsszes`,"Select %s":`Kijelöl: %s`,"Select all":`Ãsszes kijelölése`,source:`HTML`,bold:`Félkövér`,italic:`DÅlt`,brush:`Ecset`,link:`Link`,undo:`Visszavon`,redo:`Ãjra`,table:`Táblázat`,image:`Kép`,eraser:`Törlés`,paragraph:`Paragráfus`,fontsize:`Betűméret`,video:`Videó`,font:`Betű`,about:`Rólunk`,print:`Nyomtat`,underline:`Aláhúzott`,strikethrough:`Ãthúzott`,indent:`Behúzás`,outdent:`Aussenseiter`,fullsize:`Teljes méret`,shrink:`Ãsszenyom`,hr:`Egyenes vonal`,ul:`Lista`,ol:`Számozott lista`,cut:`Kivág`,selectall:`Ãsszes kijelölése`,"Open link":`Link megnyitása`,"Edit link":`Link szerkesztése`,"No follow":`Nincs követés`,Unlink:`Link leválasztása`,Eye:`felülvizsgálat`,pencil:`Szerkesztés`," URL":`URL`,Reset:`VisszaállÃt`,Save:`Mentés`,"Save as ...":`Mentés másként...`,Resize:`Ãtméretezés`,Crop:`Kivág`,Wi
185dth:`Szélesség`,Height:`Magasság`,"Keep Aspect Ratio":`Képarány megtartása`,Yes:`Igen`,No:`Nem`,Remove:`EltávolÃt`,Select:`Kijelöl`,"You can only edit your own images. Download this image on the host?":`Csak a saját képeit tudja szerkeszteni. Letölti ezt a képet?`,"The image has been successfully uploaded to the host!":`Kép sikeresen feltöltve!`,palette:`Palette`,"There are no files":`Er zijn geen bestanden in deze map.`,Rename:`átnevezés`,"Enter new name":`Adja meg az új nevet`,preview:`elÅnézet`,download:`Letöltés`,"Paste from clipboard":`Illessze be a vágólap`,"Your browser doesn't support direct access to the clipboard.":`A böngészÅ nem támogatja a közvetlen hozzáférést biztosÃt a vágólapra.`,"Copy selection":`Másolás kiválasztása`,copy:`másolás`,"Border radius":`Határ sugár`,"Show all":`Ãsszes`,Apply:`Alkalmazni`,"Please fill out this field":`Kérjük, töltse ki ezt a mezÅt,`,"Please enter a web address":`Kérjük, Ãrja be a webcÃmet`,Default:`Alapértelmezett`,Circle:`Kör`,Dot:`Pont`,Quadrate:`Quadrate`,Find:`Találni`,"Find Previous":`Megtalálja ElÅzÅ`,"Find Next":`KövetkezÅ Keresése`,"Insert className":`Helyezze be az osztály nevét`,"Press Alt for custom resizing":`Nyomja meg az Alt egyéni átméretezés`,"License: %s":`Licenc: %s`},_F={"Type something":`Ketik sesuatu`,"About Jodit":`Tentang Jodit`,"Jodit Editor":`Editor Jodit`,"Free Non-commercial Version":`Versi Bebas Non-komersil`,"Jodit User's Guide":`Panduan Pengguna Jodit`,"contains detailed help for using":`mencakup detail bantuan penggunaan`,"For information about the license, please go to our website:":`Untuk informasi tentang lisensi, silakan kunjungi website:`,"Buy full version":`Beli versi lengkap`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Hak Cipta © XDSoft.net - Chupurnov Valeriy. Hak cipta dilindungi undang-undang.`,Anchor:`Tautan`,"Open in new tab":`Buka di tab baru`,"Open in fullsize":`Buka editor dalam ukuran penuh`,"Clear Formatting":`Hapus Pemformatan`,"Fill color or set the text color":`Isi warna atau atur warna teks`,Redo:`Ulangi`,Undo:`Batalkan`,Bold:`Tebal`,Italic:`Miring`,"Insert Unordered List":`Sisipkan Daftar Tidak Berurut`,"Insert Ordered List":`Sisipkan Daftar Berurut`,"Align Center":`Tengah`,"Align Justify":`Penuh`,"Align Left":`Kiri`,"Align Right":`Kanan`,"Insert Horizontal Line":`Sisipkan Garis Horizontal`,"Insert Image":`Sisipkan Gambar`,"Insert file":`Sisipkan Berkas`,"Insert youtube/vimeo video":`Sisipkan video youtube/vimeo`,"Insert link":`Sisipkan tautan`,"Font size":`Ukuran font`,"Font family":`Keluarga font`,"Insert format block":`Sisipkan blok format`,Normal:`Normal`,"Heading 1":`Heading 1`,"Heading 2":`Heading 2`,"Heading 3":`Heading 3`,"Heading 4":`Heading 4`,Quote:`Kutip`,Code:`Kode`,Insert:`Sisipkan`,"Insert table":`Sisipkan tabel`,"Decrease Indent":`Kurangi Indentasi`,"Increase Indent":`Tambah Indentasi`,"Select Special Character":`Pilih Karakter Spesial`,"Insert Special Character":`Sisipkan Karakter Spesial`,"Paint format":`Formar warna`,"Change mode":`Ubah mode`,Margins:`Batas`,top:`atas`,right:`kanan`,bottom:`bawah`,left:`kiri`,Styles:`Gaya`,Classes:`Class`,Align:`Rata`,Right:`Kanan`,Center:`Tengah`,Left:`Kiri`,"--Not Set--":`--Tidak diset--`,Src:`Src`,Title:`Judul`,Alternative:`Teks alternatif`,Link:`Tautan`,"Open link in new tab":`Buka tautan di tab baru`,Image:`Gambar`,file:`berkas`,Advanced:`Lanjutan`,"Image properties":`Properti gambar`,Cancel:`Batal`,Ok:`Ya`,"Your code is similar to HTML. Keep as HTML?":`Kode Anda cenderung ke HTML. Biarkan sebagai HTML?`,"Paste as HTML":`Paste sebagai HTML`,Keep:`Jaga`,Clean:`Bersih`,"Insert as Text":`Sisipkan sebagai teks`,"Insert only Text":`Sisipkan hanya teks`,"Word Paste Detected":`Terdeteksi paste dari Word`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Konten dipaste dari dokumen Microsoft Word/Excel. Apakah Anda ingin tetap menjaga format atau membersihkannya?`,"File Browser":`Penjelajah Berkas`,"Error on load list":`Error ketika memuat list`,"Error on load folders":`Error ketika memuat folder`,"Are you sure?":`Apakah Anda yakin?`,"Enter Directory name":`Masukkan nama Direktori`,"Create directory":`Buat direktori`,"type name":`ketik nama`,"type dir name":`ketik nama`,"Drop image":`Letakkan gambar`,"Drop file":`Letakkan berkas`,"or click":`atau klik`,"Alternative text":`Teks alternatif`,Browse:`Jelajahi`,Upload:`Unggah`,Backgroun
185d:`Latar Belakang`,Text:`Teks`,Top:`Atas`,Middle:`Tengah`,Bottom:`Bawah`,"Insert column before":`Sisipkan kolom sebelumnya`,"Insert column after":`Sisipkan kolom setelahnya`,"Insert row above":`Sisipkan baris di atasnya`,"Insert row below":`Sisipkan baris di bawahnya`,"Delete table":`Hapus tabel`,"Delete row":`Hapus baris`,"Delete column":`Hapus kolom`,"Empty cell":`Kosongkan cell`,source:`sumber`,bold:`tebal`,italic:`miring`,brush:`sikat`,link:`tautan`,undo:`batalkan`,redo:`ulangi`,table:`tabel`,image:`gambar`,eraser:`penghapus`,paragraph:`paragraf`,fontsize:`ukuran font`,video:`video`,font:`font`,about:`tentang`,print:`cetak`,underline:`garis bawah`,strikethrough:`coret`,indent:`menjorok ke dalam`,outdent:`menjorok ke luar`,fullsize:`ukuran penuh`,shrink:`menyusut`,hr:`hr`,ul:`ul`,ol:`ol`,cut:`potong`,selectall:`Pilih semua`,"Embed code":`Kode embed`,"Open link":`Buka tautan`,"Edit link":`Edit tautan`,"No follow":`No follow`,Unlink:`Hapus tautan`,Eye:`Mata`,pencil:`pensil`,Update:`Perbarui`," URL":`URL`,Edit:`Edit`,"Horizontal align":`Perataan horizontal`,Filter:`Filter`,"Sort by changed":`Urutkan berdasarkan perubahan`,"Sort by name":`Urutkan berdasarkan nama`,"Sort by size":`Urutkan berdasarkan ukuran`,"Add folder":`Tambah folder`,Reset:`Reset`,Save:`Simpan`,"Save as ...":`Simpan sebagai...`,Resize:`Ubah ukuran`,Crop:`Crop`,Width:`Lebar`,Height:`Tinggi`,"Keep Aspect Ratio":`Jaga aspek rasio`,Yes:`Ya`,No:`Tidak`,Remove:`Copot`,Select:`Pilih`,"Chars: %d":`Karakter: %d`,"Words: %d":`Kata: %d`,All:`Semua`,"Select %s":`Pilih %s`,"Select all":`Pilih semua`,"Vertical align":`Rata vertikal`,Split:`Bagi`,"Split vertical":`Bagi secara vertikal`,"Split horizontal":`Bagi secara horizontal`,Merge:`Gabungkan`,"Add column":`Tambah kolom`,"Add row":`tambah baris`,Delete:`Hapus`,Border:`Bingkai`,"License: %s":`Lisensi: %s`,"Strike through":`Coret`,Underline:`Garis Bawah`,superscript:`Superskrip`,subscript:`Subskrip`,"Cut selection":`Potong pilihan`,Break:`Berhenti`,"Search for":`Mencari`,"Replace with":`Ganti dengan`,Replace:`Mengganti`,Paste:`Paste`,"Choose Content to Paste":`Pilih konten untuk dipaste`,"You can only edit your own images. Download this image on the host?":`Anda hanya dapat mengedit gambar Anda sendiri. Unduh gambar ini di host?`,"The image has been successfully uploaded to the host!":`Gambar telah sukses diunggah ke host!`,palette:`palet`,"There are no files":`Tidak ada berkas`,Rename:`ganti nama`,"Enter new name":`Masukkan nama baru`,preview:`pratinjau`,download:`Unduh`,"Paste from clipboard":`Paste dari clipboard`,"Your browser doesn't support direct access to the clipboard.":`Browser anda tidak mendukung akses langsung ke clipboard.`,"Copy selection":`Copy seleksi`,copy:`copy`,"Border radius":`Border radius`,"Show all":`Tampilkan semua`,Apply:`Menerapkan`,"Please fill out this field":`Silahkan mengisi kolom ini`,"Please enter a web address":`Silahkan masukkan alamat web`,Default:`Default`,Circle:`Lingkaran`,Dot:`Dot`,Quadrate:`Kuadrat`,Find:`Menemukan`,"Find Previous":`Menemukan Sebelumnya`,"Find Next":`Menemukan Berikutnya`,"Insert className":`Masukkan nama kelas`,"Press Alt for custom resizing":`Tekan Alt untuk mengubah ukuran kustom`},vF={"Type something":`Scrivi qualcosa...`,Advanced:`Avanzato`,"About Jodit":`A proposito di Jodit`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Guida utente di Jodit`,"contains detailed help for using":`contiene una guida dettagliata per l'uso.`,"For information about the license, please go to our website:":`Per informazioni sulla licenza, si prega di visitare il nostro sito web:`,"Buy full version":`Acquista la versione completa`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Tutti i diritti riservati.`,Anchor:`Link`,"Open in new tab":`Apri in una nuova scheda`,"Open in fullsize":`Apri l'editor a schermo intero`,"Clear Formatting":`Pulisci Formattazione`,"Fill color or set the text color":`Colore di sfondo o del testo`,Redo:`Ripristina`,Undo:`Annulla`,Bold:`Grassetto`,Italic:`Corsivo`,"Insert Unordered List":`Inserisci lista non ordinata`,"Insert Ordered List":`Inserisci lista ordinata`,"Align Center":`Allinea al centro`,"Align Justify":`Allineamento Giustificato`,"Align Left":`Allinea a Sinistra`,"Align Right":`Allinea a Destra`,"Insert Horizontal Line":`Inserisci una linea orizzontale`,"Insert Image":`Inserisci immagine`,"Insert file":`Inserisci un file`,"Insert youtube/vimeo video":`Inserisci video Youtube/Vimeo`,"Insert link":`Inserisci link`,"Font size":`Dimensione carattere`,"Font family":`Tipo di font`,"Insert format block":`Inserisci blocco`,Normal:`Normale`,"Heading 1":`Intestazione 1`,"Heading 2":`Intestazione 2`,"Heading 3":`Intestazione 3`,"Heading 4":`Intestazione 4`,Quote:`Citazione`,Code:`Codice`,Insert:`Inserisci`,"Insert table":`Inserisci tabella`,"Decrease Indent":`Riduci il rientro`,"Increase Indent":`Aumenta il rientro`,"Select Special Character":`Seleziona un carattere speciale`,"Insert Special Character":`Inserisci un carattere speciale`,"Paint format":`Copia formato`,"Change mode":`Cambia modalita'`,Margins:`Margini`,top:`su`,right:`destra`,bottom:`giù`,left:`sinistra`,Styles:`Stili CSS`,Classes:`Classi CSS`,Align:`Allinea`,Right:`Destra`,Center:`Centro`,Left:`Sinistra`,"--Not Set--":`--Non Impostato--`,Src:`Fonte`,Title:`Titolo`,Alternative:`Testo Alternativo`,Link:`Link`,"Open link in new tab":`Apri il link in una nuova scheda`,Image:`Immagine`,file:`Archiv
185io`,"Image properties":`Proprietà dell'immagine`,Cancel:`Annulla`,Ok:`Accetta`,"Your code is similar to HTML. Keep as HTML?":`Il codice è simile all'HTML. Mantieni come HTML?`,"Paste as HTML":`Incolla come HTML`,Keep:`Mantieni`,Clean:`Pulisci`,"Insert as Text":`Inserisci come testo`,"Word Paste Detected":`Incolla testo da Word rilevato`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Il contenuto incollato proviene da un documento Microsoft Word / Excel. Vuoi mantenere il formato o pulirlo?`,"Insert only Text":`Inserisci solo il testo`,"File Browser":`Cerca file`,"Error on load list":`Errore durante il caricamento dell'elenco`,"Error on load folders":`Errore durante il caricamento delle cartelle`,"Are you sure?":`Sei sicuro?`,"Enter Directory name":`Inserisci il nome della cartella`,"Create directory":`Crea cartella`,"type name":`Digita il nome`,"type dir name":`Digita il nome`,"Drop image":`Cancella immagine`,"Drop file":`Cancella file`,"or click":`o clicca`,"Alternative text":`Testo alternativo`,Browse:`Sfoglia`,Upload:`Carica`,Background:`Sfondo`,Text:`Testo`,Top:`Su`,Middle:`Centro`,Bottom:`Sotto`,"Insert column before":`Inserisci la colonna prima`,"Insert column after":`Inserisci la colonna dopo`,"Insert row above":`Inserisci la riga sopra`,"Insert row below":`Inserisci la riga sotto`,"Delete table":`Elimina tabella`,"Delete row":`Elimina riga`,"Delete column":`Elimina colonna`,"Empty cell":`Cella vuota`,Delete:`Cancella`,"Strike through":`Barrato`,Underline:`Sottolineato`,Break:`Pausa`,"Search for":`Cerca per`,"Replace with":`Sostituisci con`,Replace:`Sostituisci`,Edit:`Modifica`,"Vertical align":`Allineamento verticala`,"Horizontal align":`Allineamento orizzontale`,Filter:`Filtro`,"Sort by changed":`Ordina per data di modifica`,"Sort by name":`Ordina per nome`,"Sort by size":`Ordina per dimensione`,"Add folder":`Aggiungi cartella`,Split:`Dividi`,"Split vertical":`Dividi verticalmente`,"Split horizontal":`Dividi orizzontale`,Merge:`Fondi`,"Add column":`Aggiungi colonna`,"Add row":`Aggiungi riga`,Border:`Bordo`,"Embed code":`Includi codice`,Update:`Aggiorna`,superscript:`indice`,subscript:`pedice`,"Cut selection":`Taglia selezione`,Paste:`Incolla`,"Choose Content to Paste":`Seleziona il contenuto da incollare`,"Chars: %d":`Caratteri: %d`,"Words: %d":`Parole: %d`,All:`Tutto`,"Select %s":`Seleziona: %s`,"Select all":`Seleziona tutto`,source:`risorsa`,bold:`Grassetto`,italic:`Corsivo`,brush:`Pennello`,link:`Link`,undo:`Annulla`,redo:`Ripristina`,table:`Tabella`,image:`Immagine`,eraser:`Gomma`,paragraph:`Paragrafo`,fontsize:`Dimensione del carattere`,video:`Video`,font:`Font`,about:`Approposito di`,print:`Stampa`,underline:`Sottolineato`,strikethrough:`Barrato`,indent:`aumenta rientro`,outdent:`riduci rientro`,fullsize:`espandi`,shrink:`comprimi`,hr:`linea orizzontale`,ul:`lista non ordinata`,ol:`lista ordinata`,cut:`Taglia`,selectall:`Seleziona tutto`,"Open link":`Apri link`,"Edit link":`Modifica link`,"No follow":`Non seguire`,Unlink:`Rimuovi link`,Eye:`Recensione`,pencil:`Per modificare`," URL":` URL`,Reset:`Reset`,Save:`Salva`,"Save as ...":`Salva con nome...`,Resize:`Ridimensiona`,Crop:`Ritaglia`,Width:`Larghezza`,Height:`Altezza`,"Keep Aspect Ratio":`Mantieni le proporzioni`,Yes:`Si`,No:`No`,Remove:`Rimuovi`,Select:`Seleziona`,"You can only edit your own images. Download this image on the host?":`Puoi modificare solo le tue immagini. Vuoi scaricare questa immagine dal server?`,"The image has been successfully uploaded to the host!":`L'immagine è stata caricata correttamente sul server!`,palette:`tavolozza`,"There are no files":`Non ci sono file in questa directory.`,Rename:`Rinomina`,"Enter new name":`Inserisci un nuovo nome`,preview:`anteprima`,download:`Scarica`,"Paste from clipboard":`Incolla dagli appunti`,"Your browser doesn't support direct access to the clipboard.":`Il tuo browser non supporta l'accesso diretto agli appunti.`,"Copy selection":`Copia selezione`,copy:`copia`,"Border radius":`Border radius`,"Show all":`Mostra tutti`,Apply:`Applica`,"Please fill out this field":`Si prega di compilare questo campo`,"Please enter a web address":`Si prega di inserire un indirizzo web`,Default:`Default`,Circle:`Cerchio`,Dot:`Punto`,Quadrate:`Quadrato`,"Lower Alpha":`Lettera Minuscola`,"Lower Greek":`Lettera Greca Minuscola`,"Lower Roman":`Numero Romano Minuscolo`,"Upper Alpha":`Lettera Maiuscola`,"Upper Roman":`Numero Romano Maiuscolo`,Find:`Trova`,"Find Previous":`Trova Precedente`,"Find Next":`Trova Successivo`,"Insert className":`Inserisci il nome della classe`,"Press Alt for custom resizing":`Premere Alt per il ridimensionamento personalizzato`,"License: %s":`Licenza: %s`},yF={"Type something":`ãªã«ãã¿ã¤ããã¦ãã ãã`,Advanced:`é«åº¦ãªè¨å®`,"About Jodit":`Joditã«ã¤ãã¦`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Jodit ã¦ã¼ã¶ã¼ãºã»ã¬ã¤ã`,"contains detailed help for using":`詳ããä½¿ãæ¹`,"For information about the license, please go to our website:":`ã©ã¤ã»ã³ã¹è©³ç´°ã«ã¤ãã¦ã¯Jodit Webãµã¤ãã確èªãã ããï¼`,"Buy full version":`ãã«ãã¼ã¸ã§ã³ãè³¼å
¥`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.`,Anchor:`Anchor`,"Open in new tab":`æ°ããã¿ãã§éã`,"Open in fullsize":`ã¨ãã£ã¿ã¼ã®ãµã¤ãºï¼ãã«/ãã¼ãã«ï¼`,"Clear Formatting":`æ¸å¼ãã¯ãªã¢`,"Fill color or set the text color":`ããã¹ãã®è²`,Redo:`ããç´ã`,Undo:`å
ã«æ»ã`,Bold:`太å`,Italic:`æä½`,"Insert Unordered List":`ç®æ¡æ¸ã`,"Insert Ordered List":`çªå·ä»ããªã¹ã`,"Align Center":`ä¸å¤®æã`,"Align Justify":`両端æã`,"Align Left":`å·¦æã`,"Align Right":`峿ã`,"Insert Horizontal Line":`åºåãç·ãæ¿å
¥`,"Insert Image":`ç»åãæ¿å
¥`,"Insert file":`ãã¡ã¤ã«ãæ¿å
¥`,"Insert youtube/vimeo video":`Youtube/Vimeo åç»`,"Insert link":`ãªã³ã¯ãæ¿å
¥`,"Font size":`ãã©ã³ããµã¤ãº`,"Font family":`ãã©ã³ã`,"Insert format block":`ããã¹ãã®ã¹ã¿ã¤ã«`,Normal:`æå®ãªã`,"Heading 1":`ã¿ã¤ãã«1`,"Heading 2":`ã¿ã¤ãã«2`,"Heading 3":`ã¿ã¤ãã«3`,"Heading 4":`ã¿ã¤ãã«4`,Quote:`å¼ç¨`,Code:`ã³ã¼ã`,Insert:`æ¿å
¥`,"Insert table":`è¡¨ãæ¿å
¥`,"Decrease Indent":`ã¤ã
185³ãã³ãæ¸`,"Increase Indent":`ã¤ã³ãã³ãå¢`,"Select Special Character":`ç¹æ®æåã鏿`,"Insert Special Character":`ç¹æ®æåãæ¿å
¥`,"Paint format":`æ¸å¼ãè²¼ä»ã`,"Change mode":`ç·¨éã¢ã¼ãåæ¿ã`,Margins:`ãã¼ã¸ã³`,top:`ä¸`,right:`å³`,bottom:`ä¸`,left:`å·¦`,Styles:`ã¹ã¿ã¤ã«`,Classes:`ã¯ã©ã¹`,Align:`é
ç½®`,Right:`å³å¯ã`,Center:`ä¸å¤®å¯ã`,Left:`å·¦å¯ã`,"--Not Set--":`æå®ãªã`,Src:`ã½ã¼ã¹`,Title:`ã¿ã¤ãã«`,Alternative:`代æ¿ããã¹ã`,Link:`ãªã³ã¯`,"Open link in new tab":`æ°ããã¿ãã§éã`,Image:`ç»å`,file:`ãã¡ã¤ã«`,"Image properties":`ç»åã®ããããã£ã¼`,Cancel:`ãã£ã³ã»ã«`,Ok:`確å®`,"Your code is similar to HTML. Keep as HTML?":`HTMLã³ã¼ããä¿æãã¾ããï¼`,"Paste as HTML":`HTMLã§è²¼ä»ã`,Keep:`HTMLãä¿æ`,Clean:`Clean`,"Insert as Text":`HTMLãããã¹ãã«ãã`,"Word Paste Detected":`Word Paste Detected`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?`,"Insert only Text":`ããã¹ãã ã`,"File Browser":`File Browser`,"Error on load list":`Error on load list`,"Error on load folders":`Error on load folders`,"Are you sure?":`Are you sure?`,"Enter Directory name":`Enter Directory name`,"Create directory":`Create directory`,"type name":`type name`,"type dir name":`type name`,"Drop image":`ããã«ç»åããããã`,"Drop file":`ããã«ãã¡ã¤ã«ããããã`,"or click":`or ã¯ãªãã¯`,"Alternative text":`代æ¿ããã¹ã`,Browse:`ãã©ã¦ãº`,Upload:`ã¢ãããã¼ã`,Background:`èæ¯`,Text:`æå`,Top:`ä¸`,Middle:`ä¸å¤®`,Bottom:`ä¸`,"Insert column before":`å·¦ã«åãæ¿å
¥`,"Insert column after":`å³ã«åãæ¿å
¥`,"Insert row above":`ä¸ã«è¡ãæ¿å
¥`,"Insert row below":`ä¸ã«è¡ãæ¿å
¥`,"Delete table":`表ãåé¤`,"Delete row":`è¡ãåé¤`,"Delete column":`åãåé¤`,"Empty cell":`ã»ã«ã空ã«ãã`,"Chars: %d":`æåæ°: %d`,"Words: %d":`åèªæ°: %d`,"Strike through":`åãæ¶ãç·`,Underline:`ä¸ç·`,superscript:`ä¸ä»ãæå`,subscript:`ä¸ä»ãæå`,"Cut selection":`åãåã`,"Select all":`ãã¹ã¦é¸æ`,Break:`Pause`,"Search for":`æ¤ç´¢`,"Replace with":`ç½®æ`,Replace:`交æ`,Paste:`è²¼ä»ã`,"Choose Content to Paste":`鏿ããå
容ãè²¼ä»ã`,All:`å
¨é¨`,source:`source`,bold:`bold`,italic:`italic`,brush:`brush`,link:`link`,undo:`undo`,redo:`redo`,table:`table`,image:`image`,eraser:`eraser`,paragraph:`paragraph`,fontsize:`fontsize`,video:`video`,font:`font`,about:`about`,print:`print`,underline:`underline`,strikethrough:`strikethrough`,indent:`indent`,outdent:`outdent`,fullsize:`fullsize`,shrink:`shrink`,hr:`åå²ç·`,ul:`ç®æ¡æ¸ã`,ol:`çªå·ä»ããªã¹ã`,cut:`åãåã`,selectall:`ãã¹ã¦é¸æ`,"Open link":`ãªã³ã¯ãéã`,"Edit link":`ãªã³ã¯ãç·¨é`,"No follow":`No follow`,Unlink:`ãªã³ã¯è§£é¤`,Eye:`ãµã¤ãã確èª`," URL":`URL`,Reset:`ãªã»ãã`,Save:`ä¿å`,"Save as ...":`Save as ...`,Resize:`ãªãµã¤ãº`,Crop:`Crop`,Width:`å¹
`,Height:`é«ã`,"Keep Aspect Ratio":`縦横æ¯ãä¿æ`,Yes:`ã¯ã`,No:`ããã`,Remove:`ç§»é¤`,Select:`鏿`,"Select %s":`鏿: %s`,Update:`æ´æ°`,"Vertical align":`åç´æ¹åã®é
ç½®`,Merge:`ã»ã«ã®çµå`,"Add column":`åã追å `,"Add row":`è¡ã追å `,Border:`å¢çç·`,"Embed code":`åãè¾¼ã¿ã³ã¼ã`,Delete:`åé¤`,Edit:`ç·¨é`,"Horizontal align":`æ°´å¹³æ¹åã®é
ç½®`,Filter:`Filter`,"Sort by changed":`Sort by changed`,"Sort by name":`Sort by name`,"Sort by size":`Sort by size`,"Add folder":`Add folder`,Split:`åå²`,"Split vertical":`ã»ã«ã®åå²ï¼åç´æ¹åï¼`,"Split horizontal":`ã»ã«ã®åå²ï¼æ°´å¹³æ¹åï¼`,"You can only edit your own images. Download this image on the host?":`You can only edit your own images. Download this image on the host?`,"The image has been successfully uploaded to the host!":`The image has been successfully uploaded to the host!`,palette:`ãã¬ãã`,pencil:`éç`,"There are no files":`There are no files`,Rename:`Rename`,"Enter new name":`Enter new name`,preview:`ãã¬ãã¥ã¼`,download:`ãã¦ã³ãã¼ã`,"Paste from clipboard":`è²¼ãä»ã`,"Your browser doesn't support direct access to the clipboard.":`ã使ãã®ãã©ã¦ã¶ã¯ã¯ãªãããã¼ãã使ç¨ã§ãã¾ãã`,"Copy selection":`ã³ãã¼`,copy:`copy`,"Border radius":`è§ã®ä¸¸ã¿`,"Show all":`å
¨ã¦è¡¨ç¤º`,Apply:`é©ç¨`,"Please fill out this field":`ã¾ã ãã®åé`,"Please enter a web address":`ãå
¥åãã¦ãã ããã¦ã§ãã¢ãã¬ã¹`,Default:`ããã©ã«ã`,Circle:`ç½ä¸¸`,Dot:`é»ä¸¸`,Quadrate:`åè§`,Find:`è¦`,"Find Previous":`æ¢å`,"Find Next":`ç±æ¥`,"Lower Alpha":`è±å°æå`,"Lower Greek":`ã®ãªã·ã£æå`,"Lower Roman":`ãã¼ãæ°åå°æå`,"Upper Alpha":`è±å¤§æå`,"Upper Roman":`ãã¼ãæ°å大æå`,"Insert className":`ã¯ã©ã¹åãæ¿å
¥`,"Press Alt for custom resizing":`ã«ã¹ã¿ã ãµã¤ãºå¤æ´ã®ããã®Altãã¼ãæ¼ãã¾ã`,"License: %s":`ã©ã¤ã»ã³ã¹: %s`},bF={},xF={"Type something":`무ìì´ë ì
ë ¥íì¸ì`,"About Jodit":`Joditì ëíì¬`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Jodit ì¬ì©ì ìë´ì`,"contains detailed help for using":`ìì¸í ëìë§ì´ ë¤ì´ìì´ì`,"For information about the license, please go to our website:":`ë¼ì´ì¼ì¤ì ê´í´ìë Jodit ì¹ ì¬ì´í¸ë¥¼ 방문í´ì£¼ì¸ìï¼`,"Buy full version":`í ë²ì 구ì
í기`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`© XDSoft.net - Chupurnov Valeriy. ìê² ì ìê¶ê³¼ 모ë ê¶ë¦¬ê° ììµëë¤.`,Anchor:`Anchor`,"Open in new tab":`ì íìì ì´ê¸°`,"Open in fullsize":`ì ì²´ í¬ê¸°ë¡ 보기`,"Clear Formatting":`ìì ì§ì°ê¸°`,"Fill color or set the text color":`ê¸ì¨ ìì`,Redo:`ì¬ì¤í`,Undo:`ì¤í ì·¨ì`,Bold:`êµµê²`,Italic:`기ì¸ì`,"Insert Unordered List":`ê¸ë¨¸ë¦¬ 목ë¡`,"Insert Ordered List":`ë²í¸ 목ë¡`,"Align Center":`ê°ì´ë° ì ë ¬`,"Align Justify":`ì쪽 ì ë ¬`,"Align Left":`ì¼ìª½ ì ë ¬`,"Align Right":`ì¤ë¥¸ìª½ ì ë ¬`,"Insert Horizontal Line":`ìí 구ë¶ì ë£ê¸°`,"Insert Image":`ì´ë¯¸ì§ ë£ê¸°`,"Insert file":`íì¼ ë£ê¸°`,"Insert youtube/vimeo video":`Youtube/Vimeo ëìì`,"Insert link":`ë§í¬ ë£ê¸°`,"Font size":`ê¸ê¼´ í¬ê¸°`,"Font family":`ê¸ê¼´`,"Insert format block":`ë¸ë¡ ìì ë£ê¸°`,Normal:`ì¼ë° í
ì¤í¸`,"Heading 1":`ì 목 1`,"Heading 2":`ì 목 2`,"Heading 3":`ì 목 3`,"Heading 4":`ì 목 4`,Quote:`ì¸ì©`,Code:`ì½ë`,Insert:`ë¶ì¬ ë£ê¸°`,"Insert table":`í
ì´ë¸`,"Decrease Indent":`ë¤ì¬ì°ê¸° ê°ì`,"Increase Indent":`ë¤ì¬ì°ê¸° ì¦ê°`,"Select Special Character":`í¹ì문ì ì í`,"Insert Special Character":`í¹ì문ì ì
ë ¥`,"Paint format":`íì¸í¸ íì`,"Change mode":`í¸ì§ëª¨ë ë³ê²½`,Margins:`ë§ì§`,top:`ì`,right:`ì¤ë¥¸ìª½`,bottom:`ìë`,left:`ì¼ìª½`,Styles:`ì¤íì¼`,Classes:`í´ëì¤`,Align:`ì ë ¬`,Right:`ì¤ë¥¸ìª½ì¼ë¡`,Center:`ê°ì´ë°ë¡`,Left:`ì¼ìª½ì¼ë¡`,"--Not Set--":`--ì
185§ì ì í¨--`,Src:`ê²½ë¡(src)`,Title:`ì 목`,Alternative:`ëì²´ í
ì¤í¸(alt)`,Link:`ë§í¬`,"Open link in new tab":`ì íìì ì´ê¸°`,file:`íì¼`,Advanced:`ê³ ê¸`,"Image properties":`ì´ë¯¸ì§ ìì±`,Cancel:`ì·¨ì`,Ok:`íì¸`,"Your code is similar to HTML. Keep as HTML?":`HTML ì½ëë¡ ê°ì§íì´ì. ì½ëì¸ì±ë¡ ë¶ì¬ë£ìê¹ì?`,"Paste as HTML":`HTMLë¡ ë¶ì¬ë£ê¸°`,Keep:`ì본 ì ì§`,Clean:`ì§ì°ê¸°`,"Insert as Text":`í
ì¤í¸ë¡ ë£ê¸°`,"Insert only Text":`í
ì¤í¸ë§ ë£ê¸°`,"Word Paste Detected":`Word ë¶ì¬ë£ê¸° ê°ì§`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Microsoft Word/Excel 문ìë¡ ê°ì§íì´ì. ììì ì ì§íì±ë¡ ë¶ì¬ë£ìê¹ì?`,"File Browser":`íì¼ íì기`,"Error on load list":`ëª©ë¡ ë¶ë¬ì¤ê¸° ìë¬`,"Error on load folders":`í´ë ë¶ë¬ì¤ê¸°`,"Are you sure?":`ì ë§ ì§íí ê¹ì?`,"Enter Directory name":`ëë í 리 ì´ë¦ ì
ë ¥`,"Create directory":`ëë í 리 ìì±`,"type name":`ì´ë¦ ì
ë ¥`,"type dir name":`ì´ë¦ ì
ë ¥`,"Drop image":`ì´ë¯¸ì§ ëëê·¸`,"Drop file":`íì¼ ëëê·¸`,"or click":`í¹ì í´ë¦`,"Alternative text":`ëì²´ í
ì¤í¸`,Browse:`íì`,Upload:`ì
ë¡ë`,Background:`ë°°ê²½`,Text:`í
ì¤í¸`,Top:`ì`,Middle:`ì¤ì`,Bottom:`ìë`,"Insert column before":`ì´ì ì´ì ì½ì
`,"Insert column after":`ë¤ì ì´ì ì½ì
`,"Insert row above":`ì íì ì½ì
`,"Insert row below":`ìë íì ì½ì
`,"Delete table":`í
ì´ë¸ ìì `,"Delete row":`í ìì `,"Delete column":`ì´ ìì `,"Empty cell":`ë¹ ì
`,source:`HTML ìì¤`,bold:`ë³¼ë`,italic:`ì´í¤ë¦`,brush:`ë¸ë¬ì`,link:`ë§í¬`,undo:`ì¤í ì·¨ì`,redo:`ì¬ì¤í`,table:`í
ì´ë¸`,image:`ì´ë¯¸ì§`,eraser:`ì§ì°ê°`,paragraph:`문ë¨`,fontsize:`ê¸ê¼´ í¬ê¸°`,video:`ë¹ëì¤`,font:`ê¸ê¼´`,about:`í¸ì§ê¸° ì ë³´`,print:`í린í¸`,underline:`ë°ì¤`,strikethrough:`ì·¨ìì `,indent:`ë¤ì¬ì°ê¸°`,outdent:`ë´ì´ì°ê¸°`,fullsize:`ì ì²´ íë©´`,shrink:`ì¼ë° íë©´`,hr:`구ë¶ì `,ul:`ê¸ë¨¸ë¦¬ 목ë¡`,ol:`ë²í¸ 목ë¡`,cut:`ìë¼ë´ê¸°`,selectall:`모ë ì í`,"Embed code":`Embed ì½ë`,"Open link":`ë§í¬ ì´ê¸°`,"Edit link":`ë§í¬ í¸ì§`,"No follow":`No follow`,Unlink:`ë§í¬ ì ê±°`,Eye:`ì¬ì´í¸ íì¸`,pencil:`ì°í`,Update:`ê°±ì `," URL":`URL`,Edit:`í¸ì§`,"Horizontal align":`ìí ì ë ¬`,Filter:`íí°`,"Sort by changed":`ë³ê²½ì¼ ì ë ¬`,"Sort by name":`ì´ë¦ ì ë ¬`,"Sort by size":`í¬ê¸° ì ë ¬`,"Add folder":`ì í´ë`,Reset:`ì´ê¸°í`,Save:`ì ì¥`,"Save as ...":`ìë¡ ì ì¥í기 ...`,Resize:`리ì¬ì´ì¦`,Crop:`í¬ë¡`,Width:`ê°ë¡ 길ì´`,Height:`ì¸ë¡ ëì´`,"Keep Aspect Ratio":`ë¹ì¨ ì ì§í기`,Yes:`ë¤`,No:`ìëì¤`,Remove:`ì ê±°`,Select:`ì í`,"Chars: %d":`문ìì: %d`,"Words: %d":`ë¨ì´ì: %d`,All:`모ë`,"Select all":`모ë ì í`,"Select %s":`ì í: %s`,"Vertical align":`ìì§ ì ë ¬`,Split:`ë¶í `,"Split vertical":`ì¸ë¡ ì
ë¶í `,"Split horizontal":`ê°ë¡ ì
ë¶í `,Merge:`ì
ë³í©`,"Add column":`ì´ ì¶ê°`,"Add row":`í ì¶ê°`,Delete:`ìì `,Border:`ì¸ê³½ì `,"License: %s":`ë¼ì´ì¼ì¤: %s`,"Strike through":`ì·¨ìì `,Underline:`ë°ì¤`,superscript:`ì첨ì`,subscript:`ìë첨ì`,"Cut selection":`ì í ìë¼ë´ê¸°`,Break:`구ë¶ì`,"Search for":`ê²ì`,"Replace with":`ëì²´í기`,Replace:`ëì²´`,Paste:`ë¶ì¬ë£ê¸°`,"Choose Content to Paste":`ë¶ì¬ë£ì ë´ì© ì í`,"You can only edit your own images. Download this image on the host?":`ì¸ë¶ ì´ë¯¸ì§ë í¸ì§í ì ìì´ì. ì¸ë¶ ì´ë¯¸ì§ë¥¼ ë¤ì´ë¡ë í ê¹ì?`,"The image has been successfully uploaded to the host!":`ì´ë¯¸ì§ë¥¼ 무ì¬í ì
ë¡ë íì´ì!`,palette:`íë í¸`,"There are no files":`íì¼ì´ ìì´ì`,Rename:`ì´ë¦ ë³ê²½`,"Enter new name":`ì ì´ë¦ ì
ë ¥`,preview:`미리보기`,download:`ë¤ì´ë¡ë`,"Paste from clipboard":`í´ë¦½ë³´ë ë¶ì¬ë£ê¸°`,"Your browser doesn't support direct access to the clipboard.":`ì¬ì©ì¤ì¸ ë¸ë¼ì°ì ê° í´ë¦½ë³´ë ì ê·¼ì ì§ìíì§ ììì.`,"Copy selection":`ì í ë³µì¬`,copy:`ë³µì¬`,"Border radius":`ë¥ê·¼ í
ë리`,"Show all":`모ë 보기`,Apply:`ì ì©`,"Please fill out this field":`ì´ í목ì ì
ë ¥í´ì£¼ì¸ì!`,"Please enter a web address":`ì¹ URLì ì
ë ¥í´ì£¼ì¸ì.`,Default:`기본`,Circle:`ì`,Dot:`ì `,Quadrate:`ì ì¬ê°í`,Find:`찾기`,"Find Previous":`ì´ì 찾기`,"Find Next":`ë¤ì 찾기`,"Insert className":`className ì
ë ¥`,"Press Alt for custom resizing":`ì¬ì©ì ì§ì í¬ê¸° ì¡°ì ì ë í ê³ ë ë르ììì¤`},SF={"Type something":`ÐиÑÑÑд үзÑÑÑÑй`,Advanced:`ÐÑвÑилÑÑÑ`,"About Jodit":`Jodit-Ñн ÑÐ°Ð»Ð°Ð°Ñ `,"Jodit Editor":`Jodit пÑогÑам`,"Jodit User's Guide":`Jodit гаÑÑн авлага`,"contains detailed help for using":`Ñ
ÑÑÑглÑÑний ÑÐ°Ð»Ð°Ð°Ñ Ð´ÑлгÑÑÑнгүй мÑдÑÑллийг агÑÑлна`,"For information about the license, please go to our website:":`ÐиÑензийн мÑдÑÑллийг манай вÑб Ñ
ÑÑдаÑÐ½Ð°Ð°Ñ Ð°Ð²Ð½Ð° ÑÑ:`,"Buy full version":`ÐÒ¯ÑÑн Ñ
ÑÐ²Ð¸Ð»Ð±Ð°Ñ Ñ
Ñдалдан аваÑ
`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`ÐоÑ
иогÑийн ÑÑÑ
Ñ
амгаалагдÑан © XDSoft.net - Chupurnov Valeriy. ÐÒ¯Ñ
ÑÑÑ
ийг ÑзÑмÑинÑ.`,Anchor:`Холбоо баÑиÑ
`,"Open in new tab":`Ð¨Ð¸Ð½Ñ ÑÐ°Ð±Ð°Ð°Ñ Ð½ÑÑÑ
`,"Open in fullsize":`ÐÒ¯ÑÑн дÑлгÑÑÑÑÑ Ð½ÑÑÑ
`,"Clear Formatting":`ФоÑмаÑÑг аÑилгаÑ
`,"Fill color or set the text color":`Ó¨Ð½Ð³Ó©Ó©Ñ Ð±ÑдаÑ
ÑÑвÑл ÑекÑÑийн өнгө ÑонгоÑ
`,Redo:`ÐаÑ
иÑ
`,Undo:`ÐÑÑааÑ
`,Bold:`Тод`,Italic:`ÐалÑÑ`,"Insert Unordered List":`ТÑмдÑÐ³Ñ Ð¶Ð°Ð³ÑÐ°Ð°Ð»Ñ Ð½ÑмÑÑ
`,"Insert Ordered List":`ÐÑгааÑÑ Ð¶Ð°Ð³ÑÐ°Ð°Ð»Ñ Ð½ÑмÑÑ
`,"Align Center":`Ðоллож байÑлÑÑлаÑ
`,"Align Justify":`ТÑгÑиÑгÑн байÑлÑÑлаÑ
`,"Align Left":`Ðүүнд байÑлÑÑлаÑ
`,"Align Right":`ÐаÑÑÑнд байÑлÑÑлаÑ
`,"Insert Horizontal Line":`Ð¥ÑвÑÑÑ Ð·ÑÑÐ°Ð°Ñ Ð½ÑмÑÑ
`,"Insert Image":`ÐÑÑаг нÑмÑÑ
`,"Insert file":`Файл нÑмÑÑ
`,"Insert youtube/vimeo video":`Youtube/Vimeo видео нÑмÑÑ
`,"Insert link":`Ð¥Ð¾Ð»Ð±Ð¾Ð¾Ñ Ð½ÑмÑÑ
`,"Font size":`ФонÑÑн Ñ
ÑмжÑÑ`,"Font family":`ФонÑÑн бүл`,"Insert format block":`Ðлок нÑмÑÑ
`,Normal:`Ð¥Ñвийн`,"Heading 1":`ÐаÑÑиг 1`,"Heading 2":`ÐаÑÑиг 2`,"Heading 3":`ÐаÑÑиг 3`,"Heading 4":`ÐаÑÑиг 4`,Quote:`ÐÑлÑл`,Code:`Ðод`,Insert:`ÐÑÑÑлаÑ
`,"Insert table":`Ð¥Ò¯ÑнÑÐ³Ñ Ð¾ÑÑÑлаÑ
`,"Decrease Indent":`ÐоголÑн зай Ñ
аÑаÑ
`,"Increase Indent":`ÐоголÑн зай нÑмÑÑ
`,"Select Special Character":`ТÑÑгай ÑÑмдÑÐ³Ñ ÑонгоÑ
`,"Insert Special Character":`ТÑÑгай ÑÑмдÑÐ³Ñ Ð½ÑмÑÑ
`,"Paint format":`ÐÑÑгийн ÑоÑмаÑ`,"Change mode":`ÐоÑим Ó©Ó©ÑÑлөÑ
`,Margins:`ЦааÑÐ½Ñ Ð·Ð°Ð¹`,top:`ÐÑÑÑÑÑÑ`,right:`ÐаÑÑÑнааÑ`,bottom:`ÐооÑооÑ`,left:`ÐүүнÑÑÑ`,Styles:`CSS ÑÑилÑ`,Classes:`CSS анги`,Align:`ÐайÑлÑÑлаÑ
`,Right:`ÐаÑÑÑн`,Center:`Төв`,Left:`Ðүүн`,"--Not Set--":`--ТодоÑÑ
ойгүй--`,Src:`ÐÑ
Ò¯Ò¯ÑвÑÑ`,Title:`ÐаÑÑиг`,Alternative:`ÐлÑеÑнаÑив ÑекÑÑ`,Link:`ХолбооÑ`,"Open link in new tab":`ХолбооÑÑг ÑÐ¸Ð½Ñ Ñ
авÑÑанд нÑÑÑ
`,Image:`ÐÑÑаг`,file:`Файл`,"Image properties":`ÐÑÑгийн үзүүлÑлÑ`,Cancel:`ЦÑÑлаÑ
`,Ok:`Ok`,"Your code is similar to HTML. Keep as HTML?":`Ð¢Ð°Ð½Ñ ÐºÐ¾Ð´ HTML кодÑой адил байна. HTML ÑоÑмаÑÐ°Ð°Ñ Ò¯ÑгÑлжлүүлÑÑ
Ò¯Ò¯?`,"Paste as HTML":`HTML Ð±Ð°Ð¹Ð´Ð»Ð°Ð°Ñ Ð±ÑÑлгаÑ
`,Keep:`ХадгалаÑ
`,Clean:`ЦÑвÑÑлÑÑ
`,"Insert as Text":`ТекÑÑ Ð±Ð°Ð¹Ð´Ð»Ð°Ð°Ñ Ð½ÑмÑÑ
`,"Word Paste Detected":`Word Ð±Ð°Ð¹Ð´Ð»Ð°Ð°Ñ Ð±ÑÑлгаÑан байна`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`ÐÑÑлгаÑан агÑÑлга Microsoft Word/Excel ÑоÑмаÑÑай байна. ÐÐ½Ñ ÑоÑмаÑÑг Ñ
ÑвÑÑÑ Ñ
адгалаÑ
ÑÑ ÑÑвÑл аÑилгаÑ
ÑÑ?`,"Insert only Text":`ÐөвÑ
өн ÑекÑÑ Ð¾ÑÑÑлаÑ
`,"File Browser":`ФайлÑн ÑонÑ
`,"Error on load list":`ÐагÑÐ°Ð°Ð»Ñ ÑаÑаÑ
үед алдаа гаÑлаа`,"Error on load folders":`ХавÑÐ°Ñ ÑаÑаÑ
үед алдаа гаÑлаа`,"Are you sure?":`ÐÑгÑлÑÑй байна ÑÑ?`,"Enter Directory name":`ХавÑÑÑн нÑÑ Ð¾ÑÑÑлаÑ
`,"Create directory":`ХавÑÐ°Ñ Ò¯Ò¯ÑгÑÑ
`,"type name":`ÐÑÑ Ð±Ð¸ÑиÑ
`,"type dir name":`ÐÑÑ Ð±Ð¸ÑиÑ
`,"Drop image":`ÐÑÑаг бÑÑлгаÑ
`,"Drop file":`Файл бÑÑлгаÑ
`,"or click":`ÑÑвÑл ÑовÑ`,"Alternative text":`ÐлÑеÑнаÑив ÑекÑÑ`,Browse:`ҮзÑÑ
`,Upload:`ÐайÑÑÑÑлаÑ
`,Backgroun
185d:`ÐÑÑн зÑÑаг`,Text:`ТекÑÑ`,Top:`ÐÑÑÑ`,Middle:`ÐÑнд`,Bottom:`ÐооÑ`,"Insert column before":`УÑд Ð½Ñ Ð±Ð°Ð³Ð°Ð½Ð° нÑмÑÑ
`,"Insert column after":`ÐÑд Ð½Ñ Ð±Ð°Ð³Ð°Ð½Ð° нÑмÑÑ
`,"Insert row above":`ÐÑÑÑ Ð½Ñ Ð¼Ó©Ñ Ð½ÑмÑÑ
`,"Insert row below":`ÐÐ¾Ð¾Ñ Ð½Ñ Ð¼Ó©Ñ Ð½ÑмÑÑ
`,"Delete table":`Ð¥Ò¯ÑнÑÐ³Ñ ÑÑÑгаÑ
`,"Delete row":`ÐÓ©Ñ ÑÑÑгаÑ
`,"Delete column":`Ðагана ÑÑÑгаÑ
`,"Empty cell":`Ðүд ÑÑвÑÑлÑÑ
`,Delete:`УÑÑгаÑ
`,"Strike through":`ÐÑÑÐ³Ò¯Ò¯Ñ Ð·ÑÑааÑ`,Underline:`ÐоогÑÑÑ Ð·ÑÑааÑ`,Break:`ÐÓ©Ñийг ÑаÑлаÑ
`,"Search for":`ХайÑ
`,"Replace with":`ҮүгÑÑÑ ÑолиÑ
`,Replace:`СолиÑ
`,Edit:`ÐаÑаÑ
`,"Vertical align":`ÐоÑоо ÑгнүүлÑÑ
`,"Horizontal align":`Ð¥ÑвÑÑÑ ÑгнүүлÑÑ
`,Filter:`ШүүÑ
`,"Sort by changed":`Сүүлд Ó©Ó©ÑÑлөгдÑÓ©Ð½Ó©Ó©Ñ Ð¶Ð°Ð³ÑааÑ
`,"Sort by name":`ÐÑÑÑÑÑ Ð¶Ð°Ð³ÑааÑ
`,"Sort by size":`Ð¥ÑмжÑÑгÑÑÑ Ð¶Ð°Ð³ÑааÑ
`,"Add folder":`ХавÑÐ°Ñ Ð½ÑмÑÑ
`,Split:`ÐадлаÑ
`,"Split vertical":`ÐÐ°Ð³Ð°Ð½Ð°Ð°Ñ Ð·Ð°Ð´Ð»Ð°Ñ
`,"Split horizontal":`ÐÓ©ÑÓ©Ó©Ñ Ð·Ð°Ð´Ð»Ð°Ñ
`,Merge:`ÐÑгÑгÑÑ
`,"Add column":`Ðагана нÑмÑÑ
`,"Add row":`ÐÓ©Ñ Ð½ÑмÑÑ
`,Border:`Ð¥Ò¯ÑÑÑ`,"Embed code":`Ðод оÑÑÑлаÑ
`,Update:`ШинÑÑлÑÑ
`,superscript:`ÐÑÑд индекÑ`,subscript:`Ðоод индекÑ`,"Cut selection":`СонголÑÑг ÑаÑлаÑ
`,Paste:`ÐÑÑлгаÑ
`,"Choose Content to Paste":`ÐÑÑлгаÑ
агÑÑлгаа Ñонгоно ÑÑ`,"Chars: %d":`ТÑмдÑгÑ: %d`,"Words: %d":`Үг: %d`,All:`Ðүгдийг`,"Select %s":`Сонго: %s`,"Select all":`Ðүгдийг Ñонго`,source:`ÐÑ
Ò¯Ò¯ÑвÑÑ`,bold:`Тод`,italic:`ÐалÑÑ`,brush:`ÐÑдаÑ
`,link:`ХолбооÑ`,undo:`ÐÑÑааÑ
`,redo:`ÐаÑ
иÑ
`,table:`Ð¥Ò¯ÑнÑгÑ`,image:`ÐÑÑаг`,eraser:`ÐаллÑÑÑ`,paragraph:`ÐаÑагÑаÑ`,fontsize:`ФонÑÑн Ñ
ÑмжÑÑ`,video:`Ðидео`,font:`ФонÑ`,about:`ТÑÑ
ай`,print:`Ð¥ÑвлÑÑ
`,underline:`ÐоогÑÑÑ Ð·ÑÑааÑ`,strikethrough:`ÐÑÑÐ³Ò¯Ò¯Ñ Ð·ÑÑааÑ`,indent:`Ðогол нÑмÑÑ
`,outdent:`Ðогол багаÑгаÑ
`,fullsize:`ÐÒ¯ÑÑн дÑлгÑÑ`,shrink:`ÐагаÑга`,hr:`ХаалÑ`,ul:`ТÑмдÑÐ³Ñ Ð¶Ð°Ð³ÑаалÑ`,ol:`ÐÑгааÑлаÑан жагÑаалÑ`,cut:`ТаÑлаÑ
`,selectall:`Ðүгдийг Ñонго`,"Open link":`Ð¥Ð¾Ð»Ð±Ð¾Ð¾Ñ Ð½ÑÑÑ
`,"Edit link":`Ð¥Ð¾Ð»Ð±Ð¾Ð¾Ñ Ð·Ð°ÑаÑ
`,"No follow":`Nofollow özelliÄi`,Unlink:`Ð¥Ð¾Ð»Ð±Ð¾Ð¾Ñ ÑалгаÑ
`,Eye:`Ðүд`,pencil:`ÐаÑаÑ
`," URL":`URL`,Reset:`ÐÑÑааÑ
`,Save:`ХадгалаÑ
`,"Save as ...":`Ó¨Ó©ÑÓ©Ó©Ñ Ñ
адгалаÑ
`,Resize:`Ð¥ÑмжÑÑг Ó©Ó©ÑÑил`,Crop:`ТайÑаÑ
`,Width:`Ó¨Ñгөн`,Height:`ӨндөÑ`,"Keep Aspect Ratio":`ХаÑÑÑааг Ñ
адгал`,Yes:`Тийм`,No:`Үгүй`,Remove:`ÐÑилга`,Select:`Сонго`,"You can only edit your own images. Download this image on the host?":`Та зөвÑ
өн Ó©Ó©Ñийн зÑÑгÑÑдаа ÑнзлаÑ
боломжÑой. ÐÐ½Ñ Ð·ÑÑгийг Ó©Ó©Ñ Ð»Ò¯Ò¯Ð³ÑÑ ÑаÑÐ¼Ð°Ð°Ñ Ð±Ð°Ð¹Ð½Ð° ÑÑ?`,"The image has been successfully uploaded to the host!":`ÐÑÑгийг Ñ
оÑÑ ÑÑÑ Ð°Ð¼Ð¶Ð¸Ð»ÑÑай Ñ
адгалÑан`,palette:`ÐалеÑ`,"There are no files":`Ðнд ÑÐ¼Ð°Ñ Ð½Ñг Ñайл алга`,Rename:`ШинÑÑÑ Ð½ÑÑлÑÑ
`,"Enter new name":`Ð¨Ð¸Ð½Ñ Ð½ÑÑ Ð¾ÑÑÑлна ÑÑ`,preview:`УÑÑдÑилан Ñ
аÑаÑ
`,download:`ТаÑаÑ
`,"Paste from clipboard":`СамбаÑÐ°Ð°Ñ Ñ
ÑÑлаÑ
`,"Your browser doesn't support direct access to the clipboard.":`ÐÐ½Ñ Ð²Ñб Ñ
Ó©ÑÑÓ©Ó©Ñ ÑамбаÑÑ Ñ
андаÑ
ÑÑÑ
алга.`,"Copy selection":`СонголÑÑг Ñ
ÑÑл`,copy:`Ð¥ÑÑлаÑ
`,"Border radius":`Ð¥Ò¯ÑÑÑний ÑадиÑÑ`,"Show all":`Ðүгдийг Ñ
аÑÑÑлаÑ
`,Apply:`Ð¥ÑÑÑгжүүл`,"Please fill out this field":`ÐÐ½Ñ ÑалбаÑÑг бөглөнө Ò¯Ò¯`,"Please enter a web address":`ÐÑб Ñ
аÑгаа оÑÑÑлна ÑÑ`,Default:`ҮндÑÑн`,Circle:`ÐÑгÑй`,Dot:`ЦÑг`,Quadrate:`ÐÓ©Ñвөлжин`,Find:`ХайÑ
`,"Find Previous":`ӨмнөÑ
ийг ол`,"Find Next":`ÐаÑаагийнÑ
ийг ол`,"Insert className":`Ðүлгийн нÑÑÑÑ Ð¾ÑÑÑлна ÑÑ`,"Press Alt for custom resizing":`Ð¥ÑмжÑÑÑийг ÑинÑÑÑ Ó©Ó©ÑÑлөÑ
ийн ÑÑлд Alt ÑовÑин дÑÑÑ Ð´Ð°Ñна ÑÑ`,"License: %s":`ÐиÑенз: %s`},CF={"Type something":`Begin met typen..`,Advanced:`Geavanceerd`,"About Jodit":`Over Jodit`,"Jodit Editor":`Jodit Editor`,"Free Non-commercial Version":`Gratis niet-commerciële versie`,"Jodit User's Guide":`Jodit gebruikershandleiding`,"contains detailed help for using":`bevat gedetailleerde informatie voor gebruik.`,"For information about the license, please go to our website:":`Voor informatie over de licentie, ga naar onze website:`,"Buy full version":`Volledige versie kopen`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Alle rechten voorbehouden.`,Anchor:`Anker`,"Open in new tab":`Open in nieuwe tab`,"Open in fullsize":`Editor in volledig scherm openen`,"Clear Formatting":`Opmaak verwijderen`,"Fill color or set the text color":`Vulkleur of tekstkleur aanpassen`,Redo:`Opnieuw`,Undo:`Ongedaan maken`,Bold:`Vet`,Italic:`Cursief`,"Insert Unordered List":`Geordende list invoegen`,"Insert Ordered List":`Ongeordende lijst invoegen`,"Align Center":`Centreren`,"Align Justify":`Uitlijnen op volledige breedte`,"Align Left":`Links uitlijnen`,"Align Right":`Rechts uitlijnen`,"Insert Horizontal Line":`Horizontale lijn invoegen`,"Insert Image":`Afbeelding invoegen`,"Insert file":`Bestand invoegen`,"Insert youtube/vimeo video":`Youtube/Vimeo video invoegen`,"Insert link":`Link toevoegen`,"Font size":`Tekstgrootte`,"Font family":`Lettertype`,"Insert format block":`Format blok invoegen`,Normal:`Normaal`,"Heading 1":`Koptekst 1`,"Heading 2":`Koptekst 2`,"Heading 3":`Koptekst 3`,"Heading 4":`Koptekst 4`,Quote:`Citaat`,Code:`Code`,Insert:`Invoegen`,"Insert table":`Tabel invoegen`,"Decrease Indent":`Inspringing verkleinen`,"Increase Indent":`Inspringing vergroten`,"Select Special Character":`Symbool selecteren`,"Insert Special Character":`Symbool invoegen`,"Paint format":`Opmaak kopieren`,"Change mode":`Modus veranderen`,Margins:`Marges`,top:`Boven`,right:`Rechts`,bottom:`Onder`,left:`Links`,Styles:`CSS styles`,Classes:`CSS classes`,Align:`Uitlijning`,Right:`Rechts`,Center:`Gecentreerd`,Left:`Links`,"--Not Set--":`--Leeg--`,Src:`Src`,Title:`Titel`,Alternative:`Alternatieve tekst`,Link:`Link`,"Open link in new tab":`Link in nieuwe tab openen`,Image:`Afbeelding`,file:`Bestand`,"Image properties":`Afbeeldingseigenschappen`,Cancel:`Annuleren`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Deze code lijkt op HTML. Als HTML behouden?`,"Paste as HTML":`Invoegen als HTML`,Keep:`Origineel behouden`,Clean:`Opschonen`,"Insert as Text":`Als tekst invoegen`,"Word Paste Detected":`Word-tekst gedetecteerd`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`De geplakte tekst is afkomstig van een Microsoft Word/Excel document. Wil je de opmaak behouden of opschonen?`,"Insert only Text":`Als onopgemaakte tekst invoegen`,"File Browser":`Bestandsbrowser`,"Error on load list":`Fout bij het laden van de lijst`,"Error on load folders":`Fout bij het laden van de mappenlijst`,"Are you sure?":`Weet je het zeker?`,"Enter Directory name":`Geef de map een naam`,"Create directory":`Map aanmaken`,"type name":`Type naam`,"type dir name":`Type naam`,"Drop image":`Sleep hier een afbeelding naartoe`,"Drop file":`Sleep hier een bestand naartoe`,"or click":`of klik`,"Alternative text":`Alternatieve tekst`,Browse:`Bladeren`,Upload:`Uploaden`,Backgroun
185d:`Achtergrond`,Text:`Tekst`,Top:`Boven`,Middle:`Midden`,Bottom:`Onder`,"Insert column before":`Kolom invoegen (voor)`,"Insert column after":`Kolom invoegen (na)`,"Insert row above":`Rij invoegen (boven)`,"Insert row below":`Rij invoegen (onder)`,"Delete table":`Tabel verwijderen`,"Delete row":`Rij verwijderen`,"Delete column":`Kolom verwijderen`,"Empty cell":`Cel leegmaken`,Delete:`Verwijderen`,"Strike through":`Doorstrepen`,Underline:`Onderstrepen`,Break:`Enter`,"Search for":`Zoek naar`,"Replace with":`Vervangen door`,Replace:`Vervangen`,Edit:`Bewerken`,"Vertical align":`Verticaal uitlijnen`,"Horizontal align":`Horizontaal uitlijnen`,Filter:`Filteren`,"Sort by changed":`Sorteren op wijzigingsdatum`,"Sort by name":`Sorteren op naam`,"Sort by size":`Sorteren op grootte`,"Add folder":`Map toevoegen`,Split:`Splitsen`,"Split vertical":`Verticaal splitsen`,"Split horizontal":`Horizontaal splitsen`,Merge:`Samenvoegen`,"Add column":`Kolom toevoegen`,"Add row":`Rij toevoegen`,Border:`Rand`,"Embed code":`Embed code`,Update:`Updaten`,superscript:`Superscript`,subscript:`Subscript`,"Cut selection":`Selectie knippen`,Paste:`Plakken`,"Choose Content to Paste":`Kies content om te plakken`,"Chars: %d":`Tekens: %d`,"Words: %d":`Woorden: %d`,All:`Alles`,"Select %s":`Selecteer: %s`,"Select all":`Selecteer alles`,source:`Broncode`,bold:`vet`,italic:`cursief`,brush:`kwast`,link:`link`,undo:`ongedaan maken`,redo:`opnieuw`,table:`tabel`,image:`afbeelding`,eraser:`gum`,paragraph:`paragraaf`,fontsize:`lettergrootte`,video:`video`,font:`lettertype`,about:`over`,print:`afdrukken`,underline:`onderstreept`,strikethrough:`doorgestreept`,indent:`inspringen`,outdent:`minder inspringen`,fullsize:`volledige grootte`,shrink:`kleiner maken`,hr:`horizontale lijn`,ul:`lijst`,ol:`genummerde lijst`,cut:`knip`,selectall:`alles selecteren`,"Open link":`Link openen`,"Edit link":`Link aanpassen`,"No follow":`Niet volgen`,Unlink:`link verwijderen`,Eye:`Recensie`,pencil:`Om te bewerken`," URL":` URL`,Reset:`Herstellen`,Save:`Opslaan`,"Save as ...":`Opslaan als ...`,Resize:`Grootte aanpassen`,Crop:`Bijknippen`,Width:`Breedte`,Height:`Hoogte`,"Keep Aspect Ratio":`Verhouding behouden`,Yes:`Ja`,No:`Nee`,Remove:`Verwijderen`,Select:`Selecteren`,"You can only edit your own images. Download this image on the host?":`Je kunt alleen je eigen afbeeldingen aanpassen. Deze afbeelding downloaden?`,"The image has been successfully uploaded to the host!":`De afbeelding is succesvol geüploadet!`,palette:`Palette`,"There are no files":`Er zijn geen bestanden in deze map.`,Rename:`Hernoemen`,"Enter new name":`Voer een nieuwe naam in`,preview:`Voorvertoning`,download:`Download`,"Paste from clipboard":`Plakken van klembord`,"Your browser doesn't support direct access to the clipboard.":`Uw browser ondersteunt geen directe toegang tot het klembord.`,"Copy selection":`Selectie kopiëren`,copy:`kopiëren`,"Border radius":`Border radius`,"Show all":`Toon alle`,Apply:`Toepassen`,"Please fill out this field":`Vul dit veld in`,"Please enter a web address":`Voer een webadres in`,Default:`Standaard`,Circle:`Cirkel`,Dot:`Punt`,Quadrate:`Kwadraat`,Find:`Zoeken`,"Find Previous":`Vorige Zoeken`,"Find Next":`Volgende Zoeken`,"Insert className":`Voeg de klassenaam in`,"Press Alt for custom resizing":`Druk op Alt voor aangepaste grootte`,"License: %s":`Licentie: %s`},wF={"Type something":`Skriv noe`,"About Jodit":`Om Jodit`,"Jodit Editor":`Jodit-redigerer`,"Jodit User's Guide":`Jodit brukerveiledning`,"contains detailed help for using":`Inneholder detaljert hjelp for bruk`,"For information about the license, please go to our website:":`For informasjon om lisensen, besøk vÃ¥r nettside:`,"Buy full version":`Kjøp fullversjon`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Opphavsrett © XDSoft.net - Chupurnov Valeriy. Alle rettigheter forbeholdt.`,Anchor:`Anker`,"Open in new tab":`Ã
pne i ny fane`,"Open in fullsize":`Ã
pne i fullskjerm`,"Clear Formatting":`Fjern formatering`,"Fill color or set the text color":`Endre bakgrunns- eller tekstfarge`,Redo:`Gjør om`,Undo:`Angre`,Bold:`Fet`,Italic:`Kursiv`,"Insert Unordered List":`Sett inn punktliste`,"Insert Ordered List":`Sett inn nummerert liste`,"Align Center":`Midtstill`,"Align Justify":`Juster`,"Align Left":`Venstrejuster`,"Align Right":`Høyrejuster`,"Insert Horizontal Line":`Sett inn horisontal linje`,"Insert Image":`Sett inn bilde`,"Insert file":`Sett inn fil`,"Insert youtube/vimeo video":`Sett inn YouTube/Vimeo-vi
185deo`,"Insert link":`Sett inn lenke`,"Font size":`Skriftstørrelse`,"Font family":`Skriftfamilie`,"Insert format block":`Sett inn formateringsblokk`,Normal:`Normal`,"Heading 1":`Overskrift 1`,"Heading 2":`Overskrift 2`,"Heading 3":`Overskrift 3`,"Heading 4":`Overskrift 4`,Quote:`Sitat`,Code:`Kode`,Insert:`Sett inn`,"Insert table":`Sett inn tabell`,"Decrease Indent":`Reduser innrykk`,"Increase Indent":`Ãk innrykk`,"Select Special Character":`Velg spesialtegn`,"Insert Special Character":`Sett inn spesialtegn`,"Paint format":`Kopier format`,"Change mode":`Bytt modus (WYSIWYG/HTML)`,Margins:`Marger`,top:`topp`,right:`høyre`,bottom:`bunn`,left:`venstre`,Styles:`Stiler`,Classes:`Klasser`,Align:`Justering`,Right:`Høyre`,Center:`Senter`,Left:`Venstre`,"--Not Set--":`--Ikke satt--`,Src:`Kilde`,Title:`Tittel`,Alternative:`Alternativ`,Filter:`Filter`,Link:`Lenke`,"Open link in new tab":`Ã
pne lenke i ny fane`,Image:`Bilde`,file:`fil`,Advanced:`Avansert`,"Image properties":`Bildeegenskaper`,Cancel:`Avbryt`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Koden din ligner HTML. Beholde som HTML?`,"Paste as HTML":`Lim inn som HTML`,Keep:`Behold`,Clean:`Rens`,"Insert as Text":`Lim inn som tekst`,"Word Paste Detected":`Word-innliming oppdaget`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Innholdet du limer inn kommer fra et Microsoft Word/Excel-dokument. Vil du beholde formatet eller rense det?`,"Insert only Text":`Lim inn kun tekst`,"File Browser":`Filutforsker`,"Error on load list":`Feil ved lasting av liste`,"Error on load folders":`Feil ved lasting av mapper`,"Are you sure?":`Er du sikker?`,"Enter Directory name":`Skriv inn mappenavn`,"Create directory":`Opprett mappe`,"type name":`skriv navn`,"type dir name":`skriv navn`,"Drop image":`Slipp bilde`,"Drop file":`Slipp fil`,"or click":`eller klikk`,"Alternative text":`Alternativ tekst`,Browse:`Bla gjennom`,Upload:`Last opp`,Background:`Bakgrunn`,Border:`Kantlinje`,Text:`Tekst`,Top:`Topp`,Middle:`Midt`,Bottom:`Bunn`,"Insert column before":`Sett inn kolonne før`,"Insert column after":`Sett inn kolonne etter`,"Insert row above":`Sett inn rad over`,"Insert row below":`Sett inn rad under`,"Delete table":`Slett tabell`,"Delete row":`Slett rad`,"Delete column":`Slett kolonne`,"Empty cell":`Tøm celle`,"Chars: %d":`Tegn: %d`,"Words: %d":`Ord: %d`,Split:`Del`,"Split vertical":`Del vertikalt`,"Split horizontal":`Del horisontalt`,"Strike through":`Gjennomstreking`,Underline:`Understreking`,superscript:`hevet skrift`,subscript:`senket skrift`,"Cut selection":`Klipp ut markering`,"Select all":`Velg alt`,Break:`Pause`,"Search for":`Søk etter`,"Replace with":`Erstatt med`,Replace:`Erstatt`,Paste:`Lim inn`,"Choose Content to Paste":`Velg innhold Ã¥ lime inn`,source:`kilde`,bold:`fet`,italic:`kursiv`,brush:`pensel`,link:`lenke`,undo:`angre`,redo:`gjør om`,table:`tabell`,image:`bilde`,eraser:`viskelær`,paragraph:`avsnitt`,fontsize:`skriftstørrelse`,video:`video`,font:`skrift`,about:`om redigeringsverktøyet`,print:`skriv ut`,underline:`understreking`,strikethrough:`gjennomstreking`,indent:`innrykk`,outdent:`reduser innrykk`,fullsize:`full størrelse`,shrink:`krympe`,hr:`linje`,ul:`punktliste`,ol:`nummerert liste`,cut:`klipp ut`,selectall:`velg alt`,"Open link":`Ã
pne lenke`,"Edit link":`Rediger lenke`,"N
185o follow":`Ingen oppfølging`,Unlink:`Fjern lenke`,Eye:`ForhÃ¥ndsvisning`,pencil:`Rediger`," URL":`URL`,Reset:`Tilbakestill`,Save:`Lagre`,"Save as ...":`Lagre som ...`,Resize:`Endre størrelse`,Crop:`Beskjær`,Width:`Bredde`,Height:`Høyde`,"Keep Aspect Ratio":`Behold proporsjoner`,Yes:`Ja`,No:`Nei`,Remove:`Fjern`,Select:`Velg`,"Select %s":`Velg: %s`,Update:`Oppdater`,"Vertical align":`Vertikal justering`,Merge:`SlÃ¥ sammen`,"Add column":`Legg til kolonne`,"Add row":`Legg til rad`,Delete:`Slett`,"Horizontal align":`Horisontal justering`,"Sort by changed":`Sorter etter endring`,"Sort by name":`Sorter etter navn`,"Sort by size":`Sorter etter størrelse`,"Add folder":`Legg til mappe`,palette:`Palett`,preview:`ForhÃ¥ndsvisning`,"Line height":`Linjehøyde`,"Insert className":`Sett inn klassenavn`,apply:`Bruk`,edit:`Rediger`,"Show all":`Vis alle`,sound:`Lyd`,"Interim Results":`Foreløpige resultater`,default:`Standard`,circle:`Sirkel`,dot:`Punkt`,square:`Firkant`,"Press Alt for custom resizing":`Trykk pÃ¥ Alt for Ã¥ endre størrelse`,"Copy selection":`Kopier utvalg`,"Paste from clipboard":`Lim inn fra utklippstavlen`,Find:`Finne`,"Embed code":`Bygge inn kode`,Edit:`Rediger`,All:`Velg alle`,"License: %s":`Lisens: %s`,"You can only edit your own images. Download this image on the host?":`Du kan bare redigere dine egne bilder. Last ned dette bildet pÃ¥ verten?`,"The image has been successfully uploaded to the host!":`Bildet har blitt lastet opp til verten!`,"There are no files":`Det er ingen filer i denne katalogen`,Rename:`Gi nytt navn`,"Enter new name":`Skriv inn nytt navn`,download:`Last ned`,"Your browser doesn't support direct access to the clipboard.":`Nettleseren din støtter ikke direkte tilgang til utklippstavlen.`,copy:`kopi`,"Border radius":`Grenseradius`,Apply:`Bruk`,"Please fill out this field":`Vennligst fyll ut dette feltet`,"Please enter a web address":`Vennligst skriv inn en webadresse`,Default:`Standard`,Circle:`Sirkel`,Dot:`Prikk`,Quadrate:`Firkant`,"Find Previous":`Finn forrige`,"Find Next":`Finn neste`},TF={"Type something":`Napisz coÅ`,Advanced:`Zaawansowane`,"About Jodit":`O Jodit`,"Jodit Editor":`Edytor Jodit`,"Jodit User's Guide":`Instrukcja Jodit`,"contains detailed help for using":`zawiera szczegóÅowe informacje dotyczÄ
ce użytkowania.`,"For information about the license, please go to our website:":`Odwiedź naszÄ
stronÄ, aby uzyskaÄ wiÄcej informacji na temat licencji:`,"Buy full version":`Zakup peÅnej wersji`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Wszystkie prawa zastrzeżone.`,Anchor:`Kotwica`,"Open in new tab":`Otwórz w nowej zakÅadce`,"Open in fullsize":`Otwórz edytor w peÅnym rozmiarze`,"Clear Formatting":`WyczyÅÄ formatowanie`,"Fill color or set the text color":`Kolor wypeÅnienia lub ustaw kolor tekstu`,Redo:`Ponów`,Undo:`Cofnij`,Bold:`Pogrubienie`,Italic:`Kursywa`,"Insert Unordered List":`Wstaw listÄ wypunktowanÄ
`,"Insert Ordered List":`Wstaw listÄ numerycznÄ
`,"Align Center":`WyÅrodkuj`,"Align Justify":`Wyjustuj`,"Align Left":`Wyrównaj do lewej`,"Align Right":`Wyrównaj do prawej`,"Insert Horizontal Line":`Wstaw liniÄ poziomÄ
`,"Insert Image":`Wstaw grafikÄ`,"Insert file":`Wstaw plik`,"Insert youtube/vimeo video":`Wstaw film Youtube/vimeo`,"Insert link":`Wstaw link`,"Font size":`Rozmiar tekstu`,"Font family":`Krój czcionki`,"Insert format block":`Wstaw formatowanie`,Normal:`Normalne`,"Heading 1":`NagÅówek 1`,"Heading 2":`NagÅówek 2`,"Heading 3":`NagÅówek 3`,"Heading 4":`NagÅówek 4`,Quote:`Cytat`,Code:`Kod`,Insert:`Wstaw`,"Insert table":`Wstaw tabelÄ`,"Decrease Indent":`Zmniejsz wciÄcie`,"Increase Indent":`ZwiÄksz wciÄcie`,"Select Special Character":`Wybierz znak specjalny`,"Insert Special Character":`Wstaw znak specjalny`,"Paint format":`Malarz formatów`,"Change mode":`ZmieÅ tryb`,Margins:`Marginesy`,top:`Górny`,right:`Prawy`,bottom:`Dolny`,left:`Levy`,Styles:`Style CSS`,Classes:`Klasy CSS`,Align:`Wyrównanie`,Right:`Prawa`,Center:`Årodek`,Left:`Lewa`,"--Not Set--":`brak`,Src:`ŹródÅo`,Title:`TytuÅ`,Alternative:`Tekst alternatywny`,Link:`Link`,"Open link in new tab":`Otwórz w nowej zakÅadce`,Image:`Grafika`,file:`Plik`,"Image properties":`WÅaÅciwoÅci grafiki`,Cancel:`Anuluj`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Twój kod wyglÄ
da jak HTML. ZachowaÄ HTML?`,"Paste as HTML":`WkleiÄ jako HTML?`,Keep:`Oryginalny tekst`,Clean:`WyczyÅÄ`,"Insert as Text":`Wstaw jako tekst`,"Word Paste Detected":`Wykryto tekst w formacie Word`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Wklejany tekst pochodzi z dokumentu Microsoft Word/Excel. Chcesz zachowaÄ ten format czy wyczyÅciÄ go? `,"Insert only Text":`Wstaw tylko treÅÄ`,"File Browser":`PrzeglÄ
darka plików`,"Error on load list":`BÅÄ
d Åadowania listy plików`,"Error on load folders":`BÅÄ
d Åadowania folderów`,"Are you sure?":`Czy jesteÅ pewien?`,"Enter Directory name":`Wprowadź nazwÄ folderu`,"Create directory":`Utwórz folder`,"type name":`wprowadź nazwÄ`,"type dir name":`wprowadź nazwÄ`,"Drop image":`UpuÅÄ plik graficzny`,"Drop file":`UpuÅÄ plik`,"or click":`lub kliknij tu`,"Alternative text":`Tekst alternatywny`,Browse:`PrzeglÄ
daj`,Upload:`Wczytaj`,Backgroun
185d:`TÅo`,Text:`TreÅÄ`,Top:`Góra`,Middle:`Årodek`,Bottom:`DóÅ`,"Insert column before":`Wstaw kolumnÄ przed`,"Insert column after":`Wstaw kolumnÄ po`,"Insert row above":`Wstaw wiersz przed`,"Insert row below":`Wstaw wiersz po`,"Delete table":`UsuÅ tabelÄ`,"Delete row":`UsuÅ wiersz`,"Delete column":`UsuÅ kolumnÄ`,"Empty cell":`WyczyÅÄ komórkÄ`,Delete:`UsuÅ`,"Strike through":`PrzekreÅlenie`,Underline:`PodkreÅlenie`,Break:`Przerwa`,"Search for":`Szukaj`,"Replace with":`ZamieÅ na`,Replace:`WymieniÄ`,Edit:`Edytuj`,"Vertical align":`Wyrównywanie w pionie`,"Horizontal align":`Wyrównywanie w poziomie`,Filter:`Filtruj`,"Sort by changed":`Sortuj wg zmiany`,"Sort by name":`Sortuj wg nazwy`,"Sort by size":`Sortuj wg rozmiaru`,"Add folder":`Dodaj folder`,"Split vertical":`Podziel w pionie`,"Split horizontal":`Podziel w poziomie`,Split:`Podziel`,Merge:`Scal`,"Add column":`Dodaj kolumnÄ`,"Add row":`Dodaj wiersz`,Border:`Obramowanie`,"Embed code":`Wstaw kod`,Update:`Aktualizuj`,superscript:`indeks górny`,subscript:`index dolny`,"Cut selection":`Wytnij zaznaczenie`,Paste:`Wklej`,"Choose Content to Paste":`Wybierz zawartoÅÄ do wklejenia`,"Chars: %d":`Znaki: %d`,"Words: %d":`SÅowa: %d`,All:`Wszystko`,"Select %s":`Wybierz: %s`,"Select all":`Wybierz wszystko`,source:`HTML`,bold:`pogrubienie`,italic:`kursywa`,brush:`pÄdzel`,link:`link`,undo:`cofnij`,redo:`ponów`,table:`tabela`,image:`grafika`,eraser:`wyczyÅÄ`,paragraph:`akapit`,fontsize:`rozmiar czcionki`,video:`wideo`,font:`czcionka`,about:`O programie`,print:`drukuj`,underline:`podkreÅlenie`,strikethrough:`przekreÅlenie`,indent:`wciÄcie`,outdent:`wyciÄcie`,fullsize:`peÅen rozmiar`,shrink:`przytnij`,hr:`linia pozioma`,ul:`lista`,ol:`lista numerowana`,cut:`wytnij`,selectall:`zaznacz wszystko`,"Open link":`otwórz link`,"Edit link":`edytuj link`,"No follow":`Atrybut no-follow`,Unlink:`UsuÅ link`,Eye:`szukaj`,pencil:`edytuj`," URL":`URL`,Reset:`wyczyÅÄ`,Save:`zapisz`,"Save as ...":`zapisz jako`,Resize:`ZmieÅ rozmiar`,Crop:`Przytnij`,Width:`SzerokoÅÄ`,Height:`WysokoÅÄ`,"Keep Aspect Ratio":`Zachowaj proporcje`,Yes:`Tak`,No:`Nie`,Remove:`UsuÅ`,Select:`Wybierz`,"You can only edit your own images. Download this image on the host?":`Możesz edytowaÄ tylko swoje grafiki. Czy chcesz pobraÄ tÄ
grafikÄ?`,"The image has been successfully uploaded to the host!":`Grafika zostaÅa pomyÅlnienie dodana na serwer`,palette:`Paleta`,"There are no files":`Brak plików.`,Rename:`zmieÅ nazwÄ`,"Enter new name":`Wprowadź nowÄ
nazwÄ`,preview:`podglÄ
d`,download:`pobierz`,"Paste from clipboard":`Wklej ze schowka`,"Your browser doesn't support direct access to the clipboard.":`Twoja przeglÄ
darka nie obsÅuguje schowka`,"Copy selection":`Kopiuj zaznaczenie`,copy:`kopiuj`,"Border radius":`ZaokrÄ
glenie krawÄdzi`,"Show all":`Pokaż wszystkie`,Apply:`Zastosuj`,"Please fill out this field":`ProszÄ wypeÅniÄ to pole`,"Please enter a web address":`ProszÄ, wpisz adres sieci web`,Default:`DomyÅlnie`,Circle:`KoÅo`,Dot:`Punkt`,Quadrate:`Kwadrat`,Find:`ZnaleźÄ`,"Find Previous":`ZnaleÅºÄ Poprzednie`,"Find Next":`Znajdź Dalej`,"Insert className":`Wstaw nazwÄ zajÄÄ`,"Press Alt for custom resizing":`NaciÅnij Alt, aby zmieniÄ rozmiar`,"License: %s":`Licencja: %s`},EF={"Type something":`Escreva algo...`,Advanced:`Avançado`,"About Jodit":`Sobre o Jodit`,"Jodit Editor":`Editor Jodit`,"Jodit User's Guide":`Guia de usuário Jodit`,"contains detailed help for using":`contém ajuda detalhada para o uso.`,"For information about the license, please go to our website:":`Para informação sobre a licença, por favor visite nosso site:`,"Buy full version":`Compre a versão completa`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. Todos os direitos reservados.`,Anchor:`Link`,"Open in new tab":`Abrir em nova aba`,"Open in fullsize":`Abrir editor em tela cheia`,"Clear Formatting":`Limpar formatação`,"Fill color or set the text color":`Cor de preenchimento ou cor do texto`,Redo:`Refazer`,Undo:`Desfazer`,Bold:`Negrito`,Italic:`Itálico`,"Insert Unordered List":`Inserir lista não ordenada`,"Insert Ordered List":`Inserir lista ordenada`,"Align Center":`Centralizar`,"Align Justify":`Justificar`,"Align Left":`Alinhar à Esquerda`,"Align Right":`Alinhar à Direita`,"Insert Horizontal Line":`Inserir linha horizontal`,"Insert Image":`Inserir imagem`,"Insert file":`Inserir arquivo`,"Insert youtube/vimeo video":`Inserir vÃdeo do Youtube/vimeo`,"Insert link":`Inserir link`,"Font size":`Tamanho da letra`,"Font family":`Fonte`,"Insert format block":`Inserir bloco`,Normal:`Normal`,"Heading 1":`Cabeçalho 1`,"Heading 2":`Cabeçalho 2`,"Heading 3":`Cabeçalho 3`,"Heading 4":`Cabeçalho 4`,Quote:`Citação`,Code:`Código`,Insert:`Inserir`,"Insert table":`Inserir tabela`,"Decrease Indent":`Diminuir recuo`,"Increase Indent":`Aumentar recuo`,"Select Special Character":`Selecionar caractere especial`,"Insert Special Character":`Inserir caractere especial`,"Paint format":`Copiar formato`,"Change mode":`Mudar modo`,Margins:`Margens`,top:`cima`,right:`direta`,bottom:`baixo`,left:`esquerda`,Styles:`Estilos CSS`,Classes:`Classes CSS`,Align:`Alinhamento`,Right:`Direita`,Center:`Centro`,Left:`Esquerda`,"--Not Set--":`--Não Estabelecido--`,Src:`Fonte`,Title:`TÃtulo`,Alternative:`Texto Alternativo`,Link:`Link`,"Open link in new tab":`Abrir link em nova aba`,Image:`Imagem`,file:`Arquivo`,"Image properties":`Propriedades da imagem`,Cancel:`Cancelar`,Ok:`Ok`,"Your code is similar to HTML. Keep as HTML?":`Seu código é similar ao HTML. Manter como HTML?`,"Paste as HTML":`Colar como HTML?`,Keep:`Manter`,Clean:`Limpar`,"Insert as Text":`Inserir como Texto`,"Word Paste Detected":`Colado do Word Detectado`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`O conteúdo colado veio de um documento Microsoft Word/Excel. Você deseja manter o formato ou limpa-lo?`,"Insert only Text":`Inserir somente o Texto`,"File Browser":`Procurar arquivo`,"Error on load list":`Erro ao carregar a lista`,"
185Error on load folders":`Erro ao carregar as pastas`,"Are you sure?":`Você tem certeza?`,"Enter Directory name":`Escreva o nome da pasta`,"Create directory":`Criar pasta`,"type name":`Escreva seu nome`,"type dir name":`Escreva seu nome`,"Drop image":`Soltar imagem`,"Drop file":`Soltar arquivo`,"or click":`ou clique`,"Alternative text":`Texto alternativo`,Browse:`Explorar`,Upload:`Upload`,Background:`Fundo`,Text:`Texto`,Top:`Cima`,Middle:`Meio`,Bottom:`Baixo`,"Insert column before":`Inserir coluna antes`,"Insert column after":`Inserir coluna depois`,"Insert row above":`Inserir linha acima`,"Insert row below":`Inserir linha abaixo`,"Delete table":`Excluir tabela`,"Delete row":`Excluir linha`,"Delete column":`Excluir coluna`,"Empty cell":`Limpar célula`,Delete:`Excluir`,"Strike through":`Tachado`,Underline:`Sublinhar`,Break:`Pausa`,"Search for":`Procurar por`,"Replace with":`Substituir com`,Replace:`Substituir`,Edit:`Editar`,"Vertical align":`Alinhamento vertical`,"Horizontal align":`Alinhamento horizontal`,Filter:`filtrar`,"Sort by changed":`Ordenar por modificação`,"Sort by name":`Ordenar por nome`,"Sort by size":`Ordenar por tamanho`,"Add folder":`Adicionar pasta`,Split:`Dividir`,"Split vertical":`Dividir vertical`,"Split horizontal":`Dividir horizontal`,Merge:`Mesclar`,"Add column":`Adicionar coluna`,"Add row":`Adicionar linha`,Border:`Borda`,"Embed code":`Incluir código`,Update:`Atualizar`,superscript:`sobrescrito`,subscript:`subscrito`,"Cut selection":`Cortar seleção`,Paste:`Colar`,"Choose Content to Paste":`Escolher conteúdo para colar`,"Chars: %d":`Caracteres: %d`,"Words: %d":`Palavras: %d`,All:`Tudo`,"Select %s":`Selecionar: %s`,"Select all":`Selecionar tudo`,source:`HTML`,bold:`negrito`,italic:`itálico`,brush:`pincel`,link:`link`,undo:`desfazer`,redo:`refazer`,table:`tabela`,image:`imagem`,eraser:`apagar`,paragraph:`parágrafo`,fontsize:`tamanho da letra`,video:`vÃdeo`,font:`fonte`,about:`Sobre de`,print:`Imprimir`,underline:`sublinhar`,strikethrough:`tachado`,indent:`recuar`,outdent:`diminuir recuo`,fullsize:`Tamanho completo`,shrink:`diminuir`,hr:`linha horizontal`,ul:`lista não ordenada`,ol:`lista ordenada`,cut:`Cortar`,selectall:`Selecionar tudo`,"Open link":`Abrir link`,"Edit link":`Editar link`,"No follow":`Não siga`,Unlink:`Remover link`,Eye:`Visualizar`,pencil:`Editar`," URL":`URL`,Reset:`Resetar`,Save:`Salvar`,"Save as ...":`Salvar como...`,Resize:`Redimensionar`,Crop:`Recortar`,Width:`Largura`,He
185ight:`Altura`,"Keep Aspect Ratio":`Manter a proporção`,Yes:`Sim`,No:`Não`,Remove:`Remover`,Select:`Selecionar`,"You can only edit your own images. Download this image on the host?":`Você só pode editar suas próprias imagens. Baixar essa imagem pro servidor?`,"The image has been successfully uploaded to the host!":`A imagem foi enviada com sucesso para o servidor!`,palette:`Palette`,"There are no files":`Não há arquivos nesse diretório.`,Rename:`Húngara`,"Enter new name":`Digite um novo nome`,preview:`preview`,download:`Baixar`,"Paste from clipboard":`Colar da área de transferência`,"Your browser doesn't support direct access to the clipboard.":`O seu navegador não oferece suporte a acesso direto para a área de transferência.`,"Copy selection":`Selecção de cópia`,copy:`cópia`,"Border radius":`Border radius`,"Show all":`Mostrar todos os`,Apply:`Aplicar`,"Please fill out this field":`Por favor, preencha este campo`,"Please enter a web address":`Por favor introduza um endereço web`,Default:`Padrão`,Circle:`CÃrculo`,Dot:`Ponto`,Quadrate:`Quadro`,"Lower Alpha":`Letra Minúscula`,"Lower Greek":`Grego Minúscula`,"Lower Roman":`Romano Minúscula`,"Upper Alpha":`Letra Maiúscula`,"Upper Roman":`Romano Maiúscula`,Find:`Encontrar`,"Find Previous":`Encontrar Anteriores`,"Find Next":`Localizar Próxima`,"Insert className":`Insira o nome da classe`,"Press Alt for custom resizing":`Pressione Alt para redimensionamento personalizado`,"License: %s":`Licença: %s`},DF={"Type something":`ÐапиÑиÑе ÑÑо-либо`,"About Jodit":`Ð Jodit`,"Jodit Editor":`РедакÑÐ¾Ñ Jodit`,"Jodit User's Guide":`Jodit Ð ÑководÑÑво полÑзоваÑелÑ`,"contains detailed help for using":`ÑодеÑÐ¶Ð¸Ñ Ð´ÐµÑалÑнÑÑ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¿Ð¾ иÑполÑзованиÑ`,"For information about the license, please go to our website:":`ÐÐ»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ñведений о лиÑензии , пожалÑйÑÑа, пеÑейдиÑе на Ð½Ð°Ñ ÑайÑ:`,"Buy full version":`ÐÑпиÑÑ Ð¿Ð¾Ð»Ð½ÑÑ Ð²ÐµÑÑиÑ`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`ÐвÑоÑÑкие пÑава © XDSoft.net - ЧÑпÑÑнов ÐалеÑий. ÐÑе пÑава заÑиÑенÑ.`,Anchor:`ÐнкоÑ`,"Open in new tab":`ÐÑкÑÑваÑÑ ÑÑÑÐ»ÐºÑ Ð² новой вкладке`,"Open in fullsize":`ÐÑкÑÑÑÑ ÑедакÑÐ¾Ñ Ð² полном ÑазмеÑе`,"Clear Formatting":`ÐÑиÑÑиÑÑ ÑоÑмаÑиÑование`,"Fill color or set the text color":`Ð¦Ð²ÐµÑ Ð·Ð°Ð»Ð¸Ð²ÐºÐ¸ или ÑÐ²ÐµÑ ÑекÑÑа`,Redo:`ÐовÑоÑ`,Undo:`ÐÑмена`,Bold:`ÐиÑнÑй`,Italic:`ÐаклоннÑй`,"Insert Unordered List":`ÐÑÑавка маÑкиÑованного ÑпиÑка`,"Insert Ordered List":`ÐÑÑавиÑÑ Ð½ÑмеÑованнÑй ÑпиÑок`,"Align Center":`ÐÑÑовнÑÑÑ Ð¿Ð¾ ÑенÑÑÑ`,"Align Justify":`ÐÑÑовнÑÑÑ Ð¿Ð¾ ÑиÑине`,"Align Left":`ÐÑÑовнÑÑÑ Ð¿Ð¾ Ð»ÐµÐ²Ð¾Ð¼Ñ ÐºÑаÑ`,"Align Right":`ÐÑÑовнÑÑÑ Ð¿Ð¾ пÑÐ°Ð²Ð¾Ð¼Ñ ÐºÑаÑ`,"Insert Horizontal Line":`ÐÑÑавиÑÑ Ð³Ð¾ÑизонÑалÑнÑÑ Ð»Ð¸Ð½Ð¸Ñ`,"Insert Image":`ÐÑÑавиÑÑ Ð¸Ð·Ð¾Ð±Ñажение`,"Insert file":`ÐÑÑавиÑÑ Ñайл`,"Insert youtube/vimeo video":`ÐÑÑавÑÑе видео`,"Insert link":`ÐÑÑавиÑÑ ÑÑÑлкÑ`,"Font size":`Ð Ð°Ð·Ð¼ÐµÑ ÑÑиÑÑа`,"Font family":`ШÑиÑÑ`,"Insert format block":`ÐÑÑавиÑÑ Ð±Ð»Ð¾ÑнÑй ÑлеменÑ`,Normal:`ÐоÑмалÑнÑй ÑекÑÑ`,"Heading 1":`Ðаголовок 1`,"Heading 2":`Ðаголовок 2`,"Heading 3":`Ðаголовок 3`,"Heading 4":`Ðаголовок 4`,Quote:`ЦиÑаÑа`,Code:`Ðод`,Insert:`ÐÑÑавиÑÑ`,"Insert table":`ÐÑÑавиÑÑ ÑаблиÑÑ`,"Decrease Indent":`УменÑÑиÑÑ Ð¾ÑÑÑÑп`,"Increase Indent":`УвелиÑиÑÑ Ð¾ÑÑÑÑп`,"Select Special Character":`ÐÑбеÑиÑе ÑпеÑиалÑнÑй Ñимвол`,"Insert Special Character":`ÐÑÑавиÑÑ ÑпеÑиалÑнÑй Ñимвол`,"Paint format":`ФоÑÐ¼Ð°Ñ ÐºÑаÑки`,"Change mode":`ÐÑÑоÑник`,Margins:`ÐÑÑÑÑпÑ`,top:`ÑвеÑÑ
Ñ`,right:`ÑпÑава`,bottom:`ÑнизÑ`,left:`Ñлева`,Styles:`СÑили`,Classes:`ÐлаÑÑÑ`,Align:`ÐÑÑавнивание`,Right:`Ðо пÑÐ°Ð²Ð¾Ð¼Ñ ÐºÑаÑ`,Center:`Ðо ÑенÑÑÑ`,Left:`Ðо Ð»ÐµÐ²Ð¾Ð¼Ñ ÐºÑаÑ`,"--Not Set--":`--не ÑÑÑанавливаÑÑ--`,Src:`src`,Title:`Ðаголовок`,Alternative:`ÐлÑÑеÑнаÑивнÑй ÑекÑÑ (alt)`,Link:`СÑÑлка`,"Open link in new tab":`ÐÑкÑÑваÑÑ ÑÑÑÐ»ÐºÑ Ð² новом окне`,file:`Файл`,Advanced:`РаÑÑиÑеннÑе`,"Image properties":`СвойÑÑва изобÑажениÑ`,Cancel:`ÐÑмена`,Ok:`Ðк`,"Your code is similar to HTML. Keep as HTML?":`ÐÐ°Ñ ÑекÑÑ, коÑоÑÑй Ð²Ñ Ð¿ÑÑаеÑеÑÑ Ð²ÑÑавиÑÑ Ð¿Ð¾Ñ
ож на HTML. ÐÑÑавиÑÑ ÐµÐ³Ð¾ как HTML?`,"Paste as HTML":`ÐÑÑавиÑÑ ÐºÐ°Ðº HTML?`,Keep:`СоÑ
ÑаниÑÑ Ð¾Ñигинал`,Clean:`ÐоÑиÑÑиÑÑ`,"Insert as Text":`ÐÑÑавиÑÑ ÐºÐ°Ðº ÑекÑÑ`,"Insert only Text":`ÐÑÑавиÑÑ ÑолÑко ÑекÑÑ`,"Word Paste Detected":`Ðозможно ÑÑо ÑÑÐ°Ð³Ð¼ÐµÐ½Ñ Word или Excel`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`ÐонÑÐµÐ½Ñ ÐºÐ¾ÑоÑÑй Ð²Ñ Ð²ÑÑавлÑеÑе поÑÑÑÐ¿Ð°ÐµÑ Ð¸Ð· докÑменÑа Microsoft Word / Excel. ÐÑ Ñ
оÑиÑе ÑоÑ
ÑаниÑÑ ÑоÑÐ¼Ð°Ñ Ð¸Ð»Ð¸ оÑиÑÑиÑÑ ÐµÐ³Ð¾?`,"File Browser":`ÐÑаÑÐ·ÐµÑ Ñайлов`,"Error on load list":`ÐÑибка пÑи загÑÑзке ÑпиÑка изобÑажений`,"Error on load folders":`ÐÑибка пÑи загÑÑзке ÑпиÑка диÑекÑоÑий`,"Are you sure?":`ÐÑ ÑвеÑенÑ?`,"Enter Directory name":`ÐведиÑе название диÑекÑоÑии`,"Create directory":`СоздаÑÑ Ð´Ð¸ÑекÑоÑиÑ`,"type name":`введиÑе название`,"type dir name":`введиÑе название`,"Drop image":`ÐеÑеÑаÑиÑе ÑÑда изобÑажение`,"Drop file":`ÐеÑеÑаÑиÑе ÑÑда Ñайл`,"or click":`или нажмиÑе`,"Alternative text":`ÐлÑÑеÑнаÑивнÑй ÑекÑÑ`,Browse:`СеÑвеÑ`,Upload:`ÐагÑÑзка`,Backgroun
185d:`Фон`,Text:`ТекÑÑ`,Top:` РвеÑÑ
Ñ`,Middle:`Ðо ÑеÑедине`,Bottom:`РнизÑ`,"Insert column before":`ÐÑÑавиÑÑ ÑÑÐ¾Ð»Ð±ÐµÑ Ð´Ð¾`,"Insert column after":`ÐÑÑавиÑÑ ÑÑÐ¾Ð»Ð±ÐµÑ Ð¿Ð¾Ñле`,"Insert row above":`ÐÑÑавиÑÑ ÑÑд вÑÑе`,"Insert row below":`ÐÑÑавиÑÑ ÑÑд ниже`,"Delete table":`УдалиÑÑ ÑаблиÑÑ`,"Delete row":`УдалÑÑÑ ÑÑд`,"Delete column":`УдалиÑÑ ÑÑолбеÑ`,"Empty cell":`ÐÑиÑÑиÑÑ ÑÑейкÑ`,source:`HTML`,bold:`жиÑнÑй`,italic:`кÑÑÑив`,brush:`заливка`,link:`ÑÑÑлка`,undo:`оÑмениÑÑ`,redo:`повÑоÑиÑÑ`,table:`ÑаблиÑа`,image:`ÐзобÑажение`,eraser:`оÑиÑÑиÑÑ`,paragraph:`паÑагÑаÑ`,fontsize:`ÑÐ°Ð·Ð¼ÐµÑ ÑÑиÑÑа`,video:`видео`,font:`ÑÑиÑÑ`,about:`о ÑедакÑоÑе`,print:`пеÑаÑÑ`,underline:`подÑеÑкнÑÑÑй`,strikethrough:`пеÑеÑеÑкнÑÑÑй`,indent:`оÑÑÑÑп`,outdent:`вÑÑÑÑп`,fullsize:`во веÑÑ ÑкÑан`,shrink:`обÑÑнÑй ÑазмеÑ`,hr:`линиÑ`,ul:`СпиÑок`,ol:`ÐÑмеÑованнÑй ÑпиÑок`,cut:`ÐÑÑезаÑÑ`,selectall:`ÐÑделиÑÑ Ð²Ñе`,"Embed code":`Ðод`,"Open link":`ÐÑкÑÑÑÑ ÑÑÑлкÑ`,"Edit link":`РедакÑиÑоваÑÑ ÑÑÑлкÑ`,"No follow":`ÐÑÑибÑÑ nofollow`,Unlink:`УбÑаÑÑ ÑÑÑлкÑ`,Eye:`ÐÑоÑмоÑÑ`,pencil:`РедакÑиÑоваÑÑ`,Update:`ÐбновиÑÑ`," URL":`URL`,Edit:`РедакÑиÑоваÑÑ`,"Horizontal align":`ÐоÑизонÑалÑное вÑÑавнивание`,Filter:`ФилÑÑÑ`,"Sort by changed":`Ðо изменениÑ`,"Sort by name":`Ðо имени`,"Sort by size":`Ðо ÑазмеÑÑ`,"Add folder":`ÐобавиÑÑ Ð¿Ð°Ð¿ÐºÑ`,Reset:`ÐоÑÑÑановиÑÑ`,Save:`СоÑ
ÑаниÑÑ`,"Save as ...":`СоÑ
ÑаниÑÑ ÐºÐ°Ðº`,Resize:`ÐзмениÑÑ ÑазмеÑ`,Crop:`ÐбÑезаÑÑ ÑазмеÑ`,Width:`ШиÑина`,Height:`ÐÑÑоÑа`,"Keep Aspect Ratio":`СоÑ
ÑанÑÑÑ Ð¿ÑопоÑÑии`,Yes:`Ðа`,No:`ÐеÑ`,Remove:`УдалиÑÑ`,Select:`ÐÑделиÑÑ`,"Chars: %d":`Символов: %d`,"Words: %d":`Слов: %d`,All:`ÐÑделиÑÑ Ð²Ñе`,"Select %s":`ÐÑделиÑÑ: %s`,"Select all":`ÐÑделиÑÑ Ð²Ñе`,"Vertical align":`ÐеÑÑикалÑное вÑÑавнивание`,Split:`РазделиÑÑ`,"Split vertical":`РазделиÑÑ Ð¿Ð¾ веÑÑикали`,"Split horizontal":`РазделиÑÑ Ð¿Ð¾ гоÑизонÑали`,Merge:`ÐбÑединиÑÑ Ð² однÑ`,"Add column":`ÐобавиÑÑ ÑÑолбеÑ`,"Add row":`ÐобавиÑÑ ÑÑÑокÑ`,Delete:`УдалиÑÑ`,Border:`Рамка`,"License: %s":`ÐиÑензиÑ: %s`,"Strike through":`ÐеÑеÑеÑкнÑÑÑ`,Underline:`ÐодÑеÑкивание`,superscript:`веÑÑ
ний индекÑ`,subscript:`индекÑ`,"Cut selection":`ÐÑÑезаÑÑ`,Break:`РазделиÑелÑ`,"Search for":`ÐайÑи`,"Replace with":`ÐамениÑÑ Ð½Ð°`,Replace:`ÐамениÑÑ`,Paste:`ÐÑÑавиÑÑ`,"Choose Content to Paste":`ÐÑбÑаÑÑ ÐºÐ¾Ð½ÑÐµÐ½Ñ Ð´Ð»Ñ Ð²ÑÑавки`,"You can only edit your own images. Download this image on the host?":`ÐÑ Ð¼Ð¾Ð¶ÐµÑе ÑедакÑиÑоваÑÑ ÑолÑко Ñвои ÑобÑÑвеннÑе изобÑажениÑ. ÐагÑÑзиÑÑ ÑÑо изобÑажение на Ð²Ð°Ñ ÑеÑвеÑ?`,"The image has been successfully uploaded to the host!":`ÐзобÑажение ÑÑпеÑно загÑÑжено на ÑеÑвеÑ!`,palette:`палиÑÑа`,"There are no files":`Рданном каÑалоге Ð½ÐµÑ Ñайлов`,Rename:`ÐеÑеименоваÑÑ`,"Enter new name":`ÐведиÑе новое имÑ`,preview:`ÐÑедпÑоÑмоÑÑ`,download:`СкаÑаÑÑ`,"Paste from clipboard":`ÐÑÑавиÑÑ Ð¸Ð· бÑÑеÑа обмена`,"Your browser doesn't support direct access to the clipboard.":`ÐÐ°Ñ Ð±ÑаÑÐ·ÐµÑ Ð½Ðµ поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð¿ÑÑмой доÑÑÑп к бÑÑеÑÑ Ð¾Ð±Ð¼ÐµÐ½Ð°.`,"Copy selection":`СкопиÑоваÑÑ Ð²Ñделенное`,copy:`копиÑ`,"Border radius":`РадиÑÑ Ð³ÑаниÑÑ`,"Show all":`ÐоказаÑÑ Ð²Ñе`,Apply:`ÐÑимениÑÑ`,"Please fill out this field":`ÐожалÑйÑÑа, заполниÑе ÑÑо поле`,"Please enter a web address":`ÐожалÑйÑÑа, введиÑе веб-адÑеÑ`,Default:`Ðо ÑмолÑаниÑ`,Circle:`ÐÑÑг`,Dot:`ТоÑка`,Quadrate:`ÐвадÑаÑ`,Find:`ÐайÑи`,"Find Previous":`ÐайÑи ÐÑедÑдÑÑие`,"Find Next":`ÐайÑи Ðалее`,"Insert className":`ÐÑÑавиÑÑ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ðµ клаÑÑа`,"Press Alt for custom resizing":`ÐажмиÑе Alt Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑзоваÑелÑÑкого ÑазмеÑа`},OF={"Type something":`NapÃÅ¡te nieÄo`,"About Jodit":`O editore Jodit`,"Jodit Editor":`Editor Jodit`,"Free Non-commercial Version":`Bezplatná verzia na nekomerÄné použitie`,"Jodit User's Guide":`PoužÃvateľská prÃruÄka Jodit`,"contains detailed help for using":`obsahuje podrobnú pomoc s použÃvanÃm`,"For information about the license, please go to our website:":`Informácie o licencii nájdete na naÅ¡ej webovej stránke:`,"Buy full version":`KúpiÅ¥ plnú verziu`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. VÅ¡etky práva vyhradené.`,Anchor:`Kotva`,"Open in new tab":`OtvoriÅ¥ na novej karte`,"Open in fullsize":`OtvoriÅ¥ na celú obrazovku`,"Clear Formatting":`VymazaÅ¥ formátovanie`,"Fill color or set the text color":`Farba výplne alebo textu`,Redo:`Znova`,Undo:`Späť`,Bold:`TuÄné pÃsmo`,Italic:`KurzÃva`,"Insert Unordered List":`VložiÅ¥ zoznam s odrážkami`,"Insert Ordered List":`VložiÅ¥ ÄÃslovaný zoznam`,"Align Center":`ZarovnaÅ¥ na stred`,"Align Justify":`ZarovnaÅ¥ do bloku`,"Align Left":`ZarovnaÅ¥ doľava`,"Align Right":`ZarovnaÅ¥ doprava`,"Insert Horizontal Line":`VložiÅ¥ vodorovnú Äiaru`,"Insert Image":`VložiÅ¥ obrázok`,"Insert file":`VložiÅ¥ súbor`,"Insert youtube/vimeo video":`VložiÅ¥ video YouTube/Vimeo`,"Insert link":`VložiÅ¥ odkaz`,"Font size":`VeľkosÅ¥ pÃsma`,"Font family":`Typ pÃsma`,"Insert format block":`VložiÅ¥ formátovaný blok`,Normal:`Normálny text`,"Heading 1":`Nadpis 1`,"Heading 2":`Nadpis 2`,"Heading 3":`Nadpis 3`,"Heading 4":`Nadpis 4`,Quote:`Citácia`,Code:`Kód`,Insert:`VložiÅ¥`,"Insert table":`VložiÅ¥ tabuľku`,"Decrease Indent":`ZmenÅ¡iÅ¥ odsadenie`,"Increase Indent":`ZväÄÅ¡iÅ¥ odsadenie`,"Select Special Character":`VybraÅ¥ Å¡peciálny znak`,"Insert Special Character":`VložiÅ¥ Å¡peciálny znak`,"Paint format":`KopÃrovaÅ¥ formát`,"Change mode":`ZmeniÅ¥ režim`,Margins:`Okraje`,top:`horný`,right:`pravý`,bottom:`dolný`,left:`ľavý`,Styles:`Å týly`,Classes:`Triedy`,Align:`Zarovnanie`,Right:`Vpravo`,Center:`Na stred`,Left:`Vľavo`,"--Not Set--":`--nenastavené--`,Src:`Zdroj`,Title:`Názov`,Alternative:`AlternatÃvny text (alt)`,Link:`Odkaz`,"Open link in new tab":`OtvoriÅ¥ odkaz na novej karte`,Image:`Obrázok`,file:`súbor`,Advanced:`RozÅ¡Ãrené`,"Image properties":`Vlastnosti obrázka`,Cancel:`ZruÅ¡iÅ¥`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Váš kód sa podobá na HTML. PonechaÅ¥ ho ako HTML?`,"Paste as HTML":`VložiÅ¥ ako HTML`,Keep:`PonechaÅ¥`,Clean:`VyÄistiÅ¥`,"Insert as Text":`VložiÅ¥ ako text`,"Insert only Text":`VložiÅ¥ iba text`,"Word Paste Detected":`Zistil sa obsah z Wordu alebo Excelu`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Vložený obsah pochádza z dokumentu Microsoft Word/Excel. Chcete zachovaÅ¥ formátovanie alebo ho vyÄistiÅ¥?`,"File Browser":`PrehliadaÄ súborov`,"Error on load list":`Chyba pri naÄÃtanà zoznamu súborov`,"Error on load folders":`Chyba pri naÄÃtanà prieÄinkov`,"Are you sure?":`Ste si istÃ?`,"Enter Directory name":`Zadajte názov prieÄinka`,"Create directory":`VytvoriÅ¥ prieÄinok`,"type name":`zadajte názov`,"Drop image":`PresuÅte sem obrázok`,"Drop file":`PresuÅte sem súbor`,"or click":`alebo kliknite`,"Alternative text":`AlternatÃvny text`,Browse:`PrehľadávaÅ¥`,Upload:`NahraÅ¥`,Backgroun
185d:`Pozadie`,Text:`Text`,Top:`Hore`,Middle:`Na stred`,Bottom:`Dole`,"Insert column before":`VložiÅ¥ stĺpec pred`,"Insert column after":`VložiÅ¥ stĺpec za`,"Insert row above":`VložiÅ¥ riadok nad`,"Insert row below":`VložiÅ¥ riadok pod`,"Delete table":`OdstrániÅ¥ tabuľku`,"Delete row":`OdstrániÅ¥ riadok`,"Delete column":`OdstrániÅ¥ stĺpec`,"Empty cell":`VyprázdniÅ¥ bunku`,source:`HTML`,bold:`tuÄné pÃsmo`,italic:`kurzÃva`,brush:`Å¡tetec`,link:`odkaz`,undo:`späť`,redo:`znova`,table:`tabuľka`,image:`obrázok`,eraser:`guma`,paragraph:`odstavec`,fontsize:`veľkosÅ¥ pÃsma`,video:`video`,font:`pÃsmo`,about:`o editore`,print:`tlaÄiÅ¥`,underline:`podÄiarknuté`,strikethrough:`preÄiarknuté`,indent:`zväÄÅ¡iÅ¥ odsadenie`,outdent:`zmenÅ¡iÅ¥ odsadenie`,fullsize:`režim celej obrazovky`,shrink:`zmenÅ¡iÅ¥`,hr:`vodorovná Äiara`,ul:`zoznam s odrážkami`,ol:`ÄÃslovaný zoznam`,cut:`vystrihnúť`,selectall:`vybraÅ¥ vÅ¡etko`,"Embed code":`VložiÅ¥ kód`,"Open link":`OtvoriÅ¥ odkaz`,"Edit link":`UpraviÅ¥ odkaz`,"No follow":`Atribút nofollow`,Unlink:`OdstrániÅ¥ odkaz`,Eye:`ZobraziÅ¥`,pencil:`UpraviÅ¥`,Update:`AktualizovaÅ¥`," URL":`URL`,Edit:`UpraviÅ¥`,"Horizontal align":`Vodorovné zarovnanie`,Filter:`Filter`,"Sort by changed":`ZoradiÅ¥ podľa poslednej zmeny`,"Sort by name":`ZoradiÅ¥ podľa názvu`,"Sort by size":`ZoradiÅ¥ podľa veľkosti`,"Add folder":`PridaÅ¥ prieÄinok`,Reset:`ObnoviÅ¥`,Save:`UložiÅ¥`,"Save as ...":`UložiÅ¥ akoâ¦`,Resize:`ZmeniÅ¥ veľkosÅ¥`,Crop:`OrezaÅ¥`,Width:`Å Ãrka`,Height:`Výška`,"Keep Aspect Ratio":`ZachovaÅ¥ pomer strán`,Yes:`Ãno`,No:`Nie`,Remove:`OdstrániÅ¥`,Select:`VybraÅ¥`,"Chars: %d":`Znaky: %d`,"Words: %d":`Slová: %d`,All:`VÅ¡etko`,"Select %s":`VybraÅ¥ %s`,"Select all":`VybraÅ¥ vÅ¡etko`,"Vertical align":`Zvislé zarovnanie`,Split:`RozdeliÅ¥`,"Split vertical":`RozdeliÅ¥ zvislo`,"Split horizontal":`RozdeliÅ¥ vodorovne`,Merge:`ZlúÄiÅ¥`,"Add column":`PridaÅ¥ stĺpec`,"Add row":`PridaÅ¥ riadok`,Delete:`OdstrániÅ¥`,Border:`Okraj`,"License: %s":`Licencia: %s`,"Strike through":`PreÄiarknuté`,Underline:`PodÄiarknuté`,superscript:`Horný index`,subscript:`Dolný index`,"Cut selection":`Vystrihnúť výber`,Break:`Zalomenie`,"Search for":`HľadaÅ¥`,"Replace with":`NahradiÅ¥ ÄÃm`,Replace:`NahradiÅ¥`,Paste:`VložiÅ¥`,"Choose Content to Paste":`Vyberte obsah na vloženie`,"You can only edit your own images. Download this image on the host?":`Môžete upravovaÅ¥ iba vlastné obrázky. StiahnuÅ¥ tento obrázok na server?`,"The image has been successfully uploaded to the host!":`Obrázok bol úspeÅ¡ne nahraný na server!`,palette:`paleta`,"There are no files":`V tomto prieÄinku nie sú žiadne súbory.`,Rename:`PremenovaÅ¥`,"Enter new name":`Zadajte nový názov`,preview:`Ukážka`,download:`StiahnuÅ¥`,"Paste from clipboard":`VložiÅ¥ zo schránky`,"Your browser doesn't support direct access to the clipboard.":`Váš prehliadaÄ nepodporuje priamy prÃstup do schránky.`,"Copy selection":`KopÃrovaÅ¥ výber`,copy:`kopÃrovaÅ¥`,"Border radius":`Zaoblenie rohov`,"Show all":`ZobraziÅ¥ vÅ¡etko`,Apply:`PoužiÅ¥`,"Please fill out this field":`VyplÅte toto pole`,"Please enter a web address":`Zadajte webovú adresu`,Default:`Predvolené`,Circle:`Kruh`,Dot:`Bodka`,Quadrate:`Å tvorec`,Find:`NájsÅ¥`,"Find Previous":`NájsÅ¥ predchádzajúce`,"Find Next":`NájsÅ¥ nasledujúce`,"Insert className":`Vložte názov triedy`,"Press Alt for custom resizing":`StlaÄte Alt na vlastnú zmenu veľkosti`,"Upload file":`NahraÅ¥ súbor`,"Remove file":`OdstrániÅ¥ súbor`,"Update file list":`AktualizovaÅ¥ zoznam súborov`,"Select file":`VybraÅ¥ súbor`,"Edit image":`UpraviÅ¥ obrázok`,"Tiles view":`Zobrazenie dlaždÃc`,"List view":`Zobrazenie zoznamu`},kF={"Type something":`Skriv nÃ¥got...`,"About Jodit":`Om Jodit`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Jodit användarguide`,"contains detailed help for using":`InnehÃ¥ller detaljerad hjälp för användning`,"For information about the license, please go to our website:":`För information om licensen, vänligen besök vÃ¥r webbsida:`,"Buy full version":`Köp full version`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Upphovsrätt © XDSoft.net - Chupurnov Valeriy. Alla rättigheter förbehÃ¥llna.`,Anchor:`Ankare`,"Open in new tab":`Ãppna i ny flik`,"Open in fullsize":`Ãppna i fullskärm`,"Clear Formatting":`Rensa formatering`,"Fill color or set the text color":`Fyll färg eller ställ in textfärg`,Redo:`Gör om`,Undo:`Ã
ngra`,Bold:`Fetstil`,Italic:`Kursiv`,"Insert Unordered List":`Infoga punktlista`,"Insert Ordered List":`Infoga numrerad lista`,"Align Center":`Centrera`,"Align Justify":`Justera`,"Align Left":`Vänsterjustera`,"Align Right":`Högerjustera`,"Insert Horizontal Line":`Infoga horisontell linje`,"Insert Image":`Infoga bild`,"Insert file":`Infoga fil`,"Insert youtube/vimeo video":`Infoga YouTube/Vimeo-vi
185deo`,"Insert link":`Infoga länk`,"Font size":`Teckenstorlek`,"Font family":`Teckensnitt`,"Insert format block":`Infoga formateringsblock`,Normal:`Normal`,"Heading 1":`Rubrik 1`,"Heading 2":`Rubrik 2`,"Heading 3":`Rubrik 3`,"Heading 4":`Rubrik 4`,Quote:`Citat`,Code:`Kod`,Insert:`Infoga`,"Insert table":`Infoga tabell`,"Decrease Indent":`Minska indrag`,"Increase Indent":`Ãka indrag`,"Select Special Character":`Välj specialtecken`,"Insert Special Character":`Infoga specialtecken`,"Paint format":`Kopiera format`,"Change mode":`Byt läge (WYSIWYG/HTML)`,Margins:`Marginaler`,top:`överst`,right:`höger`,bottom:`nederst`,left:`vänster`,Styles:`Stilar`,Classes:`Klasser`,Align:`Justering`,Right:`Höger`,Center:`Centrera`,Left:`Vänster`,"--Not Set--":`--Inte inställd--`,Src:`Källa`,Title:`Titel`,Alternative:`Alternativ`,Filter:`Filter`,Link:`Länk`,"Open link in new tab":`Ãppna länk i ny flik`,Image:`Bild`,file:`fil`,Advanced:`Avancerad`,"Image properties":`Bildegenskaper`,Cancel:`Avbryt`,Ok:`OK`,"Your code is similar to HTML. Keep as HTML?":`Din kod liknar HTML. Vill du behÃ¥lla som HTML?`,"Paste as HTML":`Klistra in som HTML`,Keep:`BehÃ¥ll`,Clean:`Rensa`,"Insert as Text":`Klistra in som text`,"Word Paste Detected":`Word-klistring upptäckt`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Det inklistrade innehÃ¥llet k
185ommer frÃ¥n ett Microsoft Word/Excel-dokument. Vill du behÃ¥lla formatet eller rensa det?`,"Insert only Text":`Klistra in endast text`,"File Browser":`Filutforskare`,"Error on load list":`Fel vid inläsning av lista`,"Error on load folders":`Fel vid inläsning av mappar`,"Are you sure?":`Ãr du säker?`,"Enter Directory name":`Ange mappnamn`,"Create directory":`Skapa mapp`,"type name":`skriv namn`,"type dir name":`skriv namn`,"Drop image":`Släpp bild`,"Drop file":`Släpp fil`,"or click":`eller klicka`,"Alternative text":`Alternativ text`,Browse:`Bläddra`,Upload:`Ladda upp`,Background:`Bakgrund`,Border:`Kantlinje`,Text:`Text`,Top:`Topp`,Middle:`Mitten`,Bottom:`Botten`,"Insert column before":`Infoga kolumn före`,"Insert column after":`Infoga kolumn efter`,"Insert row above":`Infoga rad ovanför`,"Insert row below":`Infoga rad nedanför`,"Delete table":`Radera tabell`,"Delete row":`Radera rad`,"Delete column":`Radera kolumn`,"Empty cell":`Töm cell`,"Chars: %d":`Tecken: %d`,"Words: %d":`Ord: %d`,Split:`Dela`,"Split vertical":`Dela vertikalt`,"Split horizontal":`Dela horisontellt`,"Strike through":`Genomstrykning`,Underline:`Understrykning`,superscript:`Upphöjd skrift`,subscript:`Sänkt skrift`,"Cut selection":`Klipp ut markering`,"Select all":`Välj allt`,Break:`Paus`,"Search for":`Sök efter`,"Replace with":`Ersätt med`,Replace:`Ersätt`,Paste:`Klistra in`,"Choose Content to Paste":`Välj innehÃ¥ll att klistra in`,source:`källa`,bold:`fetstil`,italic:`kursiv`,brush:`pensel`,link:`länk`,undo:`Ã¥ngra`,redo:`gör om`,table:`tabell`,image:`bild`,eraser:`radergummi`,paragraph:`stycke`,fontsize:`teckenstorlek`,video:`video`,font:`teckensnitt`,about:`om redigeringsverktyget`,print:`skriv ut`,underline:`understrykning`,strikethrough:`genomstrykning`,indent:`indrag`,outdent:`minska indrag`,fullsize:`full storlek`,shrink:`minska`,hr:`linje`,ul:`punktlista`,ol:`numrerad lista`,cut:`klipp ut`,selectall:`välj allt`,"Open link":`Ãppna länk`,"Edit link":`Redigera länk`,"No follow":`Ingen uppföljning`,Unlink:`Ta bort länk`,Eye:`Förhandsvisning`,pencil:`Redigera`," URL":`URL`,Reset:`Ã
terställ`,Save:`Spara`,"Save as ...":`Spara som ...`,Resize:`Ãndra storlek`,Crop:`Beskär`,Width:`Bredd`,Height:`Höjd`,"Keep Aspect Ratio":`BehÃ¥ll aspektförhÃ¥llande`,Yes:`Ja`,No:`Nej`,Remove:`Ta bort`,Select:`Välj`,"Select %s":`Välj: %s`,Update:`Uppdatera`,"Vertical align":`Vertikal justering`,Merge:`Sammanfoga`,"Add column":`Lägg till kolumn`,"Add row":`Lägg till rad`,Delete:`Radera`,"Horizontal align":`Horisontell justering`,"Sort by changed":`Sortera efter ändrad`,"Sort by name":`Sortera efter namn`,"Sort by size":`Sortera efter storlek`,"Add folder":`Lägg till mapp`,"You can only edit your own images. Download this image on the host?":`Du kan endast redigera dina egna bilder. Ladda ner denna bild pÃ¥ värden?`,"The image has been successfully uploaded to the host!":`Bilden har laddats upp till värden utan problem!`,palette:`Palett`,"There are no files":`Det finns inga filer`,Rename:`Döp om`,"Enter new name":`Ange nytt namn`,preview:`Förhandsvisning`,download:`Ladda ner`,"Paste from clipboard":`Klistra in frÃ¥n urklipp`,"Your browser doesn't support direct access to the clipboard.":`Din webbläsare stöder inte direkt Ã¥tkomst till urklipp.`,"Copy selection":`Kopiera markering`,copy:`kopiera`,"Border radius":`Borderradie`,"Show all":`Visa alla`,Apply:`Tillämpa`,"Please fill out this field":`Vänligen fyll i detta fält`,"Please enter a web address":`Vänligen ange en webbadress`,Default:`Standard`,Circle:`Cirkel`,Dot:`Punkt`,Quadrate:`Fyrkant`,Find:`Hitta`,"Find Previous":`FöregÃ¥ende`,"Find Next":`Nästa`,"Insert className":`Infoga klassnamn`,"Press Alt for custom resizing":`Tryck pÃ¥ Alt för anpassad storleksändring`,"Line height":`RadavstÃ¥nd`,Edit:`Redigera`,Sound:`Ljud`,"Interim Results":`Preliminära resultat`,Spellcheck:`Stavningskontroll`,"Speech Recognize":`Taligenkänning`,newline:`ny rad`,delete:`radera`,space:`mellanslag`,"Embed code":`Bädda in kod`,All:`Välj alla`,"License: %s":`Licens: %s`},AF={"Type something":`Bir Åeyler yaz`,Advanced:`GeliÅmiÅ`,"About Jodit":`Jodit Hakkında`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`Jodit Kullanım Kılavuzu`,"contains detailed help for using":`kullanım için detaylı bilgiler içerir`,"For information about the license, please go to our website:":`Lisans hakkında bilgi için lütfen web sitemize gidin:`,"Buy full version":`Tam versiyonunu satın al`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. T
185üm hakları saklıdır.`,Anchor:`BaÄlantı`,"Open in new tab":`Yeni sekmede aç`,"Open in fullsize":`Editörü tam ekranda aç`,"Clear Formatting":`Stili temizle`,"Fill color or set the text color":`Renk doldur veya yazı rengi seç`,Redo:`Yinele`,Undo:`Geri Al`,Bold:`Kalın`,Italic:`İtalik`,"Insert Unordered List":`Sırasız Liste Ekle`,"Insert Ordered List":`Sıralı Liste Ekle`,"Align Center":`Ortala`,"Align Justify":`Kenarlara Yasla`,"Align Left":`Sola Yasla`,"Align Right":`SaÄa Yasla`,"Insert Horizontal Line":`Yatay Ãizgi Ekle`,"Insert Image":`Resim Ekle`,"Insert file":`Dosya Ekle`,"Insert youtube/vimeo video":`Youtube/Vimeo Videosu Ekle`,"Insert link":`BaÄlantı Ekle`,"Font size":`Font Boyutu`,"Font family":`Font Ailesi`,"Insert format block":`Blok Ekle`,Normal:`Normal`,"Heading 1":`BaÅlık 1`,"Heading 2":`BaÅlık 2`,"Heading 3":`BaÅlık 3`,"Heading 4":`BaÅlık 4`,Quote:`Alıntı`,Code:`Kod`,Insert:`Ekle`,"Insert table":`Tablo Ekle`,"Decrease Indent":`Girintiyi Azalt`,"Increase Indent":`Girintiyi Arttır`,"Select Special Character":`Ãzel Karakter Seç`,"Insert Special Character":`Ãzel Karakter Ekle`,"Paint format":`Resim Biçimi`,"Change mode":`Mod DeÄiÅtir`,Margins:`BoÅluklar`,top:`Ãst`,right:`SaÄ`,bottom:`Alt`,left:`Sol`,Styles:`CSS Stilleri`,Classes:`CSS Sınıfları`,Align:`Hizalama`,Right:`SaÄ`,Center:`Ortalı`,Left:`Sol`,"--Not Set--":`Belirsiz`,Src:`Kaynak`,Title:`BaÅlık`,Alternative:`Alternatif Yazı`,Link:`Link`,"Open link in new tab":`BaÄlantıyı yeni sekmede aç`,Image:`Resim`,file:`Dosya`,"Image properties":`Resim özellikleri`,Cancel:`İptal`,Ok:`Tamam`,"Your code is similar to HTML. Keep as HTML?":`Kodunuz HTML koduna benziyor. HTML olarak devam etmek ister misiniz?`,"Paste as HTML":`HTML olarak yapıÅtır`,Keep:`Sakla`,Clean:`Temizle`,"Insert as Text":`Yazı olarak ekle`,"Word Paste Detected":`Word biçiminde yapıÅtırma algılandı`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`YapıÅtırılan içerik bir Microsoft Word/Excel belgesinden geliyor. Formatı korumak mı yoksa temizlemek mi istiyorsunuz?`,"Insert only Text":`Sadece yazıyı ekle`,"File Browser":`Dosya Listeleyici`,"Error on load list":`Liste yüklenirken hata oluÅtu`,"Error on load folders":`Klasörler yüklenirken hata oluÅtur`,"Are you sure?":`Emin misiniz?`,"Enter Directory name":`Dizin yolu giriniz`,"Create directory":`Dizin oluÅtur`,"type name":`İsim yaz`,"type dir name":`İsim yaz`,"Drop image":`Resim bırak`,"Drop file":`Dosya bırak`,"or click":`veya tıkla`,"Alternative text":`Alternatif yazı`,Browse:`Gözat`,Upload:`Yükle`,Background:`Arka plan`,Text:`Yazı`,Top:`Ãst`,Middle:`Orta`,Bottom:`AÅaÄı`,"Insert column before":`Ãncesine kolon ekle`,"Insert column after":`Sonrasına kolon ekle`,"Insert row above":`Ãstüne satır ekle`,"Insert row below":`Altına satır ekle`,"Delete table":`Tabloyu sil`,"Delete row":`Satırı sil`,"Delete column":`Kolonu sil`,"Empty cell":`Hücreyi temizle`,Delete:`Sil`,"Strike through":`Ãstü çizili`,Underline:`Alt çizgi`,Break:`Satır sonu`,"Search for":`Ara`,"Replace with":`Åununla deÄiÅtir`,Replace:`DeÄiÅtir`,Edit:`Düzenle`,"Vertical align":`Dikey hizala`,"Horizontal align":`Yatay hizala`,Filter:`Filtre`,"Sort by changed":`DeÄiÅime göre sırala`,"Sort by name":`İsme göre sırala`,"Sort by size":`Boyuta göre sırala`,"Add folder":`Klasör ekle`,Split:`Ayır`,"Split vertical":`Dikey ayır`,"Split horizontal":`Yatay ayır`,Merge:`BirleÅtir`,"Add column":`Kolon ekle`,"Add row":`Satır e
185kle`,Border:`Kenarlık`,"Embed code":`Kod ekle`,Update:`Güncelle`,superscript:`Ãst yazı`,subscript:`Alt yazı`,"Cut selection":`Seçilimi kes`,Paste:`YapıÅtır`,"Choose Content to Paste":`YapıÅtırılacak içerik seç`,"Chars: %d":`Harfler: %d`,"Words: %d":`Kelimeler: %d`,All:`Tümü`,"Select %s":`Seç: %s`,"Select all":`Tümünü seç`,source:`Kaynak`,bold:`Kalın`,italic:`italik`,brush:`Fırça`,link:`BaÄlantı`,undo:`Geri al`,redo:`Yinele`,table:`Tablo`,image:`Resim`,eraser:`Silgi`,paragraph:`Paragraf`,fontsize:`Font boyutu`,video:`Video`,font:`Font`,about:`Hakkında`,print:`Yazdır`,underline:`Alt çizgi`,strikethrough:`Ãstü çizili`,indent:`Girinti`,outdent:`Ãıkıntı`,fullsize:`Tam ekran`,shrink:`Küçült`,hr:`Ayraç`,ul:`Sırasız liste`,ol:`Sıralı liste`,cut:`Kes`,selectall:`Tümünü seç`,"Open link":`BaÄlantıyı aç`,"Edit link":`BaÄlantıyı düzenle`,"No follow":`Nofollow özelliÄi`,Unlink:`BaÄlantıyı kaldır`,Eye:`Yorumu`,pencil:`Düzenlemek için`," URL":`URL`,Reset:`Sıfırla`,Save:`Kaydet`,"Save as ...":`Farklı kaydet`,Resize:`Boyutlandır`,Crop:`Kırp`,Width:`GeniÅlik`,Height:`Yükseklik`,"Keep Aspect Ratio":`En boy oranını koru`,Yes:`Evet`,No:`Hayır`,Remove:`Sil`,Select:`Seç`,"You can only edit your own images. Download this image on the host?":`Sadece kendi resimlerinizi düzenleyebilirsiniz. Bu görseli kendi hostunuza indirmek ister misiniz?`,"The image has been successfully uploaded to the host!":`Görsel baÅarıyla hostunuza yüklendi`,palette:`Palet`,"There are no files":`Bu dizinde dosya yok`,Rename:`Yeniden isimlendir`,"Enter new name":`Yeni isim girin`,preview:`Ãn izleme`,download:`İndir`,"Paste from clipboard":`Panodan yapıÅtır `,"Your browser doesn't support direct access to the clipboard.":`Tarayıcınız panoya doÄrudan eriÅimi desteklemiyor.`,"Copy selection":`Seçimi kopyala`,copy:`Kopyala`,"Border radius":`Sınır yarıçapı`,"Show all":`Tümünü Göster`,Apply:`Uygula`,"Please fill out this field":`Lütfen bu alanı doldurun`,"Please enter a web address":`Lütfen bir web adresi girin`,Default:`Varsayılan`,Circle:`Daire`,Dot:`Nokta`,Quadrate:`Kare`,Find:`Bul`,"Find Previous":`Ãncekini Bul`,"Find Next":`Sonrakini Bul`,"Insert className":`Sınıf adı girin`,"Press Alt for custom resizing":`Ãzel yeniden boyutlandırma için Alt tuÅuna basın`,"License: %s":`Lisans: %s`},jF={"Type something":`ÐапиÑÑÑÑ ÑоÑÑ`,"About Jodit":`ÐÑо Jodit`,"Jodit Editor":`РедакÑÐ¾Ñ Jodit`,"Jodit User's Guide":`Jodit ÑнÑÑÑÑкÑÑÑ ÐºÐ¾ÑиÑÑÑваÑа`,"contains detailed help for using":`мÑÑÑиÑÑ Ð´ÐµÑалÑÐ½Ñ ÑнÑоÑмаÑÑÑ Ñодо коÑиÑÑÑваннÑ`,"For information about the license, please go to our website:":`Щоб дÑзнаÑиÑÑ Ð±ÑлÑÑе пÑо лÑÑензÑÑ , бÑÐ´Ñ Ð»Ð°Ñка, пеÑейдÑÑÑ Ð½Ð° Ð½Ð°Ñ ÑайÑ:`,"Buy full version":`ÐÑпиÑи Ð¿Ð¾Ð²Ð½Ñ Ð²ÐµÑÑÑÑ`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`ÐвÑоÑÑÑÐºÑ Ð¿Ñава © XDSoft.net - ЧÑпÑÑнов ÐалеÑÑй. ÐÑÑ Ð¿Ñава заÑ
иÑенÑ.`,Anchor:`ÐнкоÑ`,"Open in new tab":`ÐÑдкÑиÑи Ñ Ð½Ð¾Ð²Ñй вкладÑÑ`,"Open in fullsize":`ÐÑдкÑиÑи ÑедакÑÐ¾Ñ Ð² Ð¿Ð¾Ð²Ð½Ð¾Ð¼Ñ ÑозмÑÑÑ`,"Clear Formatting":`ÐÑиÑÑиÑи ÑоÑмаÑÑваннÑ`,"Fill color or set the text color":`ÐолÑÑ Ð·Ð°Ð»Ð¸Ð²ÐºÐ¸ або колÑÑ ÑекÑÑа`,Redo:`ÐовÑоÑиÑи`,Undo:`ÐÑдмÑниÑи`,Bold:`ÐиÑний`,Italic:`ÐÑÑÑÑв`,"Insert Unordered List":`ÐÑÑавиÑи невпоÑÑдкований ÑпиÑок`,"Insert Ordered List":`ÐÑÑавиÑи нÑмеÑованний ÑпиÑок`,"Align Center":`ÐиÑÑвнÑÑи по ÑенÑÑÑ`,"Align Justify":`ÐиÑÑвнÑÑи по ÑиÑинÑ`,"Align Left":`ÐиÑÑвнÑÑи по лÑÐ²Ð¾Ð¼Ñ ÐºÑаÑ`,"Align Right":`ÐиÑÑвнÑÑи по пÑÐ°Ð²Ð¾Ð¼Ñ ÐºÑаÑ`,"Insert Horizontal Line":`ÐÑÑавиÑи гоÑизонÑалÑÐ½Ñ Ð»ÑнÑÑ`,"Insert Image":`ÐÑÑавиÑи зобÑаженнÑ`,"Insert file":`ÐÑÑавиÑи Ñайл`,"Insert youtube/vimeo video":`ÐÑÑавиÑи вÑдео`,"Insert link":`ÐÑÑавиÑи поÑиланнÑ`,"Font size":`РозмÑÑ ÑÑиÑÑÑ`,"Font family":`ШÑиÑÑ`,"Insert format block":`ÐÑÑавиÑи блоÑний елеменÑ`,Normal:`ÐоÑмалÑний ÑекÑÑ`,"Heading 1":`Ðаголовок 1`,"Heading 2":`Ðаголовок 2`,"Heading 3":`Ðаголовок 3`,"Heading 4":`Ðаголовок 4`,Quote:`ЦиÑаÑа`,Code:`Ðод`,Insert:`ÐÑÑавиÑи`,"Insert table":`ÐÑÑавиÑи ÑаблиÑÑ`,"Decrease Indent":`ÐбÑлÑÑиÑи вÑдÑÑÑп`,"Increase Indent":`ÐменÑиÑи вÑдÑÑÑп`,"Select Special Character":`ÐбеÑÑÑÑ ÑпеÑÑалÑнÑй Ñимвол`,"Insert Special Character":`ÐÑÑавиÑи ÑпеÑÑалÑнÑй Ñимвол`,"Paint format":`ФоÑÐ¼Ð°Ñ ÐºÑаÑки`,"Change mode":`ÐжеÑело`,Margins:`ÐÑдÑÑÑпи`,top:`звеÑÑ
Ñ`,right:`ÑпÑава`,bottom:`знизÑ`,left:`злÑва`,Styles:`СÑилÑ`,Classes:`ÐлаÑи`,Align:`ÐиÑÑвнÑваннÑ`,Right:`Ðо пÑÐ°Ð²Ð¾Ð¼Ñ ÐºÑаÑ`,Center:`Ðо ÑенÑÑÑ`,Left:`Ðо лÑÐ²Ð¾Ð¼Ñ ÐºÑаÑ`,"--Not Set--":`--не вÑÑановлено--`,Src:`src`,Title:`Ðаголовок`,Alternative:`ÐлÑÑеÑнаÑивний ÑекÑÑ (alt)`,Link:`ÐоÑиланнÑ`,"Open link in new tab":`ÐÑдкÑиÑи поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð² новÑй вкладÑÑ`,file:`Файл`,Advanced:`РозÑиÑенÑ`,"Image properties":`ÐлаÑÑивоÑÑÑ Ð·Ð¾Ð±ÑаженнÑ`,Cancel:`ÐÑдмÑна`,Ok:`Ðк`,"Your code is similar to HTML. Keep as HTML?":`ТекÑÑ, Ñкий Ðи намагаÑÑеÑÑ Ð²ÑÑавиÑи ÑÑ
ожий на HTML. ÐÑÑавиÑи його Ñк HTML?`,"Paste as HTML":`ÐÑÑавиÑи його Ñк HTML`,Keep:`ÐбеÑегÑи оÑигÑнал`,Clean:`ÐоÑиÑÑиÑи`,"Insert as Text":`ÐÑÑавиÑи Ñк ÑекÑÑ`,"Insert only Text":`ÐÑÑавиÑи ÑÑлÑки ÑекÑÑ`,"Word Paste Detected":`Ðожливо Ñе ÑÑÐ°Ð³Ð¼ÐµÐ½Ñ Word або Excel`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`Ðи вÑÑавлÑÑÑе конÑÐµÐ½Ñ Ð· докÑменÑа Microsoft Word або Excel. ÐажаÑÑе збеÑегÑи ÑоÑмаÑÑваннÑ?`,"File Browser":`ÐÑаÑÐ·ÐµÑ ÑайлÑв`,"Error on load list":`Ðомилка пÑи заванÑÐ°Ð¶ÐµÐ½Ð½Ñ ÑпиÑÐºÑ Ð·Ð¾Ð±ÑаженÑ`,"
185Error on load folders":`Ðомилка пÑи заванÑÐ°Ð¶ÐµÐ½Ð½Ñ ÑпиÑÐºÑ Ð¿Ð°Ð¿Ð¾Ðº`,"Are you sure?":`Ðи впевненÑ?`,"Enter Directory name":`ÐведÑÑÑ Ð½Ð°Ð·Ð²Ñ Ð¿Ð°Ð¿ÐºÐ¸`,"Create directory":`СÑвоÑиÑи папкÑ`,"type name":`введÑÑÑ Ð½Ð°Ð·Ð²Ñ`,"type dir name":`введÑÑÑ Ð½Ð°Ð·Ð²Ñ`,"Drop image":`ÐеÑеÑÑгнÑÑÑ Ð·Ð¾Ð±ÑÐ°Ð¶ÐµÐ½Ð½Ñ ÑÑди`,"Drop file":`ÐеÑеÑÑгнÑÑÑ Ñайл ÑÑди`,"or click":`або клÑкнÑÑÑ`,"Alternative text":`ÐлÑÑеÑнаÑивнÑй ÑекÑÑ`,Browse:`СеÑвеÑ`,Upload:`ÐаванÑаженнÑ`,Background:`Фон`,Text:`ТекÑÑ`,Top:` ÐгоÑÑ`,Middle:`Ðо ÑенÑÑÑ`,Bottom:`ÐонизÑ`,"Insert column before":`ÐÑÑавиÑи ÑÑовпеÑÑ Ð´Ð¾`,"Insert column after":`ÐÑÑавиÑи ÑÑовпеÑÑ Ð¿ÑÑлÑ`,"Insert row above":`ÐÑÑавиÑи ÑÑдок виÑе`,"Insert row below":`ÐÑÑавиÑи ÑÑдок нижÑе`,"Delete table":`ÐидалиÑи ÑаблиÑÑ`,"Delete row":`ÐидалиÑи ÑÑдок`,"Delete column":`ÐидалиÑи ÑÑовпÑик`,"Empty cell":`ÐÑиÑÑиÑи клÑинкÑ`,source:`HTML`,bold:`жиÑний`,italic:`кÑÑÑÑв`,brush:`заливка`,link:`поÑиланнÑ`,undo:`вÑдмÑниÑи`,redo:`повÑоÑиÑи`,table:`ÑаблиÑÑ`,image:`зобÑаженнÑ`,eraser:`видаленнÑ`,paragraph:`паÑагÑаÑ`,fontsize:`ÑозмÑÑ ÑÑиÑÑÑ`,video:`вÑдео`,font:`ÑÑиÑÑ`,about:`пÑо ÑедакÑоÑ`,print:`дÑÑк`,underline:`пÑдкÑеÑлений`,strikethrough:`закÑеÑлений`,indent:`вÑдÑÑÑп`,outdent:`заÑÑÑп`,fullsize:`на веÑÑ ÐµÐºÑан`,shrink:`звиÑайний ÑозмÑÑ`,hr:`лÑнÑÑ`,ul:`СпиÑок`,ol:`ÐÑмеÑований ÑпиÑок`,cut:`ÐиÑÑзаÑи`,selectall:`ÐидÑлиÑи вÑе`,"Embed code":`Ðод`,"Open link":`ÐÑдкÑиÑи поÑиланнÑ`,"Edit link":`РедагÑваÑи поÑиланнÑ`,"No follow":`ÐÑÑибÑÑ nofollow`,Unlink:`ÐидалиÑи поÑиланнÑ`,Eye:`ÐеÑеглÑд`,pencil:`РедагÑваннÑ`,Update:`ÐновиÑи`," URL":`URL`,Edit:`РедагÑваÑи`,"Horizontal align":`ÐоÑизонÑалÑне виÑÑвнÑваннÑ`,Filter:`ФÑлÑÑÑ`,"Sort by changed":`СоÑÑÑваÑи за змÑноÑ`,"Sort by name":`СоÑÑÑваÑи за Ñм'Ñм`,"Sort by size":`СоÑÑÑваÑи за ÑозмÑÑом`,"Add folder":`ÐодаÑи папкÑ`,Reset:`ÐÑдновиÑи`,Save:`ÐбеÑегÑи`,"Save as ...":`ÐбеÑегÑи Ñк`,Resize:`ÐмÑниÑи ÑозмÑÑ`,Crop:`ÐбÑÑзаÑи ÑозмÑÑ`,Width:`ШиÑина`,Height:`ÐиÑоÑа`,"Keep Aspect Ratio":`ÐбеÑегÑи пÑопоÑÑÑÑ`,Yes:`Так`,No:`ÐÑ`,Remove:`ÐидалиÑи`,Select:`ÐибÑаÑи`,"Chars: %d":`СимволÑв: %d`,"Words: %d":`СлÑв: %d`,All:`ÐибÑаÑи вÑе`,"Select %s":`ÐибÑаÑи: %s`,"Select all":`ÐибÑаÑи вÑе`,"Vertical align":`ÐеÑÑикалÑне виÑÑвнÑваннÑ`,Split:`РоздÑлиÑи`,"Split vertical":`РоздÑлиÑи по веÑÑикалÑ`,"Split horizontal":`РоздÑлиÑи по гоÑизонÑалÑ`,Merge:`Ðб'ÑднаÑи в однÑ`,"Add column":`ÐодаÑи ÑÑовпÑик`,"Add row":`ÐодаÑи ÑÑдок`,Delete:`ÐидалиÑи`,Border:`Рамка`,"License: %s":`ÐÑÑензÑÑ: %s`,"Strike through":`ÐакÑеÑлений`,Underline:`ÐÑдкÑеÑлений`,superscript:`веÑÑ
нÑй ÑндекÑ`,subscript:`ÑндекÑ`,"Cut selection":`ÐбÑÑзаÑи вибÑане`,Break:`Ðежа`,"Search for":`ШÑкаÑи`,"Replace with":`ÐамÑниÑи на`,Replace:`ÐамÑниÑи`,Paste:`ÐÑÑавиÑи`,"Choose Content to Paste":`ÐбÑаÑи конÑÐµÐ½Ñ Ð´Ð»Ñ Ð²ÑÑавки`,"You can only edit your own images. Download this image on the host?":`Ðи можеÑе ÑедагÑваÑи лиÑе влаÑÐ½Ñ Ð·Ð¾Ð±ÑаженнÑ. ÐаванÑажиÑи зобÑÐ°Ð¶ÐµÐ½Ð½Ñ Ð½Ð° Ð²Ð°Ñ ÑеÑвеÑ?`,"The image has been successfully uploaded to the host!":`ÐобÑÐ°Ð¶ÐµÐ½Ð½Ñ ÑÑпÑÑно заванÑажено на ÑеÑвеÑ!`,palette:`палÑÑÑа`,"There are no files":`Файли вÑдÑÑÑнÑ`,Rename:`ÐмÑниÑи назвÑ`,"Enter new name":`ÐведÑÑÑ Ð½Ð¾Ð²Ðµ ÑмÑ'`,preview:`ÐопеÑеднÑй пеÑеглÑд`,download:`ÐаванÑажиÑи`,"Paste from clipboard":`ÐÑÑавиÑи з бÑÑеÑа обмÑнÑ`,"Your browser doesn't support direct access to the clipboard.":`ÐÐ°Ñ Ð±ÑаÑÐ·ÐµÑ Ð½Ðµ пÑдÑÑимÑÑ Ð´Ð¾ÑÑÑп до бÑÑеÑа обмÑнÑ.`,"Copy selection":`ÐопÑÑваÑи видÑлене`,copy:`копÑÑ`,"Border radius":`РадÑÑÑ Ñамки`,"Show all":`ÐоказаÑи вÑе`,Apply:`ÐаÑÑоÑÑваÑи`,"Please fill out this field":`ÐÑÐ´Ñ Ð»Ð°Ñка, заповнÑÑÑ Ñе поле`,"Please enter a web address":`ÐÑÐ´Ñ Ð»Ð°Ñка, введÑÑÑ Ð²ÐµÐ±-адÑеÑÑ`,Default:`Ðа замовÑеннÑм`,Circle:`Ðоло`,Dot:`ÐÑапка`,Quadrate:`ÐвадÑаÑ`,Find:`ÐнайÑи`,"Find Previous":`ÐнайÑи попеÑеднÑ`,"Find Next":`ÐнайÑи наÑÑÑпнÑ`,"Insert className":`ÐÑÑавиÑи клаÑ`,"Press Alt for custom resizing":`ÐаÑиÑнÑÑÑ Alt Ð´Ð»Ñ Ð·Ð¼Ñни ÑозмÑÑÑ`},MF={"Type something":`è¾å
¥ä¸äºå
容`,Advanced:`é«çº§`,"About Jodit":`å
³äºJodit`,"Jodit Editor":`Jodit Editor`,"Free Non-commercial Version":`Free Non-commercial Version`,"Jodit User's Guide":`å¼åè
æå`,"contains detailed help for using":`使ç¨å¸®å©`,"For information about the license, please go to our website:":`æå
³è®¸å¯è¯çä¿¡æ¯ï¼è¯·è®¿é®æä»¬çç½ç«ï¼`,"Buy full version":`è´ä¹°å®æ´çæ¬`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. çæææ`,Anchor:`Anchor`,"Open in new tab":`卿°çªå£æå¼`,"Open in fullsize":`å
¨å±ç¼è¾`,"Clear Formatting":`æ¸
餿 ·å¼`,"Fill color or set the text color":`é¢è²`,Redo:`éå`,Undo:`æ¤é`,Bold:`ç²ä½`,Italic:`æä½`,"Insert Unordered List":`符å·å表`,"Insert Ordered List":`ç¼å·`,"Align Center":`å±
ä¸`,"Align Justify":`坹齿æ¬`,"Align Left":`左对é½`,"Align Right":`å³å¯¹é½`,"Insert Horizontal Line":`åå²çº¿`,"Insert Image":`å¾ç`,"Insert file":`æä»¶`,"Insert youtube/vimeo video":`è§é¢`,"Insert link":`龿¥`,"Font size":`åå·`,"Font family":`åä½`,"Insert format block":`æ ¼å¼å`,Normal:`é»è®¤`,"Heading 1":`æ é¢1`,"Heading 2":`æ é¢2`,"Heading 3":`æ é¢3`,"Heading 4":`æ é¢4`,Quote:`å¼ç¨`,Code:`代ç `,Insert:`æå
¥`,"Insert table":`è¡¨æ ¼`,"Decrease Indent":`åå°ç¼©è¿`,"Increase Indent":`å¢å 缩è¿`,"Select Special Character":`éæ©ç¹æ®ç¬¦å·`,"Insert Special Character":`ç¹æ®ç¬¦å·`,"Paint format":`æ ¼å¼å¤å¶`,"Change mode":`æ¹å模å¼`,Margins:`å¤è¾¹è·ï¼Marginsï¼`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,Styles:`æ ·å¼`,Classes:`Classes`,Align:`坹齿¹å¼`,Right:`å±
å³`,Center:`å±
ä¸`,Left:`å±
å·¦`,"--Not Set--":`æ `,Src:`Src`,Title:`Title`,Alternative:`Alternative`,Link:`Link`,"Open link in new tab":`卿°çªå£æå¼é¾æ¥`,Image:`å¾ç`,file:`file`,"Image properties":`å¾ç屿§`,Cancel:`åæ¶`,Ok:`ç¡®å®`,"Your code is similar to HTML. Keep as HTML?":`ä½ ç²è´´çææ¬æ¯ä¸æ®µhtml代ç ï¼æ¯å¦ä¿çæºæ ¼å¼`,"Paste as HTML":`htmlç²è´´`,Keep:`ä¿çæºæ ¼å¼`,Clean:`å¹é
ç®æ æ ¼å¼`,"Insert as Text":`æhtml代ç è§ä¸ºæ®éææ¬`,"Word Paste Detected":`ææ¬ç²è´´`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`æ£å¨ç²è´´ Word/Excel çææ¬ï¼æ¯å¦ä¿çæºæ ¼å¼ï¼`,"Insert only Text":`åªä¿çææ¬`,"File Browser":`æä»¶ç®¡ç`,"Error on load list":`å è½½listé误`,"Error on load folders":`å è½½foldersé误`,"Are you sure?":`ä½ ç¡®å®åï¼`,"Enter Directory name":`
185è¾å
¥è·¯å¾`,"Create directory":`å建路å¾`,"type name":`type name`,"type dir name":`type name`,"Drop image":`æå¨å¾çå°æ¤`,"Drop file":`æå¨æä»¶å°æ¤`,"or click":`æç¹å»`,"Alternative text":`Alternative text`,Browse:`æµè§`,Upload:`ä¸ä¼ `,Background:`èæ¯è²`,Text:`æå`,Top:`é¡¶é¨`,Middle:`ä¸é´`,Bottom:`åºé¨`,"Insert column before":`å¨ä¹åæå
¥å`,"Insert column after":`å¨ä¹åæå
¥å`,"Insert row above":`å¨ä¹åæå
¥è¡`,"Insert row below":`å¨ä¹åæå
¥è¡`,"Delete table":`å é¤è¡¨æ ¼`,"Delete row":`å é¤è¡`,"Delete column":`å é¤å`,"Empty cell":`æ¸
é¤å
容`,"Chars: %d":`å符æ°: %d`,"Words: %d":`åè¯æ°: %d`,"Strike through":`å é¤çº¿`,Underline:`ä¸å线`,superscript:`䏿 `,subscript:`䏿 `,"Cut selection":`åªå`,"Select all":`å
¨é`,Break:`Break`,"Search for":`æ¥æ¾`,"Replace with":`æ¿æ¢ä¸º`,Replace:`æ¿æ¢`,Edit:`ç¼è¾`,Paste:`ç²è´´`,"Choose Content to Paste":`éæ©å
容并ç²è´´`,All:`å
¨é¨`,source:`æºç `,bold:`ç²ä½`,italic:`æä½`,brush:`é¢è²`,link:`龿¥`,undo:`æ¤é`,redo:`éå`,table:`è¡¨æ ¼`,image:`å¾ç`,eraser:`æ©¡ç®æ¦`,paragraph:`段è½`,fontsize:`åå·`,video:`è§é¢`,font:`åä½`,about:`å
³äº`,print:`æå°`,underline:`ä¸å线`,strikethrough:`ä¸åºç°`,indent:`å¢å 缩è¿`,outdent:`åå°ç¼©è¿`,fullsize:`å
¨å±`,shrink:`æ¶ç¼©`,hr:`åå²çº¿`,ul:`æ åºå表`,ol:`顺åºå表`,cut:`åªå`,selectall:`å
¨é`,"Open link":`æå¼é¾æ¥`,"Edit link":`ç¼è¾é¾æ¥`,"No follow":`No follow`,Unlink:`忶龿¥`,Eye:`é¢è§`," URL":`URL`,Reset:`éç½®`,Save:`ä¿å`,"Save as ...":`ä¿å为`,Resize:`è°æ´å¤§å°`,Crop:`åªå`,Width:`宽`,Height:`é«`,"Keep Aspect Ratio":`ä¿æé¿å®½æ¯`,Yes:`æ¯`,No:`ä¸`,Remove:`ç§»é¤`,Select:`éæ©`,"Select %s":`éæ©: %s`,Update:`æ´æ°`,"Vertical align":`åç´å¯¹é½`,Merge:`åå¹¶`,"Add column":`æ·»å å`,"Add row":`æ·»å è¡`,Border:`è¾¹æ¡`,"Embed code":`åµå
¥ä»£ç `,Delete:`å é¤`,"Horizontal align":`水平对é½`,Filter:`çé`,"Sort by changed":`ä¿®æ¹æ¶é´æåº`,"Sort by name":`åç§°æåº`,"Sort by size":`大尿åº`,"Add folder":`æ°å»ºæä»¶å¤¹`,Split:`æå`,"Split vertical":`åç´æå`,"Split horizontal":`æ°´å¹³æå`,"You can only edit your own images. Download this image on the host?":`ä½ åªè½ç¼è¾ä½ èªå·±çå¾çãDownload this image on the host?`,"The image has been successfully uploaded to the host!":`å¾çä¸ä¼ æå`,palette:`è°è²æ¿`,pencil:`é
ç¬`,"There are no files":`æ¤ç®å½ä¸æ²ææä»¶ã`,Rename:`éå½å`,"Enter new name":`è¾å
¥æ°åç§°`,preview:`é¢è§`,download:`ä¸è½½`,"Paste from clipboard":`ç²è´´ä»åªè´´æ¿`,"Your browser doesn't support direct access to the clipboard.":`ä½ æµè§å¨ä¸æ¯æç´æ¥è®¿é®çåªè´´æ¿ã`,"Copy selection":`å¤å¶éä¸å
容`,copy:`å¤å¶`,"Border radius":`è¾¹çåå¾`,"Show all":`æ¾ç¤ºææ`,Apply:`åºç¨`,"Please fill out this field":`请填åè¿ä¸ªå段`,"Please enter a web address":`请è¾å
¥ä¸ä¸ªç½å`,Default:`é»è®¤`,Circle:`åå`,Dot:`ç¹`,Quadrate:`æ¹å½¢`,Find:`æç´¢`,"Find Previous":`æ¥æ¾ä¸ä¸ä¸ª`,"Find Next":`æ¥æ¾ä¸ä¸ä¸ª`,"Insert className":`æå
¥ç级åç§°`,"Press Alt for custom resizing":`æAltèªå®ä¹è°æ´å¤§å°`,"License: %s":`许å¯è¯: %s`},NF={"Type something":`輸å
¥ä¸äºå
§å®¹`,Advanced:`é²é`,"About Jodit":`éæ¼Jodit`,"Jodit Editor":`Jodit Editor`,"Jodit User's Guide":`éç¼è
æå`,"contains detailed help for using":`使ç¨å¹«å©`,"For information about the license, please go to our website:":`ç¸éææ¬æ¢æ¬¾è³è¨ï¼è«é 訪æåçç¶²ç«ï¼`,"Buy full version":`è³¼è²·å®æ´çæ¬`,"Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":`Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.`,Anchor:`é¨é»`,"Open in new tab":`卿°åé éå`,"Open in fullsize":`å
¨è¢å¹ç·¨è¼¯`,"Clear Formatting":`æ¸
餿¨£å¼`,"Fill color or set the text color":`é¡è²`,Redo:`忶復å`,Undo:`復å`,Bold:`ç²é«`,Italic:`æé«`,"Insert Unordered List":`é
ç®ç¬¦èæ¸
å®`,"Insert Ordered List":`ç·¨èæ¸
å®`,"Align Center":`ç½®ä¸`,"Align Justify":`æåå°é½`,"Align Left":`é å·¦`,"Align Right":`é å³`,"Insert Horizontal Line":`åå²ç·`,"Insert Image":`åç`,"Insert file":`æªæ¡`,"Insert youtube/vimeo video":`æå
¥ youtube/vimeo å½±ç`,"Insert link":`æå
¥é£çµ`,"Font size":`æå大å°`,"Font family":`åå`,"Insert format block":`æ ¼å¼ååå¡`,Normal:`å
§æ`,"Heading 1":`æ¨é¡1`,"Heading 2":`æ¨é¡2`,"Heading 3":`æ¨é¡3`,"Heading 4":`æ¨é¡4`,Quote:`弿`,Code:`ç¨å¼ç¢¼`,Insert:`æå
¥`,"Insert table":`è¡¨æ ¼`,"Decrease Indent":`æ¸å°ç¸®æ`,"Increase Indent":`å¢å 縮æ`,"Select Special Character":`é¸æç¹æ®ç¬¦è`,"Insert Special Character":`ç¹æ®ç¬¦è`,"Paint format":`æ ¼å¼è¤è£½`,"Change mode":`檢è¦åå§ç¢¼`,Margins:`éè·`,top:`ä¸`,right:`å³`,bottom:`ä¸`,left:`å·¦`,Styles:`樣å¼`,Classes:`Classes`,Align:`å°é½æ¹å¼`,Right:`é å³`,Center:`ç½®ä¸`,Left:`é å·¦`,"--Not Set--":`ç¡`,Src:`Src`,Title:`Title`,Alternative:`æ¿ä»£`,Link:`Link`,"Open link in new tab":`卿°åé éåé£çµ`,Image:`åç`,file:`æªæ¡`,"Image properties":`åç屬æ§`,Cancel:`åæ¶`,Ok:`確å®`,"Your code is similar to HTML. Keep as HTML?":`æ¨çç¨å¼ç¢¼è HTML é¡ä¼¼ï¼æ¯å¦è²¼ä¸ HTML æ ¼å¼ï¼`,"Paste as HTML":`è²¼ä¸ HTML`,Keep:`ä¿çåå§æ ¼å¼`,Clean:`æ¸
餿 ¼å¼`,"Insert as Text":`ä»¥ç´æåè²¼ä¸`,"Word Paste Detected":`è²¼ä¸ Word æ ¼å¼`,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?":`æ£å¨è²¼ä¸ Word/Excel æä»¶çå
§å®¹ï¼æ¯å¦ä¿çåå§æ ¼å¼ï¼`,"Insert only Text":`å
è²¼ä¸å
§æ`,"File Browser":`æªæ¡ç覽`,"Error on load list":`æ¸
å®è¼å
¥é¯èª¤`,"Error on load folders":`è³æå¤¾è¼å
¥é¯èª¤`,"Are you sure?":`æ¨ç¢ºå®åï¼`,"Enter Directory name":`
185輸å
¥è·¯å¾`,"Create directory":`åµå»ºè·¯å¾`,"type name":`type name`,"type dir name":`type name`,"Drop image":`ææ³åçè³æ¤`,"Drop file":`ææ³æªæ¡è³æ¤`,"or click":`æé»æ`,"Alternative text":`æ¿ä»£æå`,Browse:`ç覽`,Upload:`ä¸å³`,Background:`èæ¯è²`,Text:`æå`,Top:`é é¨`,Middle:`ä¸é`,Bottom:`åºé¨`,"Insert column before":`æå
¥å·¦æ¹æ¬`,"Insert column after":`æå
¥å³æ¹æ¬`,"Insert row above":`æå
¥ä¸æ¹å`,"Insert row below":`æå
¥ä¸æ¹å`,"Delete table":`åªé¤è¡¨æ ¼`,"Delete row":`åªé¤æ´å`,"Delete column":`åªé¤æ´æ¬`,"Empty cell":`æ¸
é¤å
§å®¹`,"Chars: %d":`åå
æ¸: %d`,"Words: %d":`å®åæ¸: %d`,"Strike through":`åªé¤ç·`,Underline:`åºç·`,superscript:`䏿¨`,subscript:`䏿¨`,"Cut selection":`åªä¸`,"Select all":`å
¨é¸`,Break:`æ·è¡`,"Search for":`å°æ¾`,"Replace with":`å代çº`,Replace:`å代`,Paste:`è²¼ä¸`,"Choose Content to Paste":`鏿å
§å®¹ä¸¦è²¼ä¸`,All:`å
¨é¨`,source:`åå§ç¢¼`,bold:`ç²é«`,italic:`æé«`,brush:`é¡è²`,link:`é£çµ`,undo:`復å`,redo:`忶復å`,table:`è¡¨æ ¼`,image:`åç`,eraser:`æ©¡ç®æ¦`,paragraph:`段è½`,fontsize:`æå大å°`,video:`å½±ç`,font:`åå`,about:`éæ¼`,print:`åå°`,underline:`åºç·`,strikethrough:`åªé¤ç·`,indent:`å¢å 縮æ`,outdent:`æ¸å°ç¸®æ`,fullsize:`å
¨è¢å¹`,shrink:`縮æ¸`,hr:`åéç·`,ul:`é
ç®ç¬¦èæ¸
å®`,ol:`ç·¨èæ¸
å®`,cut:`åªä¸`,selectall:`å
¨é¸`,"Open link":`æéé£çµ`,"Edit link":`編輯é£çµ`,"No follow":`No follow`,Unlink:`åæ¶é£çµ`,Eye:`æ¥ç`," URL":`URL`,Reset:`éè¨`,Save:`å²å`,"Save as ...":`å¦åçº...`,Resize:`調æ´å¤§å°`,Crop:`è£å`,Width:`寬`,Height:`é«`,"Keep Aspect Ratio":`ç¶æé·å¯¬æ¯`,Yes:`æ¯`,No:`å¦`,Remove:`ç§»é¤`,Select:`鏿`,"Select %s":`鏿: %s`,Update:`æ´æ°`,"Vertical align":`åç´å°é½`,Merge:`åä½µ`,"Add column":`æ°å¢æ¬`,"Add row":`æ°å¢å`,Border:`éæ¡`,"Embed code":`åµå
¥ç¨å¼ç¢¼`,Delete:`åªé¤`,"Horizontal align":`æ°´å¹³å°é½`,Filter:`篩é¸`,"Sort by changed":`ä¿®æ¹æéæåº`,"Sort by name":`å稱æåº`,"Sort by size":`大尿åº`,"Add folder":`æ°å¢è³æå¤¾`,Split:`åå²`,"Split vertical":`åç´åå²`,"Split horizontal":`æ°´å¹³åå²`,"You can only edit your own images. Download this image on the host?":`æ¨åªè½ç·¨è¼¯æ¨èªå·±çåçãæ¯å¦ä¸è¼æ¤åç?`,"The image has been successfully uploaded to the host!":`åçä¸å³æå`,palette:`調è²ç¤`,pencil:`éç`,"There are no files":`æ²ææªæ¡`,Rename:`éæ°å½å`,"Enter new name":`輸å
¥æ°å稱`,preview:`é 覽`,download:`ä¸è¼`,"Paste from clipboard":`å¾åªè²¼ç°¿è²¼ä¸`,"Your browser doesn't support direct access to the clipboard.":`ç覽å¨ç¡æ³åååªè²¼ç°¿ã`,"Copy selection":`è¤è£½å·²é¸åé
ç®`,copy:`è¤è£½`,"Border radius":`éæ¡åè§`,"Show all":`顯示å
¨é¨`,Apply:`æç¨`,"Please fill out this field":`è«è¼¸å
¥æ¤æ¬ä½`,"Please enter a web address":`è«è¼¸å
¥ç¶²å`,Default:`é è¨`,Circle:`åå`,Dot:`é»`,Quadrate:`æ¹å½¢`,Find:`å°æ¾`,"Find Previous":`å°æ¾ä¸ä¸å`,"Find Next":`å°æ¾ä¸ä¸å`,"Insert className":`æå
¥ class å稱`,"Press Alt for custom resizing":`æä½ Alt 以調æ´èªè¨å¤§å°`,Edit:`編輯`,"License: %s":`許å¯è: %s`},PF={};PF={ar:sF,cs_cz:cF,de:lF,en:uF,es:dF,fa:fF,fi:pF,fr:mF,he:hF,hu:gF,id:_F,it:vF,ja:yF,ko:xF,mn:SF,nl:CF,no:wF,pl:TF,pt_br:EF,ru:DF,sk:OF,sv:kF,tr:AF,ua:jF,zh_cn:MF,zh_tw:NF};var FF=e=>e?e.default||e:{},IF={};
185XE(FF(bF))&&FF(bF).forEach((e,t)=>{IF[t]=e}),Object.keys(PF).forEach(e=>{let t=FF(PF[e]);XE(t)?(PF[e]={},t.forEach((t,n)=>{PF[e][IF[n]]=t})):PF[e]=t});var LF=PF,RF=`<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <path d="M1088 1256v240q0 16-12 28t-28 12h-240q-16 0-28-12t-12-28v-240q0-16 12-28t28-12h240q16 0 28 12t12 28zm316-600q0 54-15.5 101t-35 76.5-55 59.5-57.5 43.5-61 35.5q-41 23-68.5 65t-27.5 67q0 17-12 32.5t-28 15.5h-240q-15 0-25.5-18.5t-10.5-37.5v-45q0-83 65-156.5t143-108.5q59-27 84-56t25-76q0-42-46.5-74t-107.5-32q-65 0-108 29-35 25-107 115-13 16-31 16-12 0-25-8l-164-125q-13-10-15.5-25t5.5-28q160-266 464-266 80 0 161 31t146 83 106 127.5 41 158.5z"/> </svg> `;J.prototype.controls.about={exec:e=>{let t=e.dlg({closeOnClickOverlay:!0}),n=e.i18n.bind(e);t.setMod(`theme`,e.o.theme).setHeader(n(`About Jodit`)).setContent(`<div class="jodit-about"> 186 <div>${n(`Jodit Editor`)} v.${e.getVersion()}</div> 187 <div>${n(`License: %s`,$D(e.o.license)?eA(e.o.license):e.o.license||`MIT`)}</div> 188 <div> 189 <a href="${$T}" target="_blank">${$T}</a> 190 </div> 191 <div> 192 <a href="https://xdsoft.net/jodit/docs/" target="_blank">${n(`Jodit User's Guide`)}</a> 193 ${n(`contains detailed help for using`)} 194 </div> 195 <div>${n(`Copyright © XDSoft.net - Chupurnov Valerii. All rights reserved.`)}</div> 196 </div>`),W(t.dialog,{minHeight:200,minWidth:420}),t.open(!0,!0)},tooltip:`About Jodit`,mode:3};function zF(e){e.registerButton({name:`about`,group:`info`})}q.add(`about`,zF),RA.set(`about`,RF),J.prototype.delete={hotkeys:{delete:[`delete`,`cmd+backspace`],deleteWord:[`ctrl+delete`,`cmd+alt+backspace`,`ctrl+alt+backspace`],deleteSentence:[`ctrl+shift+delete`,`cmd+shift+delete`],backspace:[`backspace`],backspaceWord:[`ctrl+backspace`],backspaceSentence:[`ctrl+shift+backspace`,`cmd+shift+backspace`]}};function BF(e){return e.s.isCollapsed()?!1:(e.execCommand(`Delete`),!0)}function VF(e,t,n,r=!1){let i=e=>t?e.firstChild:e.lastChild,a=K.findNotEmptyNeighbor(e,!t,n);if(r&&K.isElement(a)&&!K.isInlineBlock(a))return null;if(a)do if(i(a))a=i(a);else return a;while(a);return null}function HF(e){return t=>e.e.fire(`backSpaceIsMovedIgnore`,t)!==!0}function UF(e,t,n){let r=t,i=r;for(;r&&!K.findNotEmptySibling(r,n)&&r.parentElement!==e.editor;)r=r.parentElement,i=r;if(K.isElement(i)&&K.isContentEditable(i,e.editor)){let r=K.findNotEmptySibling(i,n);if(K.isTag(r,`br`))return K.safeRemove(r),e.s.setCursorBefore(t),!0;if(r&&(GF(e,i,r,n)||KF(e,i,WF(r,n),n)))return e.s.setCursorBefore(t),!0}return!1}function WF(e,t){if(!K.isTag(e,`table`))return e;let n=e.querySelectorAll(`td,th`);return n.length?n[t?n.length-1:0]:null}function GF(e,t,n,r){let i=K.isTag(n,fE),a=K.isTag(t,fE),o=(e,t)=>t?e.firstElementChild:e.lastElementChild;return a?(n=e.createInside.element(e.o.enterBlock),K.before(t,n),KF(e,o(t,r),n,r)):n&&i&&!a?KF(e,t,o(n,!r),r):!1}function KF(e,t,n,r){if(t&&K.isElement(n)){K.moveContent(t,n,!r,HF(e));let i=t;for(;i&&i!==e.editor&&K.isEmpty(i);){let e=i.parentElement;K.safeRemove(i),i=e}return!0}return!1}function qF(e,t,n){let r=K.findSibling(t,n),i=K.findSibling(t,!n);if(!K.closest(t,K.isElement,e.editor)&&K.isList(r)&&K.isList(i)&&K.isTag(r.lastElementChild,`li`)&&K.isTag(i.firstElementChild,`li`)){let{setCursorBefore:a,setCursorAfter:o}=e.s,s=r.lastElementChild,c=i.firstElementChild;return MD(n?K.prepend:K.append,c,t),K.moveContent(i,r,!n,HF(e)),K.safeRemove(i),MD(n?K.append:K.prepend,s,t),MD(n?a:o,t),!0}return!1}function JF(e,t,n,r){let i=n?-1:1,a=K.sibling(t,!n),o=K.sibling(t,n),s=null,c=!1,l;for(o||=YF(t,n,e.editor);o&&(K.isText(o)||K.isInlineBlock(o));){for(;K.isInlineBlock(o);)o=n?o?.lastChild:o?.firstChild;if(!o)break;if(o.nodeValue?.length&&(l=QF(o,n,i,a),!o.nodeValue.length&&K.isInlineBlock(o.parentNode)&&(o.nodeValue=``)),o.nodeValue?.length||(s=o),!QE(l)&&l!==``){eI(n,o,t,r,l,e),c=!0;break}let u=YF(o,n,e.editor);s&&=(K.safeRemove(s),null),o=u}return s&&=(K.safeRemove(s),null),c&&(XF(t,`a`),ZF(e,t),e.s.setCursorBefore(t),K.isTag(t.previousSibling,`br`)&&!K.findNotEmptySibling(t,!1)&&K.after(t,e.createInside.element(`br`))),c}function YF(e,t,n){let r=K.sibling(e,t);return!r&&e.parentNode&&e.parentNode!==n&&(r=VF(e,!t,n,!0),r&&K.closest(e,`li`,n)!==K.closest(r,`li`,n))?null:r}function XF(e,t){let n=e.parentElement;for(;n&&K.isInlineBlock(n)&&K.isTag(n,t);){let t=n.parentElement;K.isEmpty(n)&&(K.after(n,e),K.safeRemove(n)),n=t}}function ZF(e,t){t.parentElement!==e.editor&&K.isBlock(t.parentElement)&&K.each(t.parentElement,K.isEmptyTextNode)&&K.after(t,e.createInside.element(`br`))}function QF(e,t,n,r){let i=nD(e.nodeValue),a=i.length,o=t?a-1:0;if(i[o]===``)for(;i[o]===``;)o+=n;let s=i[o];if(i[o+n]===``){for(o+=n;i[o]===``;)o+=n;o+=t?1:-1}return i=t&&o<0?[]:i.slice(t?0:o+1,t?o:a),$F(r,t,i),e.nodeValue=i.join(``),s}function $F(e,t,n){if(!e||!K.isText(e)||(t?/^ /:/ $/).test(e.nodeValue??``)||!sD(e.n
196odeValue||``).length)for(let e=t?n.length-1:0;(t?e>=0:e<n.length)&&n[e]===` `;e+=t?-1:1)n[e]=`\xA0`}function eI(e,t,n,r,i,a){MD(e?K.after:K.before,t,n),(r===`sentence`||r===`word`&&i!==` `&&i!==`\xA0`)&&JF(a,n,e,r)}function tI(e,t,n){let r=K.findSibling(t,n);return!r&&t.parentElement&&t.parentElement!==e.editor&&(r=K.findSibling(t.parentElement,n)),K.isElement(r)&&!K.isContentEditable(r,e.editor)?(MD(n?K.before:K.after,r,t),K.safeRemove(r),bP(e,t,n),MD(n?e.s.setCursorBefore:e.s.setCursorAfter,t),!0):!1}function nI(e,t,n){let r=K.closest(t,K.isElement,e.editor);if(!r)return!1;let i=K.findNotEmptySibling(r,n);return i&&K.isEmpty(i)?(K.safeRemove(i),e.s.setCursorBefore(t),!0):!1}function rI(e,t,n){let r=!1,{setCursorBefore:i,setCursorIn:a}=e.s,o=K.closest(t,K.isElement,e.editor);if(!o||!K.isEmpty(o))return!1;let s=K.findNotEmptyNeighbor(t,n,e.editor);do if(o&&K.isEmpty(o)&&!K.isCell(o)){K.after(o,t);let n=K.closest(o,e=>K.isElement(e)&&e!==o,e.editor);K.safeRemove(o),r=!0,o=n}else break;while(o);return r&&qF(e,t,n)?!0:(s&&!K.isText(s)&&!K.isTag(s,mE)?a(s,!n):i(t),r)}function iI(e,t,n){let r=K.findSibling(t,n);return K.isElement(r)&&(K.isTag(r,mE)||K.isEmpty(r))?(K.safeRemove(r),K.isTag(r,`br`)&&!K.findNotEmptySibling(t,!1)&&K.after(t,e.createInside.element(`br`)),e.s.setCursorBefore(t),K.isTag(r,`br`)&&rI(e,t,n),!0):!1}function aI(e,t){let n=t.parentElement;return!!K.isCell(n)}function oI(e,t,n){let r=K.closest(t,K.isElement,e.editor),{s:i}=e;if(K.isLeaf(r)&&r?.parentElement?.[n?`firstElementChild`:`lastElementChild`]===r&&i.cursorInTheEdge(n,r)){let a=r.parentElement,o=e.createInside.element(e.o.enterBlock);return MD(n?K.before:K.after,a,o),K.moveContent(r,o),K.safeRemove(r),K.isEmpty(a)&&K.safeRemove(a),MD(n?i.setCursorBefore:i.setCursorAfter,t),!0}return!1}var sI=[[`remove-unbreakable`,iI],[`remove-not-editable`,tI],[`remove-char`,JF],[`table-cell`,aI],[`remove-empty-parent`,rI],[`remove-empty-neighbor`,nI],[`join-two-lists`,qF],[`join-neighbors`,UF],[`unwrap-first-list-item`,oI]];sI.map(([,e])=>e);var cI=class extends nN{afterInit(e){e.registerCommand(`deleteButton`,{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand(`backspaceButton`,{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand(`deleteWordButton`,{exec:()=>this.onDelete(!1,`word`),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand(`backspaceWordButton`,{exec:()=>this.onDelete(!0,`word`),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand(`deleteSentenceButton`,{exec:()=>this.onDelete(!1,`sentence`),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand(`backspaceSentenceButton`,{exec:()=>this.onDelete(!0,`sentence`),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off(`afterCommand.delete`)}onDelete(e,t=`char`){let n=this.j,r=n.selection;if(r.isFocused()||r.focus(),BF(n))return n.e.fire(`backSpaceAfterDelete`,e),!1;let i=r.range,a=n.createInside.text(``);try{if(K.safeInsertNode(i,a),!K.isOrContains(n.editor,a))return;if(n.e.fire(`backSpaceBeforeCases`,e,a))return!1;bP(n,a,e);let r=n.o.delete.disableCases;if(sI.some(([i,o])=>{if(!(r&&r.has(i))&&V(o)&&o(n,a,e,t))return!0}))return!1}catch(e){throw e}finally{n.e.fire(`backSpaceAfterDelete`,e,a),this.safeRemoveEmptyNode(a)}return!1}safeRemoveEmptyNode(e){let{range:t}=this.j.s;t.startContainer===e&&(e.previousSibling?K.isText(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.nodeValue?.length??0):t.setStartAfter(e.previousSibling):e.nextSibling&&(K.isText(e.nextSibling)?t.setStart(e.nextSibling,0):t.setStartBefore(e.nextSibling)),t.collapse(!0),this.j.s.selectRange(t)),K.safeRemove(e)}};cI.requires=[`hotkeys`],q.add(`backspace`,cI);var lI=class extends nN{afterInit(e){e.e.on(`afterCommand.delete`,e=>{e===`delete`&&this.__afterDeleteCommand()}),e.registerCommand(`delete`,{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off(`afterCommand.delete`)}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&K.isTag(t.firstChild,`br`)&&e.s.removeNode(t.firstChild),!aD(e.editor.textContent||``)&&!e.editor.querySelector(`img,table,jodit,iframe,hr`)&&(!t||!K.closest(t,`table`,e.editor))){e.editor.innerHTML=``;let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(){let{jodit:e}=this;if(e.s.isCollapsed())return;e.s.expandSelection();let t=e.s.range;t.deleteContents();let n=e.createInside.fake();
196t.insertNode(n);let r=K.findSibling(n,!0),i=K.findSibling(n,!1);return this.__moveContentInLeftSibling(n,r,i),t.setStartBefore(n),t.collapse(!0),this.__moveCursorInEditableSibling(e,r,n,t),this.__addBrInEmptyBlock(n,i,t),K.safeRemove(n),e.s.selectRange(t),!1}__moveContentInLeftSibling(e,t,n){t=this.__defineRightLeftBox(t),!K.isList(n)&&!K.isTag(n,`table`)&&K.isBlock(n)&&K.isBlock(t)&&(K.append(t,e),K.moveContent(n,t),K.safeRemove(n)),K.isList(n)&&K.isLeaf(n.firstElementChild)&&K.isEmpty(n.firstElementChild)&&K.safeRemove(n.firstElementChild)}__defineRightLeftBox(e){if(!K.isList(e))return e;let t=e.lastElementChild;return K.isLeaf(t)||(t=this.j.createInside.element(`li`),K.append(e,t)),t}__addBrInEmptyBlock(e,t,n){let r=this.j;if(e.isConnected&&K.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let t=r.createInside.element(`br`);K.after(e,t),n.setStartBefore(t),n.collapse(!0)}if(K.isTag(t,`table`)){let e=$O(`td,th`,t).shift();K.isCell(e)&&K.isEmpty(e)&&K.append(e,r.createInside.element(`br`))}}__moveCursorInEditableSibling(e,t,n,r){if(!t||!K.isText(t)){let t=K.closest(n,K.isBlock,e.editor)??e.editor,i=K.prev(n,K.isText,t);i&&(r.setStartAfter(i),r.collapse(!0),K.safeRemove(n))}}};lI.requires=[`backspace`],q.add(`deleteCommand`,lI),J.prototype.controls.subscript={tags:[`sub`],tooltip:`subscript`},J.prototype.controls.superscript={tags:[`sup`],tooltip:`superscript`},J.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:[`strong`,`b`],css:{"font-weight":[`bold`,`700`]},tooltip:`Bold`},J.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:[`em`,`i`],css:{"font-style":`italic`},tooltip:`Italic`},J.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:[`u`],css:{"text-decoration-line":`underline`},tooltip:`Underline`},J.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:[`s`],css:{"text-decoration-line":`line-through`},tooltip:`Strike through`};var uI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82-108-43.5-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34v-65.5q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68.5.5t67.5.5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72-64.5 57.5-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5-163.5 48.5-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"/> </svg> `,dI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M384 1662l17-85q6-2 81.5-21.5t111.5-37.5q28-35 41-101 1-7 62-289t114-543.5 52-296.5v-25q-24-13-54.5-18.5t-69.5-8-58-5.5l19-103q33 2 120 6.5t149.5 7 120.5 2.5q48 0 98.5-2.5t121-7 98.5-6.5q-5 39-19 89-30 10-101.5 28.5t-108.5 33.5q-8 19-14 42.5t-9 40-7.5 45.5-6.5 42q-27 148-87.5 419.5t-77.5 355.5q-2 9-13 58t-20 90-16 83.5-6 57.5l1 18q17 4 185 31-3 44-16 99-11 0-32.5 1.5t-32.5 1.5q-29 0-87-10t-86-10q-138-2-206-2-51 0-143 9t-121 11z"/> </svg> `,fI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9h-1728q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zm-1277-64q-28-35-51-80-48-97-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52h-743zm507 256h411q7 39 7 92 0 111-41 212-23 55-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"/> </svg> `,pI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm639 217v206h-514l-4-27q-3-45-3-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 80-65 188-65 110 0 178 59.5t68 158.5q0 66-34.5 118.5t-84 86-99.5 62.5-87 63-41 73h232v-80h126z"/> </svg> `,mI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm637-679v206h-
196514l-3-27q-4-28-4-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 83-65 188-65 110 0 178 59.5t68 158.5q0 56-24.5 103t-62 76.5-81.5 58.5-82 50.5-65.5 51.5-30.5 63h232v-80h126z"/> </svg> `,hI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M176 223q-37-2-45-4l-3-88q13-1 40-1 60 0 112 4 132 7 166 7 86 0 168-3 116-4 146-5 56 0 86-2l-1 14 2 64v9q-60 9-124 9-60 0-79 25-13 14-13 132 0 13 .5 32.5t.5 25.5l1 229 14 280q6 124 51 202 35 59 96 92 88 47 177 47 104 0 191-28 56-18 99-51 48-36 65-64 36-56 53-114 21-73 21-229 0-79-3.5-128t-11-122.5-13.5-159.5l-4-59q-5-67-24-88-34-35-77-34l-100 2-14-3 2-86h84l205 10q76 3 196-10l18 2q6 38 6 51 0 7-4 31-45 12-84 13-73 11-79 17-15 15-15 41 0 7 1.5 27t1.5 31q8 19 22 396 6 195-15 304-15 76-41 122-38 65-112 123-75 57-182 89-109 33-255 33-167 0-284-46-119-47-179-122-61-76-83-195-16-80-16-237v-333q0-188-17-213-25-36-147-39zm1488 1409v-64q0-14-9-23t-23-9h-1472q-14 0-23 9t-9 23v64q0 14 9 23t23 9h1472q14 0 23-9t9-23z"/> </svg> `;function gI(e){let t=t=>{let n=J.defaultOptions.controls[t],r={...n.css},i;return Object.keys(r).forEach(e=>{i||={},i[e]=XE(r[e])?r[e][0]:r[e]}),e.s.commitStyle({element:n.tags?n.tags[0]:void 0}),e.synchronizeValues(),!1};[`bold`,`italic`,`underline`,`strikethrough`].forEach(t=>{e.registerButton({name:t,group:`font-style`})}),[`superscript`,`subscript`].forEach(t=>{e.registerButton({name:t,group:`script`})}),e.registerCommand(`bold`,{exec:t,hotkeys:[`ctrl+b`,`cmd+b`]}).registerCommand(`italic`,{exec:t,hotkeys:[`ctrl+i`,`cmd+i`]}).registerCommand(`underline`,{exec:t,hotkeys:[`ctrl+u`,`cmd+u`]}).registerCommand(`strikethrough`,{exec:t}).registerCommand(`subscript`,{exec:t}).registerCommand(`superscript`,{exec:t})}q.add(`bold`,gI),RA.set(`bold`,uI).set(`italic`,dI).set(`strikethrough`,fI).set(`subscript`,pI).set(`superscript`,mI).set(`underline`,hI),RA.set(`palette`,`<svg xmlns='http://www.w3.org/2000/svg' x="0px" y="0px" viewBox="0 0 459 459"> <g> <path d="M229.5,0C102,0,0,102,0,229.5S102,459,229.5,459c20.4,0,38.25-17.85,38.25-38.25c0-10.2-2.55-17.85-10.2-25.5 c-5.1-7.65-10.2-15.3-10.2-25.5c0-20.4,17.851-38.25,38.25-38.25h45.9c71.4,0,127.5-56.1,127.5-127.5C459,91.8,357,0,229.5,0z M89.25,229.5c-20.4,0-38.25-17.85-38.25-38.25S68.85,153,89.25,153s38.25,17.85,38.25,38.25S109.65,229.5,89.25,229.5z M165.75,127.5c-20.4,0-38.25-17.85-38.25-38.25S145.35,51,165.75,51S204,68.85,204,89.25S186.15,127.5,165.75,127.5z M293.25,127.5c-20.4,0-38.25-17.85-38.25-38.25S272.85,51,293.25,51s38.25,17.85,38.25,38.25S313.65,127.5,293.25,127.5z M369.75,229.5c-20.4,0-38.25-17.85-38.25-38.25S349.35,153,369.75,153S408,170.85,408,191.25S390.15,229.5,369.75,229.5z" /> </g> </svg> `);var _I=(e,t,n)=>{let r=`jodit-color-picker`,i=Qk(n),a=e.c.div(r),o=e.o.textIcons?`<span>${e.i18n(`palette`)}</span>`:RA.get(`palette`),s=e=>{let t=[];return dD(e)?Object.keys(e).forEach(n=>{t.push(`<div class="${r}__group ${r}__group-${n}">`),t.push(s(e[n])),t.push(`</div>`)}):XE(e)&&e.forEach(e=>{t.push(`<span class='${r}__color-item ${i===e?`jodit-color-picker__color-item_active_true`:``}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join(``)};a.appendChild(e.c.fromHTML(`<div class="${r}__groups">${s(e.o.colors)}</div>`)),a.appendChild(e.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));let{extra:c}=tk(a);c.appendChild(e.c.fromHTML(`<div class="${r}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${i||``}"/></div>`));let{hexInput:l}=tk(a),u=()=>{let e=l.value.trim(),n=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),r=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!n&&!r)return;let i=Qk(n&&!e.startsWith(`#`)?`#`+e:e);i&&V(t)&&t(i)};return e.e.on(l,`keydown`,e=>{e.stopPropagation(),e.key===`Enter`&&(e.preventDefault(),u())}).on(l,`change`,e=>{e.stopPropagation(),u()}),e.o.showBrowserColorPicker&&HD()&&(c.appendChild(e.c.fromHTML(`<div class="${r}__native">${o}<input type="color" value="#ffffff"/></div>`)),e.e.on(a,`change`,e=>{e.stopPropagation();let n=e.target;if(!n||!n.tagName||!K.isTag(n,`input`)||n.type!==`color`)return;let r=n.value||``;V(t)&&t(r),e.preventDefault()})),e.e.on(a,`mousedown touchend`,n=>{if(K.isTag(n.target,`input`)){n.stopPropagation();return}n.stopPropagation(),n.preventDefault();let r=n.target;if((!r||!r.tagName||K.isTag(r,`svg`)||K.isTag(r,`path`))&&r.parentNode&&(r=K.closest(r.parentNode,`span`,e.editor)),!K.isTag(r,`span`)||!r.classList.contains(`jodit-color-picker__color-item`))return;let i=G(r,`-color`)||``;t&&V(t)&&t(i)}),e.e.fire(`afterGenerateColorPicker`,a,c,t,i),a},vI=(e,t,n)=>{let r=e.c.div(`jodit-tabs`),i=e.c.div(`jodit-tabs__wrapper`),a=e.c.div(`jodit-tabs__buttons`);G(a,{role:`tablist`,"aria-orientation":`horizontal`});let o={},s=[],c=``;r.appendChild(a),r.appendChild(i);let l=e=>
196{o[e]&&(s.forEach(e=>{e.state.activated=!1}),Object.values(o).forEach(({tab:e})=>e.classList.remove(`jodit-tab_active`)),o[e].button.state.activated=!0,o[e].tab.classList.add(`jodit-tab_active`))};if(t.forEach(({icon:r,name:u,content:d})=>{let f=e.c.div(`jodit-tab`);G(f,{role:`tabpanel`});let p=GA(e,r||u,u);p.state.role=`tab`,e.e.on(p.container,`pointerdown`,e=>e.preventDefault()),c||=u,a.appendChild(p.container),s.push(p),p.container.classList.add(`jodit-tabs__button`,`jodit-tabs__button_columns_`+t.length),V(d)?f.classList.add(`jodit-tab_empty`):f.appendChild(yA.isInstanceOf(d,VA)?d.container:d),i.appendChild(f),p.onAction(()=>(l(u),V(d)&&!K.isElement(d)&&d.call(e),n&&(n.activeTab=u),!1)),o[u]={button:p,tab:f}}),l(!n||!n.activeTab||!o[n.activeTab]?c:n.activeTab),n){let e=n.activeTab;Object.defineProperty(n,"activeTab",{configurable:!0,enumerable:!1,get(){return e},set(t){e=t,l(t)}})}return r},yI=(e,t,n,r,i=!0)=>{let a,o=[],s=e.o.uploader;if(t.upload&&s.showTabInFileSelector!==!1&&(s.url||s.insertImageAsBase64URI||s.customUploadFunction)){let n=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i?`Drop image`:`Drop file`)}</strong><span><br>${e.i18n(`or click`)}</span><input type="file" accept="${i?`image/*`:`*`}" tabindex="-1" dir="auto" multiple=""/></div>`);e.uploader.bind(n,n=>{let r=V(t.upload)?t.upload:s.defaultHandlerSuccess;V(r)&&r.call(e,n),e.e.fire(`closeAllPopups`)},t=>{e.message.error(t.message),e.e.fire(`closeAllPopups`)}),o.push({icon:`upload`,name:`Upload`,content:n})}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&o.push({icon:`folder`,name:`Browse`,content:()=>{r&&r(),t.filebrowser&&e.filebrowser.open(t.filebrowser,i)}}),t.url){let r=new WA(e,{type:`submit`,variant:`primary`,text:`Insert`}),i=new hj(e,[new uj(e,{required:!0,label:`URL`,name:`url`,type:`text`,placeholder:`https://`}),new uj(e,{name:`text`,label:`Alternative text`}),new rj(e,[r])]);a=null,n&&!K.isText(n)&&!K.isComment(n)&&(K.isTag(n,`img`)||$O(`img`,n).length)&&(a=n.tagName===`IMG`?n:$O(`img`,n)[0],bI(i.container,`input[name=url]`,G(a,`src`)),bI(i.container,`input[name=text]`,G(a,`alt`)),r.state.text=`Update`),n&&K.isTag(n,`a`)&&(bI(i.container,`input[name=url]`,G(n,`href`)),bI(i.container,`input[name=text]`,G(n,`title`)),r.state.text=`Update`),i.onSubmit(n=>{V(t.url)&&t.url.call(e,n.url,n.text)}),o.push({icon:`link`,name:`URL`,content:i.container})}let c=vI(e,o);return c.classList.add(`jodit-file-selector`),c};function bI(e,t,n){let r=e.querySelector(t);return r?(n&&(r.value=n),r.value):``}RA.set(`brush`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M896 1152q0-36-20-69-1-1-15.5-22.5t-25.5-38-25-44-21-50.5q-4-16-21-16t-21 16q-7 23-21 50.5t-25 44-25.5 38-15.5 22.5q-20 33-20 69 0 53 37.5 90.5t90.5 37.5 90.5-37.5 37.5-90.5zm512-128q0 212-150 362t-362 150-362-150-150-362q0-145 81-275 6-9 62.5-90.5t101-151 99.5-178 83-201.5q9-30 34-47t51-17 51.5 17 33.5 47q28 93 83 201.5t99.5 178 101 151 62.5 90.5q81 127 81 275z"/> </svg> `),J.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes(`color`),icon:`brush`,popup:(e,t,n)=>{if(!QD(e))return;let r=e.getInstance(`Table`,e.o).getAllSelectedCells();if(!r.length)return!1;let i=t=>_I(e,i=>{r.forEach(e=>{W(e,t,i)}),e.lock(),e.synchronizeValues(),n(),e.unlock()},W(r[0],t));return vI(e,[{name:`Background`,content:i(`background-color`)},{name:`Text`,content:i(`color`)},{name:`Border`,content:i(`border-color`)}])},tooltip:`Background`},J.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes(`color`),update(e,t){let n=wD(t,`color`),r=(n,r)=>r&&r!==W(e.editor,n).toString()?(t.state.icon.fill=r,!0):!1;if(n){let e=wD(t,`color`);r(e===`color`?e:`background-color`,n);return}let i=e.s.current();if(i&&!t.state.disabled){let t=K.closest(i,K.isElement,e.editor)||e.editor,n=r(`color`,W(t,`color`).toString()),a=r(`background-color`,W(t,`background-color`).toString());if(n||a)return}t.state.icon.fill=``,t.state.activated=!1},popup:(e,t,n,r)=>{let i=``,a=``,o=[],s=null;t&&t!==e.editor&&K.isNode(t)&&(K.isElement(t)&&e.s.isCollapsed()&&!K.isTag(t,new Set([`br`,`hr`]))&&(s=t),K.up(t,e=>{if(K.isHTMLElement(e)){let t=W(e,`color`,!0),n=W(e,`background-color`,!0);if(t)return i=t.toString(),!0;if(n)return a=n.toString(),!0}},e.editor));let c=_I(e,t=>
196{s?s.style.backgroundColor=t:e.execCommand(`background`,!1,t),wD(r,`color`,t),wD(r,`color-mode`,`background`),n()},a),l=_I(e,t=>{s?s.style.color=t:e.execCommand(`forecolor`,!1,t),wD(r,`color`,t),wD(r,`color-mode`,`color`),n()},i);return o=[{name:`Background`,content:c},{name:`Text`,content:l}],e.o.colorPickerDefaultTab!==`background`&&(o=o.reverse()),vI(e,o,s)},exec(e,t,{button:n}){let r=wD(n,`color-mode`),i=wD(n,`color`);if(!r)return!1;if(t&&t!==e.editor&&K.isNode(t)&&K.isElement(t))switch(r){case`color`:t.style.color=i;break;case`background`:t.style.backgroundColor=i;break}else e.execCommand(r===`background`?r:`forecolor`,!1,i)},tooltip:`Fill color or set the text color`};function xI(e){e.registerButton({name:`brush`,group:`color`});let t=(t,n,r)=>{var i;let a=Qk(r)||``,o=t===`background`?{backgroundColor:a}:{color:a},s=e.getInstance(`Table`,e.o).getAllSelectedCells();return s.length&&e.s.isCollapsed()?(s.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:o}})}),(i=e.s.sel)==null||i.removeAllRanges()):e.s.commitStyle({attributes:{style:o}}),e.synchronizeValues(),!1};e.registerCommand(`forecolor`,t).registerCommand(`background`,t)}q.add(`color`,xI);function SI(e,t,n){let r=!!K.closest(e,[`pre`,`blockquote`],t.editor),i=!r&&K.closest(e,[`td`,`th`],t.editor);if(t.o.enter.toLowerCase()===`br`||i||n&&!r||!n&&r){if(r&&CI(e))return!1;let n=t.createInside.element(`br`);if(K.before(e,n),!K.findNotEmptySibling(n,!1)){let t=n.cloneNode();K.after(n,t),K.before(t,e)}return Fk(n,t.editor,t.ed),!0}return!1}function CI(e){let t=wI(wI(e));return t?(K.safeRemove(wI(e)),K.safeRemove(t),!0):!1}function wI(e){if(!e)return!1;let t=K.findSibling(e,!0);return!t||!K.isTag(t,`br`)?!1:t}function TI(e,t,n){return K.canSplitBlock(n)?!0:(K.before(e,t.createInside.element(`br`)),!1)}function EI(e,t,n=uE){let r=e,i=t.editor;do{if(!r||r===i)break;if(n.test(r.nodeName))return K.isLeaf(r)?r:EI(r.parentNode,t,/^li$/i)||r;r=r.parentNode}while(r&&r!==i);return null}function DI(e,t){return!!K.prev(e,e=>K.isBlock(e)||K.isImage(e),t.editor)}function OI(e,t,n,r){let i=n.toLowerCase()===`br`,{createInside:a}=t,o=a.element(n),s=a.element(`br`);return i||o.appendChild(s),r&&r.cssText&&G(o,`style`,r.cssText),K.after(e,o),K.before(i?o:s,e),Fk(o,t.editor,t.ed),o}function kI(e,t,n){let{s:r}=e,i=K.closest(t,n,e.editor);i&&(r.cursorOnTheRight(i,t)?K.after(i,t):r.cursorOnTheLeft(i,t)&&K.before(i,t))}function AI(e,t,n){let r=K.closest(n,[`ol`,`ul`],t.editor);if(!r)return;let i=r.parentElement,a=K.isLeaf(i),o=a?i:r,s=t.s.createRange();s.setStartAfter(n),s.setEndAfter(r);let c=s.extractContents();K.after(o,e),K.safeRemove(n),$O(`li`,r).length||K.safeRemove(r);let l=OI(e,t,a?`li`:t.o.enter);c.querySelector(`li`)&&(a?l.appendChild(c):K.after(l,c))}function jI(e,t,n){let r=t.s,{enter:i}=t.o,a=i.toLowerCase(),o=K.isLeaf(n),s=n.tagName.toLowerCase()===a||o,c=r.cursorOnTheRight(n,e),l=r.cursorOnTheLeft(n,e);if(!s&&(c||l)){c?K.after(n,e):K.before(n,e),OI(e,t,a),l&&!c&&K.prepend(n,e);return}let{scrollTop:u}=t.editor;r.splitSelection(n,e),t.editor.scrollTop!==u&&(t.editor.scrollTop=u),Fk(n,t.editor,t.ed)}function MI(e,t){let n=e;K.up(n,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(n=e)},t.editor);let r=K.wrapInline(n,t.o.enter,t);if(K.isEmpty(r)){let n=t.createInside.element(`br`);r.appendChild(n),K.before(n,e)}return r}var NI=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},PI=class extends nN{afterInit(e){let t=e.o.enter.toLowerCase(),n=t===`br`;e.o.enterBlock||(e.o.enterBlock=n?`p`:t),e.registerCommand(`enter`,(e,t,n={})=>this.onEnter(n))}onEnterKeyDown(e){if(e.key===`Enter`){let t=this.j,n=t.e.fire(`beforeEnter`,e);return n===void 0?(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand(`Delete`),t.s.focus(),this.onEnter(e),t.e.fire(`afterEnter`,e)}),t.synchronizeValues(),!1):n}}onEnter(e){let{jodit:t}=this,n=t.createInside.fake();try{K.safeInsertNode(t.s.range,n),kI(t,n,[`a`]);let r=EI(n,t),i=K.isLeaf(r);if((!i||e?.shiftKey)&&SI(n,t,e?.shiftKey))return!1;if(!r&&!DI(n,t)&&(r=MI(n,t)),!r)return OI(n,t,i?`li`:t.o.enter),!1;if(!TI(n,t,r))return!1;if(i&&this.__isEmptyListLeaf(r))return AI(n,t,r),!1;jI(n,t,r)}finally{n.isConnected&&t.s.setCursorBefore(n),K.safeRemove(n)}}__isEmptyListLeaf(e){let t=this.j.e.fire(`enterIsEmptyListLeaf`,e);return mD(t)?t:K.isEmpty(e)}beforeDestruct(e){e.e.off(`keydown.enter`)}};
196NI([Y(`:keydown.enter`)],PI.prototype,`onEnterKeyDown`,null),q.add(`enter`,PI);var FI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M789 559l-170 450q33 0 136.5 2t160.5 2q19 0 57-2-87-253-184-452zm-725 1105l2-79q23-7 56-12.5t57-10.5 49.5-14.5 44.5-29 31-50.5l237-616 280-724h128q8 14 11 21l205 480q33 78 106 257.5t114 274.5q15 34 58 144.5t72 168.5q20 45 35 57 19 15 88 29.5t84 20.5q6 38 6 57 0 4-.5 13t-.5 13q-63 0-190-8t-191-8q-76 0-215 7t-178 8q0-43 4-78l131-28q1 0 12.5-2.5t15.5-3.5 14.5-4.5 15-6.5 11-8 9-11 2.5-14q0-16-31-96.5t-72-177.5-42-100l-450-2q-26 58-76.5 195.5t-50.5 162.5q0 22 14 37.5t43.5 24.5 48.5 13.5 57 8.5 41 4q1 19 1 58 0 9-2 27-58 0-174.5-10t-174.5-10q-8 0-26.5 4t-21.5 4q-80 14-188 14z"/> </svg> `,II=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1744 1408q33 0 42 18.5t-11 44.5l-126 162q-20 26-49 26t-49-26l-126-162q-20-26-11-44.5t42-18.5h80v-1024h-80q-33 0-42-18.5t11-44.5l126-162q20-26 49-26t49 26l126 162q20 26 11 44.5t-42 18.5h-80v1024h80zm-1663-1279l54 27q12 5 211 5 44 0 132-2t132-2q36 0 107.5.5t107.5.5h293q6 0 21 .5t20.5 0 16-3 17.5-9 15-17.5l42-1q4 0 14 .5t14 .5q2 112 2 336 0 80-5 109-39 14-68 18-25-44-54-128-3-9-11-48t-14.5-73.5-7.5-35.5q-6-8-12-12.5t-15.5-6-13-2.5-18-.5-16.5.5q-17 0-66.5-.5t-74.5-.5-64 2-71 6q-9 81-8 136 0 94 2 388t2 455q0 16-2.5 71.5t0 91.5 12.5 69q40 21 124 42.5t120 37.5q5 40 5 50 0 14-3 29l-34 1q-76 2-218-8t-207-10q-50 0-151 9t-152 9q-3-51-3-52v-9q17-27 61.5-43t98.5-29 78-27q19-42 19-383 0-101-3-303t-3-303v-117q0-2 .5-15.5t.5-25-1-25.5-3-24-5-14q-11-12-162-12-33 0-93 12t-80 26q-19 13-34 72.5t-31.5 111-42.5 53.5q-42-26-56-44v-383z"/> </svg> `;J.prototype.defaultFontSizePoints=`px`,RA.set(`font`,FI).set(`fontsize`,II),J.prototype.controls.fontsize={command:`fontsize`,data:{cssRule:`font-size`,normalize:e=>e.toString().replace(/(px|pt)$/i,``)},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>
196t+e.o.defaultFontSizePoints,childTemplate:(e,t,n)=>`${n}${e.o.defaultFontSizePoints}`,tooltip:`Font size`,value:(e,t)=>{let n=e.s.current();if(!n)return;let r=K.closest(n,K.isElement,e.editor);if(!r)return;let i=t.control.data?.cssRule||`font-size`,a=W(r,i);if(i===`font-size`){let t=parseFloat(a.toString());return e.o.defaultFontSizePoints===`pt`?Math.round(t*.75).toString():Math.round(t).toString()}return a.toString()},isChildActive:(e,t)=>{let n=t.state.value,r=t.control.data?.normalize??(e=>e);return!!(n&&t.control.args&&r(t.control.args[0].toString())===r(n.toString()))},isActive:(e,t)=>{let n=t.state.value;if(!n)return!1;let r=t.control.data?.normalize??(e=>e),i=t.control.data.cacheListSet;if(!i){let e=Object.keys(t.control.list).map(r);i=new Set(e),t.control.data.cacheListSet=i}return i.has(r(n.toString()))}},J.prototype.controls.font={...J.prototype.controls.fontsize,command:`fontname`,textTemplate:(e,t)=>{let[n]=t.split(`,`);return oD(n,`"'`)},list:{"":`Default`,"Arial, Helvetica, sans-serif":`Arial`,"'Courier New', Courier, monospace":`Courier New`,"Georgia, Palatino, serif":`Georgia`,"'Lucida Sans Unicode', 'Lucida Grande', sans-serif":`Lucida Sans Unicode`,"Tahoma, Geneva, sans-serif":`Tahoma`,"'Times New Roman', Times, serif":`Times New Roman`,"'Trebuchet MS', Helvetica, sans-serif":`Trebuchet MS`,"Helvetica, sans-serif":`Helvetica`,"Impact, Charcoal, sans-serif":`Impact`,"Verdana, Geneva, sans-serif":`Verdana`},childTemplate:(e,t,n)=>{let r=!1;try{r=t.indexOf(`dings`)===-1&&document.fonts.check(`16px ${t}`,n)}catch{}return`<span data-style="${t}" style="${r?`font-family: ${t}!important;`:``}">${n}</span>`},data:{cssRule:`font-family`,normalize:e=>e.toLowerCase().replace(/['"]+/g,``).replace(/[^a-z0-9-]+/g,`,`)},value:e=>{let t=e.s.current();if(!t)return;let n=K.closest(t,K.isElement,e.editor);if(!n)return;let r=W(n,`font-family`).toString();return r===W(e.editor,`font-family`).toString()?``:r},tooltip:`Font family`};function LI(e){e.registerButton({name:`font`,group:`font`}).registerButton({name:`fontsize`,group:`font`});let t=(t,n,r)=>{switch(t){case`fontsize`:e.s.commitStyle({attributes:{style:{fontSize:rA(r,e.o.defaultFontSizePoints)}}});break;case`fontname`:e.s.commitStyle({attributes:{style:{fontFamily:r}}});break}return e.synchronizeValues(),!1};e.registerCommand(`fontsize`,t).registerCommand(`fontname`,t)}q.add(`font`,LI),RA.set(`paragraph`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M1534 189v73q0 29-18.5 61t-42.5 32q-50 0-54 1-26 6-32 31-3 11-3 64v1152q0 25-18 43t-43 18h-108q-25 0-43-18t-18-43v-1218h-143v1218q0 25-17.5 43t-43.5 18h-108q-26 0-43.5-18t-17.5-43v-496q-147-12-245-59-126-58-192-179-64-117-64-259 0-166 88-286 88-118 209-159 111-37 417-37h479q25 0 43 18t18 43z"/></svg> `),J.prototype.controls.paragraph={command:`formatBlock`,value(e,t){let n=t.control,r=e.s.current();return K.closest(r,K.isBlock,e.editor)?.nodeName.toLowerCase()??n.data?.currentValue},update(e,t){let n=t.control;if(!e.s.current())return!1;let r=t.state.value,i=n.list;return dD(i)&&i[r.toString()]&&e.o.textIcons&&(t.state.text=i[r.toString()].toString()),!1},data:{currentValue:`p`},list:{p:`Paragraph`,h1:`Heading 1`,h2:`Heading 2`,h3:`Heading 3`,h4:`Heading 4`,blockquote:`Quote`,pre:`Code`},isChildActive:(e,t)=>t.state.value===t.control?.args?.[0],isActive:(e,t)=>t.state.value!==e.o.enter&&dD(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,n)=>`<${t} style="margin:0;padding:0"><span>${e.i18n(n)}</span></${t}>`,tooltip:`Insert format block`};function RI(e){e.registerButton({name:`paragraph`,group:`font`}),e.registerCommand(`formatblock`,(t,n,r)=>(e.s.commitStyle({element:r}),e.synchronizeValues(),!1))}q.add(`formatBlock`,RI),J.prototype.commandToHotkeys={removeFormat:[`ctrl+shift+m`,`cmd+shift+m`],insertOrderedList:[`ctrl+shift+7`,`cmd+shift+7`],insertUnorderedList:[`ctrl+shift+8`,`cmd+shift+8`],selectall:[`ctrl+a`,`cmd+a`]};var zI=class extends nN{constructor(){super(...arguments),this.onKeyPress=e=>{let t=this.specialKeys[e.which],n=(e.key||String.fromCharCode(e.which)).toLowerCase(),r=[t||n];return[`alt`,`ctrl`,`shift`,`meta`].forEach(n=>{e[n+`Key`]&&t!==n&&r.push(n)}),$k(r.join(`+`))},this.specialKeys={8:`backspace`,9:`tab`,10:`return`,13:`return`,16:`shift`,17:`ctrl`,18:`alt`,19:`pause`,20:`capslock`,27:`esc`,32:`space`,33:`pageup`,34:`pagedown`,35:`end`,36:`home`,37:`left`,38:`up`,39:`right`,40:`down`,45:`insert`,46:`del`,59:`;`,61:`=`,91:`meta`,96:`0`,97:`1`,98:`2`,99:`3`,100:`4`,101:`5`,102:`6`,103:`7`,104:`8`,105:`9`,106:`*`,107:`+`,109:`-`,110:`.`,111:`/`,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:`scroll`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`}}
196afterInit(e){LD(e.o.commandToHotkeys,!1).forEach(t=>{let n=e.o.commandToHotkeys[t];n&&(XE(n)||U(n))&&e.registerHotkeyToCommand(n,t)});let t=!1;e.e.off(`.hotkeys`).on([e.ow,e.ew],`keydown.hotkeys`,e=>{if(e.key===`Escape`)return this.j.e.fire(`escape`,e)}).on(`keydown.hotkeys`,n=>{let r=this.onKeyPress(n),i={shouldStop:!0};if(this.j.e.fire(r+`.hotkey`,n.type,i)===!1){if(i.shouldStop)return t=!0,e.e.stopPropagation(`keydown`),!1;n.preventDefault()}},{top:!0}).on(`keyup.hotkeys`,()=>{if(t)return t=!1,e.e.stopPropagation(`keyup`),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(`.hotkeys`)}};q.add(`hotkeys`,zI),J.prototype.iframeBaseUrl=``,J.prototype.iframeTitle=`Jodit Editor`,J.prototype.iframeDoctype=`<!DOCTYPE html>`,J.prototype.iframeDefaultSrc=`about:blank`,J.prototype.iframeStyle=`html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}`,J.prototype.iframeCSSLinks=[],J.prototype.iframeSandbox=null;function BI(e){let t=e.options;e.e.on(`afterSetMode`,()=>{e.isEditorMode()&&e.s.focus()}).on(`generateDocumentStructure.iframe`,(e,n)=>{let r=e||n.iframe.contentWindow.document;if(r.open(),r.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${Dk(t.language)}"><head><title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:``)+`</head><body class="jodit-wysiwyg"></body></html>`),r.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=r.createElement(`link`);G(t,`rel`,`stylesheet`),G(t,`href`,e),r.head&&r.head.appendChild(t)}),t.iframeStyle){let e=r.createElement(`style`);e.innerHTML=t.iframeStyle,r.head&&r.head.appendChild(e)}}).on(`createEditor`,()=>{if(!t.iframe)return;let n=e.c.element(`iframe`);return n.style.display=`block`,n.src=`about:blank`,n.className=`jodit-wysiwyg_iframe`,G(n,{allowtransparency:`true`,tabindex:t.tabIndex.toString(),frameborder:`0`}),t.iframeSandbox!=null&&G(n,`sandbox`,t.iframeSandbox),e.workplace.appendChild(n),e.iframe=n,FD(e.e.fire(`generateDocumentStructure.iframe`,null,e),()=>{if(!e.iframe)return!1;let n=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,i=()=>{G(n.body,`contenteditable`,e.getMode()!==2&&!e.getReadOnly()||null)},a=e=>{let t=/<body.*<\/body>/im,n=`{%%BODY%%}`,r=t.exec(e);return r&&(e=e.replace(t,n).replace(/<span([^>]*?)>(.*?)<\/span>/gim,``).replace(/<span([^&]*?)>(.*?)<\/span>/gim,``).replace(n,r[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,`$1`).replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,`$1`).replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,``)).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,`$1$2$3$5`).replace(/(<[^<]+?)\sclass="[\s]*"/gim,`$1`).replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,`$1`).replace(/(<[^<]+?)\sdir="[\s]*"/gim,`$1`)),e};if(r){let t=e.element.tagName;if(t!==`TEXTAREA`&&t!==`INPUT`)throw OD("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on(`beforeGetNativeEditorValue`,()=>a(e.o.iframeDoctype+n.documentElement.outerHTML)).on(`beforeSetNativeEditorValue`,({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){let r=n.documentElement.outerHTML;a(r)!==a(t)&&(n.open(),n.write(e.o.iframeDoctype+a(t)),n.close(),e.editor=n.body,e.e.fire(`safeHTML`,e.editor),i(),e.e.fire(`prepareWYSIWYGEditor`),e.e.stopPropagation(`beforeSetNativeEditorValue`))}else n.body.innerHTML=t;return!0},{top:!0})}if(e.editor=n.body,e.e.on(`afterSetMode afterInit afterAddPlace`,i),t.height===`auto`){n.documentElement&&(n.documentElement.style.overflowY=`hidden`);let r=e.async.throttle((...n)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&t.height===`auto`){let t=e.ew.getComputedStyle(e.editor),n=parseInt(t.marginTop||`0`,10)+parseInt(t.marginBottom||`0`,10);W(e.iframe,`height`,e.editor.offsetHeight+n)}})},e.defaultTimeout/2);if(e.e.on(`change afterInit afterSetMode resize`,r).on([e.iframe,e.ew,n.documentElement],`load`,r).on(n,`readystatechange DOMContentLoaded`,r),typeof ResizeObserver==`function`){let t=new ResizeObserver(r);t.observe(n.body),e.e.on(`beforeDestruct`,()=>{t.disconnect()})}}return n.documentElement&&e.e.on(n.documentElement,`mousedown touchend`,()=>{e.s.isFocused()||(e.s.focus(),e.editor===n.body&&e.s.setCursorIn(n.body))}).on(e.ew,`mousedown touchstart keydown keyup touchend click mouseup mousemove scroll`,t=>{var n;(n=e.events)==null||n.fire(e.ow,t)}),!1})})}q.add(`iframe`,BI),RA.set(`image`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M576 576q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 384v448h-1408v-192l320-320 160 160 512-512zm96-704h-1600q-13 0-22.5 9.5t-9.5 22.5v1216q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5v-1216q0-13-9.5-22.5t-22.5-9.5zm160 32v1216q0 66-47 113t-113 47h-1600q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1600q66 0 113 47t47 113z"/> </svg> `),J.prototype.controls.image={popup:(e,t,n)=>{let r=null;return t&&!K.isText(t)&&K.isHTMLElement(t)&&(K.isTag(t,`img`)||$O(`img`,t).length)&&(r=K.isTag(t,`img`)?t:$O(`img`,t)[0]),e.s.save(),yI(e,{filebrowser:t=>
196{e.s.restore(),t.files&&t.files.forEach(n=>e.s.insertImage(t.baseurl+n,null,e.o.imageDefaultWidth)),n()},upload:!0,url:async(t,i)=>{e.s.restore(),/^[a-z\d_-]+(\.[a-z\d_-]+)+/i.test(t)&&(t=`//`+t);let a=r||e.createInside.element(`img`);G(a,`src`,t),G(a,`alt`,i),r||await e.s.insertImage(a,null,e.o.imageDefaultWidth),n()}},r,n)},tags:[`img`],tooltip:`Insert Image`};function VI(e){e.registerButton({name:`image`,group:`media`})}q.add(`image`,VI);var HI=e=>/^(https?:|mailto:|tel:)/i.test(e.trim())&&!/^(javascript:|data:|vbscript:)/i.test(e.trim()),UI=[{name:`eye`,tooltip:`Open link`,exec:(e,t)=>{let n=G(t,`href`);t&&n&&HI(n)&&e.ow.open(n)}},{name:`link`,tooltip:`Edit link`,icon:`pencil`},`unlink`,`brush`,`file`],WI=e=>e.args&&U(e.args[0])?e.args[0].toLowerCase():``,GI=[`brushCell`,{name:`valign`,list:[`Top`,`Middle`,`Bottom`,`Normal`],childTemplate:(e,t,n)=>n,exec:(e,t,{control:n})=>{let r=WI(n);e.getInstance(`Table`,e.o).getAllSelectedCells().forEach(e=>{W(e,`vertical-align`,r===`normal`?``:r)})},tooltip:`Vertical align`},{name:`splitv`,list:{tablesplitv:`Split vertical`,tablesplitg:`Split horizontal`},tooltip:`Split`},{name:`align`,icon:`left`},` 197`,{name:`merge`,command:`tablemerge`,tooltip:`Merge`},{name:`addcolumn`,list:{tableaddcolumnbefore:`Insert column before`,tableaddcolumnafter:`Insert column after`},exec:(e,t,{control:n})=>{if(!QD(e))return;if(!n.args)return!1;let r=WI(n);e.execCommand(r,!1,t)},tooltip:`Add column`},{name:`addrow`,list:{tableaddrowbefore:`Insert row above`,tableaddrowafter:`Insert row below`},exec:(e,t,{control:n})=>{if(!QD(e))return;if(!n.args)return!1;let r=WI(n);e.execCommand(r,!1,t)},tooltip:`Add row`},{name:`deleteTable`,icon:`bin`,list:{tablebin:`Delete table`,tablebinrow:`Delete row`,tablebincolumn:`Delete column`,tableempty:`Empty cell`},exec:(e,t,{control:n})=>{if(!QD(e))return;if(!n.args)return!1;let r=WI(n);e.execCommand(r,!1,t),e.e.fire(`hidePopup`)},tooltip:`Delete`}],KI={name:`left`,childTemplate:(e,t,n)=>n,list:[`Left`,`Right`,`Center`,`Normal`],exec:(e,t,{control:n})=>{if(!K.isTag(t,new Set([`img`,`jodit`,`jodit-media`])))return;let r=n.args&&U(n.args[0])?n.args[0].toLowerCase():``;if(!r)return!1;lk(t,r),K.isTag(t,new Set([`jodit`,`jodit-media`]))&&t.firstElementChild&&lk(t.firstElementChild,r),e.synchronizeValues(),e.e.fire(`recalcPositionPopup`)},tooltip:`Horizontal align`},qI=[{name:`delete`,icon:`bin`,tooltip:`Delete`,exec:(e,t)=>{t&&e.s.removeNode(t)}},{name:`pencil`,exec(e,t){t.tagName.toLowerCase()===`img`&&e.e.fire(`openImageProperties`,t)},tooltip:`Edit`},{name:`valign`,list:[`Top`,`Middle`,`Bottom`,`Normal`],tooltip:`Vertical align`,exec:(e,t,{control:n})=>{if(!K.isTag(t,`img`))return;let r=n.args&&U(n.args[0])?n.args[0].toLowerCase():``;if(!r)return!1;W(t,`vertical-align`,r===`normal`?``:r),e.e.fire(`recalcPositionPopup`)}},KI],JI=[{name:`bin`,tooltip:`Delete`,exec:(e,t)=>{t&&e.s.removeNode(t)}},KI],YI=[`bold`,`italic`,`|`,`ul`,`ol`,`eraser`,`|`,`fontsize`,`brush`,`paragraph`,`---`,`image`,`table`,` 198`,`link`,`|`,`align`,`|`,`undo`,`redo`,`|`,`copyformat`,`fullsize`,`---`,`dots`],XI=`<svg viewBox="0 0 18.151 18.151" xmlns="http://www.w3.org/2000/svg"> <g> <path stroke-width="0" d="M6.237,16.546H3.649V1.604h5.916v5.728c0.474-0.122,0.968-0.194,1.479-0.194 c0.042,0,0.083,0.006,0.125,0.006V0H2.044v18.15h5.934C7.295,17.736,6.704,17.19,6.237,16.546z"/> <path stroke-width="0" d="M11.169,8.275c-2.723,0-4.938,2.215-4.938,4.938s2.215,4.938,4.938,4.938s4.938-2.215,4.938-4.938 S13.892,8.275,11.169,8.275z M11.169,16.81c-1.983,0-3.598-1.612-3.598-3.598c0-1.983,1.614-3.597,3.598-3.597 s3.597,1.613,3.597,3.597C14.766,15.198,13.153,16.81,11.169,16.81z"/> <polygon stroke-width="0" points="11.792,11.073 10.502,11.073 10.502,12.578 9.03,12.578 9.03,13.868 10.502,13.868 10.502,15.352 11.792,15.352 11.792,13.868 13.309,13.868 13.309,12.578 11.792,12.578 "/> </g> </svg> `,ZI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 432 432"> <g> <polygon points="203.688,96 0,96 0,144 155.688,144 "/> <polygon points="155.719,288 0,288 0,336 203.719,336 "/> <path d="M97.844,230.125c-3.701-3.703-5.856-8.906-5.856-14.141s2.154-10.438,5.856-14.141l9.844-9.844H0v48h107.719 L97.844,230.125z"/> <polygon points="232,176 232,96 112,216 232,336 232,256 432,256 432,176"/> </g> </svg> `,QI=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 312 312"> <g transform="translate(0.000000,312.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M50 3109 c0 -7 -11 -22 -25 -35 l-25 -23 0 -961 0 -961 32 -29 32 -30 501 -2 500 -3 3 -502 2 -502 31 -30 31 -31 958 0 958 0 23 25 c13 13 30 25 37 25 9 0 12 199 12 960 0 686 -3 960 -11 960 -6 0 -24 12 -40 28 l-29 27 -503 5 -502 5 -5 502 -5 503 -28 29 c-15 16 -27 34 -27 40 0 8 -274 11 -960 11 -710 0 -960 -3 -960 -11z m1738 -698 l2 -453 -40 -40 c-22 -22 -40 -43 -40 -47 0 -4 36 -42 79 -85 88 -87 82 -87 141
198-23 l26 27 455 -2 454 -3 0 -775 0 -775 -775 0 -775 0 -3 450 -2 449 47 48 47 48 -82 80 c-44 44 -84 80 -87 80 -3 0 -25 -18 -48 -40 l-41 -40 -456 2 -455 3 -3 765 c-1 421 0 771 3 778 3 10 164 12 777 10 l773 -3 3 -454z"/> <path d="M607 2492 c-42 -42 -77 -82 -77 -87 0 -6 86 -96 190 -200 105 -104 190 -197 190 -205 0 -8 -41 -56 -92 -107 -65 -65 -87 -94 -77 -98 8 -3 138 -4 289 -3 l275 3 3 275 c1 151 0 281 -3 289 -4 10 -35 -14 -103 -82 -54 -53 -103 -97 -109 -97 -7 0 -99 88 -206 195 -107 107 -196 195 -198 195 -3 0 -39 -35 -82 -78z"/> <path d="M1470 1639 c-47 -49 -87 -91 -89 -94 -5 -6 149 -165 160 -165 9 0 189 179 189 188 0 12 -154 162 -165 161 -6 0 -48 -41 -95 -90z"/> <path d="M1797 1303 c-9 -8 -9 -568 0 -576 4 -4 50 36 103 88 54 52 101 95 106 95 5 0 95 -85 199 -190 104 -104 194 -190 200 -190 6 0 46 36 90 80 l79 79 -197 196 c-108 108 -197 199 -197 203 0 4 45 52 99 106 55 55 98 103 95 108 -6 10 -568 11 -577 1z"/> </g> </svg> `,$I=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 48 48"> <path d="M6 42h4v-4h-4v4zm4-28h-4v4h4v-4zm-4 20h4v-4h-4v4zm8 8h4v-4h-4v4zm-4-36h-4v4h4v-4zm8 0h-4v4h4v-4zm16 0h-4v4h4v-4zm-8 8h-4v4h4v-4zm0-8h-4v4h4v-4zm12 28h4v-4h-4v4zm-16 8h4v-4h-4v4zm-16-16h36v-4h-36v4zm32-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-16 16h4v-4h-4v4zm8 8h4v-4h-4v4zm8 0h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg> `,eL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 48 48"> <path d="M6 18h4v-4h-4v4zm0-8h4v-4h-4v4zm8 32h4v-4h-4v4zm0-16h4v-4h-4v4zm-8 0h4v-4h-4v4zm0 16h4v-4h-4v4zm0-8h4v-4h-4v4zm8-24h4v-4h-4v4zm24 24h4v-4h-4v4zm-16 8h4v-36h-4v36zm16 0h4v-4h-4v4zm0-16h4v-4h-4v4zm0-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-8-8h4v-4h-4v4zm0 32h4v-4h-4v4zm0-16h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg> `,tL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68z"/> </svg> `,nL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z"/> </svg> `;J.prototype.toolbarInline=!0,J.prototype.toolbarInlineForSelection=!1,J.prototype.toolbarInlineDisableFor=[],J.prototype.toolbarInlineDisabledButtons=[`source`],RA.set(`addcolumn`,XI).set(`addrow`,ZI).set(`merge`,QI).set(`th`,tL).set(`splitg`,$I).set(`splitv`,eL).set(`th-list`,nL),GI.forEach(e=>{!U(e)&&e.name&&!J.prototype.controls[e.name]&&(J.prototype.controls[e.name]=e)}),J.prototype.popup={a:UI,img:qI,cells:GI,toolbar:YI,jodit:JI,iframe:JI,"jodit-media":JI,selection:[`bold`,`underline`,`italic`,`ul`,`ol`,` 199`,`outdent`,`indent`,`fontsize`,`brush`,`cut`,` 200`,`paragraph`,`link`,`align`,`dots`]};var rL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},iL=class extends nN{constructor(){super(...arguments),this.type=null,this.__reopenSelectionPopup=!1,this.snapRange=null,this.elmsList=LD(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e))}get popup(){return new Lj(this.jodit,!1)}get toolbar(){return rM(this.jodit,this.popup)}onClick(e){let t=this.elmsList,n=K.isTag(e,`img`)?e:K.closest(e,t,this.j.editor);if(n&&this.canShowPopupForType(n.nodeName.toLowerCase()))return this.showPopup(()=>fA(n,this.j),n.nodeName.toLowerCase(),n),!1}showPopup(e,t,n){if(t=t.toLowerCase(),!this.canShowPopupForType(t))return!1;
200if(this.type!==t||n!==this.previousTarget){this.previousTarget=n;let e=this.j.o.popup[t],r;if(r=V(e)?e(this.j,n,this.popup.close):e,XE(r)){let e=this.j.o.toolbarInlineDisabledButtons;this.toolbar.build(e.length?r.filter(t=>{let n=U(t)?t:t.name;return!e.includes(n??``)}):r,n),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,r=this.toolbar.container}this.popup.setContent(r),this.type=t}return this.popup.open(e),!0}hidePopup(e){this.popup.isOpened&&(!U(e)||e===this.type)&&this.popup.close()}onOutsideClick(){this.popup.close()}canShowPopupForType(e){let t=this.j.o.popup[e.toLowerCase()];return this.j.o.readonly||!this.j.o.toolbarInline||!t?!1:!this.isExcludedTarget(e)}isExcludedTarget(e){return hO(this.j.o.toolbarInlineDisableFor).map(e=>e.toLowerCase()).includes(e.toLowerCase())}afterInit(e){this.j.e.on(`getDiffButtons.mobile`,t=>{if(this.toolbar===t){let t=this.toolbar.getButtonsNames();return nD(e.registeredButtons).filter(e=>!this.j.o.toolbarInlineDisabledButtons.includes(e.name)).filter(e=>{let n=U(e)?e:e.name;return n&&n!==`|`&&n!==` 201`&&!t.includes(n)})}}).on(`hidePopup`,this.hidePopup).on(`showInlineToolbar`,this.showInlineToolbar).on(`showPopup`,(e,t,n)=>{this.showPopup(t,n||(U(e)?e:e.nodeName),U(e)?void 0:e)}).on(`mousedown keydown`,this.onSelectionStart).on(`change`,()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)}).on([this.j.ew,this.j.ow],`mouseup keyup`,this.onSelectionEnd).on([this.j.ew,this.j.ow],`mousedown touchstart`,this.__onDocumentMouseDown).on(`closeAllPopups`,this.__onCloseAllPopups),this.addListenersForElements()}__onDocumentMouseDown(e){this.popup.isOpened&&this.type===`selection`&&e.target&&VA.closestElement(e.target,Lj)&&(this.__reopenSelectionPopup=!0)}__onCloseAllPopups(){this.__reopenSelectionPopup&&(this.__reopenSelectionPopup=!1,this.j.o.toolbarInlineForSelection&&this.j.async.setTimeout(()=>{let e=this.j.s.sel;e&&!e.isCollapsed&&this.showPopup(()=>this.__selectionBound(),`selection`)},1))}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:n}=e;if(this.j.iframe){let e=fA(this.j.iframe,this.j,!0);t+=e.left,n+=e.top}return{left:t,top:n,width:e.width,height:e.height}}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(e){if(e&&e.target&&VA.closestElement(e.target,Lj))return;let{snapRange:t}=this,{range:n}=this.j.s;(!t||n.collapsed||n.startContainer!==t.startContainer||n.startOffset!==t.startOffset||n.endContainer!==t.endContainer||n.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e=`selection`,t=this.j.s.sel,n=this.j.s.range;if(t?.isCollapsed||this.isSelectedTarget(n)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}isSelectedTarget(e){let t=e.startContainer;return K.isElement(t)&&t===e.endContainer&&K.isTag(t.childNodes[e.startOffset],new Set(LD(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off(`showPopup`).off([this.j.ew,this.j.ow],`mouseup keyup`,this.onSelectionEnd).off([this.j.ew,this.j.ow],`mousedown touchstart`,this.__onDocumentMouseDown).off(`closeAllPopups`,this.__onCloseAllPopups),this.removeListenersForElements()}_eventsList(){let e=this.elmsList;return e.map(e=>bD(`click_${e}`)).concat(e.map(e=>bD(`touchstart_${e}`))).join(` `)}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},`toolbar`)}};iL.requires=[`select`],rL([aO],iL.prototype,`popup`,null),rL([aO],iL.prototype,`toolbar`,null),rL([H],iL.prototype,`onClick`,null),rL([OA(e=>!e.j.isLocked)],iL.prototype,`showPopup`,null),rL([Y([`:clickEditor`,`:beforeCommandDelete`,`:backSpaceAfterDelete`]),H],iL.prototype,`hidePopup`,null),rL([Y(`:outsideClick`)],iL.prototype,`onOutsideClick`,null),rL([H],iL.prototype,`__onDocumentMouseDown`,null),rL([H],iL.prototype,`__onCloseAllPopups`,null),rL([H],iL.prototype,`onSelectionStart`,null),rL([H],iL.prototype,`onSelectionEnd`,null),rL([xA(e=>e.defaultTimeout)],iL.prototype,`onSelectionChange`,null),rL([H],iL.prototype,`showInlineToolbar`,null),q.add(`inlinePopup`,iL);var aL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/> </svg> `,oL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M503 1271l-256 256q-10 9-23 9-12 0-23-9-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23zm169 41v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm-224-224q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm1264 128q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-334-335q-21-21-42-56l239-18 273 274q27 27 68 27.5t68-26.5l147-146q28-28 28-67 0-40-28-68l-274-275 18-239q35 21 56 42l336 336q84 86 84 204zm-617-724l-239 18-273-274q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l274 274-18 240q-35-21-56-42l-336-336q-84-86-84-204 0-120 85-203l147-146q83-83 203-83 121 0 204 85l334 335q21 21 42 56zm633 84q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm-544-544v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm407 151l-256 256q-11 9-23 9t-23-9q-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23z"/> </svg> `,sL=e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:n,ariaLabelInput:r,modeClassName:i,selectSizeClassName:a,selectMultipleClassName:o,selectOptionsClassName:s}=e.o.link;return new hj(e,[new rj(e,[new uj(e,{name:`url`,type:`text`,ref:`url_input`,label:`U
201RL`,placeholder:`http://`,required:!0})]),r?new rj(e,[new uj(e,{name:`ariaLabel`,ref:`aria_label_input`,label:`Aria label`})]):null,new rj(e,[new uj(e,{name:`content`,ref:`content_input`,label:`Text`})],{ref:`content_input_box`}),i?new rj(e,[i===`input`?new uj(e,{name:`className`,ref:`className_input`,label:`Class name`}):i===`select`?new pj(e,{name:`className`,ref:`className_select`,label:`Class name`,size:a,multiple:o,options:s}):null]):null,t?new xj(e,{name:`target`,ref:`target_checkbox`,label:`Open in new tab`}):null,n?new xj(e,{name:`nofollow`,ref:`nofollow_checkbox`,label:`No follow`}):null,new rj(e,[new WA(e,{name:`unlink`,variant:`default`,text:`Unlink`}),new WA(e,{name:`insert`,type:`submit`,variant:`primary`,text:`Insert`})],{align:`full`})])};J.prototype.link={formTemplate:sL,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:`input`,selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:[`ctrl+k`,`cmd+k`]},RA.set(`link`,aL).set(`unlink`,oL),J.prototype.controls.unlink={exec:(e,t)=>{let n=K.closest(t,`a`,e.editor);n&&K.unwrap(n),e.synchronizeValues(),e.e.fire(`hidePopup`)},tooltip:`Unlink`},J.prototype.controls.link={isActive:e=>{let t=e.s.current();return!!(t&&K.closest(t,`a`,e.editor))},popup:(e,t,n)=>e.e.fire(`generateLinkForm.link`,t,n),tags:[`a`],tooltip:`Insert link`};var cL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},lL=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`link`,group:`insert`}]}afterInit(e){e.o.link.followOnDblClick&&e.e.on(`dblclick.link`,this.__onDblClickOnLink),e.e.on(e.editor,`click.link`,this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on(`processPaste.link`,this.onProcessPasteLink),e.e.on(`generateLinkForm.link`,this.__generateForm),e.registerCommand(`openLinkDialog`,{exec:()=>{let t=e.dlg({resizable:!1}),n=this.__generateForm(e.s.current(),()=>{t.close()});n.container.classList.add(`jodit-dialog_alert`),t.setContent(n),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=tk(n.container);e?.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!K.isTag(e.target,`a`))return;let t=G(e.target,`href`);t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){let{jodit:n}=this;if(!(!nO(t)||!n.o.link.processPastedLink)){if(n.e.stopPropagation(`processPaste`),n.o.link.processVideoLink){let e=MD(n.o.video?.parseUrlToVideoEmbed??Tk,t,{width:n.o.video?.defaultWidth,height:n.o.video?.defaultHeight});if(e!==t)return n.createInside.fromHTML(e)}if(n.s.isCollapsed()){let e=n.createInside.element(`a`);return G(e,`href`,t),e.textContent=t,n.e.fire(`applyLink`,n,e,null),e}return n.s.commitStyle({element:`a`,attributes:{href:t}}),!0}}__generateForm(e,t){let{jodit:n}=this,r=n.i18n.bind(n),{openInNewTabCheckbox:i,openInNewTabCheckboxDefaultChecked:a,noFollowCheckbox:o,formTemplate:s,formClassName:c,modeClassName:l}=n.o.link,u=s(n),d=U(u)?n.c.fromHTML(u,{target_checkbox_box:i,nofollow_checkbox_box:o}):u,f=K.isElement(d)?d:d.container,p=tk(f),{insert:m,unlink:h,content_input_box:g}=p,{target_checkbox:_,nofollow_checkbox:v,url_input:y}
201=p,b=e,x=K.isImage(b),{content_input:S}=p,{className_input:C}=p,{className_select:w}=p,{aria_label_input:T}=p;S||=n.c.element(`input`,{type:`hidden`,ref:`content_input`}),c&&f.classList.add(c),x&&K.hide(g);let E,D=()=>E?E.innerText:Xk(n.s.range.cloneContents(),n.ed);E=e&&K.closest(e,`a`,n.editor)?K.closest(e,`a`,n.editor):!1,!x&&e&&(S.value=D()),T&&(T.value=E&&G(E,`aria-label`)||``),E?(y.value=G(E,`href`)||``,l&&fL(l,C,E,w),i&&_&&(_.checked=G(E,`target`)===`_blank`),o&&v&&(v.checked=(G(E,`rel`)||``).split(/\s+/).includes(`nofollow`)),m.textContent=r(`Update`)):(K.hide(h),n.o.link.deriveUrlFromText&&y&&!x&&!y.value.trim()&&(y.value=uL(S.value)),i&&_&&(_.checked=a)),n.editor.normalize();let O=n.history.snapshot.make();h&&n.e.on(h,`click`,e=>{n.s.restore(),n.history.snapshot.restore(O),E&&K.unwrap(E),n.synchronizeValues(),t(),e.preventDefault()});let ee=()=>{if(!y.value.trim().length)return y.focus(),y.classList.add(`jodit_error`),!1;let e;n.s.restore(),n.s.removeMarkers(),n.editor.normalize(),n.history.snapshot.restore(O);let r=D()!==S.value.trim(),a=n.createInside;if(!E||!K.isOrContains(n.editor,E)){if(n.s.isCollapsed()){let t=a.element(`a`);n.s.insertNode(t,!1,!1),e=[t]}else{let t=n.s.current();e=K.isTag(t,`img`)?[K.wrap(t,`a`,a)]:n.s.wrapInTag(`a`)}e.forEach(e=>n.s.select(e))}else e=[E];return e.forEach(e=>{if(G(e,`href`,y.value),dL(l,C,w,e),x||pL(e,S,r,y),i&&_&&G(e,`target`,_.checked?`_blank`:null),o&&v){let t=(G(e,`rel`)||``).split(/\s+/).filter(Boolean),n=t.includes(`nofollow`);v.checked&&!n?t.push(`nofollow`):!v.checked&&n&&t.splice(t.indexOf(`n
201ofollow`),1),G(e,`rel`,t.length?t.join(` `):null)}T&&G(e,`aria-label`,T.value.trim()||null),n.e.fire(`applyLink`,n,e,d)}),n.synchronizeValues(),t(),!1};return K.isElement(d)?n.e.on(d,`submit`,e=>(e.preventDefault(),e.stopImmediatePropagation(),ee(),!1)):d.onSubmit(ee),d}beforeDestruct(e){e.e.off(`generateLinkForm.link`,this.__generateForm).off(`dblclick.link`,this.__onDblClickOnLink).off(e.editor,`click.link`,this.__onClickReadOnlyLink).off(`processPaste.link`,this.onProcessPasteLink)}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&K.isTag(e.target,`a`)&&e.preventDefault()}};cL([H],lL.prototype,`__onDblClickOnLink`,null),cL([H],lL.prototype,`onProcessPasteLink`,null),cL([H],lL.prototype,`__generateForm`,null),cL([H],lL.prototype,`__onClickReadOnlyLink`,null),q.add(`link`,lL);function uL(e){let t=e.trim();return!t||/\s/.test(t)?``:/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(t)?t:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?`mailto:${t}`:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(t)?`https://${t}`:``}function dL(e,t,n,r){if(e&&(t??n)){if(e===`input`)t.value===``&&r.hasAttribute(`class`)&&G(r,`class`,null),t.value!==``&&G(r,`class`,t.value);else if(e===`select`){r.hasAttribute(`class`)&&G(r,`class`,null);for(let e=0;e<n.selectedOptions.length;e++){let t=n.selectedOptions.item(e)?.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{r.classList.add(e)})}}}}function fL(e,t,n,r){switch(e){case`input`:t&&(t.value=G(n,`class`)||``);break;case`select`:if(r){for(let e=0;e<r.selectedOptions.length;e++){let t=r.options.item(e);t&&(t.selected=!1)}(G(n,`class`)||``).split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<r.options.length;t++){let n=r.options.item(t);n?.value&&n.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(n.selected=!0)}})}break}}function pL(e,t,n,r){let i=e.textContent;t.value.trim().length?n&&(i=t.value):i=r.value;let a=e.textContent;i!==a&&(e.textContent=i)}var mL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-122t.5-121v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg> `,hL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M384 1408q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm0-512q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm-1408-928q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg> `,gL=(e,t,{control:n})=>{let r=`button${n.command}`,i=(n.args&&n.args[0])??wD(e,r);wD(e,r,i),e.execCommand(n.command,!1,i==="default"?null:i)};RA.set(`ol`,mL).set(`ul`,hL),J.prototype.controls.ul={command:`insertUnorderedList`,tags:[`ul`],tooltip:`Insert Unordered List`,list:{default:`Default`,circle:`Circle`,disc:`Dot`,square:`Quadrate`},exec:gL},J.prototype.controls.ol={command:`insertOrderedList`,tags:[`ol`],tooltip:`Insert Ordered List`,list:{default:`Default`,"lower-alpha":`Lower Alpha`,"lower-greek":`Lower Greek`,"lower-roman":`Lower Roman`,"upper-alpha":`Upper Alpha`,"upper-roman":`Upper Roman`},exec:gL};var _L=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},vL=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`ul`,group:`list`},{name:`ol`,group:`list`}]}afterInit(e){e.registerCommand(`insertUnorderedList`,this.onCommand).registerCommand(`insertOrderedList`,this.onCommand)}
201onCommand(e,t,n){return this.jodit.s.commitStyle({element:e===`insertunorderedlist`?`ul`:`ol`,attributes:{style:{listStyleType:n??null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}};_L([H],vL.prototype,`onCommand`,null),q.add(`orderedList`,vL),J.prototype.showPlaceholder=!0,J.prototype.placeholder=`Type something`,J.prototype.useInputsPlaceholder=!0;var yL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};function bL(e){if(!e.firstChild)return!0;let t=e.firstChild;if(mE.has(t.nodeName?.toLowerCase())||/^(TABLE)$/i.test(t.nodeName))return!1;let n=K.next(t,e=>e&&!K.isEmptyTextNode(e),e);return K.isText(t)&&!n?K.isEmptyTextNode(t):!n&&K.each(t,e=>!(K.isLeaf(e)||K.isList(e))&&(K.isEmpty(e)||K.isTag(e,`br`)))}var xL=class extends nN{constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,`input.placeholder keydown.placeholder`).on(this.j.editor,`input.placeholder keydown.placeholder`,this.toggle)},this.addEvents=()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute(`placeholder`)&&(this.placeholderElm.innerHTML=G(e.element,`placeholder`)||``),e.e.fire(`placeholder`,this.placeholderElm.innerHTML),e.e.off(`.placeholder`).on(`changePlace.placeholder`,this.addNativeListeners).on(`change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder`,this.toggle).on(window,`load`,this.toggle),this.addNativeListeners(),this.toggle()}}afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),e.o.direction===`rtl`&&(this.placeholderElm.style.right=`0px`,this.placeholderElm.style.direction=`rtl`),e.e.on(`readonly`,e=>{e?this.hide():this.toggle()}).on(`changePlace`,this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,n=0,r=e.s.current(),i=r&&K.closest(r,K.isBlock,e.editor)||e.editor,a=e.ew.getComputedStyle(i),o=e.ew.getComputedStyle(e.editor);e.workplace.appendChild(this.placeholderElm);let{firstChild:s}=e.editor;if(K.isElement(s)&&!eO(s)){let r=e.ew.getComputedStyle(s);t=parseInt(r.getPropertyValue(`margin-top`),10),n=parseInt(r.getPropertyValue(`margin-left`),10),this.placeholderElm.style.fontSize=parseInt(r.getPropertyValue(`font-size`),10)+`px`,this.placeholderElm.style.lineHeight=r.getPropertyValue(`line-height`)}else this.placeholderElm.style.fontSize=parseInt(a.getPropertyValue(`font-size`),10)+`px`,this.placeholderElm.style.lineHeight=a.getPropertyValue(`line-height`);W(this.placeholderElm,{display:`block`,textAlign:a.getPropertyValue(`text-align`),paddingTop:parseInt(o.paddingTop,10)+`px`,paddingLeft:parseInt(o.paddingLeft,10)+`px`,paddingRight:parseInt(o.paddingRight,10)+`px`,marginTop:Math.max(parseInt(a.getPropertyValue(`margin-top`),10),t),marginLeft:Math.max(parseInt(a.getPropertyValue(`margin-left`),10),n)})}hide(){K.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(!(!e.editor||e.isInDestruct)){if(e.getRealMode()!==1){this.hide();return}bL(e.editor)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(`.placeholder`).off(window,`load`,this.toggle)}};yL([xA(e=>e.defaultTimeout/10,!0)],xL.prototype,`toggle`,null),q.add(`placeholder`,xL);function SL(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus(`ready`,()=>{e.statusbar.append(e.create.fromHTML(`<a 202 tabindex="-1" 203 style="text-transform: uppercase" 204 class="jodit-status-bar-link" 205 target="_blank" 206 href="https://xdsoft.net/jodit/"> 207 Powered by Jodit 208 </a>`),!0)})}q.add(`poweredByJodit`,SL),RA.set(`redo`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 14 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z"/> </svg> `).set(`undo`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5t-264-204.5q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5t163.5-109.5 109.5-163.5 40.5-198.5-40.5-198.5-109.5-163.5-163.5-109.5-198.5-40.5q-98 0-188 35.5t-160 101.5l137 138q31 30 14 69-17 40-59 40h-448q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5t284.5-55.5q156 0 298 61t245 164 164 245 61 298z"/> </svg> `),J.prototype.controls.redo={mode:3,isDisabled:e=>!e.history.canRedo(),tooltip:`Redo`},J.prototype.controls.undo={mode:3,isDisabled:e=>!e.history.canUndo(),tooltip:`Undo`};var CL=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`undo`,group:`history`},{name:`redo`,group:`history`}]}beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand(`redo`,{exec:t,hotkeys:[`ctrl+y`,`ctrl+shift+z`,`cmd+y`,`cmd+shift+z`]}),e.registerCommand(`undo`,{exec:t,hotkeys:[`ctrl+z`,`cmd+z`]})}};q.add(`redoUndo`,CL),J.prototype.minWidth=200,J.prototype.maxWidth=`100%`,J.prototype.minHeight=200,J.prototype.maxHeight=`auto`,J.prototype.saveHeightInStorage=!1;var wL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},TL=class extends nN{constructor(){super(...arguments),this.__resizeWorksp
208aces=this.j.async.debounce(this.__resizeWorkspaceImd,this.j.defaultTimeout,!0)}afterInit(e){e.e.on(`setHeight.size`,this.__setHeight).on(`setWidth.size`,this.__setWidth).on(`afterInit.size changePlace.size`,this.__initialize,{top:!0}).on(e.ow,`load.size`,this.__resizeWorkspaces).on(`afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size`,this.__resizeWorkspaces).on(`toggleFullSize.size toggleToolbar.size`,this.__resizeWorkspaceImd),this.__immediateInitialize()}__initialize(){this.__immediateInitialize()}__immediateInitialize(){let{j:e}=this;if(e.o.inline)return;let{height:t}=e.o;if(e.o.saveHeightInStorage&&t!==`auto`){let n=e.storage.get(`height`);n&&(t=n)}W(e.editor,{minHeight:`100%`}),W(e.container,{minHeight:e.o.minHeight,maxHeight:e.o.maxHeight,minWidth:e.o.minWidth,maxWidth:e.o.maxWidth}),e.isFullSize||(this.__setHeight(t),this.__setWidth(e.o.width))}__setHeight(e){let{clientHeight:t,clientWidth:n}=this.j.container;if(tO(e)){let{minHeight:t,maxHeight:n}=this.j.o;tO(t)&&t>e&&(e=t),tO(n)&&n<e&&(e=n)}W(this.j.container,`height`,e),this.j.o.saveHeightInStorage&&this.j.storage.set(`height`,e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:n})}__setWidth(e){let{clientHeight:t,clientWidth:n}=this.j.container;if(tO(e)){let{minWidth:t,maxWidth:n}=this.j.o;tO(t)&&t>e&&(e=t),tO(n)&&n<e&&(e=n)}W(this.j.container,`width`,e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:n})}__getNotWorkHeight(){let e=this.j.toolbarContainer;return(e&&this.j.container.contains(e)?e.offsetHeight:0)+(this.j.statusbar?.getHeight()||0)+2}__resizeWorkspaceImd({clientHeight:e,clientWidth:t}=this.j.container){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline||!this.j.container||!this.j.container.parentNode)return;let n=(W(this.j.container,`minHeight`)||0)-this.__getNotWorkHeight();if(tO(n)&&n>0&&([this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(e=>{e&&W(e,`minHeight`,n)}),this.j.e.fire(`setMinHeight`,n)),tO(this.j.o.maxHeight)){let e=this.j.o.maxHeight-this.__getNotWorkHeight();[this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(t=>{t&&W(t,`maxHeight`,e)}),this.j.e.fire(`setMaxHeight`,e)}if(this.j.container){let e=this.j.o.height!==`auto`||this.j.isFullSize?this.j.container.offsetHeight-this.__getNotWorkHeight():`auto`;W(this.j.workplace,`height`,e),this.j.container.style.setProperty(`--jd-jodit-workplace-height`,tO(e)?e+`px`:e)}let{clientHeight:r,clientWidth:i}=this.j.container;(e!==r||t!==i)&&this.j.e.fire(this.j,`resize`)}beforeDestruct(e){e.e.off(e.ow,`load.size`,this.__resizeWorkspaces).off(`.size`)}};wL([SA()],TL.prototype,`__initialize`,null),wL([H],TL.prototype,`__setHeight`,null),wL([H],TL.prototype,`__setWidth`,null),wL([H],TL.prototype,`__resizeWorkspaceImd`,null),q.add(`size`,TL),J.prototype.showCharsCounter=!0,J.prototype.countHTMLChars=!1,J.prototype.countTextSpaces=!1,J.prototype.showWordsCounter=!0;var EL=class extends nN{constructor(){super(...arguments),this.charCounter=null,this.wordCounter=null,this.reInit=()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off(`change keyup`,this.calc).on(`change keyup`,this.calc),this.calc()},this.calc=this.j.async.throttle(()=>{let e=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){let t;t=this.j.o.countHTMLChars?this.j.value:this.j.o.countTextSpaces?e.replace(nE(),``).replace(/[\r\n]/g,``):e.replace(aE(),``),this.charCounter.textContent=this.j.i18n(`Chars: %d`,t.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n(`Words: %d`,e.replace(nE(),``).split(aE()).filter(e=>e.length).length))},this.j.defaultTimeout)}afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on(`afterInit changePlace afterAddPlace`,this.reInit),this.reInit()}beforeDestruct(){K.safeRemove(this.charCounter),K.safeRemove(this.wordCounter),this.j.e.off(`afterInit changePlace afterAddPlace`,this.reInit),this.charCounter=null,this.wordCounter=null}};q.add(`stat`,EL);var DL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z"/> </svg> `;J.prototype.table={splitBlockOnInsertTable:!0,selectionCellStyle:`border: 1px double #1e88e5 !important;
208`,useExtraClassesOptions:!1},RA.set(`table`,DL),J.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":`Bootstrap Bordered`,"table table-striped":`Bootstrap Striped`,"table table-dark":`Bootstrap Dark`}},popup:(e,t,n,r)=>{e.editor.normalize();let i=e.history.snapshot.make(),a=r.control,o=a.data&&a.data.rows?a.data.rows:10,s=a.data&&a.data.cols?a.data.cols:10,c=e.c.fromHTML(`<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">`+(()=>{if(!e.o.table.useExtraClassesOptions)return``;let t=[];if(a.data){let e=a.data.classList;Object.keys(e).forEach(n=>{t.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${n}" type="checkbox"/>${e[n]}</label>`)})}return t.join(``)})()+`</div></div><label class="jodit-form__center"><span>1</span> × <span>1</span></label></form>`),l=c.querySelectorAll(`span`)[0],u=c.querySelectorAll(`span`)[1],d=c.querySelector(`.jodit-form__container`),f=c.querySelector(`.jodit-form__options`),p=[],m=o*s;G(d,{role:`grid`,ariaLabel:`Table size`,ariaRowcount:o,ariaColcount:s});for(let t=0;t<m;t+=1)if(!p[t]){let n=Math.floor(t/s)+1,r=t%s+1;p.push(e.c.element(`span`,{dataIndex:t,role:`gridcell`,tabindex:t===0?0:-1,ariaLabel:`${n} by ${r}`}))}let h=e=>{let t=parseInt(G(e,`-index`)||`0`,10),n=Math.ceil((t+1)/s),r=t%s+1;for(let e=0;e<p.length;e+=1)r>=e%s+1&&n>=Math.ceil((e+1)/s)?p[e].className=`jodit_hovered`:p[e].className=``;u.textContent=r.toString(),l.textContent=n.toString()},g=t=>{let r=parseInt(G(t,`-index`)||`0`,10),a=Math.ceil((r+1)/s),o=r%s+1,c=e.createInside,l=c.element(`tbody`),u=c.element(`table`);u.appendChild(l);let d=null,p,m;
208for(let e=1;e<=a;e+=1){p=c.element(`tr`);for(let e=1;e<=o;e+=1)m=c.element(`td`),d||=m,W(m,`width`,(100/o).toFixed(4)+`%`),m.appendChild(c.element(`br`)),p.appendChild(c.text(` 209`)),p.appendChild(c.text(` `)),p.appendChild(m);l.appendChild(c.text(` 210`)),l.appendChild(p)}$O(`input[type=checkbox]:checked`,f).forEach(e=>{e.value.split(/[\s]+/).forEach(e=>{u.classList.add(e)})}),e.s.restore(),e.s.removeMarkers(),e.editor.normalize(),e.history.snapshot.restore(i);let h=K.furthest(e.s.current(),K.isBlock,e.editor);if(h&&K.isEmpty(h))K.replace(h,u,void 0,!1,!0);else if(h){let t=c.text(` 211`);if(!e.o.table.splitBlockOnInsertTable)K.after(h,t),K.after(t,u);else{let n=e.s.range;n.collapse(!1),n.insertNode(t),n.collapse(!1),e.s.selectRange(n);let r=e.s.splitSelection(h,t);r?K.after(r,u):K.after(h,u)}}else e.s.insertNode(u,!1);d&&(e.s.setCursorIn(d),Fk(d,e.editor,e.ed)),n()};if(e.e.on(d,`mousemove`,e=>{K.isTag(e.target,`span`)&&h(e.target)}).on(d,`touchstart mousedown`,e=>{K.isTag(e.target,`span`)&&(e.preventDefault(),e.stopImmediatePropagation(),g(e.target))}).on(d,`keydown`,e=>{if(!K.isTag(e.target,`span`))return;if(e.key===`Enter`){e.preventDefault(),e.stopImmediatePropagation(),g(e.target);return}if(e.key===`Escape`){e.preventDefault(),e.stopImmediatePropagation(),n();return}let t=parseInt(G(e.target,`-index`)||`0`,10),r=Math.floor(t/s),i=t%s,a=t;switch(e.key){case bE:a=i>0?t-1:t;break;case SE:a=i<s-1?t+1:t;break;case xE:a=r>0?t-s:t;break;case CE:a=r<o-1?t+s:t;break;default:return}e.preventDefault(),e.stopImmediatePropagation(),a!==t&&(p[t].tabIndex=-1,p[a].tabIndex=0,p[a].focus(),h(p[a]))}),r&&r.parentElement){for(let t=0;t<o;t+=1){let n=e.c.div();G(n,`role`,`row`);for(let e=0;e<s;e+=1)n.appendChild(p[t*s+e]);d.appendChild(n)}p[0]&&(p[0].className=`hovered`)}return c},tooltip:`Insert table`};function OL(e){e.registerButton({name:`table`,group:`insert`})}q.add(`table`,OL),J.prototype.wrapNodes={exclude:new Set([`hr`,`style`,`br`]),emptyBlockAfterInit:!0};var kL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},AL=class extends nN{constructor(){super(...arguments),this.isSuitableStart=e=>K.isText(e)&&U(e.nodeValue)&&(/[^\s]/.test(e.nodeValue)||e.parentNode?.firstChild===e&&this.isSuitable(e.nextSibling))||this.isNotWrapped(e)&&!K.isTemporary(e),this.isSuitable=e=>K.isText(e)||this.isNotWrapped(e),this.isNotWrapped=e=>K.isElement(e)&&!(K.isBlock(e)||K.isTag(e,this.j.o.wrapNodes.exclude))}afterInit(e){e.o.enter.toLowerCase()!==`br`&&e.e.on(`drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn`,this.preprocessInput,{top:!0}).on(`afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn`,this.postProcessSetEditorValue)}beforeDestruct(e){e.e.off(`.wtn`)}postProcessSetEditorValue(){let{jodit:e}=this;if(!e.isEditorMode())return;let t=e.editor.firstChild,n=!1;for(;t;){if(t=jL(t,e),this.isSuitableStart(t)){n||e.s.save(),n=!0;let r=e.createInside.element(e.o.enter);for(K.before(t,r);t&&this.isSuitable(t);){let e=t.nextSibling;r.appendChild(t),t=e}r.normalize(),t=r}t&&=t.nextSibling}n&&(e.s.restore(),e.e.current===`afterInit`&&e.e.fire(`internalChange`))}preprocessInput(){let{jodit:e}=this,t=e.e.current===`afterInit`;if(!e.isEditorMode()||e.editor.firstChild||!e.o.wrapNodes.emptyBlockAfterInit&&t)return;let n=e.createInside.element(e.o.enter),r=e.createInside.element(`br`);K.append(n,r),K.append(e.editor,n),(e.s.isFocused()||e.e.current===`backSpaceAfterDelete`)&&e.s.setCursorBefore(r),e.e.fire(`internalChange`)}};kL([H],AL.prototype,`postProcessSetEditorValue`,null),kL([H],AL.prototype,`preprocessInput`,null);function jL(e,t){let n=e,r=e;do if(K.isElement(r)&&K.isLeaf(r)&&!K.isList(r.parentElement)){let e=K.findNotEmptySibling(r,!1);K.isTag(n,`ul`)?n.appendChild(r):n=K.wrap(r,`ul`,t.createInside),r=e}else break;while(r);return n}q.add(`wrapNodes`,AL),J.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}};var ML=new Set([`table`,`pre`,`blockquote`,`code`]);function NL(e,t){if(!e.o.dtd.removeExtraBr||K.isTag(t,`br`))return;let n=K.furthest(t,K.isBlock,e.editor);if(n&&!K.isTag(n,ML)){let n=K.isTag(t,`br`)?t:K.findNotEmptySibling(t,!1);if(!K.isTag(n,`br`)||K.findNotEmptySibling(n,!1))return;e.s.setCursorBefore(n),K.safeRemove(n)}}var PL=s({removeExtraBr:()=>NL}
211);function FL(e,t){if(K.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&K.isBlock(t)){let t=null,n=e.s.current()?.parentElement??null;for(;n&&n!==e.editor;){if(K.isBlock(n)){if(e.o.dtd.blockLimits[n.nodeName.toLowerCase()])break;t=n}n=n.parentElement}t&&(e.s.setCursorAfter(t),K.isEmpty(t)&&K.safeRemove(t))}}var IL=s({checkBlockNesting:()=>FL}),LL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},RL=class extends nN{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(IL).forEach(t=>{IL[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(PL).forEach(t=>{PL[t](this.j,e)})}};LL([Y(`:beforeInsertNode`)],RL.prototype,`__onBeforeInsertNode`,null),LL([Y(`:afterInsertNode`)],RL.prototype,`__onAfterInsertNode`,null),q.add(`dtd`,RL),Object.keys(YT).forEach(e=>{jP[e]=YT[e]});var zL=e=>e!=="__esModule";Object.keys(oF).filter(zL).forEach(e=>{RA.set(e.replace(`_`,`-`),oF[e])}),Object.keys(TP).filter(zL).forEach(e=>{let t=TP[e],n=V(t.prototype?.className)?t.prototype.className():e;if(!U(n)){console.warn(`Module name must be a string`,e);return}jP.modules[n]=t}),Object.keys(MA).filter(zL).forEach(e=>{jP.decorators[e]=MA[e]}),[`Confirm`,`Alert`,`Prompt`].forEach(e=>{jP[e]=TP[e]}),Object.keys(LF).filter(zL).forEach(e=>{jP.lang[e]=LF[e]});var BL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 128 128" xml:space="preserve"> <polygon points="112.4560547,23.3203125 112.4560547,75.8154297 31.4853516,75.8154297 31.4853516,61.953125 16.0131836,72.6357422 0.5410156,83.3164063 16.0131836,93.9990234 31.4853516,104.6796875 31.4853516,90.8183594 112.4560547,90.8183594 112.4560547,90.8339844 127.4589844,90.8339844 127.4589844,23.3203125"/> </svg> `;J.prototype.addNewLine=!0,J.prototype.addNewLineOnDBLClick=!0,J.prototype.addNewLineTagsTriggers=[`table`,`iframe`,`img`,`hr`,`pre`,`jodit`],J.prototype.addNewLineDeltaShow=20,RA.set(`enter`,BL);var VL=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},HL=class extends nN{constructor(){super(...arguments),this.__line=this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n(`Break`)}" class="jodit-add-new-line"><span>${RA.get(`enter`)}</span></div>`),this.__isMatchedTag=e=>!!(e&&this.j.o.addNewLineTagsTriggers.includes(e.nodeName.toLowerCase())),this.__isBeforeContent=!1,this.__lineInFocus=!1,this.__isShown=!1,this.__hideForce=()=>{this.__isShown&&(this.__isShown=!1,this.j.async.clearTimeout(this.__timeout),this.__lineInFocus=!1,K.safeRemove(this.__line),this.__line.style.setProperty(`--jd-anl-handle-offset`,`0`))},this.__canGetFocus=e=>e!=null&&K.isBlock(e)&&!/^(img|table|iframe|hr)$/i.test(e.nodeName),this.__onClickLine=e=>{let t=this.j,n=t.createInside.element(t.o.enter);this.__isBeforeContent&&this.__current&&this.__current.parentNode?this.__current===t.editor?K.prepend(t.editor,n):this.__current.parentNode.insertBefore(n,this.__current):t.editor.appendChild(n),t.s.setCursorIn(n),Fk(n,t.editor,t.ed),t.synchronizeValues(),this.__hideForce(),e.preventDefault()}}__show(){this.j.o.readonly||this.j.isLocked||(this.j.async.clearTimeout(this.__timeout),!this.__isShown&&(this.__isShown=!0,this.j.container.appendChild(this.__line),this.__line.style.width=this.j.container.clientWidth+`px`))}onLock(e){e&&this.__isShown&&this.__hideForce()}__hide(){!this.__isShown||this.__lineInFocus||(this.__timeout=this.j.async.setTimeout(this.__hideForce,{timeout:500,label:`add-new-line-hide`}))}afterInit(e){e.o.addNewLine&&(e.e.on(this.__line,`mousemove`,e=>{e.stopPropagation()}).on(this.__line,`mousedown touchstart`,this.__onClickLine).on(`change`,this.__hideForce).on(this.__line,`mouseenter`,()=>{this.j.async.clearTimeout(this.__timeout),this.__lineInFocus=!0}).on(this.__line,`mouseleave`,()=>{this.__lineInFocus=!1}).on(`changePlace`,this.__addEventListeners.bind(this)),this.__addEventListeners())}__addEventListeners(){let e=this.j;e.e.off(e.editor,`.addnewline`).off(e.container,`.addnewline`).off(`.addnewline`).on([e.ow,e.ew,e.editor],`scroll.addnewline`,this.__hideForce).on(`finishedCleanHTMLWorker.addnewline`,this.__hideForce).on(e.editor,`click.addnewline`,this.__hide).on(e.container,`mouseleave.addnewline`,this.__hide).on(e.editor,`mousemove.addnewline`,this.__onMouseMove)}onDblClickEditor(e){let t=this.j;if(!t.o.readonly&&t.o.addNewLineOnDBLClick&&e.target===t.editor&&t.s.isCollapsed()){let n=dA(t.editor,t,t.ed),r=e.pageY-t.ew.scrollX,i=t.createInside.element(t.o.enter);Math.abs(r-n.top)<Math.abs(r-(n.height+n.top))&&t.editor.firstChild?t.editor.insertBefore(i,t.editor.firstChild):t.editor.appendChild(i),t.s.setCursorIn(i),t.synchronizeValues(),this.__hideForce(),e.preventDefault()}}__onMouseMove(e){let t=this.j,n=(t.o.shadowRoot??t.ed).elementFromPoint(e.clientX,e.clientY);if(!K.isHTMLElement(n)||!K.isOrContains(t.editor,n))return;if(t.editor!==n&&!this.__isMatchedTag(n)&&(n=K.closest(n,this.__isMatchedTag,t.editor)),!n){this.__hide();return}if(this.__isMatchedTag(n)){let e=K.up(n,K.isBlock,t.editor);e&&e!==t.editor&&(n=e)}let r=fA(n,this.j),i=!1,{clientY:a,clientX:o}=e;if(this.j.iframe){let{top:e,left:t}=fA(this.j.iframe,this.j,!0);a+=e,o+=t}let s=this.j.o.addNewLineDeltaShow;Math.abs(a-r.top)<=s?(i=r.top,this.__isBeforeContent=!0):Math.abs(a-(r.top+r.height))<=s&&(i=r.top+r.height,this.__isBeforeContent=!1);let c=t.editor===n;i!==!1&&(c&&!this.__isBeforeContent||!c&&!MD(this.__isBeforeContent?K.prev:K.next,n,this.__canGetFocus,t.editor))?(this.__line.style.top=i+`px`,this.__current=n,this.__show(),this.__line.style.setProperty(`--jd-anl-handle-offset`,o-r.left-10+`px`)):(this.__current=!1,this.__hide())}beforeDestruct(){this.j.async.clearTimeout(this.__timeout),this.j.e.off(this.__line).off(`changePlace`,this.__addEventListeners),K.safeRemove(this.__line),this.j.e.off([this.j.ow,this.j.ew,this.j.editor],`.addnewline`).off(this.j.container,`.addnewline`).off(`.addnewline`)}};VL([Y(`:lock`)],HL.prototype,`onLock`,null),VL([H],HL.prototype,`__hide`,null),VL([Y(`:dblclick`)],HL.prototype,`onDblClickEditor`,null),VL([SA(e=>e.defaultTimeout)],HL.prototype,`__onMouseMove`,null),q.add(`addNewLine`,HL);var UL=`<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M36 4h-24c-2.21 0-4 1.79-4 4v32c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4v-32c0-2.21-1.79-4-4-4zm-24 4h10v16l-5-3-5 3v-16z"/> </svg> `;J.prototype.controls.classSpan={command:`applyClassName`,exec:RD,list:[`enabled`,`disabled`,`activated`,`text-left`,`text-center`,`text-right`,`warning`,`error`],isChildActive:(e,t)=>
211{let n=e.s.current();if(n){let r=K.closest(n,K.isElement,e.editor)||e.editor;return!!(t.control.args&&r.classList.contains(t.control.args[0].toString()))}return!1},isActive:(e,t)=>{let n=e.s.current();if(n){let r=K.closest(n,K.isElement,e.editor)||e.editor,i=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{r.classList.contains(e)&&(i=!0)}),!!(r&&r!==e.editor&&t.control.list!==void 0&&i)}return!1},childTemplate:(e,t,n)=>`<span class="${t}">${e.i18n(n)}</span>`,tooltip:`Insert className`};var WL=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`classSpan`,group:`script`}]}afterInit(e){e.registerCommand(`applyClassName`,(t,n,r)=>(e.s.commitStyle({attributes:{class:r}}),!1))}beforeDestruct(){}};q.add(`classSpan`,WL),RA.set(`class-span`,UL);var GL=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M832 1408l336-384h-768l-336 384h768zm1013-1077q15 34 9.5 71.5t-30.5 65.5l-896 1024q-38 44-96 44h-768q-38 0-69.5-20.5t-47.5-54.5q-15-34-9.5-71.5t30.5-65.5l896-1024q38-44 96-44h768q38 0 69.5 20.5t47.5 54.5z"/> </svg> `;J.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,replaceNBSP:!0,replaceOldTags:{i:`em`,b:`strong`},allowTags:!1,denyTags:`script,iframe,object,embed`,useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:[`object`,`embed`],disableCleanFilter:null},J.prototype.controls.eraser={command:`removeFormat`,tooltip:`Clear Formatting`},RA.set(`eraser`,GL);function KL(e){let t=/([^[]*)\[([^\]]+)]/,n=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,i={};return U(e)?(e.split(n).map(e=>{e=aD(e);let a=t.exec(e),o={},s=e=>{e=aD(e);let t=r.exec(e);t?o[t[1]]=t[2]:o[e]=!0};if(a){let e=a[2].split(n);a[1]&&(e.forEach(s),i[a[1].toUpperCase()]=o)}else i[e.toUpperCase()]=!0}),i):e?(Object.keys(e).forEach(t=>{i[t.toUpperCase()]=e[t]}),i):!1}var qL=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,JL=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function YL(e){return qL.test(e)||JL.test(e)}function XL(e,t){let{s:n}=e,r=t;if(!r){r=e.createInside.fake();let{range:t}=n;K.safeInsertNode(t,r),t.collapse()}let i=K.furthest(r,ZL,e.editor);if(i)if(n.cursorOnTheLeft(i))K.before(i,r);else if(n.cursorOnTheRight(i))K.after(i,r);else{let e=n.splitSelection(i);e&&K.after(e,r)}t||(n.setCursorBefore(r),K.safeRemove(r))}function ZL(e){return K.isInlineBlock(e)&&!K.isTag(e,mE)}function QL(e){let{s:t,editor:n,createInside:r}=e,{range:i}=t,a=i.cloneRange(),o=i.cloneRange(),s=r.fake(),c=r.fake();a.collapse(!0),o.collapse(!1),K.safeInsertNode(a,s),K.safeInsertNode(o,c),i.setStartBefore(s),i.collapse(!0),t.selectRange(i),XL(e,s),i.setEndAfter(c),i.collapse(!1),t.selectRange(i),XL(e,c);let l=[];K.between(s,c,e=>{ZL(e)&&!K.isTag(e,`a`)&&l.push(e),K.isElement(e)&&G(e,`style`)&&G(e,`style`,null)}),l.forEach(e=>K.unwrap(e));let u=(e,t)=>{if(!K.findNotEmptySibling(e,t)){let r=e.parentNode;if(r&&r!==n&&G(r,`style`))return G(r,`style`,null),u(r,t),!0}};u(s,!0)&&u(c,!1),i.setStartAfter(s),i.setEndBefore(c),t.selectRange(i),K.safeRemove(s),K.safeRemove(c)}function $L(e,t,n,r){let i=r&&K.isElement(t)&&r[t.nodeName];if(r&&K.isElement(t)&&i!==!0){if(!i)return n;let e=t.attributes;if(e&&e.length){let r=[];for(let t=0;t<e.length;t+=1){let n=i[e[t].name];(!n||n!==!0&&n!==e[t].value)&&r.push(e[t].name)}r.length&&(n=!0),r.forEach(e=>{t.removeAttribute(e)})}}return n}function eR(e,t,n){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!K.isElement(t))return n;let i=t.nodeName.toLowerCase();if(!r.includes(i))return n;let a=t,o=G(a,`data`)||G(a,`src`)||G(a,`movie`)||``;if(!o)return K.safeRemove(a),!0;let s=e.createInside.element(`iframe`);return G(s,{src:o,sandbox:``,frameborder:`0`,width:G(a,`width`),height:G(a,`height`)}),K.replace(a,s,void 0,!1,!0),!0}var tR=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]);function nR(e,t,n){if(e.o.cleanHTML.fillEmptyParagraph&&K.isBlock(t)&&K.isEmpty(t,mE)&&!K.isTag(t,tR)){let n=e.createInside.element(`br`);return t.appendChild(n),!0}return n}function rR(e,t,n,r,i,a){return K.isText(t)&&!t.nodeValue?(t===a&&e.s.isCollapsed()&&e.s.setCursorAfter(t),K.safeRemove(t),!0):n}function iR(e,t,n,r,i,a){if(a===t||!K.isText(t)||t.nodeValue==null||!nE().test(t.no
211deValue))return n;let o=K.furthest(a,K.isBlock,e.editor);return!o||K.isOrContains(o,t)?n:(t.nodeValue=t.nodeValue.replace(nE(),``),t===a&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||K.safeRemove(t),!0)}function aR(e,t,n){let r=oR(e,t,e.o.cleanHTML.replaceOldTags);return t===r?n:(t=r,!0)}function oR(e,t,n){if(!n||!K.isHTMLElement(t))return t;let r=n[t.nodeName.toLowerCase()]||n[t.nodeName];return r?K.replace(t,r,e.createInside,!0,!1):t}function sR(e,t,n){if(!e.o.cleanHTML.safeLinksTarget||!K.isElement(t)||t.nodeName!==`A`)return n;let r=t;if(G(r,`target`)!==`_blank`)return n;let i=(G(r,`rel`)||``).split(/\s+/).filter(Boolean),a=!1;return i.includes(`noopener`)||(i.push(`noopener`),a=!0),i.includes(`noreferrer`)||(i.push(`noreferrer`),a=!0),a?(G(r,`rel`,i.join(` `)),!0):n}function cR(e,t,n){if(!e.o.cleanHTML.sandboxIframesInContent||!K.isElement(t)||t.nodeName!==`IFRAME`)return n;let r=t;return YL(G(r,`src`)||``)||r.hasAttribute(`sandbox`)?n:(G(r,`sandbox`,``),!0)}function lR(e,t,n){if(!K.isElement(t))return n;let r=e.options.cleanHTML;return Kk(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})?!0:n}function uR(e,t,n){let r=e.o.cleanHTML.allowedStyles;if(!r||!K.isElement(t))return n;let i=t,a=G(i,`style`);if(!a)return n;let o=dR(t.nodeName.toLowerCase(),r);if(!o)return n;let s=fR(a,o);return s===a?n:(G(i,`style`,s||null),!0)}function dR(e,t){let n=t[e],r=t[`*`];if(!n&&!r)return null;let i=new Set;if(r)for(let e of r)i.add(e.toLowerCase());if(n)for(let e of n)i.add(e.toLowerCase());return i}function fR(e,t){return e.split(`;`).map(e=>e.trim()).filter(e=>{if(!e)return!1;let n=e.indexOf(`:`);if(n===-1)return!1;let r=e.substring(0,n).trim().toLowerCase();return t.has(r)}).join(`; `).replace(/;\s*$/,``)}function pR(e,t,n,r,i,a){return mR(e,t,a,r,i)?(K.safeRemove(t),!0):n}function mR(e,t,n,r,i){if(!K.isText(t)){let e=t.nodeName.toUpperCase();if(r&&!r[e])return!0;let n=e===`IFRAME`&&YL(G(t,`src`)||``);if(!r&&i&&i[e]&&!n)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let a=e.s.isCollapsed()?e.s.range.startContainer:null;return K.isElement(t)&&t.nodeName.match(dE)!=null&&!K.isTemporary(t)&&sD(t.innerHTML).length===0&&(n==null||!K.isOrContains(t,n))&&(a==null||!K.isOrContains(t,a))}var hR=s({allowAttributes:()=>$L,convertUnsafeEmbeds:()=>eR,fillEmptyParagraph:()=>nR,removeEmptyTextNode:()=>rR,removeInvTextNodes:()=>iR,replaceOldTags:()=>aR,safeLinksTarget:()=>sR,sandboxIframesInContent:()=>cR,sanitizeAttributes:()=>lR,sanitizeStyles:()=>uR,tryRemoveNode:()=>pR}),gR=Object.keys(hR);function _R(e,t,n,r,i){let a=!1,o=e.o.cleanHTML.disableCleanFilter;for(let s of gR){if(o&&o.has(s))continue;let c=hR[s];if(a=c(e,t,a,n,r,i),!t.isConnected)return!0}return a}var vR=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},yR=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`eraser`,group:`font-style`}],this.currentSelectionNode=null,this.walker=new VO(this.j.async,{timeout:this.j.o.cleanHTML.timeout})}afterInit(e){}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}startWalker(){let{jodit:e}=this,t=KL(this.j.o.cleanHTML.allowTags),n=KL(this.j.o.cleanHTML.denyTags);this.walker.on(`visit`,r=>_R(e,r,t,n,this.currentSelectionNode)).on(`end`,e=>{this.j.e.fire(e?`internalChange finishedCleanHTMLWorker`:`finishedCleanHTMLWorker`)})}beforeCommand(e){if(e.toLowerCase()===`removeformat`)return this.j.s.isCollapsed()?XL(this.j):QL(this.j),!1}onBeforeSetNativeEditorValue(e){let[t,n]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument(``).body];return t.innerHTML=e.value,this.j.e.fire(`safeHTML`,t),e.value=t.innerHTML,Vk(t,{safeJavaScriptLink:!0,removeOnError:!0}),K.safeRemove(n),!1}onAfterGetValueFromEditor(e){this.j.o.cleanHTML.collapseEmptyValueToEmptyString&&/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.test(e.value.trim())&&(e.value=``)}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),Vk(e,this.j.o.cleanHTML)}beforeDestruct(){this.walker.destruct()}};vR([Y([`:change`,`:afterSetMode`,`:afterInit`,`:mousedown`,`:keydown`])],yR.prototype,`onChangeCleanHTML`,null),vR([wA(`ready`)],yR.prototype,`startWalker`,null),vR([Y(`:beforeCommand`)],yR.prototype,`beforeCommand`,null),vR([Y(`:beforeSetNativeEditorValue`)],yR.prototype,`onBeforeSetNativeEditorValue`,null),vR([Y(`:afterGetValueFromEditor`)],yR.prototype,`onAfterGetValueFromEditor`,null),vR([Y(`:safeHTML`)],yR.prototype,`onSafeHTML`,null),q.add(`cleanHtml`,yR);var bR=`<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M24.89,6.61H22.31V4.47A2.47,2.47,0,0,0,19.84,2H6.78A2.47,2.47,0,0,0,4.31,4.47V22.92a2.47,2.47,0,0,0,2.47,2.47H9.69V27.2a2.8,2.8,0,0,0,2.8,2.8h12.4a2.8,2.8,0,0,0,2.8-2.8V9.41A2.8,2.8,0,0,0,24.89,6.61ZM6.78,23.52a.61.61,0,0,1-.61-.6V4.47a.61.61,0,0,1,.61-.6H19.84a.61.61,0,0,1,.61.6V6.61h-8a2.8,2.8,0,0,0-2.8,2.8V23.52Zm19,3.68a.94.94,0,0,1-.94.93H12.49a.94.94,0,0,1-.94-.93V9.41a.94.94,0,0,1,.94-.93h12.4a.94.94,0,0,1,.94.93Z"/> <path d="M23.49,13.53h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,17.37h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,21.22h-9.6a.93.93,0,1,0,0,1.86h9.6a.93.93,0,1,0,0-1.86Z"/> </svg> `,xR=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M960 896q26 0 45 19t19 45-19 45-45 19-45-19-19-45 19-45 45-19zm300 64l507 398q28 20 25 56-5 35-35 51l-128 64q-13 7-29 7-17 0-31-8l-690-387-110 66q-8 4-12 5 14 49 10 97-7 77-56 147.5t-132 123.5q-132 84-277 84-136 0-222-78-90-84-79-207 7-76 56-147t131-124q132-84 278-84 83 0 151 31 9-13 22-22l122-73-122-73q-13-9-22-22-68 31-151 31-146 0-278-84-82-53-131-124t-56-147q-5-59 15.5-113t63.5-93q85-79 222-79 145 0 277 84 83 52 132 123t56 148q4 48-10 97 4 1 12 5l110 66 690-387q14-8 31-8 16 0 29 7l128 64q30 16 35 51 3 36-25 56zm-681-260q46-42 21-108t-106-117q-92-59-192-59-74 0-113 36-46 42-2
2111 108t106 117q92 59 192 59 74 0 113-36zm-85 745q81-51 106-117t-21-108q-39-36-113-36-100 0-192 59-81 51-106 117t21 108q39 36 113 36 100 0 192-59zm178-613l96 58v-11q0-36 33-56l14-8-79-47-26 26q-3 3-10 11t-12 12q-2 2-4 3.5t-3 2.5zm224 224l96 32 736-576-128-64-768 431v113l-160 96 9 8q2 2 7 6 4 4 11 12t11 12l26 26zm704 416l128-64-520-408-177 138q-2 3-13 7z"/> </svg> `,SR=`<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path stroke-width="0" d="M10.5 20H2a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h1V3l2.03-.4a3 3 0 0 1 5.94 0L13 3v1h1a2 2 0 0 1 2 2v1h-2V6h-1v1H3V6H2v12h5v2h3.5zM8 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm2 4h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm0 2v8h8v-8h-8z"/> </svg> `,CR=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 18 18"> <g fill-rule="evenodd" stroke="none" stroke-width="1"> <g transform="translate(-381.000000, -381.000000)"> <g transform="translate(381.000000, 381.000000)"> <path d="M0,2 L2,2 L2,0 C0.9,0 0,0.9 0,2 L0,2 Z M0,10 L2,10 L2,8 L0,8 L0,10 L0,10 Z M4,18 L6,18 L6,16 L4,16 L4,18 L4,18 Z M0,6 L2,6 L2,4 L0,4 L0,6 L0,6 Z M10,0 L8,0 L8,2 L10,2 L10,0 L10,0 Z M16,0 L16,2 L18,2 C18,0.9 17.1,0 16,0 L16,0 Z M2,18 L2,16 L0,16 C0,17.1 0.9,18 2,18 L2,18 Z M0,14 L2,14 L2,12 L0,12 L0,14 L0,14 Z M6,0 L4,0 L4,2 L6,2 L6,0 L6,0 Z M8,18 L10,18 L10,16 L8,16 L8,18 L8,18 Z M16,10 L18,10 L18,8 L16,8 L16,10 L16,10 Z M16,18 C17.1,18 18,17.1 18,16 L16,16 L16,18 L16,18 Z M16,6 L18,6 L18,4 L16,4 L16,6 L16,6 Z M16,14 L18,14 L18,12 L16,12 L16,14 L16,14 Z M12,18 L14,18 L14,16 L12,16 L12,18 L12,18 Z M12,2 L14,2 L14,0 L12,0 L12,2 L12,2 Z M4,14 L14,14 L14,4 L4,4 L4,14 L4,14 Z M6,6 L12,6 L12,12 L6,12 L6,6 L6,6 Z"/> </g> </g> </g> </svg> `;J.prototype.controls.cut={command:`cut`,isDisabled:e=>e.s.isCollapsed(),tooltip:`Cut selection`},J.prototype.controls.copy={command:`copy`,isDisabled:e=>e.s.isCollapsed(),tooltip:`Copy selection`},J.prototype.controls.selectall={icon:`select-all`,command:`selectall`,tooltip:`Select all`},RA.set(`copy`,bR).set(`cut`,xR).set(`paste`,SR).set(`select-all`,CR);var wR=class{constructor(){this.buttons=[{name:`cut`,group:`clipboard`},{name:`copy`,group:`clipboard`},{name:`paste`,group:`clipboard`},{name:`selectall`,group:`clipboard`}]}init(e){var t;(t=this.buttons)==null||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${GE} cut.${GE}`).on(`copy.${GE} cut.${GE}`,t=>{var n;let r=TR(e,e.s.html),i=zD(t)||zD(e.ew)||zD(t.originalEvent);i&&(i.setData(OE,Xk(r)),i.setData(kE,r)),e.buffer.set(GE,r),e.e.fire(`pasteStack`,{html:r,action:e.o.defaultActionOnPaste||`insert_as_html`}),t.type===`cut`&&(e.s.remove(),e.s.focus()),t.preventDefault(),(n=e?.events)==null||n.fire(`afterCopy`,r)})}destruct(e){var t,n;(t=iO(e,`buffer`))==null||t.set(`clipboard`,``),(n=e?.events)==null||n.off(`.clipboard`)}};function TR(e,t){if(!t||e.s.isCollapsed())return t;let n=e.s.range.commonAncestorContainer;K.isElement(n)||(n=n.parentElement);let r=t;for(;n&&n!==e.editor&&K.isElement(n)&&!K.isBlock(n);){let e=n.cloneNode(!1);e.innerHTML=r,r=e.outerHTML,n=n.parentElement}return r}q.add(`clipboard`,wR);var ER=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 16 16"> <path stroke-width="0" d="M16 9v-6h-3v-1c0-0.55-0.45-1-1-1h-11c-0.55 0-1 0.45-1 1v3c0 0.55 0.45 1 1 1h11c0.55 0 1-0.45 1-1v-1h2v4h-9v2h-0.5c-0.276 0-0.5 0.224-0.5 0.5v5c0 0.276 0.224 0.5 0.5 0.5h2c0.276 0 0.5-0.224 0.5-0.5v-5c0-0.276-0.224-0.5-0.5-0.5h-0.5v-1h9zM12 3h-11v-1h11v1z"/> </svg> `,DR={"copy-format":`ÙØ³Ø® Ø§ÙØªÙسÙÙ`},OR={"copy-format":`KopÃrovat formát`},kR={"copy-format":`Format kopierenÑ`},AR={"copy-format":`Copiar formato`},jR={"copy-format":`Ú©Ù¾Û Ú©Ø±Ø¯Ù ÙØ§Ùب`},MR={"copy-format":`Kopioi muotoilu`},NR={"copy-format":`Format de copie`},PR={"copy-format":`×עתק ×¢×צ××`},FR={"copy-format":`Formátum másolás`},IR={"copy-format":`salin format`},LR={"copy-format":`Copia il formato`},RR={"copy-format":`copyformat`}
211,zR={"copy-format":`ë³µì¬ íì`},BR={"copy-format":`ФоÑÐ¼Ð°Ñ Ñ
ÑÑлаÑ
`},VR={"copy-format":`opmaak kopiëren`},HR={"copy-format":`format kopii`},UR={"copy-format":`Copiar formato`},WR={"copy-format":`ÐопиÑоваÑÑ ÑоÑмаÑ`},GR={"copy-format":`Kopyalama Biçimi`},KR={"copy-format":`å¤å¶æ ¼å¼`},qR={"copy-format":`è¤è£½æ ¼å¼`},JR=s({ar:()=>DR,cs_cz:()=>OR,de:()=>kR,es:()=>AR,fa:()=>jR,fi:()=>MR,fr:()=>NR,he:()=>PR,hu:()=>FR,id:()=>IR,it:()=>LR,ja:()=>RR,ko:()=>zR,mn:()=>BR,nl:()=>VR,pl:()=>HR,pt_br:()=>UR,ru:()=>WR,tr:()=>GR,zh_cn:()=>KR,zh_tw:()=>qR}),YR=`copy-format`,XR=[`lineHeight`,`fontWeight`,`fontStyle`,`fontSize`,`fontFamily`,`color`,`margin`,`padding`,`borderWidth`,`borderStyle`,`borderColor`,`borderRadius`,`backgroundColor`,`textDecorationLine`],ZR=(e,t,n,r)=>{let i=W(n,t);return i===r[t]&&(i=n.parentNode&&n!==e.editor&&n.parentNode!==e.editor?ZR(e,t,n.parentNode,r):void 0),i},QR=(e,t,n)=>{let r={};return t&&XR.forEach(i=>{r[i]=ZR(e,i,t,n),i.match(/border(Style|Color)/)&&!r.borderWidth&&(r[i]=void 0)}),r};J.prototype.controls.copyformat={exec:(e,t,{button:n})=>{if(t){if(e.buffer.exists(YR))e.buffer.delete(YR),e.e.off(e.editor,`mouseup.copy-format`);else{let n={},r=K.up(t,e=>e&&!K.isText(e),e.editor)||e.editor,i=e.createInside.span();e.editor.appendChild(i),XR.forEach(e=>{n[e]=W(i,e)}),i!==e.editor&&K.safeRemove(i);let a=QR(e,r,n);e.e.on(e.editor,`mouseup.copy-format`,()=>{e.buffer.delete(YR);let t=e.s.current();t&&(K.isTag(t,`img`)?W(t,a):e.s.commitStyle({attributes:{style:a}})),e.e.off(e.editor,`mouseup.copy-format`)}),e.buffer.set(YR,!0)}n.update()}},isActive:e=>e.buffer.exists(YR),tooltip:`Paint format`};function $R(e){e.registerButton({name:`copyformat`,group:`clipboard`}),qO(JR)}q.add(`copyformat`,$R),RA.set(`copyformat`,ER);var ez=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},tz=class extends nN{constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=e=>{let t=zD(e);return t?t.getData(kE)||t.getData(OE):null}}afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],`dragstart.DragAndDrop`,this.onDragStart)}onDragStart(e){let t=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=K.isOrContains(this.j.editor,t,!0),this.isCopyMode=this.isFragmentFromEditor?Ek(e):!0,this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,nz(t)&&(t=t.querySelector(`img`)),K.isTag(t,`img`)&&(this.draggable=t.cloneNode(!0),wD(this.draggable,`target`,t)),this.addDragListeners()}addDragListeners(){this.j.e.on(`dragover`,this.onDrag).on(`drop.DragAndDrop`,this.onDrop).on(window,`dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop`,this.onDragEnd)}removeDragListeners(){this.j.e.off(`dragover`,this.onDrag).off(`drop.DragAndDrop`,this.onDrop).off(window,`dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop`,this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire(`hidePopup`),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&=(K.safeRemove(this.draggable),null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire(`paste`,e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,n=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),r=this.__getWorkFragment(n,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),r&&this.__insertFragment.call(this,r,n),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let n=null;if(!this.draggable&&e)n=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]=G(this.draggable,`-is-file`)===`1`?[`a`,`href`]:[`img`,`src`];n=this.j.createInside.element(e),G(n,t,G(this.draggable,`data-src`)||G(this.draggable,`src`)||``),e===`a`&&(n.textContent=G(n,t)||``)}else n=wD(this.draggable,`target`);else this.getText(t)&&(n=this.j.createInside.fromHTML(this.getText(t)));return n}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire(`synchro`)),K.isTag(e,`img`)&&this.j.events&&this.j.e.fire(`afterInsertImage`,e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,`.DragAndDrop`).off(`.DragAndDrop`).off([window,this.j.ed,this.j.editor],`dragstart.DragAndDrop`,this.onDragStart)}};ez([H],tz.prototype,`onDragStart`,null),ez([SA(e=>e.defaultTimeout/10)],tz.prototype,`onDrag`,null),ez([H],tz.prototype,`onDragEnd`,null),ez([H],tz.prototype,`onDrop`,null);function nz(e){return K.isElement(e)&&e.classList.contains(XM.prototype.getFullElName(`item`))}q.add(`dragAndDrop`,tz),J.prototype.draggableTags=[`img`,`jodit-media`,`jodit`];var rz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},iz;(function(e){e[e.IDLE=0]=`IDLE`,e[e.WAIT_DRAGGING=1]=`WAIT_DRAGGING`,e[e.DRAGGING=2]=`DRAGGING`})(iz||={});var az=class e extends nN{constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0,this.state=iz.IDLE}afterInit(){this.dragList=this.j.o.draggableTags?hO(this.j.o.draggableTags).filter(
211Boolean).map(e=>e.toLowerCase()):[],this.j.e.on(`startDragElement`,this.onStartDragElement),this.dragList.length&&this.j.e.on(`mousedown dragstart`,this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>iz.IDLE||!e||this.startDragging(e,t)}onDragStart(e){if(e.type===`dragstart`&&this.draggable)return!1;if(this.state>iz.IDLE)return;let t=e.target;if(!this.dragList.length||!t)return;let n=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),r=K.furthest(t,n,this.j.editor)||(n(t)?t:null);r&&(K.isTag(r.parentElement,`a`)&&r.parentElement.firstChild===r&&r.parentElement.lastChild===r&&(r=r.parentElement),this.startDragging(r,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=Ek(t),this.draggable=e.cloneNode(!0),wD(this.draggable,`target`,e),this.state=iz.WAIT_DRAGGING,this.addDragListeners()}onDrag(t){if(!this.draggable||this.state===iz.IDLE)return;let n=t.clientX,r=t.clientY;if(!(this.state===iz.WAIT_DRAGGING&&Math.sqrt((n-this.startX)**2+(r-this.startY)**2)<this.diffStep)){if(this.state===iz.WAIT_DRAGGING&&(this.j.lock(`drag-and-drop-element`),this.state=iz.DRAGGING),this.j.e.fire(`hidePopup hideResizer`),!this.draggable.parentNode){let n=wD(this.draggable,`target`);W(this.draggable,{zIndex:0x9184e72a000,pointerEvents:`none`,pointer:`drag`,position:`fixed`,opacity:.7,display:`inline-block`,left:t.clientX,top:t.clientY,width:n?.offsetWidth??100,height:n?.offsetHeight??100}),YO(this.j,e).appendChild(this.draggable)}W(this.draggable,{left:t.clientX,top:t.clientY}),this.j.s.insertCursorAtPoint(t.clientX,t.clientY)}}onDragEnd(){this.isInDestruct||(this.removeDragListeners(),this.j.unlock(),this.state=iz.IDLE,this.draggable&&=(K.safeRemove(this.draggable),null))}onDrop(){if(!this.draggable||this.state<iz.DRAGGING){this.onDragEnd();return}let e=wD(this.draggable,`target`);this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{K.isEmptyTextNode(e)&&K.safeRemove(e)}),t&&K.isEmpty(t)&&!K.isCell(t)&&K.safeRemove(t),K.isTag(e,`img`)&&this.j.e&&this.j.e.fire(`afterInsertImage`,e),this.j.e.fire(`synchro`)}addDragListeners(){this.j.e.on(this.j.editor,`mousemove`,this.onDrag).on(`mouseup`,this.onDrop).on([this.j.ew,this.ow],`mouseup`,this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,`mousemove`,this.onDrag).off(`mouseup`,this.onDrop).off([this.j.ew,this.ow],`mouseup`,this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off(`mousedown dragstart`,this.onDragStart).off(`startDragElement`,this.onStartDragElement),this.removeDragListeners()}};rz([H],az.prototype,`onStartDragElement`,null),rz([H],az.prototype,`onDragStart`,null),rz([SA(e=>e.defaultTimeout/10)],az.prototype,`onDrag`,null),rz([H],az.prototype,`onDragEnd`,null),rz([H],az.prototype,`onDrop`,null),q.add(`dragAndDropElement`,az),J.prototype.controls.file={popup:(e,t,n)=>{let r=(t,n=``)=>{e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${n}">${n||t}</a>`))},i=null;return t&&(K.isTag(t,`a`)||K.closest(t,`a`,e.editor))&&(i=K.isTag(t,`a`)?t:K.closest(t,`a`,e.editor)),yI(e,{filebrowser:e=>{e.files&&e.files.forEach(t=>r(e.baseurl+t)),n()},upload:!0,url:(e,t)=>{i?(G(i,`href`,e),G(i,`title`,t)):r(e,t),n()}},i,n,!1)},tags:[`a`],tooltip:`Insert file`};function oz(e){e.registerButton({name:`file`,group:`media`})}q.add(`file`,oz),J.prototype.autofocus=!1,J.prototype.cursorAfterAutofocus=`end`,J.prototype.saveSelectionOnBlur=!0;function sz(e){e.o.saveSelectionOnBlur&&e.e.on(`blur`,()=>{e.isEditorMode()&&e.s.save(!0)}).on(`focus`,()=>{e.isEditorMode()&&e.s.restore()});let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case`start`:t=K.first(e.editor,e=>K.isText(e));break;case`end`:t=K.last(e.editor,e=>K.isText(e));break}t&&e.s.setCursorIn(t,e.o.cursorAfterAutofocus===`start`)};e.e.on(`afterInit`,()=>{e.o.autofocus&&(e.defaultTimeout?e.async.setTimeout(t,300):t())}),e.e.on(`afterInit afterAddPlace`,()=>{e.e.off(e.editor,`mousedown.autofocus`).on(e.editor,`mousedown.autofocus`,t=>{e.isEditorMode()&&t.target&&K.isBlock(t.target)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})}q.add(`focus`,sz);var cz=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24"> <path stroke-width="0" d="M22,20.6L3.4,2H8V0H0v8h2V3.4L20.6,22H16v2h8v-8h-2V20.6z M16,0v2h4.7l-6.3,6.3l1.4,1.4L22,3.5V8h2V0H16z M8.3,14.3L2,20.6V16H0v8h8v-2H3.5l6.3-6.3L8.3,14.3z"/> </svg> `,lz=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M896 960v448q0 26-19 45t-45 19-45-19l-144-144-332 332q-10 10-23 10t-23-10l-114-114q-10-10-10-23t10-23l332-332-144-144q-19-19-19-45t19-45 45-19h448q26 0 45 19t19 45zm755-672q0 13-10 23l-332 332 144 144q19 19 19 45t-19 45-45 19h-448q-26 0-45-19t-19-45v-448q0-26 19-45t45-19 45 19l144 144 332-332q10-10 23-10t23 10l114 114q10 10 10 23z"/> </svg> `;J.prototype.fullsize=!1,J.prototype.globalFullSize=!0,RA.set(`fullsize`,cz).set(`shrink`,lz),J.prototype.controls.fullsize={exec:e=>{e.toggleFullSize()},update(e,t){let n=e.isFullSize?`shrink`:`fullsize`;t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=n:t.state.icon.name=n},tooltip:`Open in fullsize`,mode:3};var uz=new Set;function dz(e){e.registerButton({name:`fullsize`});let t=!1,n=0,r=0,i=0,a=0,o=!1,s=()=>{let{container:i,events:a}=e;a&&(t?(o||=(n=W(i,`height`,!0),r=W(i,`width`,!0),!0),W(i,{height:e.ow.innerHeight,width:e.ow.innerWidth})):o&&=(W(i,{height:n||`auto`,width:r||`auto`}),!1))},c=n=>{var r;let{container:o,events:c}=e;if(o){if(n===void 0&&(n=!o.classList.contains(`jodit_fullsize`)),e.setMod(`fullsize`,n),e.o.fullsize=n,t=n,o.classList.toggle(`jodit_fullsize`,n),e.toolbar&&(QD(e)&&((r=e.toolbarContainer)==null||r.appendChild(e.toolbar.container)),W(e.toolbar.container,`width`,`auto`)),n?uz.add(o):uz.delete(o),e.o.globalFullSize&&(uz.size===1&&n||uz.size===0&&!n)){n&&(i=e.ow.scrollX,a=e.ow.scrollY);
211let t=o.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle(`jodit_fullsize-box_true`,n),t=t.parentNode;s(),n||e.ow.scrollTo(i,a)}c.fire(`afterResize`)}};e.o.globalFullSize&&e.e.on(e.ow,`resize`,s),e.e.on(`afterInit afterOpen`,()=>{e.toggleFullSize(e?.options?.fullsize)}).on(`toggleFullSize`,c).on(`beforeDestruct`,()=>{t&&c(!1)}).on(`beforeDestruct`,()=>{e.events&&e.e.off(e.ow,`resize`,s)})}q.add(`fullsize`,dz),RA.set(`hr`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1600 736v192q0 40-28 68t-68 28h-1216q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h1216q40 0 68 28t28 68z"/> </svg> `),J.prototype.controls.hr={command:`insertHorizontalRule`,tags:[`hr`],tooltip:`Insert Horizontal Line`};function fz(e){e.registerButton({name:`hr`,group:`insert`}),e.registerCommand(`insertHorizontalRule`,()=>{let t=e.createInside.element(`hr`);e.s.insertNode(t,!1,!1);let n=K.closest(t.parentElement,K.isBlock,e.editor);n&&K.isEmpty(n)&&n!==e.editor&&(K.after(n,t),K.safeRemove(n));let r=K.next(t,K.isBlock,e.editor,!1);return r||(r=e.createInside.element(e.o.enter),K.after(t,r)),e.s.setCursorIn(r),!1})}q.add(`hr`,fz),J.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0};var pz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},mz=`__jodit_imageprocessor_binded`,hz=`__jodit_imageprocessor_bindedblob-id`,gz=class extends nN{afterInit(e){}beforeDestruct(e){let t=iO(e,`buffer`),n=t?.get(hz);if(t&&n){let e=Object.keys(n);for(let t of e)URL.revokeObjectURL(t);t.delete(hz)}}onAfterGetValueFromEditor(e,t){if(t!==`source-consumer`)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let n=t.buffer.get(hz);if(n){let t=Object.keys(n);for(let r of t)for(;e.value.includes(r);)e.value=e.value.replace(r,n[r])}}async afterChange(e){let{jodit:t}=this;t.editor&&$O(`img`,t.editor).forEach(e=>{wD(e,mz)||(wD(e,mz,!0),e.complete||t.e.on(e,`load`,function n(){var r;!t.isInDestruct&&((r=t.e)==null||r.fire(`resize`)),t.e.off(e,`load`,n)}),e.src&&/^data:/.test(e.src)&&_z(t,e),t.e.on(e,`mousedown touchstart`,()=>{t.s.select(e)}))})}};pz([Y(`:afterGetValueFromEditor`)],gz.prototype,`onAfterGetValueFromEditor`,null),pz([Y(`:beforeSetElementValue`)],gz.prototype,`onBeforeSetElementValue`,null),pz([Y([`:change`,`:afterInit`,`:changePlace`]),xA()],gz.prototype,`afterChange`,null);function _z(e,t){if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||typeof ArrayBuffer>`u`||typeof URL>`u`)return;let n=t.src,r=vz(n);t.src=URL.createObjectURL(r),e.e.fire(`internalUpdate`);let{buffer:i}=e,a=i.get(hz)||{};a[t.src]=n,e.buffer.set(hz,a)}function vz(e){let t=atob(e.split(`,`)[1]),n=e.split(`,`)[0].split(`:`)[1].split(`;`)[0],r=new ArrayBuffer(t.length),i=new Uint8Array(r);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return new Blob([r],{type:n})}q.add(`imageProcessor`,gz),J.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0};var yz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},bz=class extends JA{className(){return`UIImageMainTab`}appendChildToContainer(){}constructor(e,t,n){super(e),this.state=t,this.handlers=n}render(){return`<div class="jodit-form__group &__editSrc"> 212 <label>~Src~</label> 213 <div class="jodit-input_group"> 214 <input class="jodit-input &__imageSrc" type="text"/> 215 <div class="jodit-input_group-buttons &__fixImage"> 216 <a class="jodit-button &__changeImage" data-ref="changeImage">*image*</a> 217 <a class="jodit-button &__editImage" data-ref="editImage">*crop*</a> 218 </div> 219 </div> 220 </div> 221 <div class="jodit-form__group &__editTitle"> 222 <label>~Title~</label> 223 <input type="text" class="jodit-input &__imageTitle"/> 224 </div> 225 <div class="jodit-form__group &__editAlt"> 226 <label>~Alternative~</label> 227 <input type="text" class="jodit-input &__imageAlt"/> 228 </div> 229 <div class="jodit-form__group &__editLink"> 230 <label>~Link~</label> 231 <input type="text" class="jodit-input &__imageLink"/> 232 </div> 233 <div class="jodit-form__group &__editLinkTarget"> 234 <label class="jodit_vertical_middle"> 235 <input type="checkbox" class="jodit-checkbox &__imageLinkOpenInNewTab"/> 236 <span>~Open link in new tab~</span> 237 </label> 238 </div>`}async onStateImageSrcChange(){let e=this.getElm(`imageSrc`);e.value=this.state.values.imageSrc}onImageSrcChange(){this.state.values.imageSrc=this.getElm(`imageSrc`).value}onEditImageClick(e){this.handlers.openImageEditor(),e.stopPropagation()}onChangeImageClick(e){this.handlers.openImagePopup(this.getElm(`changeImage`)),e.stopPropagation()}onStateTitleChange(){let e=this.getElm(`imageTitle`);e.value=this.state.values.imageTitle}onTitleChange(){this.state.values.imageTitle=this.getElm(`imageTitle`).value}onStateAltChange(){let e=this.getElm(`imageAlt`);e.value=this.state.values.imageAlt}onAltChange(){this.state.values.imageAlt=this.getElm(`imageAlt`).value}onStateImageLinkChange(){let e=this.getElm(`imageLink`);e.value=this.state.values.imageLink}onImageLinkChange(){this.state.values.imageLink=this.getElm(`imageLink`).value}onStateImageLinkOpenInNewTabChange(){let e=this.getElm(`imageLinkOpenInNewTab`);e.checked=this.state.values.imageLinkOpenInNewTab}onImageLinkOpenInNewTabChange(){this.state.values.imageLinkOpenInNewTab=this.getElm(`imageLinkOpenInNewTab`).checked}hideFieldByOptions(){let e=this.j.o,t=e.image;[[`editSrc`,`editSrc`],[`editTitle`,`editTitle`],[`editAlt`,`editAlt`],[`editLink`,`editLink`],[`editLink`,`editLinkTarget`],[`useImageEditor`,`editImage`]].forEac
238h(([e,n])=>{W(this.getElm(n),`display`,t[e]?null:`none`)});let n=this.getElm(`changeImage`),r=!!(e.filebrowser.ajax.url||e.uploader.url);W(n,`display`,r?null:`none`);let i=this.getElm(`editImage`),a=!!e.filebrowser.ajax.url&&t.useImageEditor;W(i,`display`,a?null:`none`),W(this.getElm(`fixImage`),`display`,r||a?null:`none`)}};yz([Y(`state.values.imageSrc`)],bz.prototype,`onStateImageSrcChange`,null),yz([Y(`imageSrc:change`)],bz.prototype,`onImageSrcChange`,null),yz([Y(`editImage:click`)],bz.prototype,`onEditImageClick`,null),yz([Y(`changeImage:click`)],bz.prototype,`onChangeImageClick`,null),yz([Y(`state.values.imageTitle`)],bz.prototype,`onStateTitleChange`,null),yz([Y(`imageTitle:change`)],bz.prototype,`onTitleChange`,null),yz([Y(`state.values.imageAlt`)],bz.prototype,`onStateAltChange`,null),yz([Y(`imageAlt:change`)],bz.prototype,`onAltChange`,null),yz([Y(`state.values.imageLink`)],bz.prototype,`onStateImageLinkChange`,null),yz([Y(`imageLink:change`)],bz.prototype,`onImageLinkChange`,null),yz([Y(`state.values.imageLinkOpenInNewTab`)],bz.prototype,`onStateImageLinkOpenInNewTabChange`,null),yz([Y(`imageLinkOpenInNewTab:change`)],bz.prototype,`onImageLinkOpenInNewTabChange`,null),yz([wA(`ready`)],bz.prototype,`hideFieldByOptions`,null),bz=yz([uO],bz);var xz=e=>/^[-+]?[0-9.]+(px)?$/.test(e.toString())?parseFloat(e.toString()):e,Sz=e=>tO(e)?e?e+`px`:e.toString():(e=aD(e),/^[0-9]+$/.test(e)?e+`px`:e),Cz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},wz=class extends VA{className(){return`UIImagePositionTab`}constructor(e,t,n){super(e,{availableClasses:e.o.image.availableClasses}),this.state=t,this.handlers=n}render({availableClasses:e}){return`<div class="jodit-form__group &__editMargins"> 239 <label>~Margins~</label> 240 <div class="jodit-grid jodit_vertical_middle"> 241 <input class="jodit_col-lg-1-5 jodit-input &__marginTop" type="text" placeholder="~top~"/> 242 <a style="text-align: center;" class="jodit-properties__lock jodit_col-lg-1-5 &__lockMargin">*lock*</a> 243 <input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginRight" type="text" placeholder="~right~"/> 244 <input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginBottom" type="text" placeholder="~bottom~"/> 245 <input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginLeft" type="text" placeholder="~left~"/> 246 </div> 247 </div> 248 <div class="jodit-form__group &__editAlign"> 249 <label>~Align~</label> 250 <select class="jodit-select &__align"> 251 <option value="">~--Not Set--~</option> 252 <option value="left">~Left~</option> 253 <option value="center">~Center~</option> 254 <option value="right">~Right~</option> 255 </select> 256 </div> 257 <div class="jodit-form__group &__editStyle"> 258 <label>~Styles~</label> 259 <input type="text" class="jodit-input &__style"/> 260 </div> 261 <div class="jodit-form__group &__editClass"> 262 <label>~Classes~</label> 263 ${(()=>{let t=[];return e&&e.length>0?(t.push(`<select class="jodit-input jodit-select &__classes">`),e.forEach(e=>{U(e)?t.push(`<option value="${e}">${e}</option>`):t.push(`<option value="${e[0]}">${e[1]}</option>`)}),t.push(`</select>`)):t.push(`<input type="text" class="jodit-input &__classes"/>`),t.join(``)})()} 264 </div> 265 <div class="jodit-form__group &__editId"> 266 <label>Id</label> 267 <input type="text" class="jodit-input &__id"/> 268 </div> 269 <div 270 class="jodit-form__group &__editBorderRadius" 271 > 272 <label>~Border radius~</label> 273 <input type="number" class="jodit-input &__borderRadius"/> 274 </div>`}onStateAlignChange(){let e=this.getElm(`align`);e.value=this.state.values.align}onChangeAlign(){let e=this.getElm(`align`);this.state.values.align=e.value}onStateValuesBorderRadiusChange(){let e=this.getElm(`borderRadius`);e.value=this.state.values.borderRadius.toString()}onChangeBorderRadius(){let e=this.getElm(`borderRadius`);this.state.values.borderRadius=parseFloat(e.value)}onStateValuesIdChange(){let e=this.getElm(`id`);e.value=this.state.values.id}onChangeId(){let e=this.getElm(`id`);this.state.values.id=e.value}onStateValuesStyleChange(){let e=this.getElm(`style`);e.value=this.state.values.style}onChangeStyle(){let e=this.getElm(`style`);this.state.values.style=e.value}onStateValuesClassesChange(){let e=this.getElm(`classes`);e.value=this.state.values.classes}onChangClasses(){let e=this.getElm(`classes`);this.state.values.classes=e.value}onLockMarginClick(e){this.state.marginIsLocked=!this.state.marginIsLocked,e.preventDefault()}onChangeMarginIsLocked(){let e=this.getElm(`marginBottom`),t=this.getElm(`marginRight`),n=this.getElm(`marginLeft`),r=this.getElm(`lockMargin`);
274if([t,e,n].forEach(e=>{G(e,`disabled`,this.state.marginIsLocked||null)}),r.innerHTML=RA.get(this.state.marginIsLocked?`lock`:`unlock`),this.state.marginIsLocked){let e=this.state.values.marginTop;this.state.values.marginRight=e,this.state.values.marginBottom=e,this.state.values.marginLeft=e}}onStateValuesMarginChange(){let e=this.getElm(`marginTop`),t=this.getElm(`marginRight`),n=this.getElm(`marginBottom`),r=this.getElm(`marginLeft`);e.value=this.state.values.marginTop.toString(),t.value=this.state.values.marginRight.toString(),n.value=this.state.values.marginBottom.toString(),r.value=this.state.values.marginLeft.toString()}onChangeMargin(){let e=this.getElm(`marginTop`),t=this.getElm(`marginRight`),n=this.getElm(`marginBottom`),r=this.getElm(`marginLeft`);this.state.values.marginTop=xz(e.value),this.state.marginIsLocked?(this.state.values.marginRight=this.state.values.marginTop,this.state.values.marginBottom=this.state.values.marginTop,this.state.values.marginLeft=this.state.values.marginTop):(this.state.values.marginRight=xz(t.value),this.state.values.marginBottom=xz(n.value),this.state.values.marginLeft=xz(r.value))}hideFieldByOptions(){let e=this.j.o.image;[[`editMargins`,`editMargins`],[`editAlign`,`editAlign`],[`editStyle`,`editStyle`],[`editClass`,`editClass`],[`editId`,`editId`],[`editBorderRadius`,`editBorderRadius`]].forEach(([t,n])=>{W(this.getElm(n),`display`,e[t]?null:`none`)})}};Cz([wA(`ready`),Y(`state.values.align`)],wz.prototype,`onStateAlignChange`,null),Cz([Y(`align:change`)],wz.prototype,`onChangeAlign`,null),Cz([wA(`ready`),Y(`state.values.borderRadius`)],wz.prototype,`onStateValuesBorderRadiusChange`,null),Cz([Y(`borderRadius:change`)],wz.prototype,`onChangeBorderRadius`,null),Cz([wA(`ready`),Y(`state.values.id`)],wz.prototype,`onStateValuesIdChange`,null),Cz([Y(`id:change`)],wz.prototype,`onChangeId`,null),Cz([wA(`ready`),Y(`state.values.style`)],wz.prototype,`onStateValuesStyleChange`,null),Cz([Y(`style:change`)],wz.prototype,`onChangeStyle`,null),Cz([wA(`ready`),Y(`state.values.classes`)],wz.prototype,`onStateValuesClassesChange`,null),Cz([Y(`classes:change`)],wz.prototype,`onChangClasses`,null),Cz([Y(`lockMargin:click`)],wz.prototype,`onLockMarginClick`,null),Cz([wA(`ready`),Y(`state.marginIsLocked`)],wz.prototype,`onChangeMarginIsLocked`,null),Cz([wA(`ready`),Y([`state.values.marginTop`,`state.values.marginRight`,`state.values.marginBottom`,`state.values.marginLeft`])],wz.prototype,`onStateValuesMarginChange`,null),Cz([Y([`marginTop:change`,`marginRight:change`,`marginBottom:change`,`marginLeft:change`])],wz.prototype,`onChangeMargin`,null),Cz([wA(`ready`)],wz.prototype,`hideFieldByOptions`,null),wz=Cz([uO],wz);var Tz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ez=class extends JA{className(){return`UIImagePropertiesForm`}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let n=t.getElm(e);if(n)return n}return null}constructor(e,t,n,r){super(e),this.state=t,this.handlers=r,this.__mainTab=new bz(this.jodit,this.state,this.handlers),this.__positionTab=new wz(this.jodit,this.state,this.handlers),this.getElm(`tabsBox`).appendChild(vI(e,[{name:`Image`,content:this.__mainTab},{name:`Advanced`,content:this.__positionTab}],n)),this.setMod(`lock-size`,this.state.sizeIsLocked),this.append(this.__mainTab).append(this.__positionTab)}render(){return`<form> 275 <div class="jodit-grid jodit-grid_xs-column"> 276 <div class="jodit_col-lg-2-5 jodit_col-xs-5-5"> 277 <div class="&__view-box"> 278 <div class="&__imageView"> 279 <img class="&__imageViewSrc" src="" alt=""/> 280 </div> 281 <div class="jodit-form__group &__imageSizes"> 282 <input type="text" class="jodit-input &__imageWidth"/> 283 <a class="&__lockSize">${RA.get(`lock`)}</a> 284 <input type="text" class="&__imageHeight jodit-input"/> 285 </div>
286 </div> 287 </div> 288 <div class="jodit_col-lg-3-5 jodit_col-xs-5-5 &__tabsBox"></div> 289 </div> 290 </form>`}onChangeSizeIsLocked(){let e=this.getElm(`lockSize`),t=this.getElm(`imageWidth`);e.innerHTML=RA.get(this.state.sizeIsLocked?`lock`:`unlock`),this.setMod(`lock-size`,this.state.sizeIsLocked),this.j.e.fire(t,`change`)}onLockSizeClick(){this.state.sizeIsLocked=!this.state.sizeIsLocked}onStateValuesSizeChange(){let e=this.getElm(`imageWidth`),t=this.getElm(`imageHeight`);e!==this.j.od.activeElement&&(e.value=this.state.values.imageWidth.toString()),t!==this.j.od.activeElement&&(t.value=this.state.values.imageHeight.toString())}onImageWidthChange(e){let t=this.getElm(`imageWidth`),n=this.getElm(`imageHeight`);if(!this.state.sizeIsLocked||!hD(t.value)||!hD(n.value)){this.state.values.imageWidth=t.value,this.state.values.imageHeight=n.value;return}let r=parseFloat(t.value),i=parseFloat(n.value);e.target===t?(this.state.values.imageWidth=r,this.state.values.imageHeight=Math.round(r/this.state.ratio)):(this.state.values.imageWidth=Math.round(i*this.state.ratio),this.state.values.imageHeight=i)}onStateValuesImageSrcChange(){let{imageSrc:e}=this.state.values;if(!e)return;G(this.getElm(`imageViewSrc`),`src`,e);let t=new Image;t.src=e,this.state.image=t}hideFieldByOptions(){let e=this.j.o.image;[[`editSize`,`imageSizes`],[`showPreview`,`imageView`]].forEach(([t,n])=>{W(this.getElm(n),`display`,e[t]?null:`none`)})}};Tz([wA(`ready`),Y(`state.sizeIsLocked`)],Ez.prototype,`onChangeSizeIsLocked`,null),Tz([Y(`lockSize:click`)],Ez.prototype,`onLockSizeClick`,null),Tz([wA(`ready`),Y([`state.values.imageWidth`,`state.values.imageHeight`])],Ez.prototype,`onStateValuesSizeChange`,null),Tz([Y([`imageWidth:change`,`imageHeight:change`,`imageWidth:keydown`,`imageHeight:keydown`,`imageWidth:mousedown`,`imageHeight:mousedown`,`imageWidth:paste`,`imageHeight:paste`]),xA()],Ez.prototype,`onImageWidthChange`,null),Tz([wA(`ready`),Y(`state.values.imageSrc`)],Ez.prototype,`onStateValuesImageSrcChange`,null),Tz([wA(`ready`)],Ez.prototype,`hideFieldByOptions`,null),Ez=Tz([uO],Ez);function Dz(e,t){let n=G(t.image,`src`)||``,r=e.c.element(`a`),i=()=>{if(r.host!==location.host){e.confirm(`You can only edit your own images. Download this image on the host?`,n=>{n&&e.uploader&&e.uploader.uploadRemoteImage(r.href.toString(),n=>{e.alert(`The image has been successfully uploaded to the host!`,()=>{U(n.newfilename)&&(t.values.imageSrc=n.baseurl+n.newfilename)})},t=>{e.alert(e.i18n(`There was an error loading %s`,t.message))})});return}};r.href=n,e.filebrowser.dataProvider.getPathByUrl(r.href.toString()).then(i=>{HM.call(e.filebrowser,r.href,i.name,i.path,i.source,e=>{let r=new Date().getTime(),i=e||n;t.values.imageSrc=i+(i.indexOf(`?`)===-1?`?`:``)+`&_tmp=`+r.toString()},t=>{e.alert(t.message)})}).catch(t=>{e.alert(t.message,i)})}function Oz(e,t,n,r){let i=new Lj(t),a=()=>{i.close(),i.destruct()};i.setContent(yI(e,{upload:e=>{e.files&&e.files.length&&(n.values.imageSrc=e.baseurl+e.files[0]),a()},filebrowser:async e=>{e&&XE(e.files)&&e.files.length&&(n.values.imageSrc=e.files[0],a())}},n.image,a)).open(()=>fA(r))}function kz(e,t){e.style.cssFloat&&[`left`,`right`].indexOf(e.style.cssFloat.toLowerCase())!==-1?t.align=W(e,`float`):W(e,`display`)===`block`&&e.style.marginLeft===`auto`&&e.style.marginRight===`auto`?t.align=`center`:t.align=``}function Az(e,t,n){let r=K.closest(e.sourceImage,`a`,t.editor);
290r?(n.imageLink=G(r,`href`)||``,n.imageLinkOpenInNewTab=G(r,`target`)===`_blank`):(n.imageLink=``,n.imageLinkOpenInNewTab=!1)}function jz(e,t,n){let r=!0,i=!1;[`marginTop`,`marginRight`,`marginBottom`,`marginLeft`].forEach(n=>{let a=e.style.getPropertyValue(fD(n));if(!a){i=!0,t[n]=0;return}/^[0-9]+(px)?$/.test(a)&&(a=parseInt(a,10)),t[n]=a,(i&&t[n]||r&&n!==`marginTop`&&t[n]!==t.marginTop)&&(r=!1)}),n.marginIsLocked=r}async function Mz(e,t,n){try{await e.decode()}catch(e){console.error(e)}let r=W(e,`width`,!0)||G(e,`width`)||!1,i=W(e,`height`,!0)||G(e,`height`)||!1;t.imageWidth=r===!1?e.offsetWidth||e.naturalWidth:xz(r),hD(t.imageWidth)?t.imageHeight=i===!1?e.offsetHeight||e.naturalHeight:xz(i):t.imageHeight=i||``;let{imageWidth:a,imageHeight:o}=t,s=parseFloat(a.toString());if(!hD(a)||!hD(o)){n.sizeIsLocked=!1;return}if(i===!1){t.imageHeight=Math.round(s/n.ratio),n.sizeIsLocked=!0;return}let c=parseFloat(o.toString());n.sizeIsLocked=Math.abs(s-c*n.ratio)<1}async function Nz(e,t){let{sourceImage:n,values:r}=t;return kz(n,r),r.borderRadius=parseInt(n.style.borderRadius||`0`,10)||0,r.id=G(n,`id`)||``,r.imageTitle=G(n,`title`)||``,r.imageAlt=G(n,`alt`)||``,r.style=G(n,`style`)||``,r.classes=(G(n,`class`)||``).replace(/jodit_focused_image[\s]*/,``),jz(n,r,t),Az(t,e,r),r.imageSrc=G(n,`src`)||``,Mz(n,r,t)}function Pz(e,t,n,r){let i=K.closest(t,`a`,e.editor);if(n){if(i||=K.wrap(t,`a`,e.createInside),G(i,`href`,n),G(i,`target`,r?`_blank`:null),!r){let e=(G(i,`rel`)||``).split(/\s+/).filter(e=>e&&e!==`noopener`&&e!==`noreferrer`);G(i,`rel`,e.length?e.join(` `):null)}}else i&&i.parentNode&&i.parentNode.replaceChild(t,i)}function Fz(e,t,n,r,i,a,o){let s=[t,n,r,i],c=(e,t)=>{let n=W(a,e),r=Sz(t);n.toString()!==r.toString()&&W(a,e,r)};if(o)c(`margin`,t);else{let e=[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`];s.forEach((t,n)=>{let r=e[n];c(r,t)})}}function Iz(e,t,n,r){if(t!==e.offsetWidth||n!==e.offsetHeight){let i=t?Sz(t):null,a=n?Sz(n):null;W(e,{width:i,height:i&&r?null:a}),G(e,`width`,i&&hD(t)&&G(e,`width`)?i:null),(!G(e,`width`)||r)&&(a=null),G(e,`height`,a)}}function Lz(e,t,n){let{style:r,imageSrc:i,borderRadius:a,imageTitle:o,imageAlt:s,imageLink:c,imageWidth:l,imageHeight:u,marginTop:d,marginRight:f,marginBottom:p,marginLeft:m,imageLinkOpenInNewTab:h,align:g,classes:_,id:v}=t.values,y=e.o;if(y.image.editStyle&&G(n,`style`,r||null),i)G(n,`src`,i);else{K.safeRemove(n);return}n.style.borderRadius=a?a+`px`:``,G(n,`title`,o||null),G(n,`alt`,s||null),Pz(e,n,c,h),Iz(n,l,u,t.sizeIsLocked),e.o.image.editMargins&&Fz(e,d,f,p,m,n,t.marginIsLocked),y.image.editClass&&G(n,`class`,_||null),y.image.editId&&G(n,`id`,v||null),y.image.editAlign&&lk(n,g)}var Rz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},zz=class extends nN{constructor(){super(...arguments),this.state={image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:``,imageSrc:``,borderRadius:0,imageTitle:``,imageAlt:``,imageLink:``,imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:``,id:``,align:``}},this.activeTabState={activeTab:`Image`}}get form(){return new Ez(this.j,this.state,this.activeTabState,{openImageEditor:()=>Dz(this.j,this.state),openImagePopup:e=>Oz(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:[`fullsize`,`dialog.close`]}),n=this.__buttons;return n.check.onAction(()=>{Lz(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),n.remove.onAction(()=>{e.s.removeNode(this.state.sourceImage),t.close()}),n.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n(`Image properties`)),t.setContent(this.form),t.setFooter([[n.cancel,n.remove],n.check]),e.e.on(t,`afterClose`,()=>{this.state.image.parentNode&&e.o.image.selectImageAfterClose&&e.s.select(this.state.sourceImage)}),t.setSize(e.o.image.dialogWidth),PD(e,t.container),t}get __buttons(){let{j:e}=this;return{check:GA(e,`ok`,`Apply`,`primary`),remove:GA(e,`bin`,`Delete`),cancel:GA(e,`
290cancel`,`Cancel`)}}open(){return this.activeTabState.activeTab=`Image`,this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.async.promise((e,t)=>Nz(this.j,this.state).then(e,t)).catch(e=>{UD(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__lock(){this.dialog.lock(),this.form.setMod(`lock`,!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod(`lock`,!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on(`afterConstructor changePlace`,()=>{e.e.off(e.editor,`.imageproperties`).on(e.editor,`dblclick.imageproperties`,n=>{let r=n.target;if(K.isTag(r,`img`))if(e.o.image.openOnDblClick){if(this.j.e.fire(`openOnDblClick`,r)===!1)return;t.state.sourceImage=r,t.state.image=r.cloneNode(!0),e.o.readonly||(n.stopImmediatePropagation(),n.preventDefault(),t.open())}else n.stopImmediatePropagation(),e.s.select(r)})}).on(`openImageProperties.imageproperties`,e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){console.error(e)}if(this.state.sizeIsLocked&&hD(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire(`updateImageProperties.imageproperties`,e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){var t,n;Object.values(iO(this,`__buttons`)??{}).forEach(e=>e.destruct()),(t=iO(this,`dialog`))==null||t.destruct(),(n=iO(this,`form`))==null||n.destruct(),e.e.off(e.editor,`.imageproperties`).off(`.imageproperties`)}};Rz([aO],zz.prototype,`form`,null),Rz([aO],zz.prototype,`dialog`,null),Rz([aO],zz.prototype,`__buttons`,null),Rz([Y(`state.image`)],zz.prototype,`onStateValuesImageSrcChange`,null),q.add(`imageProperties`,zz);var Bz=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M352 832q0 14-9 23l-288 288q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-576q0-13 9.5-22.5t22.5-9.5q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg> `,Vz=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg> `,Hz=(e,t)=>`${K.isCell(t)?`padding`:`margin`}${e===`rtl`?`Right`:`Left`}`;RA.set(`indent`,Bz).set(`outdent`,Vz),J.prototype.controls.indent={tooltip:`Increase Indent`},J.prototype.controls.outdent={isDisabled:e=>{let t=e.s.current();if(!t)return!0;if(e.o.tab?.tabInsideLiInsertNewList){let n=K.closest(t,`li`,e.editor);if(n){let t=K.closest(n,[`ul`,`ol`],e.editor);if(t&&K.closest(t,`li`,e.editor))return!1}}let n=K.closest(t,K.isBlock,e.editor);if(n){let t=Hz(e.o.direction,n);return!n.style[t]||parseInt(n.style[t],10)<=0}return!0},tooltip:`Decrease Indent`},J.prototype.indentMargin=10;var Uz=(e,t,n,r)=>{if(!t||e.has(t))return;let i=Hz(n.o.direction,t);e.add(t);let a=t.style[i]?parseInt(t.style[i],10):0;a+=n.o.indentMargin*(r===`outdent`?-1:1),t.style[i]=a>0?a+`px`:``,G(t,`style`)||G(t,`style`,null)};function Wz(e){e.registerButton({name:`indent`,group:`indent`}).registerButton({name:`outdent`,group:`indent`});let t=t=>{let n=new Set,{enter:r,enterBlock:i}=e.o,a=r.toLowerCase()===`br`,o=e.s.current();return a&&e.s.isCollapsed()&&o?(Uz(n,K.wrapNextInline(o,i,e),e,t),!1):(e.s.eachSelection(o=>{e.s.save();let s=o?K.up(o,K.isBlock,e.editor):!1;if(!s&&o&&(s=MD(a?K.wrapNextInline:K.wrapInline,o,a?i:r.toLowerCase(),e)),!s)return e.s.restore(
290),!1;Uz(n,s,e,t),e.s.restore()}),e.synchronizeValues(),!1)};e.registerCommand(`indent`,{exec:t,hotkeys:[`ctrl+]`,`cmd+]`]}),e.registerCommand(`outdent`,{exec:t,hotkeys:[`ctrl+[`,`cmd+[`]})}q.add(`indent`,Wz),RA.set(`justify`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45z"/> </svg> `),J.prototype.controls.align={name:`left`,tooltip:`Align`,update(e,t){let n=t.control,r=e.s.current();if(r){let i=W(K.closest(r,K.isBlock,e.editor)||e.editor,`text-align`).toString();n.defaultValue&&n.defaultValue.indexOf(i)!==-1&&(i=`left`);let{list:a,data:o}=n;o&&o.currentValue!==i&&a&&(dD(a)?a[i]:a.includes(i))&&(e.o.textIcons||n.component===`select`?t.state.text=i:t.state.icon.name=i,o.currentValue=i)}},isActive:(e,t)=>{let n=e.s.current();if(!n||!t.control.defaultValue)return!1;let r=K.closest(n,K.isBlock,e.editor)||e.editor;return t.control.defaultValue.indexOf(W(r,`text-align`).toString())===-1},defaultValue:[`left`,`start`,`inherit`],data:{currentValue:`left`},list:[`center`,`left`,`right`,`justify`]},J.prototype.controls.center={command:`justifyCenter`,css:{"text-align":`center`},tooltip:`Align Center`},J.prototype.controls.justify={command:`justifyFull`,css:{"text-align":`justify`},tooltip:`Align Justify`},J.prototype.controls.left={command:`justifyLeft`,css:{"text-align":`left`},tooltip:`Align Left`},J.prototype.controls.right={command:`justifyRight`,css:{"text-align":`right`},tooltip:`Align Right`};function Gz(e){e.registerButton({name:`align`,group:`indent`});let t=t=>(e.s.focus(),e.s.eachSelection(n=>{if(!n)return;let r=K.up(n,K.isBlock,e.editor);r||=K.wrapInline(n,e.o.enterBlock,e),dk(t,r)}),!1);e.registerCommand(`justifyfull`,t),e.registerCommand(`justifyright`,t),e.registerCommand(`justifyleft`,t),e.registerCommand(`justifycenter`,t)}q.add(`justify`,Gz);var Kz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qz=class extends nN{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){if(e.key!==`ArrowRight`||!this.j.selection.isCollapsed())return;let{endContainer:t,endOffset:n}=this.j.selection.range;if(K.isText(t)&&t.nodeValue?.length===n){let{parentNode:e}=t;K.isInlineBlock(e)&&!K.findNotEmptyNeighbor(e,!1,this.j.editor)&&K.after(e,this.j.createInside.text(`\xA0`))}}};Kz([Y(`:keydown`)],qz.prototype,`onKeyDownArrow`,null),q.add(`keyArrowOutside`,qz),J.prototype.limitWords=!1,J.prototype.limitChars=!1,J.prototype.limitHTML=!1;var Jz=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Yz=class extends nN{afterInit(e){let{limitWords:t,limitChars:n}=e.o;if(e&&(t||n)){let t=null;e.e.off(`.limit`).on(`beforePaste.limit`,()=>{t=e.history.snapshot.make()}).on(`keydown.limit keyup.limit beforeEnter.limit`,this.checkPreventKeyPressOrPaste).on(`change.limit`,this.checkPreventChanging).on(`afterPaste.limit`,()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire(`denyPaste.limit`),!1})}}shouldPreventInsertHTML(e){return e&&(EE.includes(e.key)||e.ctrlKey||e.metaKey)?!1:this.__shouldDenyInput(!1)}__shouldDenyInput(e){let{jodit:t}=this,{limitWords:n,limitChars:r}=t.o,i=t.o.limitHTML?t.value:t.text,a=this.__splitWords(i);if(n&&Xz(a.length,n,e))return t.e.fire(`denyWords.limit limit.limit`),!0;let o=t.o.countTextSpaces?i.replace(nE(),``).replace(/[\r\n]/g,``).length:a.join(``).length,s=!!(r&&Xz(o,r,e));return s&&t.e.fire(`denyChars.limit limit.limit`),s}
290checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:n}=this;this.__shouldDenyInput(!0)&&(n.value=t)}__splitWords(e){return e.replace(nE(),``).split(aE()).filter(e=>e.length)}beforeDestruct(e){e.e.off(`.limit`)}};Jz([H],Yz.prototype,`checkPreventKeyPressOrPaste`,null),Jz([H],Yz.prototype,`checkPreventChanging`,null);function Xz(e,t,n){return n?e>t:e>=t}q.add(`limit`,Yz);var Zz=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M5.09668 6.99707H7.17358L4.17358 3.99707L1.17358 6.99707H3.09668V17.0031H1.15881L4.15881 20.0031L7.15881 17.0031H5.09668V6.99707Z"/> <path d="M22.8412 7H8.84119V5H22.8412V7Z"/> <path d="M22.8412 11H8.84119V9H22.8412V11Z"/> <path d="M8.84119 15H22.8412V13H8.84119V15Z"/> <path d="M22.8412 19H8.84119V17H22.8412V19Z"/> </svg> `;J.prototype.defaultLineHeight=null,RA.set(`line-height`,Zz),J.prototype.controls.lineHeight={command:`applyLineHeight`,tags:[`ol`],tooltip:`Line height`,list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:n})=>RD(e,t,{control:n},e=>e)};var Qz=s({default:()=>$z}),$z={"Line height":`Ø§Ø±ØªÙØ§Ø¹ Ø§ÙØ®Ø·`},eB=s({default:()=>tB}),tB={"Line height":`Výška Äáry`},nB=s({default:()=>rB}),rB={"Line height":`Zeilenhöhe`},iB=s({default:()=>aB}),aB={"Line height":`Altura de la lÃnea`},oB=s({default:()=>sB}),sB={"Line height":`Ø§Ø±ØªÙØ§Ø¹ خط`},cB=s({default:()=>lB}),lB={"Line height":`Rivin korkeus`},uB=s({default:()=>dB}),dB={"Line height":`Hauteur de ligne`},fB=s({default:()=>pB}),pB={"Line height":`×××× ×©×ר×`},mB=s({default:()=>hB}),hB={"Line height":`Vonal magassága`},gB=s({default:()=>_B}),_B={"Line height":`Tinggi baris`},vB=s({default:()=>yB}),yB={"Line height":`Altezza linea`},bB=s({default:()=>xB}),xB={"Line height":`ã©ã¤ã³ã®é«ã`},SB=s({default:()=>CB}),CB={"Line height":`ì ëì´`},wB=s({default:()=>TB}),TB={"Line height":`ÐÑÑааÑÐ½Ñ Ó©Ð½Ð´Ó©Ñ`},EB=s({default:()=>DB}),DB={"Line height":`Lijnhoogte`},OB=s({default:()=>kB}),kB={"Line height":`WysokoÅÄ linii`},AB=s({default:()=>jB}),jB={"Line height":`Altura da linha`},MB=s({default:()=>NB}),NB={"Line height":`ÐÑÑоÑа линии`},PB=s({default:()=>FB}),FB={"Line height":`Výška riadku`},IB=s({default:()=>LB}),LB={"Line height":`Ãizgi yüksekliÄi`},RB=s({default:()=>zB}),zB={"Line height":`ÐиÑоÑа лÑнÑÑ`},BB=s({default:()=>VB}),VB={"Line height":`线é«`},HB=s({default:()=>UB}),UB={"Line height":`è¡é«`},WB=s({ar:()=>Qz,cs_cz:()=>eB,de:()=>nB,es:()=>iB,fa:()=>oB,fi:()=>cB,fr:()=>uB,he:()=>fB,hu:()=>mB,id:()=>gB,it:()=>vB,ja:()=>bB,ko:()=>SB,mn:()=>wB,nl:()=>EB,pl:()=>OB,pt_br:()=>AB,ru:()=>MB,sk:()=>PB,tr:()=>IB,ua:()=>RB,zh_cn:()=>BB,zh_tw:()=>HB}),GB=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},KB=class extends nN{constructor(e){super(e),this.buttons=[{name:`lineHeight`,group:`font`}],qO(WB)}afterInit(e){W(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand(`applyLineHeight`,this.applyLineHeight)}applyLineHeight(e,t,n){let{s:r,createInside:i,editor:a,o}=this.j;r.isFocused()||r.focus(),r.save();let s,c=e=>{let t=K.closest(e,K.isBlock,a);t||=K.wrap(e,o.enter,i);let r=W(t,`lineHeight`);s===void 0&&(s=r.toString()!==n.toString()),W(t,`lineHeight`,s?n:null)};try{if(r.isCollapsed()){let e=i.fake();r.insertNode(e,!1,!1),c(e),K.safeRemove(e)}else r.eachSelection(c)}finally{r.restore()}}beforeDestruct(e){W(e.editor,{lineHeight:null})}};GB([H],KB.prototype,`applyLineHeight`,null),q.add(`lineHeight`,KB),J.prototype.mediaFakeTag=`jodit-media`,J.prototype.mediaInFakeBlock=!0,J.prototype.mediaBlocks=[`video`,`audio`];function qB(e){let t=`jodit_fake_wrapper`,{mediaFakeTag:n,mediaBlocks:r,mediaInFakeBlock:i}=e.options,a=r=>{if(r.parentNode&&G(r.parentNode,`data-jodit_iframe_wrapper`))r=r.parentNode;else{let i=e.createInside.element(n,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,[`data-${t}`]:1});G(i,`style`,G(r,`style`)),i.style.display=r.style.display===`inline-block`?`inline-block`:`block`,i.style.width=r.offsetWidth+`px`,i.style.height=r.offsetHeight+`px`,r.parentNode&&r.parentNode.insertBefore(i,r),i.appendChild(r),r=i}e.e.off(r,`mousedown.select touchstart.select`).on(r,`mousedown.select touchstart.select`,()=>{e.s.setCursorAfter(r)})};i&&e.e.on(`afterGetValueFromEditor`,e=>{let r=RegExp(`<${n}[^>]+data-${t}[^>]+>([^]+?)</${n}>`,`ig`);r.test(e.value)&&(e.value=e.value.replace(r,`$1`))}).on(`change afterInit afterSetMode changePlace`,e.async.debounce(()=>{!e.isDestructed&&e.getMode()!==2&&$O(r.join(`,`),e.editor).forEach(e
290=>{wD(e,t)||(wD(e,t,!0),a(e))})},e.defaultTimeout))}q.add(`media`,qB),J.prototype.mobileTapTimeout=300,J.prototype.toolbarAdaptive=!0,J.prototype.buttonsMD=[{group:`font-style`,buttons:[]},{group:`list`,buttons:[]},{group:`font`,buttons:[]},`---`,{group:`media`,buttons:[]},` 291`,{group:`state`,buttons:[]},{group:`insert`,buttons:[]},{group:`indent`,buttons:[]},{group:`color`,buttons:[]},`---`,{group:`history`,buttons:[]},{group:`other`,buttons:[]},`|`,`dots`],J.prototype.buttonsSM=[{group:`font-style`,buttons:[]},{group:`list`,buttons:[]},`---`,{group:`font`,buttons:[]},` 292`,{group:`state`,buttons:[]},{group:`indent`,buttons:[]},{group:`color`,buttons:[]},`---`,{group:`history`,buttons:[]},`|`,`dots`],J.prototype.buttonsXS=[{group:`font-style`,buttons:[]},{group:`list`,buttons:[]},`---`,{group:`font`,buttons:[]},{group:`color`,buttons:[]},`---`,`dots`],J.prototype.controls.dots={mode:3,popup:(e,t,n,r)=>{let i=r.control.data;return i===void 0&&(i={toolbar:rM(e),rebuild:()=>{if(r){let t=e.e.fire(`getDiffButtons.mobile`,r.closest(xN));if(t&&i){i.toolbar.build(hO(t));let n=(e.toolbar?.firstButton)?.container.offsetWidth||36;i.toolbar.container.style.width=(n+4)*3+`px`}}}},r.control.data=i),i.rebuild(),i.toolbar},tooltip:`Show all`};var JB=e=>e===`|`||e===`---`||e===` 293`;function YB(e,t){let n=kj(hO(t.o.buttons),t),r=t.getRegisteredButtonGroups(),i=!1,a=!1,o=[];for(let t of e)if(Oj(t)){let e=[...t.buttons,...r[t.group]??[]],a=e.filter(e=>n.has(e));a.length!==e.length&&(i=!0),o.push(...a)}else JB(t)?o.push(t):t===`dots`?a=!0:n.has(t)?o.push(t):i=!0;if(!i)return e;let s=[];for(let e of o)JB(e)&&(s.length===0||JB(s[s.length-1]))||s.push(e);for(;s.length&&JB(s[s.length-1]);)s.pop();if(a){let e=kj(s,t);nD(n).some(t=>!e.has(t))&&s.push(`dots`)}return s}function XB(e){let t=0,n=hO(e.o.buttons);e.o.mobileTapTimeout&&e.e.on(`touchend`,n=>{if(n.changedTouches&&n.changedTouches.length){let r=new Date().getTime(),i=r-t;i>e.o.mobileTapTimeout&&(t=r,i<e.o.mobileTapTimeout*1.5&&e.s.insertCursorAtPoint(n.clientX,n.clientY))}}),e.e.on(`getDiffButtons.mobile`,t=>{if(t===e.toolbar){let t=kj(hO(e.o.buttons),e),r=kj(n,e);return nD(t).reduce((e,t)=>(r.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on(`resize afterInit recalcAdaptive changePlace afterAddPlace`,()=>{var t;if(!e.o.toolbar)return;let r=(e.container.parentElement??e.container).offsetWidth,i=e.isFullSize||r>=e.o.sizeLG?hO(e.o.buttons):r>=e.o.sizeMD?YB(hO(e.o.buttonsMD),e):r>=e.o.sizeSM?YB(hO(e.o.buttonsSM),e):YB(hO(e.o.buttonsXS),e);i.toString()!==n.toString()&&(n=i,e.e.fire(`closeAllPopups`),(t=e.toolbar)==null||t.setRemoveButtons(e.o.removeButtons).build(n.concat(e.o.extraButtons)))}).on(e.ow,`load resize`,()=>e.e.fire(`recalcAdaptive`))}q.add(`mobile`,XB);function ZB(e){e=e.replace(/<meta[^>]+?>/g,``);let t=e.search(/<!--StartFragment-->/i);t!==-1&&(e=e.substring(t+20));let n=e.search(/<!--EndFragment-->/i);return n!==-1&&(e=e.substring(0,n)),e}function QB(e){return!!(e&&e.type===`drop`)}function $B(e,t,n){if(t.isInDestruct)return;QB(e)&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let r=t.e.fire(`beforePasteInsert`,n);!QE(r)&&(U(r)||tO(r)||K.isNode(r))&&(n=r),U(n)&&(n=ZB(n)),t.s.insertHTML(n)}function eV(e){let t=e.types,n=``;if(XE(t)||{}.toString.call(t)===`[object DOMStringList]`)for(let e=0;e<t.length;e+=1)n+=t[e]+`;`;else n=(t||OE).toString()+`;`;return n}function tV(e,t,n,r,i){if(e.e.fire(`beforeOpenPasteDialog`,t,n,r,i)===!1)return;let a=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(n)),o=i.map(({text:t,value:n})=>GA(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{a.close(),r(n)}));a.e.one(a,`afterClose`,()=>{e.s.isFocused()||e.s.focus()});let s=GA(e,{text:`Cancel`,tabIndex:0}).onAction(()=>{a.close()});return a.setFooter([...o,s]),o[0].focus(),o[0].state.variant=`primary`,e.e.fire(`afterOpenPasteDialog`,a,t,n,r,i),a}J.prototype.askBeforePasteHTML=!0,J.prototype.processPasteHTML=!0,J.prototype.scrollToPastedContent=!0,J.prototype.pasteExcludeStripTags=[`br`,`hr`],J.prototype.pasteHTMLActionList=[{value:ME,text:`Keep`},{value:PE,text:`Insert as Text`},{value:FE,text:`Insert only Text`}],J.prototype.memorizeChoiceWhenPasteFragment=!1,J.prototype.nl2brInPlainText=!0;var nV=`pasteStorage`;J.prototype.controls.paste={tooltip:`Paste from clipboard`,async exec(e,t,{control:n}){if(n.name===nV){e.execCommand(`showPasteStorage`);return}e.s.focus();let r=``,i=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],n=t.types?.includes(kE)?kE:OE,i=await t.getType(n);r=await new Response(i).text()}i=!1}catch{}if(i)try{r=await navigator.clipboard.readText(),i=!1}catch{}}i&&=(r=e.buffer.get(`clipboard`)||``,r.length===0);let a=e.value;i?(e.ed.execCommand(`paste`),i=a===e.value,!i&&e.e.fire(`afterPaste`)):r.length?($B(null,e,r),e.e.fire(`afterPaste`)):i&&e.alert(`Your browser doesn't support direct access to the clipboard.`,()=>void e.s.focus())},list:{[nV]:`Paste Storage`},isChildDisabled(e){return e.e.fire(`pasteStorageList`)<2}};var rV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},iV=class extends nN{constructor(){super(...arguments),this.pasteStack=new Lk(20),this._isDialogOpened=!1}afterInit(e){e.e.on(`paste.paste`,this.onPaste).on(`pasteStack.paste`,e=>this.pasteStack.push(e)),this.j.e.on(`processPaste.paste`,this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off(`paste.paste`,this.onPaste).off(`processPaste.paste`,this.onProcessPasteReplaceNl2Br).off(`.paste`)}onPaste(e){try{if(this.customPasteProcess(e)===!1||this.j.e.fire(`beforePaste`,e)===!1)return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire(`afterPaste`,e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=zD(e),n=[t?.getData(OE),t?.getData(kE),t?.getData(AE)];for(let t of n)if(rD(t)&&(this.j.e.fire(`processHTML`,e,t,{plain:n[0],html:n[1],rtf:n[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=zD(e),n=t?.getData(kE)||t?.getData(OE);if(t&&n&&aD(n)!==``){let r=this.j.e.fire(`processPaste`,e,n,eV(t));r!==void 0&&(n=r),(U(n)||K.isNode(n))&&this.__insertByType(e,n,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let n=this.pasteStack.find(e=>e.html===t);if(n)return this.__insertByType(e,t,n.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let n=tV(this.j,`Your code is similar to HTML. Keep as HTML?`,`Paste as HTML`,n=>{this._isDialogOpened=!1,this.__insertByType(e,t,n)},this.j.o.pasteHTMLActionList);return n&&(this._isDialogOpened=!0,n.e.on(`beforeClose`,()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,n){if(this.pasteStack.push({html:t,action:n}),U(t))switch(this.j.buffer.set(GE,t),n){case NE:t=ok(t);break;case FE:t=Xk(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case PE:t=sk(t),this.j.o.nl2brInPlainText&&(t=ck(t));break;default:{let r=this.j.e.fire(`onCustomPasteHTMLOption`,n,t,e);typeof r==`string`&&(t=r)}}$B(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,n){if(n===OE+`;`&&!rD(t)){let e=sk(t);return this.j.o.nl2brInPlainText?ck(e):e}}};rV([H],iV.prototype,`onPaste`,null),rV([H],iV.prototype,`onProcessPasteReplaceNl2Br`,null),q.add(`paste`,iV),J.prototype.askBeforePasteFromWord=!0,J.prototype.processPasteFromWord=!0,J.prototype.defaultActionOnPasteFromWord=null,J.prototype.pasteFromWordActionList=[{value:ME,text:`Keep`},{value:PE,text:`Clean`},{value:FE,text:`Insert only Text`}];var aV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},oV=class extends nN{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,n){let{j:r}=this,{processPasteFromWord:i,askBeforePasteFromWord:a,defaultActionOnPasteFromWord:o,defaultActionOnPaste:s,pasteFromWordActionList:c}=r.o;return i&&qD(t)?(a?tV(r,`The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?`,`Word Paste Detected`,r=>{this.insertFromWordByType(e,t,r,n)},c):this.insertFromWordByType(e,t,o||s,n),!0):!1}
293insertFromWordByType(e,t,n,r){switch(n){case ME:{t=ak(t);let e=this.j.events?.fire(`beautifyHTML`,t);U(e)&&(t=e);break}case PE:t=ok(t);break;case FE:t=Xk(ok(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break}$B(e,this.j,t)}};oV.requires=[`paste`],aV([Y(`:processHTML`)],oV.prototype,`processWordHTML`,null),q.add(`pasteFromWord`,oV);var sV=class extends nN{constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),this.currentIndex!==0){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire(`afterPaste`)},this.onKeyDown=e=>{let t=this.currentIndex;if([`ArrowUp`,`ArrowDown`,`Enter`].indexOf(e.key)!==-1){if(e.key===`ArrowUp`&&(t===0?t=this.list.length-1:--t),e.key===`ArrowDown`&&(t===this.list.length-1?t=0:t+=1),e.key===`Enter`){this.paste();return}t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}},this.selectIndex=e=>{this.listBox&&nD(this.listBox.childNodes).forEach((t,n)=>{t.classList.remove(`jodit_active`),e===n&&this.previewBox&&(t.classList.add(`jodit_active`),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e},this.showDialog=()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&(this.listBox.innerHTML=``),this.previewBox&&(this.previewBox.innerHTML=``),this.list.forEach((e,t)=>{let n=this.j.c.element(`a`);n.textContent=t+1+`. `+e.replace(aE(),``),this.j.e.on(n,`keydown`,this.onKeyDown),G(n,`href`,`#`),G(n,`data-index`,t.toString()),G(n,`tab-index`,`-1`),this.listBox&&this.listBox.appendChild(n)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}createDialog(){this.dialog=this.j.dlg();let e=GA(this.j,`paste`,`Paste`,`primary`);e.onAction(this.paste);let t=GA(this.j,``,`Cancel`);t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add(`jodit-paste-storage`),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),this.container.appendChild(this.listBox),this.container.appendChild(this.previewBox),this.dialog.setHeader(this.j.i18n(`Choose Content to Paste`)),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,`click dblclick`,e=>{let t=e.target;return K.isTag(t,`a`)&&t.hasAttribute(`data-index`)&&this.selectIndex(parseInt(G(t,`-index`)||`0`,10)),e.type===`dblclick`&&this.paste(),!1})}afterInit(){this.j.e.off(`afterCopy.paste-storage`).on(`pasteStorageList.paste-storage`,()=>this.list.length).on(`afterCopy.paste-storage`,e=>{this.list.indexOf(e)!==-1&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand(`showPasteStorage`,{exec:this.showDialog,hotkeys:[`ctrl+shift+v`,`cmd+shift+v`]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(`.paste-storage`),K.safeRemove(this.previewBox),K.safeRemove(this.listBox),K.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}};q.add(`pasteStorage`,sV),J.prototype.controls.preview={icon:`eye`,command:`preview`,mode:3,tooltip:`Preview`};function cV(e){e.registerButton({name:`preview`}),e.registerCommand(`preview`,(t,n,r)=>{let i=e.dlg();i.setSize(1024,600).open(``,e.i18n(`Preview`)).setModal(!0);let[,a]=Mk(e,r,`px`,i.getElm(`content`));i.e.on(i,`afterClose`,a)})}q.add(`preview`,cV);function lV(e){let t=(e,t=e.ownerDocument.styleSheets)=>nD(t).map(e=>{try{return nD(e.cssRules)}catch{}return[]}).flat().filter(t=>{try{return!!(t&&e.matches(t.selectorText))}catch{}return!1});class n{constructor(n,r,i){this.css={};let a=i||{},o=t=>{let n=t.selectorText.split(`,`).map(e=>e.trim()).sort().join(`,`);this.css[n]||(this.css[n]={});let r=t.style.cssText.split(/;(?![A-Za-z0-9])/);for(let t=0;t<r.length;t++){if(!r[t])continue;let i=r[t].split(`:`);i[0]=i[0].trim(),i[1]=i[1].trim(),this.css[n][i[0]]=i[1].replace(/var\(([^)]+)\)/g,(t,n)=>{let[r,i]=n.split(`,`);return(e.ew.getComputedStyle(e.editor).getPropertyValue(r.trim())||i||t).trim()})}};(()=>{let i=n.innerHeight,s=r.createTreeWalker(e.editor,NodeFilter.SHOW_ELEMENT,()=>NodeFilter.FILTER_ACCEPT);for(;s.nextNode();){let e=s.currentNode;if(e.getBoundingClientRect().top<i||a.scanFullPage){let n=t(e);if(n)for(let e=0;e<n.length;e++)o(n[e])}}})()}generateCSS(){let e=``;for(let t in this.css)if(!/:not\(/.test(t)){e+=t+` { `;for(let n in this.css[t])e+=n+`: `+this.css[t][n]+`; `;e+=`} 294`}return e}}try{return new n(e.ew,e.ed,{scanFullPage:!0}).generateCSS()}catch{}return``}RA.set(`print`,`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M448 1536h896v-256h-896v256zm0-640h896v-384h-160q-40 0-68-28t-28-68v-160h-640v640zm1152 64q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128 0v416q0 13-9.5 22.5t-22.5 9.5h-224v160q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-160h-224q-13 0-22.5-9.5t-9.5-22.5v-416q0-79 56.5-135.5t135.5-56.5h64v-544q0-40 28-68t68-28h672q40 0 88 20t76 48l152 152q28 28 48 76t20 88v256h64q79 0 135.5 56.5t56.5 135.5z"/> </svg> `),J.prototype.controls.print={exec:e=>{let t=e.create.element(`iframe`);Object.assign(t.style,{position:`fixed`,right:0,bottom:0,width:0,height:0,border:0}),YO(e,J).appendChild(t);let n=()=>{e.e.off(e.ow,`mousemove`,n),K.safeRemove(t)},r=t.contentWindow;if(r){e.e.on(r,`onbeforeunload onafterprint`,n).on(e.ow,`mousemove`,n),e.o.iframe?(e.e.fire(`generateDocumentStructure.iframe`,r.document,e),r.document.body.innerHTML=e.value):(r.document.write(`<!doctype html><html lang="`+Dk(e.o.language)+`"><head><title></title></head><style>`+lV(e)+`</style><body></body></html>`),r.document.close(),Mk(e,void 0,`px`,r.document.body));let t=r.document.createElement(`style`);t.innerHTML=`@media print { 295 body { 296 -webkit-print-color-adjust: exact; 297 } 298 }`,r.document.head.appendChild(t),r.focus(),r.print()}},mode:3,tooltip:`Print`};function uV(e){e.registerButton({name:`print`})}q.add(`print`,uV),J.prototype.tableAllowCellResize=!0;var dV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},fV=`table_processor_observer-resize`,pV=class extends nN{constructor(){super(...arguments),this.selectMode=!1,this.resizeDelta=0,this.createResizeHandle=()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div(`jodit-table-resizer`),this.j.e.on(this.resizeHandler,`mousedown.table touchstart.table`,this.onHandleMouseDown).on(this.resizeHandler,`mouseenter.table`,()=>{this.j.async.clearTimeout(this.hideTimeout)}))},this.hideTimeout=0,this.drag=!1,this.minX=0,this.maxX=0,this.startX=0}get module(){return this.j.getInstance(`Table`,this.j.o)}get isRTL(){return this.j.o.direction===`rtl`}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),this.j.workplace.appendChild(this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{K.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:`hideResizer`})}onHandleMouseDown(e){if(this.j.isLocked)return;this.drag=!0,this.j.e.on(this.j.ow,`mouseup.resize-cells touchend.resize-cells`,this.onMouseUp).on(this.j.ew,`mousemove.table touchmove.table`,this.onMouseMove),this.startX=e.clientX,this.j.lock(fV),this.resizeHandler.classList.add(`jodit-table-resizer_moved`);let t,n=this.workTable.getBoundingClientRect();if(this.minX=0,this.maxX=1e6,this.wholeTable!=null)n=this.workTable.parentNode.getBoundingClientRect(),this.minX=n.left,this.maxX=this.minX+n.width;else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(n,r,i)=>{e[1]===i&&(t=n.getBoundingClientRect(),this.minX=Math.max(t.left+5/2,this.minX)),e[1]+(this.isRTL?-1:1)===i&&(t=n.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-5/2,this.maxX))})}return!1}onMouseMove(e){if(!this.drag)return;this.j.e.fire(`closeAllPopups`);let t=e.clientX,n=dA(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?n.left
298:0),this.resizeHandler.style.left=t-(this.j.o.iframe?0:n.left)+`px`;let r=this.j.s.sel;r&&r.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),!(!this.resizeHandler||!this.drag)&&(this.drag=!1,this.j.e.off(this.j.ew,`mousemove.table touchmove.table`,this.onMouseMove),this.resizeHandler.classList.remove(`jodit-table-resizer_moved`),this.startX!==e.clientX&&(this.wholeTable==null?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],n=this.module;n.setColumnWidthByDelta(this.workTable,n.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let r=MD(this.isRTL?K.prev:K.next,this.workCell,K.isCell,this.workCell.parentNode);n.setColumnWidthByDelta(this.workTable,n.formalCoordinate(this.workTable,r)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,n=aA(this.workTable.parentNode,this.j.ew),r=!this.wholeTable;if(this.isRTL?!r:r)this.workTable.style.width=(t+e)/n*100+`%`;else{let r=this.isRTL?`marginRight`:`marginLeft`,i=parseInt(this.j.ew.getComputedStyle(this.workTable)[r]||`0`,10);this.workTable.style.width=(t-e)/n*100+`%`,this.workTable.style[r]=(i+e)/n*100+`%`}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=K.up(e,e=>K.isTag(e,`table`),this.j.editor)}calcHandlePosition(e,t,n=0,r=0){let i=dA(t,this.j,this.j.ed);if(n>5&&n<i.width-5){this.hideResizeHandle();return}let a=dA(this.j.workplace,this.j,this.j.od,!0),o=dA(e,this.j,this.j.ed);if(this.resizeHandler.style.left=(n<=5?i.left:i.left+i.width)-a.left+r+`px`,Object.assign(this.resizeHandler.style,{height:o.height+`px`,top:o.top-a.top+`px`}),this.showResizeHandle(),n<=5){let e=MD(this.isRTL?K.next:K.prev,t,K.isCell,t.parentNode);this.setWorkCell(e||t,e?null:!0)}else{let e=MD(this.isRTL?K.prev:K.next,t,K.isCell,t.parentNode);this.setWorkCell(t,e?null:!1)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,`.resize-cells`).off(`.resize-cells`).on(`change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells`,()=>{$O(`table`,e.editor).forEach(this.observe)}).on(this.j.ow,`scroll.resize-cells`,()=>{if(!this.drag)return;let t=K.up(this.workCell,e=>K.isTag(e,`table`),e.editor);if(t){let e=t.getBoundingClientRect();this.resizeHandler.style.top=e.top+`px`}}).on(`beforeSetMode.resize-cells`,()=>{let t=this.module;
298t.getAllSelectedCells().forEach(n=>{t.removeSelection(n),t.normalizeTable(K.closest(n,`table`,e.editor))})})}observe(e){wD(e,fV)||(wD(e,fV,!0),this.j.e.on(e,`mouseleave.resize-cells`,e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,`mousemove.resize-cells touchmove.resize-cells`,this.j.async.throttle(t=>{if(this.j.isLocked)return;let n=K.up(t.target,K.isCell,e);n&&this.calcHandlePosition(e,n,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,`.resize-cells`),e.e.off(`.resize-cells`))}};dV([H],pV.prototype,`onHandleMouseDown`,null),dV([H],pV.prototype,`onMouseMove`,null),dV([H],pV.prototype,`onMouseUp`,null),dV([H],pV.prototype,`observe`,null),q.add(`resizeCells`,pV),J.prototype.allowResizeX=!1,J.prototype.allowResizeY=!0;var mV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},hV=class extends nN{constructor(){super(...arguments),this.isResized=!1,this.start={x:0,y:0,w:0,h:0},this.handle=this.j.c.div(`jodit-editor__resize`,RA.get(`resize_handler`))}afterInit(e){let{height:t,width:n,allowResizeX:r}=e.o,{allowResizeY:i}=e.o;t===`auto`&&n!==`auto`&&(i=!1),(t!==`auto`||n!==`auto`)&&(r||i)&&(e.statusbar.setMod(`resize-handle`,!0),e.statusbar.show(),e.e.on(`toggleFullSize.resizeHandler`,()=>{this.handle.style.display=e.isFullSize?`none`:`block`}).on(this.handle,`mousedown touchstart`,this.onHandleResizeStart).on(e.ow,`mouseup touchend`,this.onHandleResizeEnd),e.container.appendChild(this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,`mousemove touchmove`,this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:n}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=dA(this.j.workplace,this.j,this.j.od,!0);t+=e.left,n+=e.top}this.j.o.allowResizeY&&this.j.e.fire(`setHeight`,this.start.h+n-this.start.y),this.j.o.allowResizeX&&this.j.e.fire(`setWidth`,this.start.w+t-this.start.x),this.j.e.fire(`resize`)}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,`mousemove touchmove`,this.onHandleResize),this.j.unlock())}beforeDestruct(){K.safeRemove(this.handle),this.j.e.off(this.j.ow,`mouseup touchsend`,this.onHandleResizeEnd)}};hV.requires=[`size`],mV([H],hV.prototype,`onHandleResizeStart`,null),mV([H],hV.prototype,`onHandleResize`,null),mV([H],hV.prototype,`onHandleResizeEnd`,null),q.add(`resizeHandler`,hV),J.prototype.allowResizeTags=new Set([`img`,`iframe`,`table`,`jodit`]),J.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set([`img`])};var gV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_V=`__jodit-resizer_binded`,vV=class extends nN{constructor(){super(...arguments),this.LOCK_KEY=`resizer`,this.element=null,this.isResizeMode=!1,this.isShown=!1,this.startX=0,this.startY=0,this.width=0,this.height=0,this.ratio=0,this.rect=this.j.c.fromHTML(`<div title="${this.j.i18n(`Press Alt for custom resizing`)}" class="jodit-resizer"> 299 <div class="jodit-resizer__top-left"></div> 300 <div class="jodit-resizer__top-right"></div> 301 <div class="jodit-resizer__bottom-right"></div> 302 <div class="jodit-resizer__bottom-left"></div> 303 <span>100x100</span> 304 </div>`),this.sizeViewer=this.rect.getElementsByTagName(`span`)[0],this.pointerX=0,this.pointerY=0,this.isAltMode=!1,this.onClickElement=e=>{this.isResizeMode||(this.element!==e||!this.isShown)&&(this.element=e,this.show(),K.isTag(this.element,`img`)&&!this.element.complete&&this.j.e.one(this.element,`load`,this.updateSize))},this.updateSize=()=>{if(!(this.isInDestruct||!this.isShown)&&this.element&&this.rect){let e=this.getWorkplacePosition(),t=dA(this.element,this.j,this.j.ed),n=parseInt(this.rect.style.left||`0`,10),r=parseInt(this.rect.style.top||`0`,10),i=this.rect.offsetWidth,a=this.rect.offsetHeight,o=t.top-e.top,s=t.left-e.left;(r!==o||n!==s||i!==this.element.offsetWidth||a!==this.element.offsetHeight)&&(W
304(this.rect,{top:o,left:s,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,`changesize`),isNaN(n)||this.j.e.fire(`resize`)))}},this.hideSizeViewer=()=>{this.sizeViewer.style.opacity=`0`}}afterInit(e){$O(`div`,this.rect).forEach(t=>{e.e.on(t,`mousedown.resizer touchstart.resizer`,this.onStartResizing.bind(this,t))}),ZO.on(`hideHelpers`,this.hide),e.e.on(`readonly`,e=>{e&&this.hide()}).on(`afterInit changePlace`,this.addEventListeners.bind(this)).on(`afterGetValueFromEditor.resizer`,e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,`$1`))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:n,options:{allowResizeTags:r}}=this.j;for(;t&&t!==n;){if(K.isTag(t,r)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=G(e,`width`);t&&!W(e,`width`,!0)&&(W(e,`width`,t),G(e,`width`,null))}addEventListeners(){let e=this.j;e.e.off(e.editor,`.resizer`).off(e.ow,`.resizer`).on(e.editor,`keydown.resizer`,e=>{this.isShown&&e.key===`Delete`&&this.element&&!K.isTag(this.element,`table`)&&this.onDelete(e)}).on(e.ow,`resize.resizer`,this.updateSize).on(`resize.resizer`,this.updateSize).on([e.ow,e.editor],`scroll.resizer`,()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,`keydown.resizer`,this.onKeyDown).on(e.ow,`keyup.resizer`,this.onKeyUp).on(e.ow,`mouseup.resizer touchend.resizer`,this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:n}=this;n.e.fire(`hidePopup`),n.lock(this.LOCK_KEY),n.e.on(n.ow,`mousemove.resizer touchmove.resizer`,this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,`mousemove.resizer touchmove.resizer`,this.onResize)}onResize(e){if(this.isResizeMode){if(!this.element)return;this.pointerX=e.clientX,this.pointerY=e.clientY;let t,n;if(this.j.options.iframe&&e.view===this.j.ew){let r=this.getWorkplacePosition();t=e.clientX+r.left-this.startX,n=e.clientY+r.top-this.startY}else t=this.pointerX-this.startX,n=this.pointerY-this.startY;let r=this.handle.className,i=0,a=0,o=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(o===!0||o&&K.isTag(this.element,o))?(t?(i=this.width+(r.match(/left/)?-1:1)*t,a=Math.round(i/this.ratio)):(a=this.height+(r.match(/top/)?-1:1)*n,i=Math.round(a*this.ratio)),i>lA(this.j.editor,this.j.ow)&&(i=lA(this.j.editor,this.j.ow),a=Math.round(i/this.ratio))):(i=this.width+(r.match(/left/)?-1:1)*t,a=this.height+(r.match(/top/)?-1:1)*n),i>this.j.o.resizer.min_width&&(i<this.rect.parentNode.offsetWidth?this.applySize(this.element,`width`,i):this.applySize(this.element,`width`,`100%`)),a>this.j.o.resizer.min_height&&this.applySize(this.element,`height`,a),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===`Alt`,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return dA(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,n){let r=K.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;r&&G(e,t,n),(!r||e.style[t])&&W(e,t,n)}onDelete(e){this.element&&(this.element.tagName===`JODIT`?(K.safeRemove(this.element),this.hide(),e.preventDefault()):this.j.s.select(this.element))}__onChangeEditor(){this.isShown&&(!this.element||!this.element.parentNode?this.hide():this.updateSize()),$O(`iframe`,this.j.editor).forEach(this.__bind)}__bind(e){if(!K.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||wD(e,_V))return;wD(e,_V,!0);let t;if(K.isTag(e,`iframe`)){let n=e;K.isHTMLElement(e.parentNode)&&G(e.parentNode,`-jodit_iframe_wrapper`)?e=e.parentNode:(t=this.j.createInside.element(`jodit`,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),G(t,`style`,G(e,`style`)),W(t,{display:e.style.display===`inline-block`?`inline-block`:`block`,width:e.offsetWidth,height:e.offsetHeight}),e.parentNode&&e.parentNode.insertBefore(t,e),t.appendChild(e),this.j.e.on(t,`click`,()=>{G(t,`data-jodit-wrapper_active`,!0)}
304),e=t),this.j.e.off(e,`mousedown.select touchstart.select`).on(e,`mousedown.select touchstart.select`,()=>{this.j.s.select(e)}).off(e,`changesize`).on(e,`changesize`,()=>{G(n,`width`,e.offsetWidth+`px`),G(n,`height`,e.offsetHeight+`px`)})}this.j.e.on(e,`dragstart`,this.hide)}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight){this.hideSizeViewer();return}this.sizeViewer.style.opacity=`1`,this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:`hideSizeViewer`})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||(PD(this.j,this.rect),this.j.workplace.appendChild(this.rect)),this.j.isFullSize&&(this.rect.style.zIndex=W(this.j.container,`zIndex`).toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,K.safeRemove(this.rect),$O(`[data-jodit-wrapper_active='true']`,this.j.editor).forEach(e=>G(e,`data-jodit-wrapper_active`,!1)))}beforeDestruct(e){this.hide(),ZO.off(`hideHelpers`,this.hide),e.e.off(this.j.ow,`.resizer`).off(`.resizer`)}};gV([Y(`:click`)],vV.prototype,`onEditorClick`,null),gV([Y(`:afterInsertImage`)],vV.prototype,`__afterInsertImage`,null),gV([H],vV.prototype,`onStartResizing`,null),gV([H],vV.prototype,`onEndResizing`,null),gV([H],vV.prototype,`onResize`,null),gV([H],vV.prototype,`onKeyDown`,null),gV([H],vV.prototype,`onKeyUp`,null),gV([H],vV.prototype,`onClickOutside`,null),gV([Y(`:change`)],vV.prototype,`__onChangeEditor`,null),gV([H],vV.prototype,`__bind`,null),gV([H,Y(`:hideResizer`)],vV.prototype,`hide`,null),q.add(`resizer`,vV);var yV=`<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill-rule="evenodd"/> </svg> `;J.prototype.useSearch=!0,J.prototype.search={lazyIdleTimeout:0,useCustomHighlightAPI:cE&&cE.Highlight!==void 0},RA.set(`search`,yV),J.prototype.controls.find={tooltip:`Find`,icon:`search`,exec(e,t,{control:n}){switch(n.args&&n.args[0]){case`findPrevious`:e.e.fire(`searchPrevious`);break;case`findNext`:e.e.fire(`searchNext`);break;case`replace`:e.execCommand(`openReplaceDialog`);break;default:e.execCommand(`openSearchDialog`)}},list:{search:`Find`,findNext:`Find Next`,findPrevious:`Find Previous`,replace:`Replace`},childTemplate:(e,t,n)=>n};var bV=`jd-tmp-selection`,xV=`background-color: var(--jd-color-background-selection); color: var(--jd-color-text-selection);`,SV=new WeakSet;function CV(e,t){if(SV.has(e))return;SV.add(e);let n=t?`::highlight(jodit-search-result) { ${xV} }`:`[${bV}] { ${xV} }`;try{let t=new CSSStyleSheet;t.insertRule(n),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}catch{let t=e.createElement(`style`);t.textContent=n,e.head.appendChild(t)}}function wV(e,t,n,r,i){if(t.startContainer.nodeValue==null||t.endContainer.nodeValue==null||kV(e,t,n))return;CV(e.ed,!1);let a=r.element(`span`,{[bV]:!0});K.markTemporary(a),jV(t,n,r);let o=t.startContainer;do{if(!o||(K.isText(o)&&!OV(o.parentNode)&&K.wrap(o,a.cloneNode(),r),o===t.endContainer))break;let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling&&o!==i;)o=o.parentNode;e=o?.nextSibling}o=e}while(o&&o!==i)}function TV(e){return $O(`[${bV}]`,e)}function EV(e){TV(e.editor).forEach(e=>K.unwrap(e)),AV(e)}function DV(e){return e.replace(RegExp(`<span[^>]+${bV}[^>]+>(.*?)</span>`,`g`),`$1`)}function OV(e){return K.isElement(e)&&e.hasAttribute(bV)}function kV(e,t,n){if(e.o.search.useCustomHighlightAPI&&cE&&cE.Highlight!==void 0){let r=[t,...n].map(t=>{let n=e.selection.createRange();return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n});CV(e.ed,!0);let i=new Highlight(...r);
304return CSS.highlights.clear(),CSS.highlights.set(`jodit-search-result`,i),n.length=0,!0}return!1}function AV(e){e.o.search.useCustomHighlightAPI&&cE&&cE.Highlight!==void 0&&CSS.highlights.clear()}function jV(e,t,n){let r=e.startContainer.nodeValue,i=0;if(e.startOffset!==0){let t=n.text(r.substring(0,e.startOffset));e.startContainer.nodeValue=r.substring(e.startOffset),K.before(e.startContainer,t),e.startContainer===e.endContainer&&(i=e.startOffset,e.endOffset-=i),e.startOffset=0}let a=e.endContainer.nodeValue;if(e.endOffset!==a.length){let r=n.text(a.substring(e.endOffset));e.endContainer.nodeValue=a.substring(0,e.endOffset),K.after(e.endContainer,r);for(let n of t)if(n.startContainer===e.endContainer)n.startContainer=r,n.startOffset=n.startOffset-e.endOffset-i,n.endContainer===e.endContainer&&(n.endContainer=r,n.endOffset=n.endOffset-e.endOffset-i);else break;e.endOffset=e.endContainer.nodeValue.length}}var MV=class{constructor(e=pA){this.searchIndex=e,this.queue=[],this.value=``}add(e){let t=(e.nodeValue??``).toLowerCase();if(!t.length)return;let n=this.value.length;this.queue.push({startIndex:n,endIndex:n+t.length,node:e}),this.value+=t}ranges(e,t=0){let n=[],r=t,i=0,a=0;do if([r,i]=this.searchIndex(e,this.value,r),r!==-1){let e,t=0,o,s=0;for(let n=a;n<this.queue.length;n+=1)if(!e&&this.queue[n].endIndex>r&&(e=this.queue[n].node,t=r-this.queue[n].startIndex),e&&this.queue[n].endIndex>=r+i){o=this.queue[n].node,s=r+i-this.queue[n].startIndex,a=n;break}e&&o&&n.push({startContainer:e,startOffset:t,endContainer:o,endOffset:s}),r+=i}while(r!==-1);return n.length===0?null:n}},NV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},PV=class extends VA{className(){return`UISearch`}render(){return`<div> 305 <div class="&__box"> 306 <div class="&__inputs"> 307 <input data-ref="query" tabindex="0" placeholder="~Search for~" type="text"/> 308 <input data-ref="replace" tabindex="0" placeholder="~Replace with~" type="text"/> 309 </div> 310 <div class="&__counts"> 311 <span data-ref="counter-box"> 312 <span data-ref="current">0</span><span>/</span><span data-ref="count">0</span> 313 </span> 314 </div> 315 <div class="&__buttons"> 316 <button data-ref="next" tabindex="0" type="button">${RA.get(`angle-down`)}</button> 317 <button data-ref="prev" tabindex="0" type="button">${RA.get(`angle-up`)}</button> 318 <button data-ref="cancel" tabindex="0" type="button">${RA.get(`cancel`)}</button> 319 <button data-ref="replace-btn" tabindex="0" type="button" class="jodit-ui-button">~Replace~</button> 320 </div> 321 </div> 322 </div>`}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e,this.currentBox.innerText=e.toString()}set count(e){this.countBox.innerText=e.toString()}get query(){return this.queryInput.value}get replace(){return this.replaceInput.value}constructor(e){super(e),this.selInfo=null,this._currentIndex=0,this.isOpened=!1;let{query:t,replace:n,cancel:r,next:i,prev:a,replaceBtn:o,current:s,count:c}=tk(this.container);this.queryInput=t,this.replaceInput=n,this.closeButton=r,this.replaceButton=o,this.currentBox=s,this.countBox=c;let l=()=>this.close(),u=()=>void e.e.fire(this,`pressReplaceButton`),d=()=>void e.e.fire(`searchNext`),f=()=>void e.e.fire(`searchPrevious`),p=e=>t=>{t.detail||(t.preventDefault(),e())};e.e.on(this.closeButton,`pointerdown`,()=>(l(),!1)).on(this.closeButton,`click`,p(l)).on(this.queryInput,`input`,()=>{this.currentIndex=0}).on(this.queryInput,`pointerdown`,()=>{e.s.isFocused()&&(e.s.removeMarkers(),this.selInfo=e.s.save())}).on(this.replaceButton,`pointerdown`,()=>(u(),!1)).on(this.replaceButton,`click`,p(u)).on(i,`pointerdown`,()=>(d(),!1)).on(i,`click`,p(d)).on(a,`pointerdown`,()=>(f(),!1)).on(a,`click`,p(f)).on(this.queryInput,`input`,()=>{this.setMod(`empty-query`,!aD(this.queryInput.value).length)}).on(this.queryInput,`keydown`,(()=>{let t=this.j.async.debounce(async t=>{switch(t.key){case vE:await e.e.fire(`searchNext`)&&this.close();break;default:e.e.fire(this,`needUpdateCounters`);break}},this.j.defaultTimeout);return e=>{e.key===`Enter`&&(e.preventDefault(),e.stopImmediatePropagation()),t(e)}})())}onEditorKeyDown(e){if(!this.isOpened)return;let{j:t}=this;if(t.getRealMode()===1)switch(e.key){case yE:this.close();break;case`F3`:this.queryInput.value&&(t.e.fire(e.shiftKey?`searchPrevious`:`searchNext`),e.preventDefault());break}}open(e,t,n=!1){this.isOpened||=(this.j.workplace.appendChild(this.container),!0),this.calcSticky(this.j.e.fire(`getStickyState.sticky`)||!1),this.j.e.fire(`hidePopup`),this.setMod(`replace`,n);let r=e??(this.j.s.sel||``).toString();r&&(this.queryInput.value=r),t&&(this.replaceInput.value=t),this.setMod(`empty-query`,!r.length),this.j.e.fire(this,`needUpdateCounters`),r?this.queryInput.select():this.queryInput.focus()}
322close(){this.isOpened&&(this.j.s.restore(),K.safeRemove(this.container),this.isOpened=!1,this.j.e.fire(this,`afterClose`))}calcSticky(e){if(this.isOpened)if(this.setMod(`sticky`,e),e){let e=fA(this.j.toolbarContainer);W(this.container,{top:e.top+e.height,left:e.left+e.width})}else W(this.container,{top:null,left:null})}};NV([Y([`:keydown`,`queryInput:keydown`])],PV.prototype,`onEditorKeyDown`,null),NV([H],PV.prototype,`open`,null),NV([H],PV.prototype,`close`,null),NV([Y(`:toggleSticky`)],PV.prototype,`calcSticky`,null),PV=NV([uO],PV);var FV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},IV=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`find`,group:`search`}],this.previousQuery=``,this.drawPromise=null,this.walker=null,this.walkerCount=null,this.cache={},this.wrapFrameRequest=0}get ui(){return new PV(this.j)}async updateCounters(){this.ui.isOpened&&(this.ui.count=await this.calcCounts(this.ui.query))}onPressReplaceButton(){this.findAndReplace(this.ui.query),this.updateCounters()}tryScrollToElement(e){let t=K.closest(e,K.isElement,this.j.editor);t||=K.prev(e,K.isElement,this.j.editor),t&&t!==this.j.editor&&Fk(t,this.j.editor,this.j.ed)}async calcCounts(e){return(await this.findQueryBounds(e,`walkerCount`)).length}async findQueryBounds(e,t){let n=this[t];return n&&n.break(),n=new VO(this.j.async,{timeout:this.j.o.search.lazyIdleTimeout}),this[t]=n,this.find(n,e).catch(e=>[])}async findAndReplace(e){let t=await this.findQueryBounds(e,`walker`);if(!t.length)return!1;let n=this.findCurrentIndexInRanges(t,this.j.s.range);n===-1&&(n=0);let r=t[n];if(r){try{let t=this.j.ed.createRange();t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),t.deleteContents();let i=this.j.createInside.text(this.ui.replace);K.safeInsertNode(t,i),EV(this.j),this.j.s.setCursorAfter(i),this.tryScrollToElement(i),this.cache={},this.ui.currentIndex=n,await this.findAndSelect(e,!0).catch(e=>null)}finally{this.j.synchronizeValues()}return this.j.e.fire(`afterFindAndReplace`),!0}return!1}async findAndSelect(e,t){var n;let r=await this.findQueryBounds(e,`walker`);if(!r.length)return!1;(this.previousQuery!==e||!TV(this.j.editor).length)&&((n=this.drawPromise)==null||n.rejectCallback(),this.j.async.cancelAnimationFrame(this.wrapFrameRequest),EV(this.j),this.drawPromise=this.__drawSelectionRanges(r)),this.previousQuery=e;let i=this.ui.currentIndex-1;i=i===-1?0:t?i===r.length-1?0:i+1:i===0?r.length-1:i-1,this.ui.currentIndex=i+1;let a=r[i];if(a){let e=this.j.ed.createRange();try{e.setStart(a.startContainer,a.startOffset),e.setEnd(a.endContainer,a.endOffset),this.j.s.selectRange(e)}catch{}return this.tryScrollToElement(a.startContainer),await this.updateCounters(),await this.drawPromise,this.j.e.fire(`afterFindAndSelect`),!0}return!1}findCurrentIndexInRanges(e,t){return e.findIndex(e=>e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.startContainer&&e.endOffset===t.endOffset)}async isValidCache(e){return(await e).every(e=>e.startContainer.isConnected&&e.startOffset<=(e.startContainer.nodeValue?.length??0)&&e.endContainer.isConnected&&e.endOffset<=(e.endContainer.nodeValue?.length??0))}async find(e,t){if(!t.length)return[];let n=this.cache[t];return n&&await this.isValidCache(n)?n:(this.cache[t]=this.j.async.promise(n=>{let r=new MV(this.j.o.search.fuzzySearch);e.on(`break`,()=>{n([])}).on(`visit`,e=>(K.isText(e)&&r.add(e),!1)).on(`end`,()=>{n(r.ranges(t)??[])}).setWork(this.j.editor)}),this.cache[t])}__drawSelectionRanges(e){let{async:t,createInside:n,editor:r}=this.j;t.cancelAnimationFrame(this.wrapFrameRequest);let i=[...e],a,o=0;return t.promise(e=>{let s=()=>{do a=i.shift(),a&&wV(this.j,a,i,n,r),o+=1;while(a&&o<=5);i.length?this.wrapFrameRequest=t.requestAnimationFrame(s):e()};s()})}onAfterGetValueFromEditor(e){e.value=DV(e.value)}afterInit(e){if(e.o.useSearch){let t=this;e.e.on(`beforeSetMode.search`,()=>{this.ui.close()}).on(this.ui,`afterClose`,()=>{EV(e),this.ui.currentIndex=0,this.ui.count=0,this.cache={},e.focus()}).on(`click`,()=>{this.ui.currentIndex=0,EV(e)}).on(`change.search`,()=>{this.cache={}}).on(`keydown.search mousedown.search`,e.async.debounce(()=>{this.ui.selInfo&&(e.s.removeMarkers(),this.ui.selInfo=null),this.ui.isOpened&&this.updateCounters()},e.defaultTimeout)).on(`searchNext.search searchPrevious.search`,()=>(this.ui.isOpened||this.ui.open(),t.findAndSelect(t.ui.query,e.e.current===`searchNext`).catch(e=>{}))).on(`search.search`,(e,n=!0)=>(this.ui.currentIndex=0,t.findAndSelect(e||``,n).catch(e=>{}))),e.registerCommand(`search`,{exec:(e,n,r=!0)=>(n&&t.findAndSelect(n,r).catch(e=>{}),!1)}).registerCommand(`openSearchDialog`,{exec:(e,n)=>(t.ui.open(n),!1),hotkeys:[`ctrl+f`,`cmd+f`]}).registerCommand(`openReplaceDialog`,{exec:(n,r,i)=>(e.o.readonly||t.ui.open(r,i,!0),!1),hotkeys:[`ctrl+h`,`cmd+h`]})}}beforeDestruct(e){var t;(t=iO(this,`ui`))==null||t.destruct(),e.e.off(`.search`)}};FV([aO],IV.prototype,`ui`,null),FV([Y(`ui:needUpdateCounters`)],IV.prototype,`updateCounters`,null),FV([Y(`ui:pressReplaceButton`)],IV.prototype,`onPressReplaceButton`,null),FV([H],IV.prototype,`findQueryBounds`,null),FV([H],IV.prototype,`findAndReplace`,null),FV([H],IV.prototype,`findAndSelect`,null),FV([H],IV.prototype,`find`,null),FV([Y(`:afterGetValueFromEditor`)],IV.prototype,`onAfterGetValueFromEditor`,null),q.add(`search`,IV),J.prototype.select={normalizeSelectionBeforeCutAndCopy:!1,normalizeTripleClick:!0};var LV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},RV=class extends nN{constructor(){super(...arguments),this.proxyEventsList=[`click`,`mousedown`,`touchstart`,`mouseup`,`touchend`]}afterInit(e){this.proxyEventsList.forEach(t=>{e.e.on(t+`.select`,this.onStartSelection)})}beforeDestruct(e){this.proxyEventsList.forEach(t=>{e.e.on(t+`.select`,this.onStartSelection)})}onStartSelection(e){let{j:t}=this,n,r=e.target;for(;n===void 0&&r&&r!==t.editor;)n=t.e.fire(bD(e.type+`_`+r.nodeName.toLowerCase()),r,e),r=r.parentElement;e.type===`click`&&n===void 0&&r===t.editor&&t.e.fire(e.type+`Editor`,r,e)}onOutsideClick(e){let t=e.target;K.up(t,e=>e===this.j.editor)||VA.closestElement(t,Lj)||this.j.e.fire(`outsideClick`,e)}beforeCommandCut(){let{s:e}=this.j;if(!e.isCollapsed()){let t=e.current();t&&K.isOrContains(this.j.editor,t)&&this.onCopyNormalizeSelectionBound()}}beforeCommandSelectAll(){let{s:e}=this.j;return e.focus(),e.select(this.j.editor,!0),e.expandSelection(),!1}onClickRightOfNestedListItem(e){let{s:t}=this.j,n=t.range;if(!n.collapsed||n.startOffset!==0||!K.isText(n.startContainer))return;let r=n.startContainer,i=r.parentNode;if(!K.isTag(i,`li`)||!(i.querySelector(`ul`)||i.querySelector(`ol`)))return;let a=this.j.ed.createRange();a.selectNodeContents(r);let o=a.getBoundingClientRect();e.clientX>o.right&&t.setCursorAfter(r)}onClickKeepPendingFormat(){let{s:e}=this.j,t=e.range;if(!t.collapsed||!K.isText(t.startContainer))return;let n=t.startContainer;if(t.startOffset!==(n.nodeValue?.length??0))return;let r=n.nextSibling;if(!K.isElement(r)||!r.nodeName.match(dE)||!K.isEmpty(r))return;let i=r;for(;K.isElement(i.firstElementChild)&&i.firstElementChild.nodeName.match(dE);)i=i.firstElementChild;e.setCursorIn(i)}onTripleClickNormalizeSelection(e){if(e.detail!==3||!this.j.o.select.normalizeTripleClick)return;let{s:t}=this.j,{startContainer:n,startOffset:r}=t.range;r===0&&K.isText(n)&&t.select(K.closest(n,K.isBlock,this.j.editor)||n,!0)}onCopyNormalizeSelectionBound(e){let{s:t,editor:n,o:r}=this.j;!r.select.normalizeSelectionBeforeCutAndCopy||t.isCollapsed()||e&&(!e.isTrusted||!K.isNode(e.target)||!K.isOrContains(n,e.target))||this.jodit.s.expandSelection()}};LV([H],RV.prototype,`onStartSelection`,null),LV([Y(`ow:click`)],RV.prototype,`onOutsideClick`,null),LV([Y([`:beforeCommandCut`])],RV.prototype,`beforeCommandCut`,null),LV([Y([`:beforeCommandSelectall`])],RV.prototype,`beforeCommandSelectAll`,null),LV([Y([`:click`])],RV.prototype,`onClickRightOfNestedListItem`,null),LV([Y([`:click`])],RV.prototype,`onClickKeepPendingFormat`,null),LV([Y([`:click`])],RV.prototype,`onTripleClickNormalizeSelection`,null),LV([Y([`:copy`,`:cut`])],RV.prototype,`onCopyNormalizeSelectionBound`,null),q.add(`select`,RV),J.prototype.tableAllowCellSelection=!0;var zV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},BV=`table_processor_observer`,VV=`onMoveTableSelectCell`,HV=class extends nN{constructor(){super(...arguments),this.__selectedCell=null,this.__isSelectionMode=!1}
322get __tableModule(){return this.j.getInstance(fN,this.j.o)}afterInit(e){e.o.tableAllowCellSelection&&e.e.on(`keydown.select-cells`,e=>{e.key===`Tab`&&this.unselectCells()}).on(`beforeCommand.select-cells`,this.onExecCommand).on(`afterCommand.select-cells`,this.onAfterCommand).on([`clickEditor`,`mousedownTd`,`mousedownTh`,`touchstartTd`,`touchstartTh`].map(e=>e+`.select-cells`).join(` `),this.onStartSelection).on(`clickTr clickTbody`,()=>{var e;let t=this.__tableModule.getAllSelectedCells().length;if(t)return t>1&&((e=this.j.s.sel)==null||e.removeAllRanges()),!1})}onStartSelection(e,t){var n;if(this.j.o.readonly)return;let r=K.closest(e,`table`,this.j.editor);if((t?.ctrlKey||t?.metaKey)&&e!==this.j.editor&&r&&K.isCell(e))return this.__tableModule.getAllSelectedCells().includes(e)?this.__tableModule.removeSelection(e):(e.firstChild||e.appendChild(this.j.createInside.element(`br`)),this.__tableModule.addSelection(e)),this.__selectedCell=e,(n=this.j.s.sel)==null||n.removeAllRanges(),this.__tableModule.getAllSelectedCells().length?this.j.e.fire(`showPopup`,r,()=>fA(e,this.j),`cells`):this.j.e.fire(`hidePopup`,`cells`),!1;if(this.unselectCells(),e!==this.j.editor&&!(!e||!r))return e.firstChild||e.appendChild(this.j.createInside.element(`br`)),this.__isSelectionMode=!0,this.__selectedCell=e,this.__tableModule.addSelection(e),this.j.e.on(r,`mousemove.select-cells touchmove.select-cells`,this.j.async.throttle(this.__onMove.bind(this,r),{label:VV,timeout:this.j.defaultTimeout/2})).on(r,`mouseup.select-cells touchend.select-cells`,this.__onStopSelection.bind(this,r)),!1}onOutsideClick(){this.__selectedCell=null,this.__onRemoveSelection()}onChange(){!this.j.isLocked&&!this.__isSelectionMode&&this.__onRemoveSelection()}__onMove(e,t){var n;if(this.j.o.readonly&&!this.j.isLocked||this.j.isLockedNotBy(BV))return;let r=(this.j.o.shadowRoot??this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!r)return;let i=K.closest(r,[`td`,`th`],e);if(!i||!this.__selectedCell)return;i!==this.__selectedCell&&this.j.lock(BV),this.unselectCells();let a=this.__tableModule.getSelectedBound(e,[i,this.__selectedCell]),o=this.__tableModule.formalMatrix(e);for(let e=a[0][0];e<=a[1][0];e+=1)for(let t=a[0][1];t<=a[1][1];t+=1)this.__tableModule.addSelection(o[e][t]);this.__tableModule.getAllSelectedCells().length>1&&((n=this.j.s.sel)==null||n.removeAllRanges()),this.j.e.fire(`hidePopup`),t.stopPropagation(),(()=>{let e=this.j.createInside.fromHTML(`<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>`);i.appendChild(e),this.j.async.setTimeout(()=>{var t;(t=e.parentNode)==null||t.removeChild(e)},this.j.defaultTimeout/5)})()}__onRemoveSelection(e){if(!e?.buffer?.actionTrigger&&!this.__selectedCell&&this.__tableModule.getAllSelectedCells().length){this.j.unlock(),this.unselectCells(),this.j.e.fire(`hidePopup`,`cells`);return}this.__isSelectionMode=!1,this.__selectedCell=null}__onStopSelection(e,t){if(!this.__selectedCell)return;this.__isSelectionMode=!1,this.j.unlock();let n=(this.j.o.shadowRoot??this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!n)return;let r=K.closest(n,[`td`,`th`],e);if(!r)return;let i=K.closest(r,`table`,e);if(i&&i!==e)return;let a=this.__tableModule.getSelectedBound(e,[r,this.__selectedCell]),o=this.__tableModule.formalMatrix(e),s=o[a[1][0]]?.[a[1][1]],c=o[a[0][0]]?.[a[0][1]];!c||!s||(this.j.e.fire(`showPopup`,e,()=>{let e=fA(c,this.j),t=fA(s,this.j);return{left:e.left,top:e.top,width:t.left-e.left+t.width,height:t.top-e.top+t.height}},`cells`),$O(`table`,this.j.editor).forEach(e=>{this.j.e.off(e,`mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells`)}),this.j.async.clearTimeout(VV))}unselectCells(e){let t=this.__tableModule,n=t.getAllSelectedCells();n.length&&n.forEach(n=>{(!e||e!==n)&&t.removeSelection(n)})}onExecCommand(e){if(/^(delete|backspace)(word|sentence)?button$/.test(e)&&this.__tableModule.getAllSelectedCells().length>1){let e=this.__tableModule.getAllSelectedCells();return e.forEach(e=>{K.detach(e),e.appendChild(this.j.createInside.element(`br`))}),this.unselectCells(),this.j.s.setCursorIn(e[0]),this.j.synchronizeValues(),!1}if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(e)){e=e.replace(`table`,``);let t=this.__tableModule.getAllSelectedCells();if(t.length){let[n]=t;if(!n)return;let r=K.closest(n,`table`,this.j.editor);if(!r)return;switch(e){case`splitv`:this.__tableModule.splitVertical(r);break;case`splitg`:this.__tableModule.splitHorizontal(r);break;case`merge`:this.__tableModule.mergeSelected(r);break;
322case`empty`:t.forEach(e=>K.detach(e));break;case`bin`:K.safeRemove(r);break;case`binrow`:new Set(t.map(e=>e.parentNode)).forEach(e=>{this.__tableModule.removeRow(r,e.rowIndex)});break;case`bincolumn`:{let e=new Set,n=[];t.forEach(t=>{let[,i]=this.__tableModule.formalCoordinate(r,t);e.has(i)||(n.push(i),e.add(i))}),n.sort((e,t)=>t-e).forEach(e=>{this.__tableModule.removeColumn(r,e)})}break;case`addcolumnafter`:case`addcolumnbefore`:this.__tableModule.appendColumn(r,n,e===`addcolumnafter`);break;case`addrowafter`:case`addrowbefore`:this.__tableModule.appendRow(r,n.parentNode,e===`addrowafter`);break}}return!1}}onAfterCommand(e){/^justify/.test(e)&&this.__tableModule.getAllSelectedCells().forEach(t=>dk(e,t))}beforeDestruct(e){this.__onRemoveSelection(),e.e.off(`.select-cells`)}};HV.requires=[`select`],zV([H],HV.prototype,`onStartSelection`,null),zV([Y(`:outsideClick`)],HV.prototype,`onOutsideClick`,null),zV([Y(`:change`)],HV.prototype,`onChange`,null),zV([H],HV.prototype,`__onRemoveSelection`,null),zV([H],HV.prototype,`__onStopSelection`,null),zV([H],HV.prototype,`onExecCommand`,null),zV([H],HV.prototype,`onAfterCommand`,null),q.add(`selectCells`,HV);var UV=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M553 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"/> </svg> `;J.prototype.beautifyHTML=!DE,J.prototype.sourceEditor=`ace`,J.prototype.sourceEditorNativeOptions={showGutter:!0,theme:`ace/theme/idle_fingers`,mode:`ace/mode/html`,wrap:!0,highlightActiveLine:!0},J.prototype.sourceEditorCDNUrlsJS=[`https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js`],J.prototype.beautifyHTMLCDNUrlsJS=[`https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js`,`https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify-html.min.js`],RA.set(`source`,UV),J.prototype.controls.source={mode:3,exec:e=>{e.toggleMode()},isActive:e=>e.getRealMode()===2,tooltip:`Change mode`};var WV=class{constructor(e,t,n,r){this.jodit=e,this.container=t,this.toWYSIWYG=n,this.fromWYSIWYG=r,this.className=``,this.isReady=!1}get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,`ready`)}onReadyAlways(e){var t;this.isReady?e():(t=this.j.events)==null||t.on(this,`ready`,e)}},GV=class extends WV{constructor(){super(...arguments),this.className=`jodit_ace_editor`,this.proxyOnBlur=e=>{this.j.e.fire(`blur`,e)},this.proxyOnFocus=e=>{this.j.e.fire(`focus`,e)},this.proxyOnMouseDown=e=>{this.j.e.fire(`mousedown`,e)}}aceExists(){return this.j.ow.ace!==void 0}getLastColumnIndex(e){return this.instance.session.getLine(e).length}getLastColumnIndices(){let e=this.instance.session.getLength(),t=[],n=0;for(let r=0;r<e;r++)n+=this.getLastColumnIndex(r),r>0&&(n+=1),t[r]=n;return t}getRowColumnIndices(e){let t=this.getLastColumnIndices();if(e<=t[0])return{row:0,column:e};let n=1;for(let r=1;r<t.length;r++)e>t[r]&&(n=r+1);let r=e-t[n-1]-1;return{row:n,column:r}}setSelectionRangeIndices(e,t){let n=this.getRowColumnIndices(e),r=this.getRowColumnIndices(t);this.instance.getSelection().setSelectionRange({start:n,end:r})}getIndexByRowColumn(e,t){return this.getLastColumnIndices()[e]-this.getLastColumnIndex(e)+t}init(e){let t=()=>{if(this.instance!==void 0||!this.aceExists())return;let t=this.j.c.div(`jodit-source__mirror-fake`);this.container.appendChild(t);let n=e.ow.ace;this.instance=n.edit(t),e.o.direction===`rtl`&&(this.instance.setOption(`rtlText`,!0),this.instance.setOption(`rtl`,!0)),this.instance.setOptions(e.o.sourceEditorNativeOptions),this.instance.setTheme(e.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(e.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(e.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(e.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption(`indentedSoftWrap`,!1),this.instance.setOption(`wrap`,e.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on(`change`,this.toWYSIWYG),this.instance.on(`focus`,this.proxyOnFocus),this.instance.on(`mousedown`,this.proxyOnMouseDown),this.instance.on(`blur`,this.proxyOnBlur),e.getRealMode()!==1&&this.setValue(this.getValue());let r=this.j.async.throttle(()=>{if(e.isInDestruct||e.getMode()===1)return;let t=this.instance.isFocused();e.o.height===`auto`?this.instance.setOption(`maxLines`,1/0):this.instance.setOption(`maxLines`,e.workplace.offsetHeight/this.instance.renderer.lineHeight),this.instance.resize(),t&&this.focus()},this.j.defaultTimeout*2);e.e.on(e,`resize`,r).on(`afterResize afterSetMode`,r),r(),this.onReady()},n=()=>{e.isInDestruct||e.getRealMode()!==2&&e.getMode()!==3||(this.fromWYSIWYG(),t())};e.e.on(`afterSetMode`,n),n(),this.aceExists()||EO(e,e.o.sourceEditorCDNUrlsJS).then(n).catch(()=>null)}destruct(){var e;this.instance.off(`change`,this.toWYSIWYG),this.instance.off(`focus`,this.proxyOnFocus),this.instance.off(`mousedown`,this.proxyOnMouseDown),this.instance.destroy(),(e=this.j?.events)==null||e.off(`aceInited.source`)}setValue(e){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let t=this.j.e.fire(`beautifyHTML`,e);U(t)&&(e=t)}this.instance.setValue(e),this.instance.clearSelection()}getValue(){return this.instance.getValue()}setReadOnly(e){this.instance.setReadOnly(e)}get isFocused(){return this.instance.isFocused()}focus(){this.instance.container.focus(),this.instance.focus()}blur(){this.instance.blur()}getSelectionStart(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.start.row,e.start.column)}getSelectionEnd(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.end.row,e.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(e){let t=this.instance.selection.getCursor(),n=this.instance.session.insert(t,e);this.instance.selection.setRange({start:t,end:n},!1)}setSelectionRange(e,t){this.setSelectionRangeIndices(e,t)}setPlaceHolder(e){}replaceUndoManager(){let{history:e}=this.jodit;this.instance.commands.addCommand({name:`Undo`,bindKey:{win:`Ctrl-Z`,mac:`Command-Z`},exec:()=>{e.undo()}}),this.instance.commands.addCommand({name:`Redo`,bindKey:{win:`Ctrl-Shift-Z`,mac:`Command-Shift-Z`},exec:()=>{e.redo()}})}},KV=class extends WV{constructor(){super(...arguments),this.autosize=this.j.async.debounce(()=>{this.instance.style.height=`auto`,this.instance.style.height=this.instance.scrollHeight+`px`},this.j.defaultTimeout,!0)}
322init(e){this.instance=e.c.element(`textarea`,{class:`jodit-source__mirror`,dir:e.o.direction===`rtl`?`rtl`:void 0}),this.container.appendChild(this.instance),e.e.on(this.instance,`mousedown keydown touchstart input`,e.async.debounce(this.toWYSIWYG,e.defaultTimeout)).on(`setMinHeight.source`,e=>{W(this.instance,`minHeight`,e)}).on(this.instance,`change keydown mousedown touchstart input`,this.autosize).on(`afterSetMode.source`,this.autosize).on(this.instance,`mousedown focus blur`,t=>{e.e.fire(t.type,t)}),this.autosize(),this.onReady()}destruct(){K.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(e){this.instance.value=e}insertRaw(e){let t=this.getValue();if(this.getSelectionStart()>=0){let n=this.getSelectionStart(),r=this.getSelectionEnd();this.setValue(t.substring(0,n)+e+t.substring(r,t.length))}else this.setValue(t+e)}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(e,t=e){this.instance.setSelectionRange(e,t)}get isFocused(){return this.instance===this.j.od.activeElement}focus(){this.instance.focus()}blur(){this.instance.blur()}setPlaceHolder(e){G(this.instance,`placeholder`,e)}setReadOnly(e){G(this.instance,`readonly`,e?`true`:null)}selectAll(){this.instance.select()}replaceUndoManager(){let{history:e}=this.jodit;this.j.e.on(this.instance,`keydown`,t=>{if((t.ctrlKey||t.metaKey)&&t.key===`z`)return t.shiftKey?e.redo():e.undo(),this.setSelectionRange(this.getValue().length),!1})}};function qV(e,t,n,r,i){let a;if(V(e))a=e(t);else switch(e){case`ace`:if(!t.o.shadowRoot){a=new GV(t,n,r,i);break}default:a=new KV(t,n,r,i)}return a.init(t),a.onReadyAlways(()=>{a.setReadOnly(t.o.readonly)}),a}var JV=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},YV=class extends nN{constructor(){super(...arguments),this.buttons=[{name:`source`,group:`source`}],this.__lock=!1,this.__oldMirrorValue=``,this.tempMarkerStart=`{start-jodit-selection}`,this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd=`{end-jodit-selection}`,this.tempMarkerEndReg=/{end-jodit-selection}/g,this.getSelectionStart=()=>this.sourceEditor?.getSelectionStart()??0,this.getSelectionEnd=()=>this.sourceEditor?.getSelectionEnd()??0}onInsertHTML(e){var t;if(!this.j.o.readonly&&!this.j.isEditorMode())return(t=this.sourceEditor)==null||t.insertRaw(e),this.toWYSIWYG(),!1}fromWYSIWYG(e=!1){if(!this.__lock||e===!0){this.__lock=!0;let e=this.j.getEditorValue(!1,KE);e!==this.getMirrorValue()&&this.setMirrorValue(e),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;let e=this.getMirrorValue();e!==this.__oldMirrorValue&&(this.__lock=!0,this.j.value=e,this.__lock=!1,this.__oldMirrorValue=e)}getNormalPosition(e,t){for(t=t.replace(/<(script|style|iframe)[^>]*>[^]*?<\/\1>/im,e=>{let t=``;for(let n=0;n<e.length;n+=1)t+=``;return t});e>0&&t[e]===``;)e--;let n=e;for(;n>0;){if(n--,t[n]===`<`&&t[n+1]!==void 0&&t[n+1].match(/[\w/]+/i))return n;if(t[n]===`>`)return e}return e}clnInv(e){return e.replace(nE(),``)}onSelectAll(e){var t;if(e.toLowerCase()===`selectall`&&this.j.getRealMode()===2)return(t=this.sourceEditor)==null||t.selectAll(),!1}getMirrorValue(){return this.sourceEditor?.getValue()||``}setMirrorValue(e){var t;(t=this.sourceEditor)==null||t.setValue(e)}setFocusToMirror(){var e;let t=this.j.od.activeElement;t&&t!==this.j.od.body&&!this.j.container.contains(t)||(e=this.sourceEditor)==null||e.focus()}saveSelection(){if(this.j.getRealMode()===1)this.j.s.save(),this.j.synchronizeValues(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;let e=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){let t=this.j.s.marker(!0),n=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(e.substring(0,n)+this.clnInv(t.outerHTML)+e.substring(n))}else{let t=this.j.s.marker(!0),n=this.j.s.marker(!1),r=this.getNormalPosition(this.getSelectionStart(),e),i=this.getNormalPosition(this.getSelectionEnd(),e);this.setMirrorValue(e.slice(0,r)+this.clnInv(t.outerHTML)+e.slice(r,i)+this.clnInv(n.outerHTML)+e.slice(i))}this.toWYSIWYG()}}removeSelection(){if(this.j.getRealMode()===1){this.__lock=!0,this.j.s.restore(
322),this.__lock=!1;return}let e=this.getMirrorValue(),t=0,n=0;try{if(e=e.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let t=this.j.e.fire(`beautifyHTML`,e);U(t)&&(e=t)}if(t=e.indexOf(this.tempMarkerStart),n=t,e=e.replace(this.tempMarkerStartReg,``),t!==-1){let t=e.indexOf(this.tempMarkerEnd);t!==-1&&(n=t)}e=e.replace(this.tempMarkerEndReg,``)}finally{e=e.replace(this.tempMarkerEndReg,``).replace(this.tempMarkerStartReg,``)}this.setMirrorValue(e),this.setMirrorSelectionRange(t,n),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(e,t){var n;(n=this.sourceEditor)==null||n.setSelectionRange(e,t)}onReadonlyReact(){var e;(e=this.sourceEditor)==null||e.setReadOnly(this.j.o.readonly)}afterInit(e){if(this.mirrorContainer=e.c.div(`jodit-source`),e.workplace.appendChild(this.mirrorContainer),e.e.on(`afterAddPlace changePlace afterInit`,()=>{e.workplace.appendChild(this.mirrorContainer)}),this.sourceEditor=qV(`area`,e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),e.e.on(e.ow,`keydown`,e=>{e.key===`Escape`&&this.sourceEditor?.isFocused&&this.sourceEditor.blur()}),this.onReadonlyReact(),e.e.on(`placeholder.source`,e=>{var t;(t=this.sourceEditor)==null||t.setPlaceHolder(e)}).on(`change.source`,this.syncValueFromWYSIWYG).on(`beautifyHTML`,e=>e),e.o.beautifyHTML){let t=()=>{var t;if(e.isInDestruct)return!1;let n=e.ow.html_beautify;return n&&!e.isInDestruct?((t=e.events)==null||t.off(`beautifyHTML`).on(`beautifyHTML`,e=>n(e)),!0):!1};t()||EO(e,e.o.beautifyHTMLCDNUrlsJS).then(t,()=>null)}this.syncValueFromWYSIWYG(!0),this.initSourceEditor(e)}syncValueFromWYSIWYG(e=!1){let t=this.j;(t.getMode()===3||t.getMode()===2)&&this.fromWYSIWYG(e)}initSourceEditor(e){var t;if(e.o.sourceEditor!==`area`){let t=qV(e.o.sourceEditor,e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);t.onReadyAlways(()=>{var n,r;(n=this.sourceEditor)==null||n.destruct(),this.sourceEditor=t,this.syncValueFromWYSIWYG(!0),(r=e.events)==null||r.fire(`sourceEditorReady`,e)})}else (t=this.sourceEditor)==null||t.onReadyAlways(()=>{var t;this.syncValueFromWYSIWYG(!0),(t=e.events)==null||t.fire(`sourceEditorReady`,e)})}beforeDestruct(){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),K.safeRemove(this.mirrorContainer)}};JV([Y(`:insertHTML.source`)],YV.prototype,`onInsertHTML`,null),JV([H],YV.prototype,`fromWYSIWYG`,null),JV([H],YV.prototype,`toWYSIWYG`,null),JV([H],YV.prototype,`getNormalPosition`,null),JV([Y(`:beforeCommand.source`)],YV.prototype,`onSelectAll`,null),JV([Y(`:beforeSetMode.source`)],YV.prototype,`saveSelection`,null),JV([Y(`:afterSetMode.source`)],YV.prototype,`removeSelection`,null),JV([H],YV.prototype,`setMirrorSelectionRange`,null),JV([Y(`:readonly.source`)],YV.prototype,`onReadonlyReact`,null),JV([H],YV.prototype,`syncValueFromWYSIWYG`,null),q.add(`source`,YV);var XV=`<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24.89 32h4.18L18.86 6h-3.71L4.93 32h4.18l2.25-6h11.29l2.24 6zM12.86 22L17 10.95 21.14 22h-8.28zm30.31 1.17L27 39.34 19.66 32l-2.83 2.83L27 45l19-19-2.83-2.83z"/> </svg> `;J.prototype.spellcheck=!1,RA.set(`spellcheck`,XV),J.prototype.controls.spellcheck={isActive(e){return e.o.spellcheck},icon:XV,name:`spellcheck`,command:`toggleSpellcheck`,tooltip:`Spellcheck`};var ZV=s({default:()=>QV}),QV={Spellcheck:`Ø§ÙØªØ¯ÙÙÙ Ø§ÙØ¥Ù
ÙØ§Ø¦Ù`},$V=s({default:()=>eH}),eH={Spellcheck:`Kontrola pravopisu`},tH=s({default:()=>nH}),nH={Spellcheck:`Rechtschreibprüfung`},rH=s({default:()=>iH}),iH={Spellcheck:`Corrección ortográfica`},aH=s({default:()=>oH}),oH={Spellcheck:`ØºÙØ·ÛØ§Ø¨Û Ø§Ù
ÙØ§ÛÛ`},sH=s({default:()=>cH}),cH={Spellcheck:`Oikeinkirjoituksen tarkistus`},lH=s({default:()=>uH}),uH={Spellcheck:`Vérification Orthographique`},dH=s({default:()=>fH}),fH={Spellcheck:`×××קת ×××ת`},pH=s({default:()=>mH}),mH={Spellcheck:`HelyesÃrás-ellenÅrzés`},hH=s({default:()=>gH}
322),gH={Spellcheck:`Spellchecking`},_H=s({default:()=>vH}),vH={Spellcheck:`Controllo ortografico`},yH=s({default:()=>bH}),bH={Spellcheck:`ã¹ãã«ãã§ãã¯`},xH=s({default:()=>SH}),SH={Spellcheck:`ë§ì¶¤ë² ê²ì¬`},CH=s({default:()=>wH}),wH={Spellcheck:`ÐÒ¯Ñмийн алдаа ÑалгаÑ
`},TH=s({default:()=>EH}),EH={Spellcheck:`Spellingcontrole`},DH=s({default:()=>OH}),OH={Spellcheck:`Stavekontroll`},kH=s({default:()=>AH}),AH={Spellcheck:`Sprawdzanie pisowni`},jH=s({default:()=>MH}),MH={Spellcheck:`Verificação ortográfica`},NH=s({default:()=>PH}),PH={Spellcheck:`ÐÑовеÑка оÑÑогÑаÑии`},FH=s({default:()=>IH}),IH={Spellcheck:`Kontrola pravopisu`},LH=s({default:()=>RH}),RH={Spellcheck:`Yazım denetimi`},zH=s({default:()=>BH}),BH={Spellcheck:`ÐеÑевÑÑка оÑÑогÑаÑÑÑ`},VH=s({default:()=>HH}),HH={Spellcheck:`æ¼åæ£æ¥`},UH=s({default:()=>WH}),WH={Spellcheck:`æ¼å檢æ¥`},GH=s({ar:()=>ZV,cs_cz:()=>$V,de:()=>tH,es:()=>rH,fa:()=>aH,fi:()=>sH,fr:()=>lH,he:()=>dH,hu:()=>pH,id:()=>hH,it:()=>_H,ja:()=>yH,ko:()=>xH,mn:()=>CH,nl:()=>TH,no:()=>DH,pl:()=>kH,pt_br:()=>jH,ru:()=>NH,sk:()=>FH,tr:()=>LH,ua:()=>zH,zh_cn:()=>VH,zh_tw:()=>UH}),KH=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},qH=class extends nN{constructor(e){super(e),this.buttons=[{group:`state`,name:`spellcheck`}],qO(GH)}afterInit(e){e.e.on(`afterInit afterAddPlace prepareWYSIWYGEditor`,this.toggleSpellcheck),this.toggleSpellcheck(),e.registerCommand(`toggleSpellcheck`,()=>{this.jodit.o.spellcheck=!this.jodit.o.spellcheck,this.toggleSpellcheck(),this.j.e.fire(`updateToolbar`)})}toggleSpellcheck(){G(this.jodit.editor,`spellcheck`,this.jodit.o.spellcheck)}beforeDestruct(e){}};KH([H],qH.prototype,`toggleSpellcheck`,null),q.add(`spellcheck`,qH),J.prototype.toolbarSticky=!0,J.prototype.toolbarDisableStickyForMobile=!0,J.prototype.toolbarStickyOffset=0;var JH=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},YH=!1,XH=class extends nN{constructor(){super(...arguments),this.__isToolbarStuck=!1,this.__createDummy=e=>{this.__dummyBox=this.j.c.div(),this.__dummyBox.classList.add(`jodit_sticky-dummy_toolbar`),this.j.container.insertBefore(this.__dummyBox,e)},this.addSticky=e=>{this.__isToolbarStuck||=(YH&&!this.__dummyBox&&this.__createDummy(e),this.j.container.classList.add(`jodit_sticky`),!0),W(e,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2}),this.__dummyBox&&W(this.__dummyBox,{height:e.offsetHeight})},this.removeSticky=e=>{this.__isToolbarStuck&&=(W(e,{width:``,top:``}),this.j.container.classList.remove(`jodit_sticky`),!1)}}afterInit(e){e.e.on(e.ow,`scroll.sticky wheel.sticky mousewheel.sticky resize.sticky`,this.__onScroll).on(`getStickyState.sticky`,()=>this.__isToolbarStuck)}__onScroll(){let{jodit:e}=this;if(!e.o.toolbarSticky||!e.o.toolbar)return;let t=e.ow.pageYOffset||e.od.documentElement&&e.od.documentElement.scrollTop||0,n=dA(e.container,e,e.od,!0),r=e.getMode()===1&&t+e.o.toolbarStickyOffset>n.top&&t+e.o.toolbarStickyOffset<n.top+n.height&&!(e.o.toolbarDisableStickyForMobile&&this.__isMobile());if(this.__isToolbarStuck===r)return;let i=e.toolbarContainer;i&&(r?this.addSticky(i):this.removeSticky(i)),e.e.fire(`toggleSticky`,r)}__isMobile(){let{j:e}=this;return e&&e.options&&e.container&&e.options.sizeSM>=e.container.offsetWidth}beforeDestruct(e){K.safeRemove(this.__dummyBox),e.e.off(e.ow,`scroll.sticky wheel.sticky mousewheel.sticky resize.sticky`,this.__onScroll).off(`.sticky`)}};JH([SA()],XH.prototype,`__onScroll`,null),q.add(`sticky`,XH);var ZH=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 270 270"> <path d="m240.443652,220.45085l-47.410809,0l0,-10.342138c13.89973,-8.43655 25.752896,-19.844464 34.686646,-33.469923c11.445525,-17.455846 17.496072,-37.709239 17.496072,-58.570077c0,-59.589197 -49.208516,-108.068714 -109.693558,-108.068714s-109.69263,48.479517 -109.69263,108.069628c0,20.860839 6.050547,41.113316 17.497001,58.570077c8.93375,13.625459 20.787845,25.032458 34.686646,33.469008l0,10.342138l-47.412666,0c-10.256959,0 -18.571354,8.191376 -18.571354,18.296574c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.98402,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574l0,-39.496814c0,-7.073455 -4.137698,-13.51202 -10.626529,-16.537358c-25.24497,-11.772016 -41.557118,-37.145704 -41.557118,-64.643625c0,-39.411735 32.545369,-71.476481 72.549922,-71.476481c40.004553,0 72.550851,32.064746 72.550851,71.476481c0,27.497006 -16.312149,52.87161 -41.557118,64.643625c-6.487902,3.026253 -10.6256,9.464818 -10.6256,16.537358l0,39.496814c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.982163,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574c0,-10.105198 -8.314395,-18.296574 -18.571354,-18.296574z"/> </svg> `;J.prototype.usePopupForSpecialCharacters=!1,J.prototype.specialCharacters="!,",#,$,%,&,',(,),*,+,-,.,/,0,1,2,3,4,5,6,7,8,9,:,;,<,=,>,?,@,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,{,|,},~,€,‘,’,“,”,–,—,¡,¢,£,¤,¥,¦,§,¨,©,ª,«,»,¬,®,¯,°,²,³,´,µ,¶,·,¸,¹,º,¼,½,¾,¿,À,Á,Â,Ã,Ä,Å,Æ,Ç,È,É,Ê,Ë,Ì,Í,Î,Ï,Ð,Ñ,Ò,Ó,Ô,Õ,Ö,×,Ø,Ù,Ú,Û,Ü,Ý,Þ,ß,à,á,â,ã,ä,å,æ,ç,è,é,ê,ë,ì,í,î,ï,ð,ñ,ò,ó,ô,õ,ö,÷,ø,ù,ú,û,ü,ý,þ,ÿ,Œ,œ,Ŵ,Ŷ,ŵ,ŷ,‚,‛,„,…,™,►,•,→,⇒,⇔,♦,≈".split(`,`),RA.set(`symbols`,ZH),J.prototype.controls.symbols={hotkeys:[`ctrl+shift+i`,`cmd+shift+i`],tooltip:`Insert Special Character`,popup:(e,t,n)=>{let r=e.e.fire(`generateSpecialCharactersTable.symbols`);if(r){if(e.o.usePopupForSpecialCharacters){let t=e.c.div();return t.classList.add(`jodit-symbols`),t.appendChild(r),e.e.on(r,`close_dialog`,n),t}e.alert(r,`Select Special Character`,void 0,`jodit-symbols`).bindDestruct(e);let t=r.querySelector(`a`);t&&t.focus()}}};var QH=s({default:()=>$H}),$H={symbols:`رÙ
ز`},eU=s({default:()=>tU}),tU={symbols:`symbol`},nU=s({default:()=>rU}),rU={symbols:`Symbol`},iU=s({default:()=>aU}),aU={symbols:`SÃmbolo`},oU=s({default:()=>sU}),sU={symbols:`سÙ
بÙ`},cU=s({default:()=>lU}),lU={symbols:`Symbolit`},uU=s({default:()=>dU}),dU={symbols:`caractère`},fU=s({default:()=>pU}),pU={symbols:`×ª× ×××××`},mU=s({default:()=>hU}),hU={symbols:`Szimbólum`},gU=s({default:()=>_U}),_U={symbols:`simbol`},vU=s({default:()=>yU}),yU={symbols:`Simbolo`},bU=s({default:()=>xU}),xU={symbols:`symbol`},SU=s({default:()=>CU}),CU={symbols:`기í¸`},wU=s({default:()=>TU}),TU={symbols:`ÑÑмдÑгÑ`},EU=s({default:()=>DU}),DU={symbols:`symbool`},OU=s({default:()=>kU}),kU={symbols:`symbol`},AU=s({default:()=>jU}),jU={symbols:`SÃmbolo`},MU=s({default:()=>NU}),NU={symbols:`Ñимвол`},PU=s({default:()=>FU}),FU={symbols:`Sembol`},IU=s({default:()=>LU}),LU={symbols:`Ñимвол`},RU=s({default:()=>zU}),zU={symbols:`符å·`},BU=s({default:()=>VU}
322),VU={symbols:`符è`},HU=s({ar:()=>QH,cs_cz:()=>eU,de:()=>nU,es:()=>iU,fa:()=>oU,fi:()=>cU,fr:()=>uU,he:()=>fU,hu:()=>mU,id:()=>gU,it:()=>vU,ja:()=>bU,ko:()=>SU,mn:()=>wU,nl:()=>EU,pl:()=>OU,pt_br:()=>AU,ru:()=>MU,tr:()=>PU,ua:()=>IU,zh_cn:()=>RU,zh_tw:()=>BU}),UU=class extends nN{constructor(e){super(e),this.buttons=[{name:`symbols`,group:`insert`}],this.__countInRow=17,qO(HU)}afterInit(e){e.e.on(`generateSpecialCharactersTable.symbols`,()=>{let t=e.c.fromHTML(`<div class="jodit-symbols__container"> 323 <div class="jodit-symbols__container_table"> 324 <table class="jodit-symbols__table"><tbody></tbody></table> 325 </div> 326 <div class="jodit-symbols__container_preview"> 327 <div class="jodit-symbols__preview"></div> 328 </div> 329 </div>`),n=t.querySelector(`.jodit-symbols__preview`),r=t.querySelector(`table`).tBodies[0],i=[];for(let t=0;t<e.o.specialCharacters.length;){let n=e.c.element(`tr`);for(let r=0;r<this.__countInRow&&t<e.o.specialCharacters.length;r+=1,t+=1){let a=e.c.element(`td`),o=e.c.fromHTML(`<a 330 data-index="${t}" 331 data-index-j="${r}" 332 role="option" 333 tabindex="-1" 334 >${e.o.specialCharacters[t]}</a>`);i.push(o),a.appendChild(o),n.appendChild(a)}r.appendChild(n)}let a=this;return e.e.on(i,`focus`,function(){n.innerHTML=this.innerHTML}).on(i,`mousedown`,function(t){K.isTag(this,`a`)&&(e.s.focus(),e.s.insertHTML(this.innerHTML),t?.shiftKey||e.e.fire(this,`close_dialog`),t&&t.preventDefault(),t&&t.stopImmediatePropagation())}).on(i,`mouseenter`,function(){K.isTag(this,`a`)&&this.focus()}).on(i,`keydown`,t=>{let n=t.target;if(K.isTag(n,`a`)){let r=parseInt(G(n,`-index`)||`0`,10),o=parseInt(G(n,`data-index-j`)||`0`,10),s;switch(t.key){case xE:case CE:s=t.key===`ArrowUp`?r-a.__countInRow:r+a.__countInRow,i[s]===void 0&&(s=t.key===`ArrowUp`?Math.floor(i.length/a.__countInRow)*a.__countInRow+o:o,s>i.length-1&&(s-=a.__countInRow)),i[s]&&i[s].focus();break;case SE:case bE:s=t.key===`ArrowLeft`?r-1:r+1,i[s]===void 0&&(s=t.key===`ArrowLeft`?i.length-1:0),i[s]&&i[s].focus();break;case vE:e.e.fire(n,`mousedown`),t.stopImmediatePropagation(),t.preventDefault();break}}}),t})}beforeDestruct(e){e.e.off(`generateSpecialCharactersTable.symbols`)}};q.add(`symbols`,UU);var WU=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 270 270"> <path d="M 255.9537,58.150081 237.69527,40.997278 c -1.49414,-1.375593 -3.43653,-2.077427 -5.37891,-2.077427 -1.94239,0 -3.88478,0.701834 -5.37892,2.077427 L 29.919751,226.1128 c -2.988286,2.77926 -2.988286,7.32714 0,10.13447 L 48.148295,253.372 c 1.46426,1.37559 3.406646,2.1055 5.378915,2.1055 1.972268,0 3.884771,-0.72991 5.378914,-2.1055 L 221.34935,100.73732 255.9537,68.284552 c 2.9584,-2.807333 2.9584,-7.355212 0,-10.134471 z M 251.17244,63.79282 221.34935,91.781927 201.89561,73.506191 231.68882,45.48901 c 0.20918,-0.140367 0.38847,-0.224587 0.62754,-0.224587 0.23906,0 0.44824,0.08422 0.59765,0.224587 l 18.25843,17.152803 c 0,0 0.23906,0.33688 0.23906,0.561467 0,0.224586 -0.0896,0.4211 -0.23906,0.58954 z" style="stroke-width:2.8964;stroke-opacity:1" /> <path d="m 48.626421,116.87948 10.578532,23.10435 c 0.83672,1.82477 3.615826,1.85284 4.452546,0 l 10.937126,-23.52545 c 2.629692,-5.69888 7.470715,-10.24676 13.536935,-12.71722 l 25.07172,-10.274833 c 1.94239,-0.786053 1.94239,-3.396873 0,-4.182926 L 88.13156,79.008563 C 82.06534,76.53811 77.224317,71.990231 74.594625,66.291346 L 63.657499,42.737824 c -0.83672,-1.824766 -3.615826,-1.824766 -4.452546,0 L 48.267826,66.291346 C 45.638135,71.990231 40.797112,76.53811 34.730891,79.008563 L 9.6292894,89.311474 c -1.9423859,0.786054 -1.9423859,3.3688 0,4.182926 l 25.5498446,10.61172 c 6.036338,2.49852 10.847478,7.07448 13.477169,12.77336 z" style="stroke-width:2.8964;fill-opacity:1;stroke-opacity:1" /> <path d="m 111.79878,33.136746 13.56682,5.642739 c 3.19747,1.319446 5.76739,3.761826 7.14201,6.793745 l 5.61797,12.268044 c 0.44825,0.982567 1.91251,0.982567 2.36075,0 l 5.79727,-12.492631 c 1.4045,-3.031919 3.97442,-5.446225 7.20177,-6.765672 l 13.29788,-5.446225 c 1.0459,-0.4211 1.0459,-1.796693 0,-2.217793 l -13.29788,-5.446225 c -3.22735,-1.319447 -5.79727,-3.733753 -7.20177,-6.765672 L 140.48633,6.2144248 c
334-0.44824,-0.9825664 -1.9125,-0.9825664 -2.36075,0 l -5.79727,12.4926312 c -1.4045,3.031919 -3.97442,5.446225 -7.20177,6.765672 l -13.32776,5.474298 c -1.01601,0.4211 -1.0459,1.796693 0,2.217793 z" style="stroke-width:2.8964;fill-opacity:1" /> <path d="m 233.09331,192.98627 -14.13459,-5.7831 c -3.40665,-1.40367 -6.12599,-3.95834 -7.62013,-7.1587 l -6.15587,-13.27868 c -0.47813,-1.03872 -2.03203,-1.03872 -2.51016,0 l -6.15587,13.27868 c -1.49414,3.20036 -4.21348,5.75503 -7.62013,7.1587 l -14.13459,5.81118 c -1.10567,0.44917 -1.10567,1.90898 0,2.35816 l 14.40354,5.97961 c 3.40664,1.40367 6.12598,3.98642 7.59024,7.21485 l 5.97658,13.02602 c 0.47812,1.03872 2.03203,1.03872 2.51016,0 l 6.15586,-13.25061 c 1.49415,-3.20036 4.21349,-5.75503 7.62013,-7.1587 l 14.1346,-5.7831 c 1.10566,-0.44917 1.10566,-1.90899 0,-2.35816 z" style="stroke-width:2.8964;stroke-opacity:1" /> </svg> `,GU=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24"> <g transform="scale(1.2 1.2) translate(-2 -0.5)"> <path d="M 22,12.5 A 1.49995,1.49995 0 0 0 20.50006,11 H 20 V 10 A 3,3 0 0 0 17,7 H 13 V 5.7226 a 2,2 0 1 0 -2,0 V 7 H 7 a 3,3 0 0 0 -3,3 v 1 H 3.49994 a 1.5,1.5 0 0 0 0,3 H 4 v 1 A 3.00128,3.00128 0 0 0 6.20251,17.89282 1.03113,1.03113 0 0 1 7,18.86975 v 0.716 a 0.99928,0.99928 0 0 0 1.00726,1.002 0.9792,0.9792 0 0 0 0.69983,-0.29486 l 2,-2 A 1,1 0 0 1 11.41425,18 H 17 a 3,3 0 0 0 3,-3 v -1 h 0.50006 A 1.49995,1.49995 0 0 0 22,12.5 Z M 19,15 a 2.00226,2.00226 0 0 1 -2,2 H 11.41425 A 1.987,1.987 0 0 0 10,17.58575 l -2,2 v -0.716 A 2.02082,2.02082 0 0 0 6.46771,16.92865 2.00439,2.00439 0 0 1 5,15 V 10 A 2.00226,2.00226 0 0 1 7,8 h 10 a 2.00222,2.00222 0 0 1 2,2 z M 10,12.5 A 1.5,1.5 0 1 1 8.5,11 1.5,1.5 0 0 1 10,12.5 Z m 7,0 A 1.5,1.5 0 1 1 15.5,11 1.5,1.5 0 0 1 17,12.5 Z"/> </g> </svg> `,KU={aiImproveWritingPrompt:`Improve writing`,aiMakeShorterPrompt:`Make shorter`,aiMakeLongerPrompt:`Make longer`,aiSimplifyLanguagePrompt:`Simplify language`,aiSummarizePrompt:`Summarize`,aiContinuePrompt:`Continue`,aiChangeToneProfessionalPrompt:`Change tone to professional`,aiChangeToneFriendlyPrompt:`Change tone to friendly`,aiChangeToneFormalPrompt:`Change tone to formal`,aiChangeToneCasualPrompt:`Change tone to casual`,aiChangeToneDirectPrompt:`Change tone to direct`,aiChangeToneConfidentPrompt:`Change tone to confident`,aiChangeStyleBusinessPrompt:`Change style to business`,aiChangeStyleLegalPrompt:`Change style to legal`,aiChangeStyleJournalismPrompt:`Change style of journalism`,aiChangeStylePoeticPrompt:`Change style to poetic`,aiTranslateToSpanishPrompt:`Translate to Spanish`,aiTranslateToFrenchPrompt:`Translate to French`,aiTranslateToGermanPrompt:`Translate to German`,aiTranslateToItalianPrompt:`Translate to Italian`,aiTranslateToPortuguesePrompt:`Translate to Portuguese`,aiTranslateToEnglishPrompt:`Translate to English`,aiTranslateToChinesePrompt:`Translate to Chinese`,aiTranslateToJapanesePrompt:`Translate to Japanese`,aiTranslateToKoreanPrompt:`Translate to Korean`,aiTranslateToRussianPrompt:`Translate to Russian`,aiTranslateToArabicPrompt:`Translate to Arabic`},qU={aiCommonPrefixPrompt:``,aiCommonSuffixPrompt:``,aiImproveWritingPrompt:`It needs to be refined for better clarity, coherence, and overall quality. Please enhance the writing style while keeping the original meaning and language intact.`,aiMakeShorterPrompt:`Please condense this content to make it more concise, while preserving the key messages, language and information.`,aiMakeLongerPrompt:`Expand on this content to provide more detail, depth, and richness, without diverging from the original message and language.`,aiSimplifyLanguagePrompt:`The language used here needs to be simplified for easier understanding, without altering the core information and the original language.`,aiSummarizePrompt:`Provide a brief summary of this content, capturing the essential points in a concise manner. Preserve the original language and meaning.`,aiContinuePrompt:`Continue the narrative or discussion from this content seamlessly, maintaining the same language, tone and style.`,aiChangeToneProfessionalPrompt:`Adjust the tone to be professional, suitable for a formal business or academic setting, while retaining the original message and language.`,aiChangeToneFriendlyPrompt:`It needs to be rewritten in a friendly tone while maintaining the original message and language. Please modify this content to be warm, approachable, and engaging.`,aiChangeToneFormalPrompt:`Transform this content to have a formal tone, appropriate for official or serious contexts, without changing the main points and language.`,aiChangeToneCasualPrompt:`Revise this content to have a casual, relaxed tone, making it feel more personal and less formal, without changing the original meaning and language.`,aiChangeToneDirectPrompt:`Make the tone more direct, with straightforward language and a clear, assertive approach, without changing the original meaning and language.`,aiChangeToneConfidentPrompt:`Infuse this content with a confident tone, showcasing assurance and decisiveness, without changing the original meaning and language.`,aiChangeStyleBusinessPrompt:`Rewrite this content with a business-oriented style, focusing on clarity, efficiency, and professionalism, without changing the original meaning and language.`,aiChangeStyleLegalPrompt:`Adapt this content to a legal style, incorporating appropriate terminology and formality typical of legal documents, without changing the original meaning and language.`,aiChangeStyleJournalismPrompt:`Convert this content into a
334journalistic style, emphasizing factual accuracy, objectivity, and informative reporting, without changing the original meaning and language.`,aiChangeStylePoeticPrompt:`Recreate this content with a poetic style, using expressive language, rhythm, and imagery to convey the message, without changing the original meaning and language.`,aiTranslateToSpanishPrompt:`Translate this content into Spanish, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToFrenchPrompt:`Translate this content into French, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToGermanPrompt:`Translate this content into German, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToItalianPrompt:`Translate this content into Italian, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToPortuguesePrompt:`Translate this content into Portuguese, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToEnglishPrompt:`Translate this content into English, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToChinesePrompt:`Translate this content into Chinese, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToJapanesePrompt:`Translate this content into Japanese, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToKoreanPrompt:`Translate this content into Korean, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToRussianPrompt:`Translate this content into Russian, ensuring the translation is accurate and maintains the original meaning.`,aiTranslateToArabicPrompt:`Translate this content into Arabic, ensuring the translation is accurate and maintains the original meaning.`};J.prototype.aiAssistant=qU,RA.set(`ai-assistant`,GU),RA.set(`ai-commands`,WU),J.prototype.controls[`ai-commands`]={isDisabled(e){return!e.o.aiAssistant.aiAssistantCallback},tooltip:`AI Commands`,list:KU,exec:(e,t,{control:n})=>{e.e.fire(`generateAiAssistantForm.ai-assistant`,n.name)}},J.prototype.controls[`ai-assistant`]={isDisabled(e){return!e.o.aiAssistant.aiAssistantCallback},hotkeys:[`ctrl+a+i`,`cmd+a+i`],tooltip:`AI Assistant`,exec:(e,t,n)=>{e.e.fire(`generateAiAssistantForm.ai-assistant`)}};var JU=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},YU=class extends VA{className(){return`UIAiAssistant`}constructor(e,{onInsert:t,onInsertAfter:n}){super(e),this.__aiResult=``,this.__error=this.getElm(`error`),this.__body=this.getElm(`body`),this.__buttons=this.getElm(`buttons`),this.__results=this.getElm(`results`),this.__spinner=this.getElm(`spinner`),this.__insertButton=GA(e,``,`Insert`,`primary`).onAction(()=>t(this.__aiResult)),this.__insertAfterButton=GA(e,``,`Insert After`,`initial`).onAction(()=>n(this.__aiResult));let r=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=GA(e,`ai-assistant`,``).onAction(r),this.__tryAgainButton=GA(e,`update`,``,`initial`).onAction(r),this.promptInput=new vj(e,{name:`prompt`,required:!0,label:`Prompt`,placeholder:`Ask AI to improve generated text`,className:this.getFullElName(`prompt-row-input`)});let i=new rj(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName(`prompt-row`)});this.__formAiAssistant=new hj(e,[new rj(e,[this.promptInput,this.__submitButton],{className:this.getFullElName(`prompt-row`)})]).onSubmit(t=>{this.__error.textContent=``,this.setMod(`loading`,!0),e.e.fire(`invokeAiAssistant`,t.prompt);let n=this.getFullElName(``,`hide`,`true`);this.__results.classList.remove(n),this.__buttons.classList.remove(n),K.detach(this.__results),this.__results.appendChild(this.__spinner),this.__insertButton.focus()}),this.__buttons.appendChild(i.container),this.__body.appendChild(this.__formAiAssistant.container),this.onChangePromptValue()}render(){return`<div> 335 <div class="&__container"> 336 <div class="&__error"></div> 337 <div class="&__body"></div> 338 <div class="&__buttons &_hide_true"></div> 339 <div class="&__results &_hide_true"> 340 <div class="&__spinner"></div> 341 </div>
342 </div> 343 </div>`}setPrompt(e){if(e){let{jodit:t}=this,n=t.o.aiAssistant[e],{aiCommonPrefixPrompt:r,aiCommonSuffixPrompt:i}=t.o.aiAssistant;this.promptInput.value=[r,U(n)?n:``,i].filter(Boolean).join(` `),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod(`loading`,!1),K.detach(this.__results),this.__aiResult=e,this.__results.appendChild(this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult=``,this.setMod(`loading`,!1),this.__error.textContent=e,K.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName(``,`hide`,`true`);this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}};JU([Y(`:ai-assistant-response`)],YU.prototype,`onAiAssistentResponse`,null),JU([Y(`:ai-assistant-error`)],YU.prototype,`onAiAssistentError`,null),JU([Y(`promptInput:change`)],YU.prototype,`onChangePromptValue`,null),YU=JU([uO],YU);var XU=s({default:()=>ZU}),ZU={aiAssistant:`AI Assistant`,aiCommands:`AI Commands`,"AI Assistant":`AI Assistant`,Prompt:`Prompt`,"Ask AI to improve generated text":`Ask AI to improve generated text`,Submit:`Submit`},QU=s({default:()=>$U}),$U={aiAssistant:`Asistente de IA`,aiCommands:`Comandos de IA`,"AI Assistant":`Asistente de IA`,"AI Commands":`Comandos de IA`,"Improve writing":`Mejorar escritura`,"Make shorter":`Hacer más corto`,"Make longer":`Hacer más largo`,"Simplify language":`Simplificar lenguaje`,Summarize:`Resumir`,Continue:`Continuar`,Prompt:`Solicitud`,Insert:`Insertar`,"Insert After":`Insertar después`,"Try Again":`Intentar de nuevo`,"Ask AI to improve generated text":`Pida a la IA que mejore el texto generado`,"Change tone to professional":`Cambiar tono a profesional`,"Change tone to friendly":`Cambiar tono a amigable`,"Change tone to formal":`Cambiar tono a formal`,"Change tone to casual":`Cambiar tono a casual`,"Change tone to direct":`Cambiar tono a directo`,"Change tone to confident":`Cambiar tono a confiado`,"Change tone to business":`Cambiar tono a empresarial`,"Change style to legal":`Cambiar estilo a legal`,"Change style to journalism":`Cambiar estilo a periodÃstico`,"Change style to poetic":`Cambiar estilo a poético`,"Translate to Spanish":`Traducir al español`,"Translate to French":`Traducir al francés`,"Translate to German":`Traducir al alemán`,"Translate to Italian":`Traducir al italiano`,"Translate to Portuguese":`Traducir al portugués`,"Translate to English":`Traducir al inglés`,"Translate to Chinese":`Traducir al chino`,"Translate to Japanese":`Traducid al japonés`,"Translate to Korean":`Traducir al coreano`,"Translate to Russian":`Traducir al ruso`,"Translate to Arabic":`Traducir al árabe`,Submit:`Enviar`},eW=s({en:()=>XU,es:()=>QU}),tW=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},nW=class extends nN{get __dialog(){return this.jodit.dlg({buttons:[`fullsize`,`dialog.close`],closeOnClickOverlay:!0,closeOnEsc:!0,resizable:!1,draggable:!0,minHeight:160})}get __container(){let{jodit:e,__dialog:t}=this;return new YU(e,{onInsertAfter(n){e.s.focus();let r=e.s.range;r.collapse(!1),e.s.selectRange(r),e.s.insertHTML(n),t.close()},onInsert(n){e.s.focus(),e.s.insertHTML(n),t.close()}})}constructor(e){super(e),this.buttons=[{name:`ai-commands`,group:`insert`},{name:`ai-assistant`,group:`insert`}],qO(eW)}afterInit(){}onGenerateAiAssistantForm(e){this.__dialog.open(this.__container,`AI Assistant`),this.__container.setPrompt(e)}onInvokeAiAssistant(e){let{jodit:t}=this;t.s.focus();let n=t.s.html;t.async.promise(async(r,i)=>{try{r(await t.o.aiAssistant.aiAssistantCallback(e,n))}catch(e){i(e)}}).then(e=>{t.e.fire(`ai-assistant-response`,e)}).catch(e=>{UD(e)||(t.message.error(e.message),t.e.fire(`ai-assistant-error`,e.message))})}beforeDestruct(e){var t,n;(t=iO(this,`__container`))==null||t.destruct(),(n=iO(this,`__dialog`))==null||n.destruct()}};tW([aO],nW.prototype,`__dialog`,null),tW([aO],nW.prototype,`__container`,null),tW([Y(`:generateAiAssistantForm.ai-assistant`)],nW.prototype,`onGenerateAiAssistantForm`,null),tW([Y(`:invokeAiAssistant`)],nW.prototype,`onInvokeAiAssistant`,null),q.add(`ai-assistant`,nW),J.prototype.tab={tabInsideLiInsertNewList:!0};function rW(e,t=!1){if(!e.o.tab.tabInsideLiInsertNewList)return!1;let[n,r]=iW(e);try{let r=aW(e,n,t);if(!r||!oW(r,e,n))return!1;let i=K.closest(r,[`ol`,`ul`],e.editor);return!i||t&&!K.closest(i,`li`,e.editor)?!1:(t?cW(e,i,r):sW(e,i,r),!0)}finally{let t=e.s.createRange();t.setStartAfter(n),t.setEndBefore(r),e.s.selectRange(t),K.safeRemove(n),K.safeRemove(r)}return!1}function iW(e){let t=e.createInside.fake(),n=e.createInside.fake(),r=e.s.range.cloneRange();
343r.collapse(!0),r.insertNode(t);let i=e.s.range.cloneRange();return i.collapse(!1),i.insertNode(n),[t,n]}function aW(e,t,n){let r=K.closest(t,`li`,e.editor);return!r||!n&&!K.isLeaf(r.previousElementSibling)||n&&!K.closest(r,`li`,e.editor)?!1:r}function oW(e,t,n){let r=K.closest(n,`li`,t.editor);return!(!r||r!==e&&!e.contains(r))}function sW(e,t,n){let r=n.previousElementSibling;lD(r,`tab previousElementSibling is null`);let i=r.lastElementChild,a=K.isTag(i,t.tagName)?i:e.createInside.element(t.tagName,Array.from(t.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{}));a.appendChild(n),i!==a&&r.appendChild(a)}function cW(e,t,n){let r=K.closest(t,`li`,e.editor);lD(r,`tab parent li is null`);let i=Array.from(t.children).filter(e=>K.isLeaf(e));K.after(r,n);let a=i.indexOf(n);if((a===0||i.length===1)&&K.safeRemove(t),a!==i.length-1){let e=t.cloneNode();K.append(n,e);for(let t=a+1;t<i.length;t+=1)K.append(e,i[t])}}var lW=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},uW=class extends nN{afterInit(e){}__onTab(e){if(e.key===`Tab`&&this.__onShift(e.shiftKey))return!1}__onCommand(e){if((e===`indent`||e===`outdent`)&&this.__onShift(e===`outdent`))return!1}__onShift(e){let t=rW(this.j,e);return t&&this.j.e.fire(`afterTab`,e),t}beforeDestruct(e){}};lW([Y(`:keydown.tab`)],uW.prototype,`__onTab`,null),lW([Y(`:beforeCommand.tab`)],uW.prototype,`__onCommand`,null),q.add(`tab`,uW);var dW=new Set([`Tab`,bE,SE,xE,CE]);function fW(e){e.e.off(`.tableKeyboardNavigation`).on(`keydown.tableKeyboardNavigation`,t=>{let{key:n}=t,r=pW(e,n);if(!r)return;let i=e.getInstance(fN,e.o),a=K.closest(r,`table`,e.editor),o=null,s=n===`ArrowLeft`||t.shiftKey,c=()=>MD(s?K.prev:K.next,r,K.isCell,a);switch(n){case`Tab`:case bE:o=c(),o||=(i.appendRow(a,s?a.querySelector(`tr`):!1,!s),c());break;case xE:case CE:{let e=i.formalMatrix(a),[t,s]=i.formalCoordinate(a,r);n===`ArrowUp`?e[t-1]!==void 0&&(o=e[t-1][s]):e[t+1]!==void 0&&(o=e[t+1][s])}break}if(o){if(e.e.fire(`hidePopup hideResizer`),o.firstChild)n===`Tab`?e.s.select(o,!0):e.s.setCursorIn(o,n===`ArrowRight`||n===`ArrowDown`);else{let t=e.createInside.element(`br`);o.appendChild(t),e.s.setCursorBefore(t)}return e.synchronizeValues(),!1}})}q.add(`tableKeyboardNavigation`,fW);function pW(e,t){if(!dW.has(t))return;let n=e.s.current();if(!n)return;let r=K.up(n,K.isCell,e.editor);if(!r)return;let{range:i}=e.s;if(t!==`Tab`&&n!==r){let e=t===`ArrowRight`||t===`ArrowDown`,a=MD(e?K.next:K.prev,n,e=>t===`ArrowUp`||t===`ArrowDown`?K.isTag(e,`br`):!!e,r);if(!e&&(a||t!==`ArrowUp`&&K.isText(n)&&i.startOffset!==0)||e&&(a||t!==`ArrowDown`&&K.isText(n)&&n.nodeValue&&i.startOffset!==n.nodeValue.length))return}return r}var mW=`<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 352v1088q0 42-39 59-13 5-25 5-27 0-45-19l-403-403v166q0 119-84.5 203.5t-203.5 84.5h-704q-119 0-203.5-84.5t-84.5-203.5v-704q0-119 84.5-203.5t203.5-84.5h704q119 0 203.5 84.5t84.5 203.5v165l403-402q18-19 45-19 12 0 25 5 39 17 39 59z"/> </svg> `;J.prototype.video={parseUrlToVideoEmbed:Tk,defaultWidth:400,defaultHeight:345},RA.set(`video`,mW),J.prototype.controls.video={popup:(e,t,n)=>{let r=new hj(e,[new rj(e,[new uj(e,{name:`url`,required:!0,label:`URL`,placeholder:`https://`,validators:[`url`]})]),new rj(e,[GA(e,``,`Insert`,`primary`).onAction(()=>r.submit())])]),i=new hj(e,[new rj(e,[new vj(e,{name:`code`,required:!0,label:`Embed code`})]),new rj(e,[GA(e,``,`Insert`,`primary`).onAction(()=>i.submit())])]),a=[],o=t=>{e.s.restore(),e.s.insertHTML(t),n()};return e.s.save(),a.push({icon:`link`,name:`Link`,content:r.container},{icon:`source`,name:`Code`,content:i.container}),r.onSubmit(t=>{o(MD(e.o.video?.parseUrlToVideoEmbed??Tk,t.url,{width:e.o.video?.defaultWidth,height:e.o.video?.defaultHeight}))}),i.onSubmit(e=>{o(e.code)}),vI(e,a)},tags:[`iframe`],tooltip:`Insert youtube/vimeo video`};function hW(e){e.registerButton({name:`video`,group:`media`})}q.add(`video`,hW),J.prototype.showXPathInStatusbar=!0;var gW=class extends nN{constructor(){super(...arguments),this.onContext=(e,t)=>
343(this.menu||=new _M(this.j),this.menu.show(t.clientX,t.clientY,[{icon:`bin`,title:e===this.j.editor?`Clear`:`Remove`,exec:()=>{e===this.j.editor?this.j.value=``:K.safeRemove(e),this.j.synchronizeValues()}},{icon:`select-all`,title:`Select`,exec:()=>{this.j.s.select(e)}}]),!1),this.onSelectPath=(e,t)=>{this.j.s.focus();let n=G(t.target,`-path`)||`/`;if(n===`/`)return this.j.execCommand(`selectall`),!1;try{let e=this.j.ed.evaluate(n,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(e)return this.j.s.select(e),!1}catch{}return this.j.s.select(e),!1},this.tpl=(e,t,n,r)=>{let i=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${t}" title="${r}" tabindex="-1"'>${aD(n)}</a></span>`),a=i.firstChild;return this.j.e.on(a,`click`,this.onSelectPath.bind(this,e)).on(a,`contextmenu`,this.onContext.bind(this,e)),i},this.removeSelectAll=()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)},this.appendSelectAll=()=>{this.removeSelectAll(),this.selectAllButton=iM(this.j,{name:`selectall`,...this.j.o.controls.selectall}),this.selectAllButton.state.size=`tiny`,this.container&&this.container.insertBefore(this.selectAllButton.container,this.container.firstChild)},this.calcPathImd=()=>{if(this.isDestructed)return;let e=this.j.s.current();if(this.container&&(this.container.innerHTML=``),e){let t,n,r;K.up(e,e=>{e&&this.j.editor!==e&&!K.isText(e)&&!K.isComment(e)&&(t=e.nodeName.toLowerCase(),n=ek(e,this.j.editor).replace(/^\//,``),r=this.tpl(e,n,t,this.j.i18n(`Select %s`,t)),this.container&&this.container.insertBefore(r,this.container.firstChild))},this.j.editor)}this.appendSelectAll()},this.calcPath=this.j.async.debounce(this.calcPathImd,this.j.defaultTimeout*2,!0)}afterInit(){if(this.j.o.showXPathInStatusbar){this.container=this.j.c.div(`jodit-xpath`),G(this.container,`role`,`list`);let e=()=>{!this.j.o.showXPathInStatusbar||!this.container||(this.j.statusbar.append(this.container),this.j.getRealMode()===1?this.calcPath():(this.container&&(this.container.innerHTML=``),this.appendSelectAll()))};this.j.e.off(`.xpath`).on(`pointerup.xpath change.xpath keydown.xpath changeSelection.xpath`,this.calcPath).on(`afterSetMode.xpath afterInit.xpath changePlace.xpath`,e),e(),this.calcPath()}}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(`.xpath`),this.removeSelectAll(),this.menu&&this.menu.destruct(),K.safeRemove(this.container),delete this.menu,delete this.container}};q.add(`xpath`,gW);var _W=cE?cE.SpeechRecognition||cE.webkitSpeechRecognition:void 0,vW=new WeakMap;function yW(e){if(!cE)return null;let t=vW.get(e);if(t&&t.state!==`closed`)return t;let n=cE.AudioContext||cE.webkitAudioContext;if(!n)return null;let r=new n;return vW.set(e,r),r}function bW(e,{sec:t=.1,frequency:n=440,gain:r=.1,type:i=`sine`}={}){let a=yW(e);if(!a)return;let o=a.createGain(),s=a.createOscillator();s.type=i,s.frequency.value=n,o.gain.value=r,s.connect(o),o.connect(a.destination),s.start(),s.stop(a.currentTime+t)}function xW(e){let t=vW.get(e);t&&(vW.delete(e),t.state!==`closed`&&t.close())}var SW=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},CW=class e extends zO{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}constructor(t,n){super(),this.async=t,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout(()=>{this.restart(),this.emit(`pulse`,!1),this._makeSound(940)},5e3),this.emit(`pulse`,!0))},this.__interimResults=``,this._api=n,e._instances.add(this)}destruct(){this.stop(),xW(this),e._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}
343start(){if(!this._isEnabled){this._isEnabled=!0,e._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on(`speechstart`,this._onSpeechStart).__on(`error`,this._onError).__on(`result`,this._onProgress).__on(`end`,this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off(`speechstart`,this._onSpeechStart).__off(`error`,this._onError).__off(`result`,this._onProgress).__off(`end`,this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit(`pulse`,!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit(`pulse`,!1),this.emit(`result`,this.__interimResults),this.__interimResults=``,this._makeSound(440),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults=``,e.results)){for(let t=0;t<e.results.length;t++){let n=e.results.item(t);if(n.length){let{transcript:e}=n.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit(`progress`,this.__interimResults)}}_onError(e){e.error===`voice-unavailable`&&this.emit(`error`,`Voice unavailable`),e.error===`not-allowed`&&this.emit(`error`,`Not allowed`),(e.error===`language-unavailable`||e.error===`language-not-supported`)&&this.emit(`error`,`Language unavailable`),this._makeSound(940),this.emit(`pulse`,!1),this.stop()}_makeSound(e){this.sound&&bW(this,{frequency:e})}};CW._instances=new Set,SW([H],CW.prototype,`_onResults`,null),SW([H],CW.prototype,`_onProgress`,null),SW([H],CW.prototype,`_onError`,null);var wW=`<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg> `;J.prototype.speechRecognize={api:_W===void 0?null:_W,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":`enter`,"delete|remove word|delete word":`backspaceWordButton`,comma:`inserthtml::,`,underline:`inserthtml::_`,hyphen:`inserthtml::-`,space:`inserthtml:: `,question:`inserthtml::?`,dot:`inserthtml::.`,"quote|quotes|open quote":`inserthtml::'`,"header|header h1":`formatblock::h1`,"select all":`selectall`}},RA.set(`speech-recognize`,wW),J.prototype.controls.speechRecognize={isVisible(e){return!!e.o.speechRecognize.api},isActive(e,t){return!!wD(e,`speech`)?.isEnabled},isDisabled(e){return!e.o.speechRecognize.api},exec(e,t,{button:n,control:r}){let{api:i,lang:a,continuous:o,interimResults:s,sound:c}=e.o.speechRecognize;if(!i){e.alert(`Speech recognize API unsupported in your browser`);return}let l=wD(e,`speech`);if(!l){let t=new i;l=new CW(e.async,t),l.lang=U(a)?a:G(e.od.documentElement,`lang`)??void 0,l.continuous=o,l.interimResults=s,l.sound=c,wD(e,`speech`,l),l.on(`pulse`,e=>{n.setMod(`pulse`,e)}),l.on(`result`,t=>e.e.fire(`speechRecognizeResult`,t)),l.on(`progress`,t=>e.e.fire(`speechRecognizeProgressResult`,t)),l.on(`error`,t=>e.message.error(t)),e.hookStatus(`beforeDestruct`,()=>{wD(e,`speech`,null),l.destruct()})}if(r.args){let e=r.args[0];if(mD(l[e])){l[e]=!l[e],l.isEnabled&&l.restart();return}}l.toggle(),l.isEnabled&&n.setMod(`pulse`,!0),n.state.activated=l.isEnabled},name:`speechRecognize`,command:`toggleSpeechRecognize`,tooltip:`Speech Recognize`,list:{sound:`Sound`,interimResults:`Interim Results`},childTemplate(e,t,n){return`<span class='jodit-speech-recognize__list-item'><input ${wD(e,`speech`)?.[t]??e.o.speechRecognize[t]?`checked`:``} class='jodit-checkbox' type='checkbox'> ${n}</span>`},mods:{stroke:!1}};function TW(e,t){let[n,r]=t.split(`::`);n.toLowerCase()===`open`&&r&&/^(javascript:|data:|vbscript:)/i.test(r.trim())||e.execCommand(n,null,r)}var EW=s({default:()=>DW}),DW={newline:`Ø§ÙØ®Ø· Ø§ÙØ¬Ø¯Ùد`,delete:`ØØ°Ù`,space:`اÙÙØ¶Ø§Ø¡`,"Speech Recognize":`Ø§ÙØªØ¹Ø±Ù عÙ٠اÙÙÙØ§Ù
`,Sound:`Ø§ÙØµÙت`,"Interim Results":`اÙÙØªØ§Ø¦Ø¬ اÙÙ
Ø¤ÙØªØ©`},OW=s({default:()=>kW}
343),kW={newline:`Åádek`,delete:`odstranit`,space:`prostora`,"Speech Recognize":`Rozpoznánà ÅeÄi`,Sound:`Zvuk`,"Interim Results":`PrůbÄžné Výsledky`},AW=s({default:()=>jW}),jW={newline:`Zeilenumbruch`,delete:`löschen`,space:`Raum`,"Speech Recognize":`Sprache Erkennen`,Sound:`Sound`,"Interim Results":`Zwischenergebnis`},MW=s({default:()=>NW}),NW={newline:`nueva lÃnea`,delete:`eliminar`,space:`espacio`,"Speech Recognize":`Reconocimiento de Voz`,Sound:`Sonido`,"Interim Results":`Resultados Provisionales`},PW=s({default:()=>FW}),FW={newline:`خط Ø¬Ø¯ÛØ¯`,delete:`ØØ°Ù`,space:`ÙØ¶Ø§`,"Speech Recognize":`Ú¯ÙØªØ§Ø± را ØªØ´Ø®ÛØµ دÙÛØ¯`,Sound:`صدا`,"Interim Results":`ÙØªØ§Ûج Ù
ÙÙØª`},IW=s({default:()=>LW}),LW={"Speech Recognize":`Puheentunnistus`,newline:`uusi rivi`,delete:`poistaa`,space:`tilaa`,Sound:`Ãäni`,"Interim Results":`Välitulokset`},RW=s({default:()=>zW}),zW={newline:`nouvelle ligne`,delete:`supprimer`,space:`espace`,"Speech Recognize":`Reconnaissance Vocale`,Sound:`Son`,"Interim Results":`Résultats Intermédiaires`},BW=s({default:()=>VW}),VW={newline:`××ש×ת`,delete:`×××§`,space:`ש××`,"Speech Recognize":`××××ר ××××`,Sound:`×§××`,"Interim Results":`ת×צ××ת ××× ×××`},HW=s({default:()=>UW}),UW={newline:`újsor`,delete:`törlés`,space:`tér`,"Speech Recognize":`A Beszéd Felismeri`,Sound:`Hang`,"Interim Results":`IdÅközi Eredmények`},WW=s({default:()=>GW}),GW={newline:`newline`,delete:`Hapus`,space:`ruang`,"Speech Recognize":`Pidato Mengenali`,Sound:`Suara`,"Interim Results":`Hasil Sementara`},KW=s({default:()=>qW}),qW={newline:`nuova riga`,delete:`eliminare`,space:`spazio`,"Speech Recognize":`Discorso Riconoscere`,Sound:`Suono`,"Interim Results":`Risultati intermedi`},JW=s({default:()=>YW}),YW={newline:`æ¹è¡`,delete:`åé¤`,space:`ã¹ãã¼ã¹`,"Speech Recognize":`é³å£°èªè`,Sound:`é³`,"Interim Results":`ä¸éçµæ`},XW=s({default:()=>ZW}),ZW={newline:`ì¤ ë°ê¿`,delete:`ìì `,space:`ê³µê°`,"Speech Recognize":`ìì± ì¸ì`,Sound:`ì리`,"Interim Results":`ì¤ê° ê²°ê³¼`},QW=s({default:()=>$W}),$W={newline:`Ð¨Ð¸Ð½Ñ Ð¼Ó©Ñ`,delete:`УÑÑгаÑ
`,space:`Ðай`,"Speech Recognize":`ÐÑÑ Ñ
оолой ÑаниÑ
`,Sound:`ÐÑÑ`,"Interim Results":`Ð¢Ò¯Ñ Ð·ÑÑÑÑн Ò¯Ñ Ð´Ò¯Ð½`},eG=s({default:()=>tG}),tG={newline:`regel`,delete:`verwijderen`,space:`ruimte`,"Speech Recognize":`Spraak Herkennen`,Sound:`Geluid`,"Interim Results":`Tussentijdse Resultaten`},nG=s({default:()=>rG}),rG={newline:`nylinje`,delete:`slette`,space:`rom`,"Speech Recognize":`Talegjenkjenning`,Sound:`Lyd`,"Interim Results":`Midlertidige resultater`},iG=s({default:()=>aG}),aG={newline:`newline`,delete:`usunÄ
Ä`,space:`przestrzeÅ`,"Speech Recognize":`Rozpoznawanie Mowy`,Sound:`DźwiÄk`,"Interim Results":`Wyniki Okresowe`},oG=s({default:()=>sG}),sG={newline:`linha`,delete:`excluir`,space:`espaco`,"Speech Recognize":`Discurso Reconhecer`,Sound:`Som`,"Interim Results":`Resultados Provisórios`},cG=s({default:()=>lG}),lG={newline:`Ð½Ð¾Ð²Ð°Ñ ÑÑÑока|пеÑеноÑ|ÑнÑеÑ`,delete:`ÑдалиÑÑ`,space:`пÑобел`,"Speech Recognize":`РаÑпознавание ÑеÑи`,Sound:`ÐвÑк`,"Interim Results":`ÐÑомежÑÑоÑнÑе ÑезÑлÑÑаÑÑ`},uG=s({default:()=>dG}),dG={newline:`nový riadok`,delete:`vymazaÅ¥`,space:`medzera`,"Speech Recognize":`Rozpoznávanie reÄi`,Sound:`Zvuk`,"Interim Results":`Predbežné výsledky`},fG=s({default:()=>pG}),pG={newline:`yeni satır`,delete:`silmek`,space:`uzay`,"Speech Recognize":`KonuÅma Tanıma`,Sound:`Ses`,"Interim Results":`Ara Sonuçlar`},mG=s({default:()=>hG}),hG={newline:`Ð½Ð¾Ð²Ð°Ñ ÑÑÑока|пеÑеноÑ|енÑеÑ`,delete:`видалиÑи`,space:`пÑобел`,"Speech Recognize":`РаÑпознавание ÑеÑи`,Sound:`ÐвÑк`,"Interim Results":`ÐÑомÑÐ¶Ð½Ñ ÑезÑлÑÑаÑи`},gG=s({default:()=>_G}),_G={newline:`æ°è¡`,delete:`å é¤`,space:`空é´`,"Speech Recognize":`è¨è¯è¯å«`,Sound:`声é³`,"Interim Results":`䏿ä¸ç»©`},vG=s({default:()=>yG}),yG={newline:`æè¡`,delete:`åªé¤`,space:`空ç½`,"Speech Recognize":`èªé³è¾¨è`,Sound:`è²é³`,"Interim Results":`éæ®µæ§è¾¨èçµæ`},bG=s({ar:()=>EW,cs_cz:()=>OW,de:()=>AW,es:()=>MW,fa:()=>PW,fi:()=>IW,fr:()=>RW,he:()=>BW,hu:()=>HW,id:()=>WW,it:()=>
343KW,ja:()=>JW,ko:()=>XW,mn:()=>QW,nl:()=>eG,no:()=>nG,pl:()=>iG,pt_br:()=>oG,ru:()=>cG,sk:()=>uG,tr:()=>fG,ua:()=>mG,zh_cn:()=>gG,zh_tw:()=>vG}),xG=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},SG=class extends nN{constructor(){super(...arguments),this.buttons=[{group:`state`,name:`speechRecognize`}],this._commandToWord={}}afterInit(e){let{commands:t}=e.o.speechRecognize;t&&(qO(bG),LD(t,!1).forEach(n=>{n.split(`|`).forEach(r=>{r=r.trim().toLowerCase(),this._commandToWord[r]=t[n];let i=e.i18n(r);i!==r&&i.split(`|`).forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[n].trim()})})}))}beforeDestruct(e){K.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||=this.j.create.div(`jodit-speech-recognize__popup`),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(()=>{K.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+`|`}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),K.safeRemove(this.messagePopup);let{j:t}=this,{s:n}=t;if(!this._checkCommand(e)){let{range:r}=n,i=n.current();if(n.isCollapsed()&&K.isText(i)&&K.isOrContains(t.editor,i)&&i.nodeValue){let a=i.nodeValue;i.nodeValue=a+(/[\u00A0 ]\uFEFF*$/.test(a)?``:` `)+e,r.setStartAfter(i),n.selectRange(r),t.synchronizeValues()}else n.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,``),this._commandToWord[e]?(TW(this.j,this._commandToWord[e]),!0):!1}};xG([Y(`:speechRecognizeProgressResult`)],SG.prototype,`onSpeechRecognizeProgressResult`,null),xG([Y(`:speechRecognizeResult`)],SG.prototype,`onSpeechRecognizeResult`,null),jP.plugins.add(`speech-recognize`,SG);var CG=jP;function wG(e){let t=(0,_.useRef)(``);return(0,_.useEffect)(()=>{t.current=e},[e]),t.current}var TG=(0,_.forwardRef)(({JoditConstructor:e=CG,className:t,config:n,id:r,name:i,onBlur:a,onChange:o,tabIndex:s,value:c,editorRef:l},u)=>{let d=(0,_.useRef)(null),f=(0,_.useRef)(null);(0,_.useEffect)(()=>{let t=d.current,r=e.make(t,n);return f.current=r,typeof l==`function`&&l(r),u&&(typeof u==`function`?u(r):u.current=r),()=>{r.isReady?r.destruct():r.waitForReady().then(e=>e.destruct())}},[e,n,l]);let p=wG(t??``);return(0,_.useEffect)(()=>{let e=f.current?.container?.classList;p!==t&&typeof p==`string`&&p.split(/\s+/).filter(Boolean).forEach(t=>e?.remove(t)),t&&typeof t==`string`&&t.split(/\s+/).filter(Boolean).forEach(t=>e?.add(t))},[t,p]),(0,_.useEffect)(()=>{f.current?.workplace&&(f.current.workplace.tabIndex=s||-1)},[s]),(0,_.useEffect)(()=>{let e=f.current;if(!e?.events||!(a||o))return;let t=e=>a&&a(f?.current?.value??``,e),n=e=>o&&o(e);return e.events.on(`blur`,t).on(`change`,n),()=>{var r;(r=e.events)==null||r.off(`blur`,t).off(`change`,n)}},[a,o]),(0,_.useEffect)(()=>{let e=f.current,t=()=>{e&&c!==void 0&&e.value!==c&&(e.value=c)};e&&(e.isReady?t():e.waitForReady().then(t))},[c]),(0,M.jsx)(`div`,{className:`jodit-react-container`,children:(0,M.jsx)(`textarea`,{defaultValue:c,name:i,id:r,ref:d})})});TG.displayName=`JoditEditor`;var EG=TG,DG=5,OG=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(1),[c,l]=(0,_.useState)(0),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(0),x=(0,_.useRef)(null);(0,_.useEffect)(()=>{(async()=>{r(!0),a(null);try{let{data:e,error:n}=await wb.from(`updates`).select(`*, updates_tags(tag_id, tags(name)), tags:updates_tags(tag_id)`).order(`date`,{ascending:!1});if(n)throw n;t(e||[]),b(0)}catch(e){a(e.message||`Failed to load updates.`)}finally{r(!1)}})()},[]),(0,_.useEffect)(()=>{(async()=>{let{data:{user:e}}=await wb.auth.getUser();if(e){let{data:t}=await wb.from(`profiles`).select(`is_admin`).eq(`id`,e.id).single();v(!!t?.is_admin)}else v(!1)})()},[]),Math.ceil(c/DG);let S=e=>{d(e.id),p(e.body)},C=()=>{d(null),p(``)},w=async e=>{h(!0);try{let{error:n}=await wb.from(`updates`).update({body:f}).eq(`id`,e.id);if(n)throw n;t(t=>t.map(t=>
343t.id===e.id?{...t,body:f}:t)),d(null),p(``)}catch{alert(`Failed to save update.`)}finally{h(!1)}},T=e[y],E=y>0?e[y-1]:null,D=y<e.length-1?e[y+1]:null;(0,_.useEffect)(()=>{if(x.current){let e=x.current.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:e-80,behavior:`smooth`})}},[y]);let O=()=>{E&&b(y-1)},ee=()=>{D&&b(y+1)};function k(e,t=120){let n=document.createElement(`div`);n.innerHTML=e;let r=n.textContent||n.innerText||``;return r.length>t?r.slice(0,t)+`â¦`:r}return(0,M.jsxs)(`main`,{className:`min-h-screen bg-background`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pb-12 px-4 md:px-8 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsxs)(L,{to:`/about`,className:`inline-flex items-center text-golf-green hover:text-golf-green/80 mb-6 transition-colors`,children:[(0,M.jsx)(Qt,{className:`h-4 w-4 mr-2`}),(0,M.jsx)(`span`,{children:`Back to About`})]}),(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-6 text-golf-green`,children:`Club Updates`}),(0,M.jsx)(`p`,{className:`text-lg md:text-xl text-gray-700`,children:`Stay informed about the latest developments, improvements, and upcoming changes at Belvedere Golf Club`})]})})}),(0,M.jsx)(`section`,{className:`py-12 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:n?(0,M.jsx)(`div`,{className:`text-center py-12 text-gray-500`,children:`Loading updates...`}):i?(0,M.jsx)(`div`,{className:`text-center py-12 text-red-600`,children:i}):T?(0,M.jsx)(`div`,{children:(0,M.jsxs)(`article`,{className:`mb-12 border-b pb-8`,id:`update-${T.id}`,children:[(0,M.jsx)(`h2`,{ref:x,className:`font-playfair text-3xl font-bold text-golf-green mb-2`,children:T.title}),(0,M.jsx)(`p`,{className:`text-gray-600 mb-4`,children:new Date(T.date).toLocaleDateString()}),T.images&&T.images.length>0&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-4 mb-4`,children:T.images.map((e,t)=>(0,M.jsx)(`img`,{src:e,alt:T.title+` image`,className:`rounded-lg shadow w-full max-w-xs object-cover`},t))}),g&&u===T.id?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`border rounded`,children:(0,M.jsx)(EG,{value:f,config:{readonly:!1,height:300,toolbarAdaptive:!1,toolbarSticky:!1,buttons:`source.|.bold.italic.underline.strikethrough.ul.ol.|.outdent.indent.|.font.fontsize.brush.paragraph.|.image.table.link.|.align.undo.redo.|.hr.eraser.copyformat.|.fullsize.selectall.print.about`.split(`.`)},onBlur:e=>p(e)})}),(0,M.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,M.jsx)(`button`,{className:`px-4 py-2 bg-golf-green text-white rounded`,onClick:()=>w(T),disabled:m,children:m?`Saving...`:`Save`}),(0,M.jsx)(`button`,{className:`px-4 py-2 bg-gray-200 rounded`,onClick:C,children:`Cancel`})]})]}):(0,M.jsx)(`div`,{className:`mb-4`,dangerouslySetInnerHTML:{__html:T.body}}),g&&u!==T.id&&(0,M.jsx)(`button`,{className:`px-3 py-1 bg-golf-green text-white rounded mb-2`,onClick:()=>S(T),children:`Edit`}),T.tags&&T.tags.length>0&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2 mt-2`,children:T.tags.map(e=>(0,M.jsx)(`span`,{className:`inline-block bg-golf-sand text-golf-green px-3 py-1 rounded-full text-xs font-medium`,children:e.tags?.name},e.tag_id))}),(E||D)&&(0,M.jsxs)(`div`,{className:`mt-12`,children:[(0,M.jsx)(`h3`,{className:`text-2xl font-bold text-golf-green mb-8`,children:`Previous Updates`}),(0,M.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-8 md:gap-0 justify-center items-stretch`,children:[D&&(0,M.jsxs)(`button`,{className:`flex-1 text-left bg-white border-0 hover:bg-golf-sand/20 transition rounded-lg p-6 md:border-r md:border-golf-sand/40 md:mr-4`,style:{borderRight:E?`1px solid #e5e5d6`:void 0},onClick:ee,children:[(0,M.jsx)(`div`,{className:`text-xs uppercase text-gray-400 mb-1 tracking-wider`,children:`Older`}),(0,M.jsx)(`div`,{className:`text-gray-500 mb-1`,children:new Date(D.date).toLocaleDateString(void 0,{year:`numeric`,month:`long`})}),(0,M.jsx)(`div`,{className:`font-bold text-xl mb-2`,children:D.title}),(0,M.jsx)(`div`,{className:`text-gray-700`,children:k(D.body)})]}),E&&(0,M.jsxs)(`button`,{className:`flex-1 text-left bg-white border-0 hover:bg-golf-sand/20 transition rounded-lg p-6 md:ml-4`,onClick:O,children:[(0,M.jsx)(`div`,{className:`text-xs uppercase text-gray-400 mb-1 tracking-wider`,children:`Newer`}),(0,M.jsx)(`div`,{className:`text-gray-500 mb-1`,children:new Date(E.date).toLocaleDateString(void 0,{year:`numeric`,month:`long`})}),(0,M.jsx)(`div`,{className:`font-bold text-xl mb-2`,children:E.title}),(0,M.jsx)(`div`,{className:`text-gray-700`,children:k(E.body)})]})]})]})]},T.id)}):(0,M.jsx)(`div`,{className:`text-center py-12 text-gray-500`,children:`No updates found.`})})})})]})},kG=()=>{let e=new Date().getFullYear();return(0,M.jsx)(`footer`,{className:`bg-golf-green text-white py-12`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-10`,children:[(0,M.jsxs)(`div`,{className:`lg:col-span-1`,children:[(0,M.jsxs)(L,{to:`/`,className:`flex items-center gap-2 mb-4`,children:[(0,M.jsx)(`img`,{src:`/lovable-uploads/ed4ee0f9-6867-41fc-b95e-12b9ec553b7f.png`,alt:`Belvedere Golf Club Logo`,className:`h-10 w-auto bg-white rounded-full p-1`}),(0,M.jsx)(`span`,{className:`font-playfair text-2xl font-bold`,children:`Belvedere`})]}),(0,M.jsx)(`p`,{className:`text-white/80 mb-4`,children:`A historic golf experience in an extraordinary setting since 1902. Belvedere Golf Club combines tradition, excellence, and natural beauty.`}),(0,M.jsxs)(`div`,{className:`flex space-x-4`,children:[(0,M.jsxs)(`a`,{href:`#`,className:`text-white hover:text-golf-sand transition-colors`,children:[(0,M.jsx)(`span`,{className:`sr-only`,children:`Facebook`}),(0,M.jsx)(`svg`,{className:`h-6 w-6`,fill:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987
343h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z`,clipRule:`evenodd`})})]}),(0,M.jsxs)(`a`,{href:`#`,className:`text-white hover:text-golf-sand transition-colors`,children:[(0,M.jsx)(`span`,{className:`sr-only`,children:`Instagram`}),(0,M.jsx)(`svg`,{className:`h-6 w-6`,fill:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z`,clipRule:`evenodd`})})]}),(0,M.jsxs)(`a`,{href:`#`,className:`text-white hover:text-golf-sand transition-colors`,children:[(0,M.jsx)(`span`,{className:`sr-only`,children:`Twitter`}),(0,M.jsx)(`svg`,{className:`h-6 w-6`,fill:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84`})})]})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-lg font-bold mb-4`,children:`Quick Links`}),(0,M.jsxs)(`ul`,{className:`space-y-2`,children:[(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/about`,className:`hover:text-golf-sand-light transition-colors`,children:`About Us`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#course`,className:`hover:text-golf-sand-light transition-colors`,children:`Course Tour`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/membership`,className:`hover:text-golf-sand-light transition-colors`,children:`Membership`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/contact`,className:`hover:text-golf-sand-light transition-colors`,children:`Contact`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#events`,className:`hover:text-golf-sand-light transition-colors`,children:`Events`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#proshop`,className:`hover:text-golf-sand-light transition-colors`,children:`Pro Shop`})})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-lg font-bold mb-4`,children:`Golf Services`}),(0,M.jsxs)(`ul`,{className:`space-y-2`,children:[(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/teetimes`,className:`hover:text-golf-sand-light transition-colors`,children:`Tee Times`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(L,{to:`/lessons`,className:`hover:text-golf-sand-light transition-colors`,children:`Lessons`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/contact#club-professional`,className:`hover:text-golf-sand-light transition-colors`,children:`Club Fitting`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#junior`,className:`hover:text-golf-sand-light transition-colors`,children:`Junior Golf`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#tournaments`,className:`hover:text-golf-sand-light transition-colors`,children:`Tournaments`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:`/#practice`,className:`hover:text-golf-sand-light transition-colors`,children:`Practice Facilities`})})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-playfair text-lg font-bold mb-4`,children:`Stay Updated`}),(0,M.jsx)(`p`,{className:`text-white/80 mb-4`,children:`Subscribe to our newsletter for updates on events, tournaments, and club news.`}),(0,M.jsxs)(`form`,{className:`flex flex-col space-y-2`,children:[(0,M.jsx)(`input`,{type:`email`,placeholder:`Your email address`,className:`px-4 py-2 text-gray-800 rounded-md focus:outline-none`}),(0,M.jsx)(`button`,{type:`submit`,className:`bg-golf-sand text-golf-green-dark px-4 py-2 rounded-md hover:bg-golf-sand-light transition-colors font-medium`,children:`Subscribe`})]})]})]}),(0,M.jsxs)(`div`,{className:`pt-8 border-t border-white/20 flex flex-col md:flex-row justify-between items-center text-sm text-white/70`,children:[(0,M.jsxs)(`p`,{children:[`© `,e,` Belvedere Golf Club. All rights reserved.`]}),(0,M.jsxs)(`div`,{className:`mt-4 md:mt-0 space-x-6`,children:[(0,M.jsx)(L,{to:`/privacy`,className:`hover:text-golf-sand-light transition-colors`,children:`Privacy Policy`}),(0,M.jsx)(`a`,{href:`/terms`,className:`hover:text-golf-sand-light transition-colors`,children:`Terms of Service`}),(0,M.jsx)(`a`,{href:`/cookies`,className:`hover:text-golf-sand-light transition-colors`,children:`Cookies`}),(0,M.jsx)(L,{to:`/admin`,className:`hover:text-golf-sand-light transition-colors`,children:`Admin`})]})]})]})})},AG=()=>(0,M.jsxs)(`main`,{className:`min-h-screen`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`pt-28 pb-16 bg-golf-green/5`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 md:px-8`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-3xl md:text-4xl lg:text-5xl font-bold text-center text-golf-green mb-2`,children:`Course Scorecard`}),(0,M.jsx)(`p`,{className:`text-center text-gray-600 mb-12 max-w-3xl mx-auto`,children:`View the official USGA course rating and scorecards for all tee options at Belvedere Golf Club.`}),(0,M.jsxs)(`div`,{className:`mb-12 bg-white p-6 rounded-lg shadow-lg`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl md:text-3xl font-bold text-golf-green mb-6`,children:`USGA Course Ratings`}),(0,M.jsx)(`div`,{className:`overflow-x-auto`,children:(0,M.jsx)(`img`,{src:`/lovable-uploads/49fcea98-2ec3-4851-8755-e281178e1a8e.png`,alt:`USGA Course Rating for Belvedere Golf Club`,className:`w-full`})})]}),(0,M.jsxs)(`div`,{className:`bg-white p-6 rounded-lg shadow-lg`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl md:text-3xl font-bold text-golf-green mb-6`,children:`Course Scorecard`}),(0,M.jsx)(`div`,{className:`overflow-x-auto`,children:(0,M.jsx)(`img`,{src:`/lovable-uploads/34b89dc1-03bc-4988-add0-314f92067e33.png`,alt:`Belvedere Golf Club Scorecard`,className:`w-full`})}),(0,M.jsx)(`div`,{className:`mt-12 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6`,children:[{color:`Blue`,hexColor:`#1e40af`,yards:`6494`,courseRating:`71.8`,slope:`126`},{color:`Gold`,hexColor:`#b45309`,yards:`5280`,courseRating:`65.4`,slope:`110`},{color:`White`,hexColor:`#f3f4f6`,borderColor:`#d1d5db`,yards:`6155`,courseRating:`70.1`,slope:`124`},{color:`Red`,hexColor:`#b91c1c`,yards:`5171`,courseRating:`69.5`,slope:`118`}].map((e,t)=>(0,M.jsxs)(`div`,{className:`p-4 border rounded-lg text-center`,children:[(0,M.jsx)(`div`,{className:`h-6 w-full rounded-t-md mb-3`,style:{backgroundColor:e.hexColor,border:e.borderColor?`1px solid ${e.borderColor}`:`none`}}),(0,M.jsxs)(`h3`,{className:`font-bold text-xl mb-2`,children:[e.color,` Tees`]}),(0,M.jsxs)(`div`,{className:`flex justify-between border-b pb-1 mb-1`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:`Yards:`}),(0,M.jsx)(`span`,{children:e.yards})]}),(0,M.jsxs)(`div`,{className:`flex justify-between border-b pb-1 mb-1`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:`Course Rating:`}),(0,M.jsx)(`span`,{children:e.courseRating})]}),(0,M.jsxs)(`div`,{className:`flex justify-between`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:`Slope:`}),(0,M.jsx)(`span`,{children:e.slope})]})]},t))}),(0,M.jsxs)(`div`,{className:`mt-10 bg-golf-green/5 p-4 rounded-md`,children:[(0,M.jsx)(`h3`,{className:`font-bold text-lg mb-2`,children:`How to Use the Scorecard`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-5 space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`Select your preferred tee color based on your handicap and skill level`}),(0,M.jsx)(`li`,{children:`The "hcp" rows indicate the hole handicap - hole #1 is not necessarily the hardest hole`}),(0,M.jsx)(`li`,{children:`"Out" refers to the front 9 holes, and "In" refers to the back 9`}),(0,M.jsx)(`li`,{children:`Par for the entire course is 72`}),(0,M.jsx)(`li`,{children:`Print this page to have a physical scorecard for your next round`})]})]})]})]})}),(0,M.jsx)(kG,{})]}),jG=({onRegister:e})=>{let t=Ru();return(0,M.jsx)(`section`,{className:`section-padding bg-white`,children:(0,M.jsxs)(`div`,{className:`container mx-auto`,children:[(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h1`,{className:`section-heading`,children:`Golf Lessons & Clinics`}),(0,M.jsx)(`p`,{className:`section-subheading`,children:`Improve your skills with our professional instructors through a variety of lesson programs designed for all ages and skill levels.`})]}),(0,M.jsxs)(`div`,{className:`mt-16`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-bold text-golf-green mb-8 text-center`,children:`Current Programs`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-lg overflow-hidden border border-golf-green/10 flex flex-col hover-lift relative`,children:[(0,M.jsx)(`div`,{className:`absolute top-0 right-0 z-10 overflow-hidden w-28 h-28`,children:(0,M.jsx)(`div`,{className:`bg-golf-green text-white font-medium text-sm absolute top-[8px] right-[-35px] rotate-45 py-1 px-8 shadow-md`,children:`Popular`})}),(0,M.jsxs)(`div`,{className:`bg-golf-wood text-white p-6 text-center relative`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold`,children:`Junior Summer Camps`}),(0,M.jsx)(`p`,{className:`mt-2 opacity-90`,children:`Week-long immersive golf experience for young players`}),(0,M.jsxs)(`p`,{className:`mt-4`,children:[(0,M.jsx)(`span`,{className:`text-3xl font-bold`,children:`$500`}),(0,M.jsx)(`span`,{className:`text-sm opacity-80`,children:`/Attendee`})]})]}),(0,M.jsx)(`div`,{className:`p-6 flex-grow`,children:(0,M.jsxs)(`ul`,{className:`space-y-5`,children:[(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`shrink-0 mr-3`,children:(0,M.jsx)(xn,{className:`h-5 w-5 text-golf-green`})}),(0,M.jsx)(`div`,{children:(0,M.jsx)(`p`,{className:`font-medium`,children:`9:00 AM - 4:00 PM (MonâFri)`})})]}),(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`shrink-0 mr-3`,children:(0,M.jsx)(cn,{className:`h-5 w-5 text-golf-green`})}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`July 6â10:`}),(0,M.jsx)(`span`,{className:`bg-red-500 text-white text-xs px-2 py-0.5 rounded`,children:`SOLD OUT`})]}
343),(0,M.jsx)(`p`,{className:`font-medium mt-2`,children:`July 27â31`}),(0,M.jsx)(`p`,{className:`font-medium mt-2`,children:`August 24â28`})]})]})]})}),(0,M.jsx)(`div`,{className:`p-6 border-t border-gray-200`,children:(0,M.jsx)(R,{className:`w-full bg-golf-wood hover:bg-golf-wood-dark`,onClick:()=>e(`Junior Summer Camps`),children:`Register Now`})})]}),(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-lg overflow-hidden border border-golf-green/10 flex flex-col hover-lift`,children:[(0,M.jsxs)(`div`,{className:`bg-golf-green text-white p-6 text-center`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold`,children:`Junior Clinics`}),(0,M.jsx)(`p`,{className:`mt-2 opacity-90`,children:`Perfect for young golfers learning fundamentals`}),(0,M.jsxs)(`p`,{className:`mt-4`,children:[(0,M.jsx)(`span`,{className:`text-3xl font-bold`,children:`$250`}),(0,M.jsx)(`span`,{className:`text-sm opacity-80`,children:`/Attendee`})]})]}),(0,M.jsx)(`div`,{className:`p-6 flex-grow`,children:(0,M.jsxs)(`ul`,{className:`space-y-5`,children:[(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`shrink-0 mr-3`,children:(0,M.jsx)(xn,{className:`h-5 w-5 text-golf-green`})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`3 Sessions per evening`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`4:00 PM (Girls Only)`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`5:00 PM (Anyone)`}),(0,M.jsxs)(`p`,{className:`text-gray-600 text-sm flex items-center gap-2`,children:[`6:00 PM (Anyone) `,(0,M.jsx)(`span`,{className:`bg-red-500 text-white text-xs px-2 py-0.5 rounded`,children:`June Sold Out`})]})]})]}),(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`shrink-0 mr-3`,children:(0,M.jsx)(cn,{className:`h-5 w-5 text-golf-green`})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`May:`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`12th, 14th, 19th, 21st, 26th, 28th`}),(0,M.jsx)(`p`,{className:`font-medium mt-2`,children:`June:`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`9th, 11th, 16th, 18th, 25th, 30th`})]})]})]})}),(0,M.jsx)(`div`,{className:`p-6 border-t border-gray-200`,children:(0,M.jsx)(R,{className:`w-full bg-golf-green hover:bg-golf-green-dark`,onClick:()=>e(`Junior Clinics`),children:`Register Now`})})]}),(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-lg overflow-hidden border border-golf-green/10 flex flex-col hover-lift`,children:[(0,M.jsxs)(`div`,{className:`bg-golf-wood text-white p-6 text-center`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold`,children:`Ladies Clinic`}),(0,M.jsx)(`p`,{className:`mt-2 opacity-90`,children:`Focused instruction in a supportive environment`}),(0,M.jsxs)(`p`,{className:`mt-4`,children:[(0,M.jsx)(`span`,{className:`text-3xl font-bold`,children:`$250`}),(0,M.jsx)(`span`,{className:`text-sm opacity-80`,children:`/Attendee`})]})]}),(0,M.jsx)(`div`,{className:`p-6 flex-grow`,children:(0,M.jsxs)(`ul`,{className:`space-y-5`,children:[(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`shrink-0 mr-3`,children:(0,M.jsx)(xn,{className:`h-5 w-5 text-golf-green`})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`3 Sessions per evening`}),(0,M.jsxs)(`p`,{className:`text-gray-600 text-sm flex items-center gap-2`,children:[`5:00 PM `,(0,M.jsx)(`span`,{className:`bg-red-500 text-white text-xs px-2 py-0.5 rounded`,children:`SOLD OUT`})]}),(0,M.jsxs)(`p`,{className:`text-gray-600 text-sm flex items-center gap-2`,children:[`6:00 PM `,(0,M.jsx)(`span`,{className:`bg-red-500 text-white text-xs px-2 py-0.5 rounded`,children:`SOLD OUT`})]}),(0,M.jsxs)(`p`,{className:`text-gray-600 text-sm flex items-center gap-2`,children:[`7:00 PM `,(0,M.jsx)(`span`,{className:`bg-green-600 text-white text-xs px-2 py-0.5 rounded`,children:`NEW`})]})]})]}),(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`shrink-0 mr-3`,children:(0,M.jsx)(cn,{className:`h-5 w-5 text-golf-green`})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`June:`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`1st, 3rd, 8th, 10th, 15th, 17th`})]})]})]})}),(0,M.jsx)(`div`,{className:`p-6 border-t border-gray-200`,children:(0,M.jsx)(R,{className:`w-full bg-golf-wood hover:bg-golf-wood-dark`,onClick:()=>e(`Ladies Clinic`),children:`Register Now`})})]})]})]}),(0,M.jsxs)(`div`,{className:`mt-24 bg-golf-sand/20 p-8 md:p-12 rounded-2xl text-center`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl md:text-3xl font-bold mb-4 text-golf-green`,children:`Private Lessons`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-lg mb-8 max-w-xl mx-auto`,children:`Book a private lesson with Connor Shea directly online â pick your time and
343you're all set.`}),(0,M.jsx)(R,{className:`bg-golf-green hover:bg-golf-green-dark text-white text-lg px-8 py-6`,onClick:()=>t(`/book-lessons`),children:`Book a Private Lesson`})]})]})})},MG=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),NG=o(((e,t)=>{var n=MG();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),PG=o(((e,t)=>{t.exports=NG()()})),FG=o(((e,t)=>{function n(e){return e&&typeof e==`object`&&`default`in e?e.default:e}var r=d(),i=n(r);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var s=!!(typeof window<`u`&&window.document&&window.document.createElement);function c(e,t,n){if(typeof e!=`function`)throw Error(`Expected reducePropsToState to be a function.`);if(typeof t!=`function`)throw Error(`Expected handleStateChangeOnClient to be a function.`);if(n!==void 0&&typeof n!=`function`)throw Error(`Expected mapStateOnServer to either be undefined or a function.`);function c(e){return e.displayName||e.name||`Component`}return function(l){if(typeof l!=`function`)throw Error(`Expected WrappedComponent to be a React component.`);var u=[],d;function f(){d=e(u.map(function(e){return e.props})),p.canUseDOM?t(d):n&&(d=n(d))}var p=function(e){o(t,e);function t(){return e.apply(this,arguments)||this}t.peek=function(){return d},t.rewind=function(){if(t.canUseDOM)throw Error(`You may only call rewind() on the server. Call peek() to read the current state.`);var e=d;return d=void 0,u=[],e};var n=t.prototype;return n.UNSAFE_componentWillMount=function(){u.push(this),f()},n.componentDidUpdate=function(){f()},n.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),f()},n.render=function(){return i.createElement(l,this.props)},t}(r.PureComponent);return a(p,`displayName`,`SideEffect(`+c(l)+`)`),a(p,`canUseDOM`,s),p}}t.exports=c})),IG=o(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),LG=o(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);
343if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),RG=l(PG()),zG=l(FG()),BG=l(IG()),VG=l(LG()),HG={BODY:`bodyAttributes`,HTML:`htmlAttributes`,TITLE:`titleAttributes`},UG={BASE:`base`,BODY:`body`,HEAD:`head`,HTML:`html`,LINK:`link`,META:`meta`,NOSCRIPT:`noscript`,SCRIPT:`script`,STYLE:`style`,TITLE:`title`};Object.keys(UG).map(function(e){return UG[e]});var WG={CHARSET:`charset`,CSS_TEXT:`cssText`,HREF:`href`,HTTPEQUIV:`http-equiv`,INNER_HTML:`innerHTML`,ITEM_PROP:`itemprop`,NAME:`name`,PROPERTY:`property`,REL:`rel`,SRC:`src`,TARGET:`target`},GG={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},KG={DEFAULT_TITLE:`defaultTitle`,DEFER:`defer`,ENCODE_SPECIAL_CHARACTERS:`encodeSpecialCharacters`,ON_CHANGE_CLIENT_STATE:`onChangeClientState`,TITLE_TEMPLATE:`titleTemplate`},qG=Object.keys(GG).reduce(function(e,t){return e[GG[t]]=t,e},{}),JG=[UG.NOSCRIPT,UG.SCRIPT,UG.STYLE],YG=`data-react-helmet`,XG=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ZG=function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)},QG=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),$G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eK=function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},tK=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},nK=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e},rK=function(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!1?String(e):String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)},iK=function(e){var t=lK(e,UG.TITLE),n=lK(e,KG.TITLE_TEMPLATE);if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(``):t});var r=lK(e,KG.DEFAULT_TITLE);return t||r||void 0},aK=function(e){return lK(e,KG.ON_CHANGE_CLIENT_STATE)||function(){}},oK=function(e,t){return t.filter(function(t){return t[e]!==void 0}).map(function(t){return t[e]}).reduce(function(e,t){return $G({},e,t)},{})},sK=function(e,t){return t.filter(function(e){return e[UG.BASE]!==void 0}).map(function(e){return e[UG.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}return t},[])},cK=function(e,t,n){var r={};return n.filter(function(t){return Array.isArray(t[e])?!0:(t[e]!==void 0&&hK(`Helmet: `+e+` should be of type "Array". Instead found type "`+XG(t[e])+`"`),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var i={};n.filter(function(e){for(var n=void 0,a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],c=s.toLowerCase();t.indexOf(c)!==-1&&!(n===WG.REL&&e[n].toLowerCase()===`canonical`)&&!(c===WG.REL&&e[c].toLowerCase()===`stylesheet`)&&(n=c),t.indexOf(s)!==-1&&(s===WG.INNER_HTML||s===WG.CSS_TEXT||s===WG.ITEM_PROP)&&(n=s)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),r[n][l]?!1:(i[n][l]=!0,!0)}
343).reverse().forEach(function(t){return e.push(t)});for(var a=Object.keys(i),o=0;o<a.length;o++){var s=a[o];r[s]=(0,VG.default)({},r[s],i[s])}return e},[]).reverse()},lK=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},uK=function(e){return{baseTag:sK([WG.HREF,WG.TARGET],e),bodyAttributes:oK(HG.BODY,e),defer:lK(e,KG.DEFER),encode:lK(e,KG.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:oK(HG.HTML,e),linkTags:cK(UG.LINK,[WG.REL,WG.HREF],e),metaTags:cK(UG.META,[WG.NAME,WG.CHARSET,WG.HTTPEQUIV,WG.PROPERTY,WG.ITEM_PROP],e),noscriptTags:cK(UG.NOSCRIPT,[WG.INNER_HTML],e),onChangeClientState:aK(e),scriptTags:cK(UG.SCRIPT,[WG.SRC,WG.INNER_HTML],e),styleTags:cK(UG.STYLE,[WG.CSS_TEXT],e),title:iK(e),titleAttributes:oK(HG.TITLE,e)}},dK=function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){dK(t)},0)}}(),fK=function(e){return clearTimeout(e)},pK=typeof window<`u`?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||dK:global.requestAnimationFrame||dK,mK=typeof window<`u`?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||fK:global.cancelAnimationFrame||fK,hK=function(e){return console&&typeof console.warn==`function`&&console.warn(e)},gK=null,_K=function(e){gK&&mK(gK),e.defer?gK=pK(function(){vK(e,function(){gK=null})}):(vK(e),gK=null)},vK=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,c=e.onChangeClientState,l=e.scriptTags,u=e.styleTags,d=e.title,f=e.titleAttributes;xK(UG.BODY,r),xK(UG.HTML,i),bK(d,f);var p={baseTag:SK(UG.BASE,n),linkTags:SK(UG.LINK,a),metaTags:SK(UG.META,o),noscriptTags:SK(UG.NOSCRIPT,s),scriptTags:SK(UG.SCRIPT,l),styleTags:SK(UG.STYLE,u)},m={},h={};Object.keys(p).forEach(function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(m[e]=n),r.length&&(h[e]=p[e].oldTags)}),t&&t(),c(e,m,h)},yK=function(e){return Array.isArray(e)?e.join(``):e},bK=function(e,t){e!==void 0&&document.title!==e&&(document.title=yK(e)),xK(UG.TITLE,t)},xK=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(YG),i=r?r.split(`,`):[],a=[].concat(i),o=Object.keys(t),s=0;s<o.length;s++){var c=o[s],l=t[c]||``;n.getAttribute(c)!==l&&n.setAttribute(c,l),i.indexOf(c)===-1&&i.push(c);var u=a.indexOf(c);u!==-1&&a.splice(u,1)}for(var d=a.length-1;d>=0;d--)n.removeAttribute(a[d]);i.length===a.length?n.removeAttribute(YG):n.getAttribute(YG)!==o.join(`,`)&&n.setAttribute(YG,o.join(`,`))}},SK=function(e,t){var n=document.head||document.querySelector(UG.HEAD),r=n.querySelectorAll(e+`[`+YG+`]`),i=Array.prototype.slice.call(r),a=[],o=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===WG.INNER_HTML)n.innerHTML=t.innerHTML;else if(r===WG.CSS_TEXT)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var s=t[r]===void 0?``:t[r];n.setAttribute(r,s)}n.setAttribute(YG,`true`),i.some(function(e,t){return o=t,n.isEqualNode(e)})?i.splice(o,1):a.push(n)}
343),i.forEach(function(e){return e.parentNode.removeChild(e)}),a.forEach(function(e){return n.appendChild(e)}),{oldTags:i,newTags:a}},CK=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n]===void 0?``+n:n+`="`+e[n]+`"`;return t?t+` `+r:r},``)},wK=function(e,t,n,r){var i=CK(n),a=yK(t);return i?`<`+e+` `+YG+`="true" `+i+`>`+rK(a,r)+`</`+e+`>`:`<`+e+` `+YG+`="true">`+rK(a,r)+`</`+e+`>`},TK=function(e,t,n){return t.reduce(function(t,r){var i=Object.keys(r).filter(function(e){return!(e===WG.INNER_HTML||e===WG.CSS_TEXT)}).reduce(function(e,t){var i=r[t]===void 0?t:t+`="`+rK(r[t],n)+`"`;return e?e+` `+i:i},``),a=r.innerHTML||r.cssText||``,o=JG.indexOf(e)===-1;return t+`<`+e+` `+YG+`="true" `+i+(o?`/>`:`>`+a+`</`+e+`>`)},``)},EK=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[GG[n]||n]=e[n],t},t)},DK=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[qG[n]||n]=e[n],t},t)},OK=function(e,t,n){var r,i=EK(n,(r={key:t},r[YG]=!0,r));return[_.createElement(UG.TITLE,i,t)]},kK=function(e,t){return t.map(function(t,n){var r,i=(r={key:n},r[YG]=!0,r);return Object.keys(t).forEach(function(e){var n=GG[e]||e;n===WG.INNER_HTML||n===WG.CSS_TEXT?i.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:i[n]=t[e]}),_.createElement(e,i)})},AK=function(e,t,n){switch(e){case UG.TITLE:return{toComponent:function(){return OK(e,t.title,t.titleAttributes,n)},toString:function(){return wK(e,t.title,t.titleAttributes,n)}};case HG.BODY:case HG.HTML:return{toComponent:function(){return EK(t)},toString:function(){return CK(t)}};default:return{toComponent:function(){return kK(e,t)},toString:function(){return TK(e,t,n)}}}},jK=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,c=e.scriptTags,l=e.styleTags,u=e.title,d=u===void 0?``:u,f=e.titleAttributes;return{base:AK(UG.BASE,t,r),bodyAttributes:AK(HG.BODY,n,r),htmlAttributes:AK(HG.HTML,i,r),link:AK(UG.LINK,a,r),meta:AK(UG.META,o,r),noscript:AK(UG.NOSCRIPT,s,r),script:AK(UG.SCRIPT,c,r),style:AK(UG.STYLE,l,r),title:AK(UG.TITLE,{title:d,titleAttributes:f},r)}},MK=function(e){var t,n;return n=t=function(t){eK(n,t);function n(){return ZG(this,n),nK(this,t.apply(this,arguments))}return n.prototype.shouldComponentUpdate=function(e){return!(0,BG.default)(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case UG.SCRIPT:case UG.NOSCRIPT:return{innerHTML:t};case UG.STYLE:return{cssText:t}}throw Error(`<`+e.type+` /> elements are self-closing and can not contain children. Refer to our API for more information.`)},n.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,i=e.newChildProps,a=e.nestedChildren;return $G({},r,(t={},t[n.type]=[].concat(r[n.type]||[],[$G({},i,this.mapNestedChildrenToProps(n,a))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,a=e.newChildProps,o=e.nestedChildren;switch(r.type){case UG.TITLE:return $G({},i,(t={},t[r.type]=o,t.titleAttributes=$G({},a),t));case UG.BODY:return $G({},i,{bodyAttributes:$G({},a)});case UG.HTML:return $G({},i,{htmlAttributes:$G({},a)})}return $G({},i,(n={},n[r.type]=$G({},a),n))},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=$G({},t);return Object.keys(e).forEach(function(t){var r;n=$G({},n,(r={},r[t]=e[t],r))}),n}
343,n.prototype.warnOnInvalidChildren=function(e,t){return!0},n.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return _.Children.forEach(e,function(e){if(!(!e||!e.props)){var i=e.props,a=i.children,o=DK(tK(i,[`children`]));switch(n.warnOnInvalidChildren(e,a),e.type){case UG.LINK:case UG.META:case UG.NOSCRIPT:case UG.SCRIPT:case UG.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:o,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:o,nestedChildren:a});break}}}),t=this.mapArrayTypeChildrenToProps(r,t),t},n.prototype.render=function(){var t=this.props,n=t.children,r=$G({},tK(t,[`children`]));return n&&(r=this.mapChildrenToProps(n,r)),_.createElement(e,r)},QG(n,null,[{key:`canUseDOM`,set:function(t){e.canUseDOM=t}}]),n}(_.Component),t.propTypes={base:RG.default.object,bodyAttributes:RG.default.object,children:RG.default.oneOfType([RG.default.arrayOf(RG.default.node),RG.default.node]),defaultTitle:RG.default.string,defer:RG.default.bool,encodeSpecialCharacters:RG.default.bool,htmlAttributes:RG.default.object,link:RG.default.arrayOf(RG.default.object),meta:RG.default.arrayOf(RG.default.object),noscript:RG.default.arrayOf(RG.default.object),onChangeClientState:RG.default.func,script:RG.default.arrayOf(RG.default.object),style:RG.default.arrayOf(RG.default.object),title:RG.default.string,titleAttributes:RG.default.object,titleTemplate:RG.default.string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=e.peek,t.rewind=function(){var t=e.rewind();return t||=jK({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}),t},n}((0,zG.default)(uK,_K,jK)(function(){return null}));MK.renderStatic=MK.rewind;var NK=e=>e.type===`checkbox`,PK=e=>e instanceof Date,FK=e=>e==null,IK=e=>typeof e==`object`,LK=e=>!FK(e)&&!Array.isArray(e)&&IK(e)&&!PK(e),RK=e=>LK(e)&&e.target?NK(e.target)?e.target.checked:e.target.value:e,zK=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,BK=(e,t)=>e.has(zK(t)),VK=e=>{let t=e.constructor&&e.constructor.prototype;return LK(t)&&t.hasOwnProperty(`isPrototypeOf`)},HK=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function UK(e){let t,n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(HK&&(e instanceof Blob||e instanceof FileList))&&(n||LK(e)))if(t=n?[]:{},!n&&!VK(e))t=e;else for(let n in e)e.hasOwnProperty(n)&&(t[n]=UK(e[n]));else return e;return t}var WK=e=>Array.isArray(e)?e.filter(Boolean):[],GK=e=>e===void 0,X=(e,t,n)=>{if(!t||!LK(e))return n;let r=WK(t.split(/[,[\].]+?/)).reduce((e,t)=>FK(e)?e:e[t],e);return GK(r)||r===e?GK(e[t])?n:e[t]:r},KK=e=>typeof e==`boolean`,qK=e=>/^\w*$/.test(e),JK=e=>WK(e.replace(/["|']|\]/g,``).split(/\.|\[/)),YK=(e,t,n)=>{let r=-1,i=qK(t)?[t]:JK(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=LK(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`)return;e[t]=a,e=e[t]}return e},XK={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`},ZK={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},QK={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},$K=_.createContext(null),eq=()=>_.useContext($K),tq=e=>{let{children:t,...n}=e;return _.createElement($K.Provider,{value:n},t)},nq=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==ZK.all&&(t._proxyFormState[i]=!r||ZK.all),n&&(n[i]=!0),e[i]}});return i},rq=e=>LK(e)&&!Object.keys(e).length,iq=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return rq(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||ZK.all))},aq=e=>Array.isArray(e)?e:[e],oq=(e,t,n)=>!e||!t||e===t||aq(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e)));function sq(e){let t=_.useRef(e);t.current=e,_.useEffect(()=>{let n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function cq(e){let t=eq(),{control:n=t.control,disabled:r,name:i,exact:a}=e||{},[o,s]=_.useState(n._formState),c=_.useRef(!0),l=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=_.useRef(i);return u.current=i,sq({disabled:r,next:e=>c.current&&oq(u.current,e.name,a)&&iq(e,l.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),_.useEffect(()=>
vendor: 9,591 bytes, line 343
343(c.current=!0,l.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),nq(o,n,l.current,!1)}var lq=e=>typeof e==`string`,uq=(e,t,n,r,i)=>lq(e)?(r&&t.watch.add(e),X(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),X(n,e))):(r&&(t.watchAll=!0),n);function dq(e){let t=eq(),{control:n=t.control,name:r,defaultValue:i,disabled:a,exact:o}=e||{},s=_.useRef(r);s.current=r,sq({disabled:a,subject:n._subjects.values,next:e=>{oq(s.current,e.name,o)&&l(UK(uq(s.current,n._names,e.values||n._formValues,!1,i)))}});let[c,l]=_.useState(n._getWatch(r,i));return _.useEffect(()=>n._removeUnmounted()),c}function fq(e){let t=eq(),{name:n,disabled:r,control:i=t.control,shouldUnregister:a}=e,o=BK(i._names.array,n),s=dq({control:i,name:n,defaultValue:X(i._formValues,n,X(i._defaultValues,n,e.defaultValue)),exact:!0}),c=cq({control:i,name:n,exact:!0}),l=_.useRef(i.register(n,{...e.rules,value:s,...KK(e.disabled)?{disabled:e.disabled}:{}}));return _.useEffect(()=>{let e=i._options.shouldUnregister||a,t=(e,t)=>{let n=X(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=UK(X(i._options.defaultValues,n));YK(i._defaultValues,n,e),GK(X(i._formValues,n))&&YK(i._formValues,n,e)}return()=>{(o?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,o,a]),_.useEffect(()=>{X(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:X(i._fields,n)._f.value})},[r,n,i]),{field:{name:n,value:s,...KK(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:_.useCallback(e=>l.current.onChange({target:{value:RK(e),name:n},type:XK.CHANGE}),[n]),onBlur:_.useCallback(()=>l.current.onBlur({target:{value:X(i._formValues,n),name:n},type:XK.BLUR}),[n,i]),ref:_.useCallback(e=>{let t=X(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[i._fields,n])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!X(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!X(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!X(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!X(c.validatingFields,n)},error:{enumerable:!0,get:()=>X(c.errors,n)}})}}var pq=e=>e.render(fq(e)),mq=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},hq=e=>({isOnSubmit:!e||e===ZK.onSubmit,isOnBlur:e===ZK.onBlur,isOnChange:e===ZK.onChange,isOnAll:e===ZK.all,isOnTouch:e===ZK.onTouched}),gq=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),_q=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=X(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(_q(a,t))break}else if(LK(a)&&_q(a,t))break}}},vq=(e,t,n)=>{let r=aq(X(e,n));return YK(r,`root`,t[n]),YK(e,n,r),e},yq=e=>e.type===`file`,bq=e=>typeof e==`function`,xq=e=>{if(!HK)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Sq=e=>lq(e),Cq=e=>e.type===`radio`,wq=e=>e instanceof RegExp,Tq={value:!1,isValid:!1},Eq={value:!0,isValid:!0},Dq=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!GK(e[0].attributes.value)?GK(e[0].value)||e[0].value===``?Eq:{value:e[0].value,isValid:!0}:Eq:Tq}return Tq},Oq={isValid:!1,value:null},kq=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Oq):Oq;function Aq(e,t,n=`validate`){if(Sq(e)||Array.isArray(e)&&e.every(Sq)||KK(e)&&!e)return{type:n,message:Sq(e)?e:``,ref:t}}var jq=e=>LK(e)&&!wq(e)?e:{value:e,message:``},Mq=async(e,t,n,r,i)=>{let{ref:a,refs:o,required:s,maxLength:c,minLength:l,min:u,max:d,pattern:f,validate:p,name:m,valueAsNumber:h,mount:g,disabled:_}=e._f,v=X(t,m);if(!g||_)return{};let y=o?o[0]:a,b=e=>{r&&y.reportValidity&&(y.setCustomValidity(KK(e)?``:e||``),y.reportValidity())},x={},S=Cq(a),C=NK(a),w=S||C,T=(h||yq(a))&&GK(a.value)&&GK(v)||xq(a)&&a.value===``||v===``||Array.isArray(v)&&!v.length,E=mq.bind(null,m,n,x),D=(e,t,n,r=QK.maxLength,i=QK.minLength)=>{let o=e?t:n;x[m]={type:e?r:i,message:o,ref:a,...E(e?r:i,o)}};if(i?!Array.isArray(v)||!v.length:s&&(!w&&(T||FK(v))||KK(v)&&!v||C&&!Dq(o).isValid||S&&!kq(o).isValid)){let{value:e,message:t}=Sq(s)?{value:!!s,message:s}:jq(s);if(e&&(x[m]={type:QK.required,message:t,ref:y,...E(QK.required,t)},!n))return b(t),x}if(!T&&(!FK(u)||!FK(d))){let e,t,r=jq(d),i=jq(u);if(!FK(v)&&!isNaN(v)){let n=a.valueAsNumber||v&&+v;FK(r.value)||(e=n>r.value),FK(i.value)||(t=n<i.value)}else{let n=a.valueAsDate||new Date(v),o=e=>new Date(new Date().toDateString()+` `+e),s=a.type==`time`,c=a.type==`week`;lq(r.value)&&v&&(e=s?o(v)>o(r.value):c?v>r.value:n>new Date(r.value)),lq(i.value)&&v&&(t=s?o(v)<o(i.value):c?v<i.value:n<new Date(i.value))}if((e||t)&&(D(!!e,r.message,i.message,QK.max,QK.min),!n))return b(x[m].message),x}if((c||l)&&!T&&(lq(v)||i&&Array.isArray(v))){let e=jq(c),t=jq(l),r=!FK(e.value)&&v.length>+e.value,i=!FK(t.value)&&v.length<+t.value;if((r||i)&&(D(r,e.message,t.message),!n))return b(x[m].message),x}if(f&&!T&&lq(v)){let{value:e,message:t}=jq(f);if(wq(e)&&!v.match(e)&&(x[m]={type:QK.pattern,message:t,ref:a,...E(QK.pattern,t)},!n))return b(t),x}if(p){if(bq(p)){let e=Aq(await p(v,t),y);if(e&&(x[m]={...e,...E(QK.validate,e.message)},!n))return b(e.message),x}else if(LK(p)){let e={};for(let r in p){if(!rq(e)&&!n)break;let i=Aq(await p[r](v,t),y,r);i&&(e={...i,...E(r,i.message)},b(i.message),n&&(x[m]=e))}if(!rq(e)&&(x[m]={ref:y,...e},!n))return x}}return b(!0),x};function Nq(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=GK(e)?r++:e[t[r++]];return e}function Pq(e){for(let t in e)if(e.hasOwnProperty(t)&&!GK(e[t]))return!1;return!0}function Fq(e,t){let n=Array.isArray(t)?t:qK(t)?[t]:JK(t),r=n.length===1?e:Nq(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(LK(r)&&rq(r)||Array.isArray(r)&&Pq(r))&&Fq(e,n.slice(0,-1)),e}var Iq=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},Lq=e=>FK(e)||!IK(e);function Rq(e,t){if(Lq(e)||Lq(t))return e===t;if(PK(e)&&PK(t))return e.getTime()===t.getTime();let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n){let n=e[i];if(!r.includes(i))return!1;if(i!==`ref`){let e=t[i];if(PK(n)&&PK(e)||LK(n)&&LK(e)||Array.isArray(n)&&Array.isArray(e)?!Rq(n,e):n!==e)return!1}}return!0}var zq=e=>e.type===`select-multiple`,Bq=e=>Cq(e)||NK(e),Vq=e=>xq(e)&&e.isConnected,Hq=e=>{for(let t in e)if(bq(e[t]))return!0;return!1};function Uq(e,t={}){let n=Array.isArray(e);if(LK(e)||n)for(let n in e)Array.isArray(e[n])||LK(e[n])&&!Hq(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Uq(e[n],t[n])):FK(e[n])||(t[n]=!0);return t}function Wq(e,t,n){let r=Array.isArray(e);if(LK(e)||r)for(let r in e)Array.isArray(e[r])||LK(e[r])&&!Hq(e[r])?GK(t)||Lq(n[r])?n[r]=Array.isArray(e[r])?Uq(e[r],[]):{...Uq(e[r])}:Wq(e[r],FK(t)?{}:t[r],n[r]):n[r]=!Rq(e[r],t[r]);return n}var Gq=(e,t)=>Wq(e,t,Uq(t)),Kq=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>GK(e)?e:t?e===``?NaN:e&&+e:n&&lq(e)?new Date(e):r?r(e):e;function qq(e){let t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return yq(t)?t.files:Cq(t)?kq(e.refs).value:zq(t)?[...t.selectedOptions].map(({value:e})=>e):NK(t)?Dq(e.refs).value:Kq(GK(t.value)?e.ref.value:t.value,e)}var Jq=(e,t,n,r)=>{let i={};for(let n of e){let e=X(t,n);e&&YK(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Yq=e=>GK(e)?e:wq(e)?e.source:LK(e)?wq(e.value)?e.value.source:e.value:e,Xq=`AsyncFunction`,Zq=e=>(!e||!e.validate)&&!!(bq(e.validate)&&e.validate.constructor.name===Xq||LK(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Xq)),Qq=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function $q(e,t,n){let r=X(e,n);if(r||qK(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=X(t,r),o=X(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};i.pop()}return{name:n}}var eJ=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,tJ=(e,t)=>!WK(X(e,t)).length&&Fq(e,t),nJ={mode:ZK.onSubmit,reValidateMode:ZK.onChange,shouldFocusError:!0};function rJ(e={}){let t={...nJ,...e},n={submitCount:0,isDirty:!1,isLoading:bq(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=(LK(t.defaultValues)||LK(t.values))&&UK(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:UK(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Iq(),array:Iq(),state:Iq()},f=hq(t.mode),p=hq(t.reValidateMode),m=t.criteriaMode===ZK.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=async i=>{if(!e.disabled&&(u.isValid||i)){let e=t.resolver?rq((await w()).errors):await E(r,!0);e!==n.isValid&&d.state.next({isValid:e})}},_=(t,r)=>{!e.disabled&&(u.isValidating||u.validatingFields)&&((t||Array.from(s.mount)).forEach(e=>{e&&(r?YK(n.validatingFields,e,r):Fq(n.validatingFields,e))}),d.state.next({validatingFields:n.validatingFields,isValidating:!rq(n.validatingFields)}))},v=(t,s=[],c,l,f=!0,p=!0)=>
vendor: 3,978 bytes, line 343
343{if(l&&c&&!e.disabled){if(o.action=!0,p&&Array.isArray(X(r,t))){let e=c(X(r,t),l.argA,l.argB);f&&YK(r,t,e)}if(p&&Array.isArray(X(n.errors,t))){let e=c(X(n.errors,t),l.argA,l.argB);f&&YK(n.errors,t,e),tJ(n.errors,t)}if(u.touchedFields&&p&&Array.isArray(X(n.touchedFields,t))){let e=c(X(n.touchedFields,t),l.argA,l.argB);f&&YK(n.touchedFields,t,e)}u.dirtyFields&&(n.dirtyFields=Gq(i,a)),d.state.next({name:t,isDirty:O(t,s),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else YK(a,t,s)},y=(e,t)=>{YK(n.errors,e,t),d.state.next({errors:n.errors})},b=e=>{n.errors=e,d.state.next({errors:n.errors,isValid:!1})},x=(e,t,n,s)=>{let c=X(r,e);if(c){let r=X(a,e,GK(n)?X(i,e):n);GK(r)||s&&s.defaultChecked||t?YK(a,e,t?r:qq(c._f)):A(e,r),o.mount&&g()}},S=(t,a,o,s,c)=>{let l=!1,f=!1,p={name:t};if(!e.disabled){let e=!!(X(r,t)&&X(r,t)._f&&X(r,t)._f.disabled);if(!o||s){u.isDirty&&(f=n.isDirty,n.isDirty=p.isDirty=O(),l=f!==p.isDirty);let r=e||Rq(X(i,t),a);f=!!(!e&&X(n.dirtyFields,t)),r||e?Fq(n.dirtyFields,t):YK(n.dirtyFields,t,!0),p.dirtyFields=n.dirtyFields,l||=u.dirtyFields&&f!==!r}if(o){let e=X(n.touchedFields,t);e||(YK(n.touchedFields,t,o),p.touchedFields=n.touchedFields,l||=u.touchedFields&&e!==o)}l&&c&&d.state.next(p)}return l?p:{}},C=(t,r,i,a)=>{let o=X(n.errors,t),s=u.isValid&&KK(r)&&n.isValid!==r;if(e.delayError&&i?(c=h(()=>y(t,i)),c(e.delayError)):(clearTimeout(l),c=null,i?YK(n.errors,t,i):Fq(n.errors,t)),(i?!Rq(o,i):o)||!rq(a)||s){let e={...a,...s&&KK(r)?{isValid:r}:{},errors:n.errors,name:t};n={...n,...e},d.state.next(e)}},w=async e=>{_(e,!0);let n=await t.resolver(a,t.context,Jq(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return _(e),n},T=async e=>{let{errors:t}=await w(e);if(e)for(let r of e){let e=X(t,r);e?YK(n.errors,r,e):Fq(n.errors,r)}else n.errors=t;return t},E=async(e,r,i={valid:!0})=>{for(let o in e){let c=e[o];if(c){let{_f:e,...l}=c;if(e){let l=s.array.has(e.name),d=c._f&&Zq(c._f);d&&u.validatingFields&&_([o],!0);let f=await Mq(c,a,m,t.shouldUseNativeValidation&&!r,l);if(d&&u.validatingFields&&_([o]),f[e.name]&&(i.valid=!1,r))break;!r&&(X(f,e.name)?l?vq(n.errors,f,e.name):YK(n.errors,e.name,f[e.name]):Fq(n.errors,e.name))}!rq(l)&&await E(l,r,i)}}return i.valid},D=()=>{for(let e of s.unMount){let t=X(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Vq(e)):!Vq(t._f.ref))&&le(e)}s.unMount=new Set},O=(t,n)=>!e.disabled&&(t&&n&&YK(a,t,n),!Rq(ie(),i)),ee=(e,t,n)=>uq(e,s,{...o.mount?a:GK(t)?i:lq(e)?{[e]:t}:t},n,t),k=t=>WK(X(o.mount?a:i,t,e.shouldUnregister?X(i,t,[]):[])),A=(e,t,n={})=>{let i=X(r,e),o=t;if(i){let n=i._f;n&&(!n.disabled&&YK(a,e,Kq(t,n)),o=xq(n.ref)&&FK(t)?``:t,zq(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?NK(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find(t=>t===e.value):o===e.value)):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach(e=>e.checked=e.value===o):yq(n.ref)?n.ref.value=``:(n.ref.value=o,n.ref.type||d.values.next({name:e,values:{...a}})))}(n.shouldDirty||n.shouldTouch)&&S(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&M(e)},te=(e,t,n)=>{for(let i in t){let a=t[i],o=`${e}.${i}`,c=X(r,o);(s.array.has(e)||LK(a)||c&&!c._f)&&!PK(a)?te(o,a,n):A(o,a,n)}},ne=(e,t,c={})=>{let l=X(r,e),f=s.array.has(e),p=UK(t);YK(a,e,p),f?(d.array.next({name:e,values:{...a}}),(u.isDirty||u.dirtyFields)&&c.shouldDirty&&d.state.next({name:e,dirtyFields:Gq(i,a),isDirty:O(e,p)})):l&&!l._f&&!FK(p)?te(e,p,c):A(e,p,c),gq(e,s)&&d.state.next({...n}),d.values.next({name:o.mount?e:void 0,values:{...a}})},j=async i=>{o.mount=!0;let l=i.target,h=l.name,v=!0,y=X(r,h),b=()=>l.type?qq(y._f):RK(i),x=e=>{v=Number.isNaN(e)||PK(e)&&isNaN(e.getTime())||Rq(e,X(a,h,e))};if(y){let o,l,T=b(),D=i.type===XK.BLUR||i.type===XK.FOCUS_OUT,O=!Qq(y._f)&&!t.resolver&&!X(n.errors,h)&&!y._f.deps||eJ(D,X(n.touchedFields,h),n.isSubmitted,p,f),ee=gq(h,s,D);YK(a,h,T),D?(y._f.onBlur&&y._f.onBlur(i),c&&c(0)):y._f.onChange&&y._f.onChange(i);
vendor: 7,356 bytes, line 343
343let k=S(h,T,D,!1),A=!rq(k)||ee;if(!D&&d.values.next({name:h,type:i.type,values:{...a}}),O)return u.isValid&&(e.mode===`onBlur`?D&&g():g()),A&&d.state.next({name:h,...ee?{}:k});if(!D&&ee&&d.state.next({...n}),t.resolver){let{errors:e}=await w([h]);if(x(T),v){let t=$q(n.errors,r,h),i=$q(e,r,t.name||h);o=i.error,h=i.name,l=rq(e)}}else _([h],!0),o=(await Mq(y,a,m,t.shouldUseNativeValidation))[h],_([h]),x(T),v&&(o?l=!1:u.isValid&&(l=await E(r,!0)));v&&(y._f.deps&&M(y._f.deps),C(h,l,o,k))}},re=(e,t)=>{if(X(n.errors,t)&&e.focus)return e.focus(),1},M=async(e,i={})=>{let a,o,c=aq(e);if(t.resolver){let t=await T(GK(e)?e:c);a=rq(t),o=e?!c.some(e=>X(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=X(r,e);return await E(t&&t._f?{[e]:t}:t)}))).every(Boolean),!(!o&&!n.isValid)&&g()):o=a=await E(r);return d.state.next({...!lq(e)||u.isValid&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&_q(r,re,e?c:s.mount),o},ie=e=>{let t={...o.mount?a:i};return GK(e)?t:lq(e)?X(t,e):e.map(e=>X(t,e))},ae=(e,t)=>({invalid:!!X((t||n).errors,e),isDirty:!!X((t||n).dirtyFields,e),error:X((t||n).errors,e),isValidating:!!X(n.validatingFields,e),isTouched:!!X((t||n).touchedFields,e)}),oe=e=>{e&&aq(e).forEach(e=>Fq(n.errors,e)),d.state.next({errors:e?n.errors:{}})},se=(e,t,i)=>{let a=(X(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=X(n.errors,e)||{};YK(n.errors,e,{...l,...t,ref:a}),d.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},ce=(e,t)=>bq(e)?d.values.subscribe({next:n=>e(ee(void 0,t),n)}):ee(e,t,!0),le=(e,o={})=>{for(let c of e?aq(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(Fq(r,c),Fq(a,c)),!o.keepError&&Fq(n.errors,c),!o.keepDirty&&Fq(n.dirtyFields,c),!o.keepTouched&&Fq(n.touchedFields,c),!o.keepIsValidating&&Fq(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&Fq(i,c);d.values.next({values:{...a}}),d.state.next({...n,...o.keepDirty?{isDirty:O()}:{}}),!o.keepIsValid&&g()},ue=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(KK(e)&&o.mount||e){let o=e?void 0:GK(i)?qq(n?n._f:X(r,t)._f):i;YK(a,t,o),S(t,o,!1,!1,!0)}},de=(n,a={})=>{let c=X(r,n),l=KK(a.disabled)||KK(e.disabled);return YK(r,n,{...c||{},_f:{...c&&c._f?c._f:{ref:{name:n}},name:n,mount:!0,...a}}),s.mount.add(n),c?ue({field:c,disabled:KK(a.disabled)?a.disabled:e.disabled,name:n,value:a.value}):x(n,!0,a.value),{...l?{disabled:a.disabled||e.disabled}:{},...t.progressive?{required:!!a.required,min:Yq(a.min),max:Yq(a.max),minLength:Yq(a.minLength),maxLength:Yq(a.maxLength),pattern:Yq(a.pattern)}:{},name:n,onChange:j,onBlur:j,ref:e=>{if(e){de(n,a),c=X(r,n);let t=GK(e.value)&&e.querySelectorAll&&e.querySelectorAll(`input,select,textarea`)[0]||e,o=Bq(t),s=c._f.refs||[];if(o?s.find(e=>e===t):t===c._f.ref)return;YK(r,n,{_f:{...c._f,...o?{refs:[...s.filter(Vq),t,...Array.isArray(X(i,n))?[{}]:[]],ref:{type:t.type,name:n}}:{ref:t}}}),x(n,!1,void 0,t)}else c=X(r,n,{}),c._f&&(c._f.mount=!1),(t.shouldUnregister||a.shouldUnregister)&&!(BK(s.array,n)&&o.action)&&s.unMount.add(n)}}},fe=()=>t.shouldFocusError&&_q(r,re,s.mount),pe=e=>{KK(e)&&(d.state.next({disabled:e}),_q(r,(t,n)=>{let i=X(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},me=(e,i)=>async o=>{let s;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let c=UK(a);if(d.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await w();n.errors=e,c=t}else await E(r);if(Fq(n.errors,`root`),rq(n.errors)){d.state.next({errors:{}});try{await e(c,o)}catch(e){s=e}}else i&&await i({...n.errors},o),fe(),setTimeout(fe);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rq(n.errors)&&!s,submitCount:n.submitCount+1,errors:n.errors}),s)throw s},he=(e,t={})=>{X(r,e)&&(GK(t.defaultValue)?ne(e,UK(X(i,e))):(ne(e,t.defaultValue),YK(i,e,UK(t.defaultValue))),t.keepTouched||Fq(n.touchedFields,e),t.keepDirty||(Fq(n.dirtyFields,e),n.isDirty=t.defaultValue?O(e,UK(X(i,e))):O()),t.keepError||(Fq(n.errors,e),u.isValid&&g()),d.state.next({...n}))},N=(t,c={})=>{let l=t?UK(t):i,f=UK(l),p=rq(t),m=p?i:f;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(Gq(i,a))]);for(let t of Array.from(e))X(n.dirtyFields,t)?YK(m,t,X(a,t)):ne(t,X(m,t))}else{if(HK&&GK(t))for(let e of s.mount){let t=X(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(xq(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}r={}}a=e.shouldUnregister?c.keepDefaultValues?UK(i):{}:UK(m),d.array.next({values:{...m}}),d.values.next({values:{...m}})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!u.isValid||!!c.keepIsValid||!!c.keepDirtyValues,o.watch=!!e.shouldUnregister,d.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:p?!1:c.keepDirty?n.isDirty:!!(c.keepDefaultValues&&!Rq(t,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&a?Gq(i,a):n.dirtyFields:c.keepDefaultValues&&t?Gq(i,t):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},ge=(e,t)=>N(bq(e)?e(a):e,t);return{control:{register:de,unregister:le,getFieldState:ae,handleSubmit:me,setError:se,_executeSchema:w,_getWatch:ee,_getDirty:O,_updateValid:g,_removeUnmounted:D,_updateFieldArray:v,_updateDisabledField:ue,_getFieldArray:k,_reset:N,_resetDefaultValues:()=>bq(t.defaultValues)&&t.defaultValues().then(e=>{ge(e,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:e=>{n={...n,...e}},_disableForm:pe,_subjects:d,_proxyFormState:u,_setErrors:b,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},set _formState(e){n=e},get _options(){return t},set _options(e){t={...t,...e}}},trigger:M,register:de,handleSubmit:me,watch:ce,setValue:ne,getValues:ie,reset:ge,resetField:he,clearErrors:oe,unregister:le,setError:se,setFocus:(e,t={})=>{let n=X(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:ae}}function iJ(e={}){let t=_.useRef(),n=_.useRef(),[r,i]=_.useState({isDirty:!1,isValidating:!1,isLoading:bq(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:bq(e.defaultValues)?void 0:e.defaultValues});t.current||={...rJ(e),formState:r};let a=t.current.control;return a._options=e,sq({subject:a._subjects.state,next:e=>{iq(e,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),_.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),_.useEffect(()=>{e.values&&!Rq(e.values,n.current)?(a._reset(e.values,a._options.resetOptions),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[e.values,a]),_.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),_.useEffect(()=>
343{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),_.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),_.useEffect(()=>{t.current&&(t.current.watch=t.current.watch.bind({}))},[r]),t.current.formState=nq(r,a),t.current}var aJ=`Label`,oJ=_.forwardRef((e,t)=>(0,M.jsx)(N.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));oJ.displayName=aJ;var sJ=oJ,cJ=Kt(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),lJ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(sJ,{ref:n,className:F(cJ(),e),...t}));lJ.displayName=sJ.displayName;var uJ=tq,dJ=_.createContext({}),fJ=({...e})=>(0,M.jsx)(dJ.Provider,{value:{name:e.name},children:(0,M.jsx)(pq,{...e})}),pJ=()=>{let e=_.useContext(dJ),t=_.useContext(mJ),{getFieldState:n,formState:r}=eq(),i=n(e.name,r);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},mJ=_.createContext({}),hJ=_.forwardRef(({className:e,...t},n)=>{let r=_.useId();return(0,M.jsx)(mJ.Provider,{value:{id:r},children:(0,M.jsx)(`div`,{ref:n,className:F(`space-y-2`,e),...t})})});hJ.displayName=`FormItem`;var gJ=_.forwardRef(({className:e,...t},n)=>{let{error:r,formItemId:i}=pJ();return(0,M.jsx)(lJ,{ref:n,className:F(r&&`text-destructive`,e),htmlFor:i,...t})});gJ.displayName=`FormLabel`;var _J=_.forwardRef(({...e},t)=>{let{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=pJ();return(0,M.jsx)(oe,{ref:t,id:r,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})});_J.displayName=`FormControl`;var vJ=_.forwardRef(({className:e,...t},n)=>{let{formDescriptionId:r}=pJ();return(0,M.jsx)(`p`,{ref:n,id:r,className:F(`text-sm text-muted-foreground`,e),...t})});vJ.displayName=`FormDescription`;var yJ=_.forwardRef(({className:e,children:t,...n},r)=>{let{error:i,formMessageId:a}=pJ(),o=i?String(i?.message):t;return o?(0,M.jsx)(`p`,{ref:r,id:a,className:F(`text-sm font-medium text-destructive`,e),...n,children:o}):null});yJ.displayName=`FormMessage`;var bJ=_.forwardRef(({className:e,type:t,...n},r)=>(0,M.jsx)(`input`,{type:t,className:F(`flex h-10 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`,e),ref:r,...n}));bJ.displayName=`Input`;var xJ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`textarea`,{className:F(`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`,e),ref:n,...t}));xJ.displayName=`Textarea`;var SJ=`Checkbox`,[CJ,wJ]=me(SJ),[TJ,EJ]=CJ(SJ),DJ=_.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=_.useState(null),m=j(t,e=>p(e)),h=_.useRef(!1),g=f?u||!!f.closest(`form`):!0,[v=!1,y]=He({prop:i,defaultProp:a,onChange:l}),b=_.useRef(v);return _.useEffect(()=>{let e=f?.form;if(e){let t=()=>y(b.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[f,y]),(0,M.jsxs)(TJ,{scope:n,state:v,disabled:s,children:[(0,M.jsx)(N.button,{type:`button`,role:`checkbox`,"aria-checked":jJ(v)?`mixed`:v,"aria-required":o,"data-state":MJ(v),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onKeyDown:A(e.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:A(e.onClick,e=>{y(e=>jJ(e)?!0:!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,M.jsx)(AJ,{control:f,bubbles:!h.current,name:r,value:c,checked:v,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`},defaultChecked:jJ(a)?!1:a})]})});DJ.displayName=SJ;var OJ=`CheckboxIndicator`,kJ=_.forwardRef((e,t)=>
343{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=EJ(OJ,n);return(0,M.jsx)(Re,{present:r||jJ(a.state)||a.state===!0,children:(0,M.jsx)(N.span,{"data-state":MJ(a.state),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});kJ.displayName=OJ;var AJ=e=>{let{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...a}=e,o=_.useRef(null),s=xC(n),c=us(t);_.useEffect(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(s!==n&&i){let t=new Event(`click`,{bubbles:r});e.indeterminate=jJ(n),i.call(e,jJ(n)?!1:n),e.dispatchEvent(t)}},[s,n,r]);let l=_.useRef(jJ(n)?!1:n);return(0,M.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:i??l.current,...a,tabIndex:-1,ref:o,style:{...e.style,...c,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})};function jJ(e){return e===`indeterminate`}function MJ(e){return jJ(e)?`indeterminate`:e?`checked`:`unchecked`}var NJ=DJ,PJ=kJ,FJ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(NJ,{ref:n,className:F(`peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:(0,M.jsx)(PJ,{className:F(`flex items-center justify-center text-current`),children:(0,M.jsx)(dn,{className:`h-4 w-4`})})}));FJ.displayName=NJ.displayName;function IJ(e,t=[]){let n=[];function r(t,r){let i=_.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=_.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})}function s(n,o){let s=o?.[e][a]||i,c=_.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>_.createContext(e));return function(n){let r=n?.[e]||t;return _.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,LJ(i,...t)]}function LJ(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var RJ=`rovingFocusGroup.onEntryFocus`,zJ={bubbles:!1,cancelable:!0},BJ=`RovingFocusGroup`,[VJ,HJ,UJ]=fe(BJ),[WJ,GJ]=IJ(BJ,[UJ]),[KJ,qJ]=WJ(BJ),JJ=_.forwardRef((e,t)=>(0,M.jsx)(VJ.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(VJ.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(YJ,{...e,ref:t})})}));JJ.displayName=BJ;var YJ=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=_.useRef(null),p=j(t,f),m=bC(a),[h=null,g]=He({prop:o,defaultProp:s,onChange:c}),[v,y]=_.useState(!1),b=_e(l),x=HJ(n),S=_.useRef(!1),[C,w]=_.useState(0);return _.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(RJ,b),()=>e.removeEventListener(RJ,b)},[b]),(0,M.jsx)(KJ,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:_.useCallback(e=>g(e),[g]),onItemShiftTab:_.useCallback(()=>y(!0),[]),onFocusableItemAdd:_.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:_.useCallback(()=>w(e=>e-1),[]),children:(0,M.jsx)(N.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:A(e.onMouseDown,()=>{S.current=!0}),onFocus:A(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(RJ,zJ);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);tY([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:A(e.onBlur,()=>y(!1))})})}),XJ=`RovingFocusGroupItem`,ZJ=_.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=ra(),c=a||s,l=qJ(XJ,n),u=l.currentTabStopId===c,d=HJ(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return _.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),(0,M.jsx)(VJ.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:(0,M.jsx)(N.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:A(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:A(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:A(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=eY(e,l.orientation,l.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=d().filter(e=>
vendor: 4,113 bytes, line 343
343e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?nY(n,r+1):n.slice(r+1)}setTimeout(()=>tY(n))}})})})});ZJ.displayName=XJ;var QJ={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function $J(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function eY(e,t,n){let r=$J(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return QJ[r]}function tY(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function nY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rY=JJ,iY=ZJ,aY=`Radio`,[oY,sY]=me(aY),[cY,lY]=oY(aY),uY=_.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=_.useState(null),p=j(t,e=>f(e)),m=_.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,M.jsxs)(cY,{scope:n,checked:i,disabled:o,children:[(0,M.jsx)(N.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":mY(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:A(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,M.jsx)(pY,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});uY.displayName=aY;var dY=`RadioIndicator`,fY=_.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=lY(dY,n);return(0,M.jsx)(Re,{present:r||a.checked,children:(0,M.jsx)(N.span,{"data-state":mY(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});fY.displayName=dY;var pY=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,a=_.useRef(null),o=xC(n),s=us(t);return _.useEffect(()=>{let e=a.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(o!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[o,n,r]),(0,M.jsx)(`input`,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...e.style,...s,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})};function mY(e){return e?`checked`:`unchecked`}var hY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],gY=`RadioGroup`,[_Y,vY]=me(gY,[GJ,sY]),yY=GJ(),bY=sY(),[xY,SY]=_Y(gY),CY=_.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=yY(n),m=bC(l),[h,g]=He({prop:a,defaultProp:i,onChange:d});return(0,M.jsx)(xY,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,M.jsx)(rY,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,M.jsx)(N.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});CY.displayName=gY;var wY=`RadioGroupItem`,TY=_.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=SY(wY,n),o=a.disabled||r,s=yY(n),c=bY(n),l=_.useRef(null),u=j(t,l),d=a.value===i.value,f=_.useRef(!1);return _.useEffect(()=>{let e=e=>{hY.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,M.jsx)(iY,{asChild:!0,...s,focusable:!o,active:d,children:(0,M.jsx)(uY,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:A(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:A(i.onFocus,()=>{f.current&&l.current?.click()})})})});TY.displayName=wY;var EY=`RadioGroupIndicator`,DY=_.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,M.jsx)(fY,{...bY(n),...r,ref:t})});DY.displayName=EY;var OY=CY,kY=TY,AY=DY,jY=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(OY,{className:F(`grid gap-2`,e),...t,ref:n}));jY.displayName=OY.displayName;var MY=_.forwardRef(({className:e,...t},n)=>
343(0,M.jsx)(kY,{ref:n,className:F(`aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,M.jsx)(AY,{className:`flex items-center justify-center`,children:(0,M.jsx)(bn,{className:`h-2.5 w-2.5 fill-current text-current`})})}));MY.displayName=kY.displayName;async function NY(e){try{await wb.from(`form_submissions`).insert({form_type:e.formType,name:e.name,email:e.email,phone:e.phone,subject:e.subject,form_data:e.formData,status:e.status||`submitted`})}catch(e){console.error(`Failed to log form submission:`,e)}}var PY=(e,t,n)=>{if(e&&`reportValidity`in e){let r=X(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},FY=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?PY(r.ref,n,e):r.refs&&r.refs.forEach(t=>PY(t,n,e))}},IY=(e,t)=>{t.shouldUseNativeValidation&&FY(e,t);let n={};for(let r in e){let i=X(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(LY(t.names||Object.keys(e),r)){let e=Object.assign({},X(n,r));YK(e,`root`,a),YK(n,r,e)}else YK(n,r,a)}return n},LY=(e,t)=>e.some(e=>e.startsWith(t+`.`)),RY=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(`unionErrors`in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=mq(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},zY=function(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(i,o){try{var s=Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&FY({},a),{errors:{},values:n.raw?r:e}})}catch(e){return o(e)}return s&&s.then?s.then(void 0,o):s}(0,function(e){if(function(e){return Array.isArray(e?.errors)}(e))return{values:{},errors:IY(RY(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}}},BY;(function(e){e.assertEqual=e=>e;function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(BY||={});var VY;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(VY||={});var Z=BY.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),HY=e=>{switch(typeof e){case`undefined`:return Z.undefined;case`string`:return Z.string;case`number`:return isNaN(e)?Z.nan:Z.number;case`boolean`:return Z.boolean;case`function`:return Z.function;case`bigint`:return Z.bigint;case`symbol`:return Z.symbol;case`object`:return Array.isArray(e)?Z.array:e===null?Z.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?Z.promise:typeof Map<`u`&&e instanceof Map?Z.map:typeof Set<`u`&&e instanceof Set?Z.set:typeof Date<`u`&&e instanceof Date?Z.date:Z.object;default:return Z.unknown}},Q=BY.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),UY=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,`$1:`),WY=class e extends
vendor: 4,199 bytes, line 343
343Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,BY.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};WY.create=e=>new WY(e);var GY=(e,t)=>{let n;switch(e.code){case Q.invalid_type:n=e.received===Z.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,BY.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:n=`Unrecognized key(s) in object: ${BY.joinValues(e.keys,`, `)}`;break;case Q.invalid_union:n=`Invalid input`;break;case Q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${BY.joinValues(e.options)}`;break;case Q.invalid_enum_value:n=`Invalid enum value. Expected ${BY.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:n=`Invalid function arguments`;break;case Q.invalid_return_type:n=`Invalid function return type`;break;case Q.invalid_date:n=`Invalid date`;break;case Q.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:BY.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Q.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Q.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Q.custom:n=`Invalid input`;break;case Q.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,BY.assertNever(e)}return{message:n}},KY=GY;function qY(e){KY=e}function JY(){return KY}var YY=e=>
vendor: 7,050 bytes, line 343
343{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},XY=[];function $(e,t){let n=JY(),r=YY({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===GY?void 0:GY].filter(e=>!!e)});e.common.issues.push(r)}var ZY=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return QY;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return QY;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},QY=Object.freeze({status:`aborted`}),$Y=e=>({status:`dirty`,value:e}),eX=e=>({status:`valid`,value:e}),tX=e=>e.status===`aborted`,nX=e=>e.status===`dirty`,rX=e=>e.status===`valid`,iX=e=>typeof Promise<`u`&&e instanceof Promise;function aX(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function oX(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var sX;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(sX||={});var cX,lX,uX=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},dX=(e,t)=>{if(rX(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new WY(e.common.issues);return this._error=t,this._error}}};function fX(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var pX=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return HY(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:HY(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ZY,ctx:{common:e.parent.common,data:e.data,parsedType:HY(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(iX(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:HY(e)};return dX(n,this._parseSync({data:e,path:n.path,parent:n}))}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:HY(e)},r=this._parse({data:e,path:n.path,parent:n});return dX(n,await(iX(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Q.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new uZ({schema:this,typeName:SZ.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return dZ.create(this,this._def)}nullable(){return fZ.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return GX.create(this,this._def)}promise(){return lZ.create(this,this._def)}or(e){return JX.create([this,e],this._def)}and(e){return QX.create(this,e,this._def)}transform(e){return new uZ({...fX(this._def),schema:this,typeName:SZ.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new pZ({...fX(this._def),innerType:this,defaultValue:t,typeName:SZ.ZodDefault})}brand(){return new _Z({typeName:SZ.ZodBranded,type:this,...fX(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new mZ({...fX(this._def),innerType:this,catchValue:t,typeName:SZ.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return vZ.create(this,e)}readonly(){return yZ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mX=/^c[^\s-]{8,}
vendor: 8,086 bytes, line 343
343$/i,hX=/^[0-9a-z]+$/,gX=/^[0-9A-HJKMNP-TV-Z]{26}$/,_X=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,vX=/^[a-z0-9_-]{21}$/i,yX=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bX=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xX=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,SX,CX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wX=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,TX=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,EX=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,DX=RegExp(`^${EX}$`);function OX(e){let t=`([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`),t}function kX(e){return RegExp(`^${OX(e)}$`)}function AX(e){let t=`${EX}T${OX(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function jX(e,t){return!!((t===`v4`||!t)&&CX.test(e)||(t===`v6`||!t)&&wX.test(e))}var MX=class e extends pX{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Z.string){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.string,received:t.parsedType}),QY}let t=new ZY,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:Q.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:Q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?$(n,{code:Q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&$(n,{code:Q.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)bX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`email`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)SX||=new RegExp(xX,`u`),SX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`emoji`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)_X.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`uuid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)vX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`nanoid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)mX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`cuid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)hX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`cuid2`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)gX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`ulid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),$(n,{validation:`url`,code:Q.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`regex`,code:Q.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),$(n,{code:Q.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),$(n,{code:Q.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),$(n,{code:Q.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?AX(r).test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{code:Q.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?DX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{code:Q.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?kX(r).test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{code:Q.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?yX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`duration`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?jX(e.data,r.version)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`ip`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?TX.test(e.data)||(n=this._getOrReturnCtx(e,n),$(n,{validation:`base64`,code:Q.invalid_string,message:r.message}),t.dirty()):BY.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Q.invalid_string,...sX.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...sX.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...sX.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...sX.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...sX.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...sX.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...sX.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...sX.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...sX.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...sX.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...sX.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...sX.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...sX.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...sX.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...sX.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...sX.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...sX.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...sX.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...sX.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...sX.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...sX.errToObj(t)})}nonempty(e){return this.min(1,sX.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}
vendor: 23,521 bytes, line 343
343get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};MX.create=e=>new MX({checks:[],typeName:SZ.ZodString,coerce:e?.coerce??!1,...fX(e)});function NX(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(`.`,``))%parseInt(t.toFixed(i).replace(`.`,``))/10**i}var PX=class e extends pX{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Z.number){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.number,received:t.parsedType}),QY}let t,n=new ZY;for(let r of this._def.checks)r.kind===`int`?BY.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),$(t,{code:Q.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:Q.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:Q.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?NX(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),$(t,{code:Q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),$(t,{code:Q.not_finite,message:r.message}),n.dirty()):BY.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,sX.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,sX.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,sX.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,sX.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:sX.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:sX.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:sX.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:sX.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:sX.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:sX.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:sX.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:sX.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:sX.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:sX.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&BY.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};PX.create=e=>new PX({checks:[],typeName:SZ.ZodNumber,coerce:e?.coerce||!1,...fX(e)});var FX=class e extends pX{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Z.bigint){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.bigint,received:t.parsedType}),QY}let t,n=new ZY;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:Q.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),$(t,{code:Q.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),$(t,{code:Q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):BY.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,sX.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,sX.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,sX.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,sX.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:sX.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:sX.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:sX.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:sX.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:sX.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:sX.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};FX.create=e=>new FX({checks:[],typeName:SZ.ZodBigInt,coerce:e?.coerce??!1,...fX(e)});var IX=class extends pX{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Z.boolean){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.boolean,received:t.parsedType}),QY}return eX(e.data)}};IX.create=e=>new IX({typeName:SZ.ZodBoolean,coerce:e?.coerce||!1,...fX(e)});var LX=class e extends pX{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Z.date){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.date,received:t.parsedType}),QY}if(isNaN(e.data.getTime()))return $(this._getOrReturnCtx(e),{code:Q.invalid_date}),QY;let t=new ZY,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:Q.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),$(n,{code:Q.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):BY.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:sX.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:sX.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};LX.create=e=>new LX({checks:[],coerce:e?.coerce||!1,typeName:SZ.ZodDate,...fX(e)});var RX=class extends pX{_parse(e){if(this._getType(e)!==Z.symbol){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.symbol,received:t.parsedType}),QY}return eX(e.data)}};RX.create=e=>new RX({typeName:SZ.ZodSymbol,...fX(e)});var zX=class extends pX{_parse(e){if(this._getType(e)!==Z.undefined){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.undefined,received:t.parsedType}),QY}return eX(e.data)}};zX.create=e=>new zX({typeName:SZ.ZodUndefined,...fX(e)});var BX=class extends pX{_parse(e){if(this._getType(e)!==Z.null){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.null,received:t.parsedType}),QY}return eX(e.data)}};BX.create=e=>new BX({typeName:SZ.ZodNull,...fX(e)});var VX=class extends pX{constructor(){super(...arguments),this._any=!0}_parse(e){return eX(e.data)}};VX.create=e=>new VX({typeName:SZ.ZodAny,...fX(e)});var HX=class extends pX{constructor(){super(...arguments),this._unknown=!0}_parse(e){return eX(e.data)}};HX.create=e=>new HX({typeName:SZ.ZodUnknown,...fX(e)});var UX=class extends pX{_parse(e){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.never,received:t.parsedType}),QY}};UX.create=e=>new UX({typeName:SZ.ZodNever,...fX(e)});var WX=class extends pX{_parse(e){if(this._getType(e)!==Z.undefined){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.void,received:t.parsedType}),QY}return eX(e.data)}};WX.create=e=>new WX({typeName:SZ.ZodVoid,...fX(e)});var GX=class e extends pX{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==Z.array)return $(t,{code:Q.invalid_type,expected:Z.array,received:t.parsedType}),QY;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&($(t,{code:e?Q.too_big:Q.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&($(t,{code:Q.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&($(t,{code:Q.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new uX(t,e,t.path,n)))).then(e=>ZY.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new uX(t,e,t.path,n)));return ZY.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:sX.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:sX.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:sX.toString(n)}})}nonempty(e){return this.min(1,e)}};GX.create=(e,t)=>new GX({type:e,minLength:null,maxLength:null,exactLength:null,typeName:SZ.ZodArray,...fX(t)});function KX(e){if(e instanceof qX){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=dZ.create(KX(r))}return new qX({...e._def,shape:()=>t})}else if(e instanceof GX)return new GX({...e._def,type:KX(e.element)});else if(e instanceof dZ)return dZ.create(KX(e.unwrap()));else if(e instanceof fZ)return fZ.create(KX(e.unwrap()));else if(e instanceof $X)return $X.create(e.items.map(e=>KX(e)));else return e}var qX=class e extends pX{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=BY.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Z.object){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.object,received:t.parsedType}),QY}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof UX&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new uX(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof UX){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&($(n,{code:Q.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new uX(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>ZY.mergeObjectSync(t,e)):ZY.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return sX.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{var r;let i=(r=this._def).errorMap?.call(r,e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:sX.errToObj(t).message??i}:{message:i}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:SZ.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return BY.objectKeys(t).forEach(e=>{t[e]&&this.shape[e]&&(n[e]=this.shape[e])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return BY.objectKeys(this.shape).forEach(e=>{t[e]||(n[e]=this.shape[e])}),new e({...this._def,shape:()=>n})}deepPartial(){return KX(this)}partial(t){let n={};return BY.objectKeys(this.shape).forEach(e=>{let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}),new e({...this._def,shape:()=>n})}required(t){let n={};return BY.objectKeys(this.shape).forEach(e=>{if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof dZ;)t=t._def.innerType;n[e]=t}}),new e({...this._def,shape:()=>n})}keyof(){return oZ(BY.objectKeys(this.shape))}};qX.create=(e,t)=>new qX({shape:()=>e,unknownKeys:`strip`,catchall:UX.create(),typeName:SZ.ZodObject,...fX(t)}),qX.strictCreate=(e,t)=>new qX({shape:()=>e,unknownKeys:`strict`,catchall:UX.create(),typeName:SZ.ZodObject,...fX(t)}),qX.lazycreate=(e,t)=>new qX({shape:e,unknownKeys:`strip`,catchall:UX.create(),typeName:SZ.ZodObject,...fX(t)});var JX=class extends pX{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new WY(e.ctx.common.issues));return $(t,{code:Q.invalid_union,unionErrors:n}),QY}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new WY(e));return $(t,{code:Q.invalid_union,unionErrors:i}),QY}}get options(){return this._def.options}};JX.create=(e,t)=>new JX({options:e,typeName:SZ.ZodUnion,...fX(t)});var YX=e=>e instanceof iZ?YX(e.schema):e instanceof uZ?YX(e.innerType()):e instanceof aZ?[e.value]:e instanceof sZ?e.options:e instanceof cZ?BY.objectValues(e.enum):e instanceof pZ?YX(e._def.innerType):e instanceof zX?[void 0]:e instanceof BX?[null]:e instanceof dZ?[void 0,...YX(e.unwrap())]:e instanceof fZ?[null,...YX(e.unwrap())]:e instanceof _Z||e instanceof yZ?YX(e.unwrap()):e instanceof mZ?YX(e._def.innerType):[],XX=class e extends pX{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Z.object)return $(t,{code:Q.invalid_type,expected:Z.object,received:t.parsedType}),QY;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):($(t,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),QY)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=YX(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:SZ.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...fX(r)})}};function ZX(e,t){let n=HY(e),r=HY(t);if(e===t)return{valid:!0,data:e};if(n===Z.object&&r===Z.object){let n=BY.objectKeys(t),r=BY.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ZX(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===Z.array&&r===Z.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ZX(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===Z.date&&r===Z.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var QX=class extends pX{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(tX(e)||tX(r))return QY;let i=ZX(e.value,r.value);return i.valid?((nX(e)||nX(r))&&t.dirty(),{status:t.value,value:i.data}):($(n,{code:Q.invalid_intersection_types}),QY)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};QX.create=(e,t,n)=>new QX({left:e,right:t,typeName:SZ.ZodIntersection,...fX(n)});var $X=class e extends pX{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Z.array)return $(n,{code:Q.invalid_type,expected:Z.array,received:n.parsedType}),QY;if(n.data.length<this._def.items.length)return $(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),QY;!this._def.rest&&n.data.length>this._def.items.length&&($(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new uX(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>ZY.mergeArray(t,e)):ZY.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};$X.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new $X({items:e,typeName:SZ.ZodTuple,rest:null,...fX(t)})};var eZ=class e extends pX{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Z.object)return $(n,{code:Q.invalid_type,expected:Z.object,received:n.parsedType}),QY;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new uX(n,e,n.path,e)),value:a._parse(new uX(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?ZY.mergeObjectAsync(t,r):ZY.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof pX?new e({keyType:t,valueType:n,typeName:SZ.ZodRecord,...fX(r)}):new e({keyType:MX.create(),valueType:t,typeName:SZ.ZodRecord,...fX(n)})}},tZ=class extends pX{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Z.map)return $(n,{code:Q.invalid_type,expected:Z.map,received:n.parsedType}),QY;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new uX(n,e,n.path,[a,`key`])),value:i._parse(new uX(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return QY;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return QY;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};tZ.create=(e,t,n)=>new tZ({valueType:t,keyType:e,typeName:SZ.ZodMap,...fX(n)});var nZ=class e extends pX{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Z.set)return $(n,{code:Q.invalid_type,expected:Z.set,received:n.parsedType}),QY;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&($(n,{code:Q.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&($(n,{code:Q.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return QY;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new uX(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:sX.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:sX.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};nZ.create=(e,t)=>new nZ({valueType:e,minSize:null,maxSize:null,typeName:SZ.ZodSet,...fX(t)});var rZ=class e extends pX{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Z.function)return $(t,{code:Q.invalid_type,expected:Z.function,received:t.parsedType}),QY;function n(e,n){return YY({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,JY(),GY].filter(e=>!!e),issueData:{code:Q.invalid_arguments,argumentsError:n}})}function r(e,n){return YY({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,JY(),GY].filter(e=>!!e),issueData:{code:Q.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof lZ){let e=this;return eX(async function(...t){let o=new WY([]),s=await e._def.args.parseAsync(t,i).c
vendor: 1,527 bytes, line 343
343atch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return eX(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new WY([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new WY([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:$X.create(t).rest(HX.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||$X.create([]).rest(HX.create()),returns:n||HX.create(),typeName:SZ.ZodFunction,...fX(r)})}},iZ=class extends pX{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};iZ.create=(e,t)=>new iZ({getter:e,typeName:SZ.ZodLazy,...fX(t)});var aZ=class extends pX{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return $(t,{received:t.data,code:Q.invalid_literal,expected:this._def.value}),QY}return{status:`valid`,value:e.data}}get value(){return this._def.value}};aZ.create=(e,t)=>new aZ({value:e,typeName:SZ.ZodLiteral,...fX(t)});function oZ(e,t){return new sZ({values:e,typeName:SZ.ZodEnum,...fX(t)})}var sZ=class e extends pX{constructor(){super(...arguments),cX.set(this,void 0)}
343_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return $(t,{expected:BY.joinValues(n),received:t.parsedType,code:Q.invalid_type}),QY}if(aX(this,cX,`f`)||oX(this,cX,new Set(this._def.values),`f`),!aX(this,cX,`f`).has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return $(t,{received:t.data,code:Q.invalid_enum_value,options:n}),QY}return eX(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};cX=new WeakMap,sZ.create=oZ;var cZ=class extends pX{constructor(){super(...arguments),lX.set(this,void 0)}_parse(e){let t=BY.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Z.string&&n.parsedType!==Z.number){let e=BY.objectValues(t);return $(n,{expected:BY.joinValues(e),received:n.parsedType,code:Q.invalid_type}),QY}if(aX(this,lX,`f`)||oX(this,lX,new Set(BY.getValidEnumValues(this._def.values)),`f`),!aX(this,lX,`f`).has(e.data)){let e=BY.objectValues(t);return $(n,{received:n.data,code:Q.invalid_enum_value,options:e}),QY}return eX(e.data)}get enum(){return this._def.values}};lX=new WeakMap,cZ.create=(e,t)=>new cZ({values:e,typeName:SZ.ZodNativeEnum,...fX(t)});var lZ=class extends pX{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==Z.promise&&t.common.async===!1?($(t,{code:Q.invalid_type,expected:Z.promise,received:t.parsedType}),QY):eX((t.parsedType===Z.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};lZ.create=(e,t)=>new lZ({type:e,typeName:SZ.ZodPromise,...fX(t)});var uZ=class extends pX{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===SZ.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{$(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return QY;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?QY:r.status===`dirty`||t.value===`dirty`?$Y(r.value):r});{if(t.value===`aborted`)return QY;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?QY:r.status===`dirty`||t.value===`dirty`?$Y(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?QY:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?QY:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!rX(e))return e;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>rX(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);BY.assertNever(r)}};uZ.create=(e,t,n)=>new uZ({schema:e,typeName:SZ.ZodEffects,effect:t,...fX(n)}),uZ.createWithPreprocess=(e,t,n)=>new uZ({schema:t,effect:{type:`preprocess`,transform:e},typeName:SZ.ZodEffects,...fX(n)});var dZ=class extends pX{_parse(e){return this._getType(e)===Z.undefined?eX(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};dZ.create=(e,t)=>
343new dZ({innerType:e,typeName:SZ.ZodOptional,...fX(t)});var fZ=class extends pX{_parse(e){return this._getType(e)===Z.null?eX(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fZ.create=(e,t)=>new fZ({innerType:e,typeName:SZ.ZodNullable,...fX(t)});var pZ=class extends pX{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===Z.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};pZ.create=(e,t)=>new pZ({innerType:e,typeName:SZ.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...fX(t)});var mZ=class extends pX{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return iX(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new WY(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new WY(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mZ.create=(e,t)=>new mZ({innerType:e,typeName:SZ.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...fX(t)});var hZ=class extends pX{_parse(e){if(this._getType(e)!==Z.nan){let t=this._getOrReturnCtx(e);return $(t,{code:Q.invalid_type,expected:Z.nan,received:t.parsedType}),QY}return{status:`valid`,value:e.data}}};hZ.create=e=>new hZ({typeName:SZ.ZodNaN,...fX(e)});var gZ=Symbol(`zod_brand`),_Z=class extends pX{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},vZ=class e extends pX{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?QY:e.status===`dirty`?(t.dirty(),$Y(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?QY:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:SZ.ZodPipeline})}},yZ=class extends pX{_parse(e){let t=this._def.innerType._parse(e),n=e=>(rX(e)&&(e.value=Object.freeze(e.value)),e);return iX(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};yZ.create=(e,t)=>new yZ({innerType:e,typeName:SZ.ZodReadonly,...fX(t)});function bZ(e,t={},n){return e?VX.create().superRefine((r,i)=>{if(!e(r)){let e=typeof t==`function`?t(r):typeof t==`string`?{message:t}:t,a=e.fatal??n??!0,o=typeof e==`string`?{message:e}:e;i.addIssue({code:`custom`,...o,fatal:a})}}):VX.create()}var xZ={object:qX.lazycreate},SZ;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(SZ||={});var CZ=(e,t={message:`Input not instance of ${e.name}`})=>bZ(t=>t instanceof e,t),wZ=MX.create,TZ=PX.create,EZ=hZ.create,DZ=FX.create,OZ=IX.create,kZ=LX.create,AZ=RX.create,jZ=zX.create,MZ=BX.create,NZ=VX.create,PZ=HX.create,FZ=UX.create,IZ=WX.create,LZ=GX.create,RZ=qX.create,zZ=qX.strictCreate,BZ=JX.create,VZ=XX.create,HZ=QX.create,UZ=$X.create,WZ=eZ.create,GZ=tZ.create,KZ=nZ.create,qZ=rZ.create,JZ=iZ.create,YZ=aZ.create,XZ=sZ.create,ZZ=cZ.create,QZ=lZ.create,$Z=uZ.create,eQ=dZ.create,tQ=fZ.create,nQ=uZ.createWithPreprocess,rQ=vZ.create,iQ=Object.freeze({__proto__:null,defaultErrorMap:GY,setErrorMap:qY,getErrorMap:JY,makeIssue:YY,EMPTY_PATH:XY,addIssueToContext:$,ParseStatus:ZY,INVALID:QY,DIRTY:$Y,OK:eX,isAborted:tX,isDirty:nX,isValid:rX,isAsync:iX,get util(){return BY},get objectUtil(){return VY},ZodParsedType:Z,getParsedType:HY,ZodType:pX,datetimeRegex:AX,ZodString:MX,ZodNumber:PX,ZodBigInt:FX,ZodBoolean:IX,ZodDate:LX,ZodSymbol:RX,ZodUndefined:zX,ZodNull:BX,ZodAny:VX,ZodUnknown:HX,ZodNever:UX,ZodVoid:WX,ZodArray:GX,ZodObject:qX,ZodUnion:JX,ZodDiscriminatedUnion:XX,ZodIntersection:QX,ZodTuple:$X,ZodRecord:eZ,ZodMap:tZ,ZodSet:nZ,ZodFunction:rZ,ZodLazy:iZ,ZodLiteral:aZ,ZodEnum:sZ,ZodNativeEnum:cZ,ZodPromise:lZ,ZodEffects:uZ,ZodTransformer:uZ,ZodOptional:dZ,ZodNullable:fZ,ZodDefault:pZ,ZodCatch:mZ,ZodNaN:hZ,BRAND:gZ,ZodBranded:_Z,ZodPipeline:vZ,ZodReadonly:yZ,custom:bZ,Schema:pX,ZodSchema:pX,late:xZ,get ZodFirstPartyTypeKind(){return SZ},coerce:{string:(e=>MX.create({...e,coerce:!0})),number:(e=>PX.create({...e,coerce:!0})),boolean:(e=>IX.create({...e,coerce:!0})),bigint:(e=>FX.create({...e,coerce:!0})),date:(e=>LX.create({...e,coerce:!0}))},any:NZ,array:LZ,bigint:DZ,boolean:OZ,date:kZ,discriminatedUnion:VZ,effect:$Z,enum:XZ,function:qZ,instanceof:CZ,intersection:HZ,lazy:JZ,literal:YZ,map:GZ,nan:EZ,nativeEnum:ZZ,never:FZ,null:MZ,nullable:tQ,number:TZ,object:RZ,oboolean:()=>OZ().optional(),onumber:()=>TZ().optional(),optional:eQ,ostring:()=>wZ().optional(),pipeline:rQ,preprocess:nQ,promise:QZ,record:WZ,set:KZ,strictObject:zZ,string:wZ,symbol:AZ,transformer:$Z,tuple:UZ,undefined:jZ,union:BZ,unknown:PZ,void:IZ,NEVER:QY,ZodIssueCode:Q,quotelessJson:UY,ZodError:WY}),aQ=[`Junior Clinics`,`Junior Summer Camps`,`Ladies Clinic`],oQ=RZ({firstName:wZ().min(2,{message:`First name must be at least 2 characters.`}),lastName:wZ().min(2,{message:`Last name must be at least 2 characters.`}),email:wZ().email({message:`Please enter a valid email address.`}),phone:wZ().min(10,{message:`Please enter a valid phone number.`}),participantName:wZ().optional(),participantAge:wZ().optional(),lessonType:wZ(),clinicMonth:wZ().optional(),clinicTime:wZ().optional(),notes:wZ().optional(),agreeToTerms:OZ().refine(e=>e===!0,{message:`You must agree to the terms and conditions.`})}).superRefine((e,t)=>
343{e.lessonType===`Junior Clinics`&&(e.clinicMonth||t.addIssue({code:Q.custom,message:`Please select a month.`,path:[`clinicMonth`]}),e.clinicTime||t.addIssue({code:Q.custom,message:`Please select a time slot.`,path:[`clinicTime`]}))}),sQ=({defaultLessonType:e=``})=>{let{toast:t}=hC(),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(!1),o=iJ({resolver:zY(oQ),defaultValues:{firstName:``,lastName:``,email:``,phone:``,participantName:``,participantAge:``,lessonType:e,clinicMonth:``,clinicTime:``,notes:``,agreeToTerms:!1}}),s=o.watch(`lessonType`),c=o.watch(`clinicMonth`),l=s.toLowerCase().includes(`junior`),u=async e=>{r(!0);try{let n=`[email protected]`;switch(e.lessonType){case`Junior Clinics`:case`Ladies Clinic`:n=`[email protected]`;break;case`Junior Summer Camps`:n=`[email protected]`;break;default:n=`[email protected]`}let r={to:n,from:`[email protected]`,subject:`Lesson Registration: ${e.lessonType}`,replyTo:e.email,name:`${e.firstName} ${e.lastName}`,email:e.email,phone:e.phone,message:` 344Lesson Type: ${e.lessonType} 345${e.clinicMonth?`Month: ${e.clinicMonth}`:``} 346${e.clinicTime?`Time Slot: ${e.clinicTime}`:``} 347${e.participantName?`Participant Name: ${e.participantName}`:``} 348${e.participantAge?`Participant Age: ${e.participantAge}`:``} 349 350Additional Notes: 351${e.notes||`None provided`} 352 `.trim()};if(!(await fetch(`https://hook.us1.make.com/0amxmnlcl1jsfetx66qa8pru89wdedfr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})).ok)throw Error(`Failed to send registration. Please try again or contact us directly.`);NY({formType:`lesson_registration`,name:`${e.firstName} ${e.lastName}`,email:e.email,phone:e.phone,subject:e.lessonType,formData:e}),t({title:`Registration Submitted!`,description:`Thank you for your registration. We will contact you shortly to confirm.`}),o.reset(),a(!0)}catch(e){console.error(`Error sending registration:`,e),t({title:`Error`,description:`There was a problem submitting your registration. Please try again later.`,variant:`destructive`})}finally{r(!1)}};return i?(0,M.jsxs)(`div`,{className:`w-full bg-white rounded-lg shadow-lg p-6 md:p-8 text-center`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold mb-4 text-golf-green`,children:`Registration Submitted!`}),(0,M.jsx)(`p`,{className:`mb-6`,children:`Thank you for your registration. We will contact you shortly to confirm your lesson.`}),(0,M.jsx)(R,{onClick:()=>a(!1),className:`bg-golf-green hover:bg-golf-green-dark`,children:`Submit Another Registration`})]}):(0,M.jsx)(`div`,{className:`w-full`,children:(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-lg p-6 md:p-8`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold mb-6 text-golf-green`,children:`Register for a Golf Lesson`}),(0,M.jsx)(uJ,{...o,children:(0,M.jsxs)(`form`,{onSubmit:o.handleSubmit(u),className:`space-y-6`,children:[(0,M.jsx)(fJ,{control:o.control,name:`lessonType`,render:({field:e})=>(0,M.jsxs)(hJ,{className:`space-y-3`,children:[(0,M.jsx)(gJ,{children:`Select Lesson Type`}),(0,M.jsx)(_J,{children:(0,M.jsx)(jY,{onValueChange:e.onChange,defaultValue:e.value,className:`flex flex-col space-y-1`,children:aQ.map(t=>(0,M.jsxs)(hJ,{className:`flex items-center space-x-3 space-y-0`,children:[(0,M.jsx)(_J,{children:(0,M.jsx)(MY,{value:t,checked:e.value===t})}),(0,M.jsx)(gJ,{className:`font-normal cursor-pointer`,children:t})]},t))})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(fJ,{control:o.control,name:`firstName`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`First Name`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:o.control,name:`lastName`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Last Name`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{...e})}),(0,M.jsx)(yJ,{})]})})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(fJ,{control:o.control,name:`email`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Email`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{type:`email`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:o.control,name:`phone`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Phone`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{...e})}),(0,M.jsx)(yJ,{})]})})]}),l&&(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(fJ,{control:o.control,name:`participantName`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Participant Name (if different)`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:o.control,name:`participantAge`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Participant Age`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{...e})}),(0,M.jsx)(yJ,{})]})})]}),s===`Junior Clinics`&&(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(fJ,{control:o.control,name:`clinicMonth`,render:({field:e})=>(0,M.jsxs)(hJ,{className:`space-y-3`,children:[(0,M.jsxs)(gJ,{children:[`Preferred Month `,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(_J,{children:(0,M.jsx)(jY,{onValueChange:e.onChange,value:e.value,className:`flex flex-col space-y-1`,children:[`May`,`June`].map(e=>(0,M.jsxs)(hJ,{className:`flex items-center space-x-3 space-y-0`,children:[(0,M.jsx)(_J,{children:(0,M.jsx)(MY,{value:e})}),(0,M.jsx)(gJ,{className:`font-normal cursor-pointer`,children:e})]},e))})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:o.control,name:`clinicTime`,render:({field:e})=>(0,M.jsxs)(hJ,{className:`space-y-3`,children:[(0,M.jsxs)(gJ,{children:[`Preferred Time `,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(_J,{children:(0,M.jsx)(jY,{onValueChange:e.onChange,value:e.value,className:`flex flex-col space-y-1`,children:[{value:`4:00pm`,label:`4:00pm`,note:`Girls only`},{value:`5:00pm`,label:`5:00pm`,note:``},{value:`6:00pm`,label:`6:00pm`,note:``}].map(({value:e,label:t,note:n})=>{let r=e===`6:00pm`&&c===`June`;return(0,M.jsxs)(hJ,{className:`flex items-center space-x-3 space-y-0`,children:[(0,M.jsx)(_J,{children:(0,M.jsx)(MY,{value:e,disabled:r})}),(0,M.jsxs)(gJ,{className:`font-normal ${r?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,children:[t,n&&(0,M.jsxs)(`span`,{className:`ml-2 text-xs text-golf-green font-medium`,children:[`(`,n,`)`]}),r&&(0,M.jsx)(`span`,{className:`ml-2 text-xs text-red-500 font-medium`,children:`Sold Out`})]})]},e)})})}),(0,M.jsx)(yJ,{})]})})]}),(0,M.jsx)(fJ,{control:o.control,name:`notes`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Additional Notes`}),(0,M.jsx)(_J,{children:(0,M.jsx)(xJ,{className:`min-h-[120px]`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsxs)(`div`,{className:`bg-golf-sand/20 p-4 rounded-md`,children:[(0,M.jsx)(`p`,{className:`text-golf-green font-medium`,children:`Payment Information:`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`You can pay for your lesson in person at the Golf Shop or Main Office.`})]}),(0,M.jsx)(fJ,{control:o.control,name:`agreeToTerms`,render:({field:e})=>(0,M.jsxs)(hJ,{className:`flex flex-row items-start space-x-3 space-y-0`,children:[(0,M.jsx)(_J,{children:(0,M.jsx)(FJ,{checked:e.value,onCheckedChange:e.onChange})}),(0,M.jsxs)(`div`,{className:`space-y-1 leading-none`,children:[(0,M.jsx)(gJ,{children:`I agree to the terms and conditions`}),(0,M.jsx)(vJ,{children:`By submitting this form, you agree to our privacy policy.`}),(0,M.jsx)(yJ,{})]})]})}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark`,disabled:n,children:n?`Submitting...`:`Register Now`})]})})]})})},cQ=()=>{let[e,t]=_.useState(``),n=(0,_.useRef)(null);return(0,M.jsxs)(`main`,{className:`min-h-screen`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Golf Lessons | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Improve your golf skills with professional lessons at Belvedere Golf Club. We offer junior clinics, summer camps, ladies clinics and more.`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jG,{onRegister:e=>{t(e),setTimeout(()=>{n.current?.scrollIntoView({behavior:`smooth`})},100)}}),(0,M.jsx)(`div`,{ref:n,className:`container mx-auto mt-12 px-4 md:px-0`,children:(0,M.jsxs)(`div`,{className:`max-w-3xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`text-3xl font-playfair font-bold mb-8 text-center text-golf-green`,children:`Registration Form`}),(0,M.jsx)(sQ,{defaultLessonType:e})]})})]})]})},lQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`div`,{className:`relative w-full overflow-auto`,children:(0,M.jsx)(`table`,{ref:n,className:F(`w-full caption-bottom text-sm`,e),...t})}));lQ.displayName=`Table`;var uQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`thead`,{ref:n,className:F(`[&_tr]:border-b`,e),...t}));uQ.displayName=`TableHeader`;var dQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`tbody`,{ref:n,className:F(`[&_tr:last-child]:border-0`,e),...t}));dQ.displayName=`TableBody`;var fQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`tfoot`,{ref:n,className:F(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));fQ.displayName=`TableFooter`;var pQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`tr`,{ref:n,className:F(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));pQ.displayName=`TableRow`;var mQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`th`,{ref:n,className:F(`h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0`,e),...t}));mQ.displayName=`TableHead`;var hQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`td`,{ref:n,className:F(`p-4 align-middle [&:has([role=checkbox])]:pr-0`,e),...t}));hQ.displayName=`TableCell`;var gQ=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(`caption`,{ref:n,className:F(`mt-4 text-sm text-muted-foreground`,e),...t}));gQ.displayName=`TableCaption`;var _Q=()=>{let[e,t]=(0,_.useState)(`adult`);return(0,M.jsxs)(`main`,{className:`min-h-screen bg-white`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pt-28 pb-16 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-4 text-golf-green`,children:`Membership Options`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 max-w-3xl mx-auto`,children:`Join our distinguished community of golf enthusiasts and experience the exclusive benef
352its of being a Belvedere member.`})]})})}),(0,M.jsx)(`div`,{className:`bg-golf-green text-white py-6 mb-12`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 text-center`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl font-bold`,children:`2026 Membership Pricing`}),(0,M.jsx)(`p`,{className:`mt-2 opacity-90`,children:`All prices are subject to HST. Food and Beverage minimum spend is HST exempt.`})]})}),(0,M.jsx)(`section`,{className:`mb-12`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4`,children:(0,M.jsx)(`div`,{className:`flex flex-wrap gap-3 justify-center`,children:[{id:`adult`,label:`Adult`},{id:`senior`,label:`Super Senior`},{id:`intermediate`,label:`Intermediate`},{id:`junior`,label:`Junior`},{id:`services`,label:`Additional Services`}].map(n=>(0,M.jsxs)(R,{variant:e===n.id?`default`:`outline`,className:`${e===n.id?`bg-golf-green`:`border-golf-green text-golf-green`} mb-2`,onClick:()=>t(n.id),children:[n.label,` Memberships`]},n.id))})})}),(0,M.jsx)(`section`,{className:`py-8`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[e===`adult`&&(0,M.jsxs)(`div`,{className:`mb-12 animate-fade-in`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-6 text-golf-green text-center`,children:`Adult Membership`}),(0,M.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-8 max-w-5xl mx-auto`,children:[(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green text-white`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Adult Silver`}),(0,M.jsx)(Um,{className:`text-white/90`,children:`Full golf privileges with customizable service options`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Full Golf Privileges`,`May attend AGM with voting privileges`,`Opportunity to serve on the Board and Committees`,`Guest fee $75.00 (Peak Season)`,`Guest fee $55.00 (Non Peak)`,`7 Day booking privileges`,`includes $300 Food and Beverage Minimum Spend`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$2,283.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]}),(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green text-white`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Adult Silver with Golf Car`}),(0,M.jsx)(Um,{className:`text-white/90`,children:`Full golf privileges with season golf car included`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Full Golf Privileges`,`Season Golf Car (1 seat)`,`May attend AGM with voting privileges`,`Opportunity to serve on the Board and Committees`,`Guest fee $75.00 (Peak Season)`,`Guest fee $55.00 (Non Peak)`,`7 Day booking privileges`,`includes $300 Food and Beverage Minimum Spend`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$3,043.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]})]})]}),e===`senior`&&(0,M.jsxs)(`div`,{className:`mb-12 animate-fade-in`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-6 text-golf-green text-center`,children:`Super Senior Membership`}),(0,M.jsx)(`p`,{className:`text-center text-gray-700 mb-8 max-w-3xl mx-auto`,children:`Golf is one of those games you can enjoy throughout your lifetime. We offer a special reduced rate for seniors 80 years of age or older.`}),(0,M.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-8 max-w-5xl mx-auto`,children:[(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-sand-dark text-golf-green`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Super Senior 2026 with cart`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`For members 80 years of age or older`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`80 years of age or older`,`Full Golf Privileges`,`May attend AGM with voting privileges`,`Opportunity to serve on the Board and Committees`,`Guest fee $75.00 (Peak Season)`,`Guest fee $55.00 (Non Peak)`,`7 Day booking privileges`,`Season Golf Cart (1 seat)`,`includes $300 Food and Beverage Minimum Spend`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$2,393.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]}),(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-sand-dark text-golf-green`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Super Senior 2026 no cart`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`For members 80 years of age or older`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`80 years of age or older`,`Full Golf Privileges`,`May attend AGM with voting privileges`,`Opportunity to serve on the Board and Committees`,`Guest fee $75.00 (Peak Season)`,`Guest fee $55.00 (Non Peak)`,`7 Day booking privileges`,`includes $300 Food and Beverage Minimum Spend`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$1,868.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]})]})]}),e===`intermediate`&&(0,M.jsxs)(`div`,{className:`mb-12 animate-fade-in`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-6 text-golf-green text-center`,children:`Intermediate Memberships`}),(0,M.jsx)(`p`,{className:`text-center text-gray-700 mb-8 max-w-3xl mx-auto`,children:`We are delighted to encourage young adults to pick up or continue playing our favorite game with reduced priced memberships.`}),(0,M.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-8 max-w-5xl mx-auto`,children:[(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-wood text-white`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Intermediate 19-25`}),(0,M.jsx)(Um,{className:`text-white/90`,children:`Cannot be 26 before April 15th`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Cannot be 26 before April 15th`,`Full Golf Privileges`,`May attend AGM with voting privileges`,`Opportunity to serve on the Board and Committees`,`Guest fee $75.00 (Peak Season)`,`Guest fee $55.00 (Non Peak)`,`7 Day booking privileges`,`includes $300 Food and Beverage Minimum Spend`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$1,393.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]}),(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-wood text-white`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Intermediate 26-30`}),(0,M.jsx)(Um,{className:`text-white/90`,children:`Cannot be 31 before April 15th`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Cannot be 31 before April 15th`,`Full Golf Privileges`,`May attend AGM with voting privileges`,`Opportunity to serve on the Board and Committees`,`Guest fee $75.00 (Peak Season)`,`Guest fee $55.00 (Non Peak)`,`7 Day booking privileges`,`includes $300 Food and Beverage Minimum Spend`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$1,603.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]})]})]}),e===`junior`&&(0,M.jsxs)(`div`,{className:`mb-12 animate-fade-in`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-6 text-golf-green text-center`,children:`Junior Memberships`}),(0,M.jsxs)(`div`,{className:`grid md:grid-cols-3 gap-6 max-w-6xl mx-auto`,children:[(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green/20 text-golf-green`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-xl`,children:`Junior 6-9`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`Cannot be 10 before July 1st`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Must be accompanied by at least one adult`,`Monday to Frid
352ay: after 5:00 PM`,`Saturday and Sunday: after 2:00 PM`,`7 Day Booking Privileges`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700 text-sm`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-lg font-bold text-gray-900`,children:[`$408.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]}),(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green/20 text-golf-green`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-xl`,children:`Junior 10-11`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`Must be 10 before July 1st`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Monday to Thursday: after 10:00 AM`,`Friday: before 12:00 PM or after 5:00 PM`,`Saturday, Sunday & Holidays: after 10:00 AM`,`7 Day Booking Privileges`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700 text-sm`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-lg font-bold text-gray-900`,children:[`$568.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]}),(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green/20 text-golf-green`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-xl`,children:`Junior 12-18`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`Cannot be 19 before July 1st`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3 mb-6`,children:[`Monday to Thursday: after 10:00 AM`,`Friday: before 12:00 PM or after 5:00 PM`,`Saturday, Sunday & Holidays: after 10:00 AM`,`7 Day Booking Privileges`,`includes Golf Canada Membership`].map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700 text-sm`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-lg font-bold text-gray-900`,children:[`$778.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]})]}),(0,M.jsx)(`div`,{className:`max-w-6xl mx-auto mt-8`,children:(0,M.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg border border-golf-green/20 bg-golf-sand/25 shadow-sm`,children:[(0,M.jsx)(`div`,{className:`absolute inset-y-0 left-0 w-1.5 bg-golf-green`,"aria-hidden":`true`}),(0,M.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-center gap-6 p-6 md:p-8 pl-8 md:pl-10`,children:[(0,M.jsx)(`div`,{className:`flex-shrink-0 self-start rounded-full bg-golf-green/10 p-4`,children:(0,M.jsx)(An,{className:`h-7 w-7 text-golf-green`,"aria-hidden":`true`})}),(0,M.jsxs)(`div`,{className:`flex-grow`,children:[(0,M.jsx)(`span`,{className:`inline-block text-xs font-semibold uppercase tracking-[0.15em] text-golf-green/70 mb-1`,children:`Junior Program`}),(0,M.jsx)(`h4`,{className:`font-playfair text-2xl font-bold text-golf-green mb-2`,children:`Approved Junior Member Policy`}),(0,M.jsx)(`p`,{className:`text-gray-700 text-sm leading-relaxed max-w-2xl`,children:`Approved Junior status recognizes junior members who have demonstrated the playing ability, maturity, etiquette and pace of play required for unrestr
352icted playing privileges. The full policy outlines the recommendation and assessment process, committee review, and the standards expected of the program.`})]}),(0,M.jsx)(`div`,{className:`flex-shrink-0`,children:(0,M.jsx)(R,{asChild:!0,className:`bg-golf-green hover:bg-golf-green-dark text-white`,children:(0,M.jsxs)(`a`,{href:`/assets/Approved-Junior-Member-Policy-2026.pdf`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,M.jsx)(Tn,{className:`h-4 w-4 mr-2`,"aria-hidden":`true`}),`View Policy (PDF)`]})})})]})]})})]}),e===`services`&&(0,M.jsxs)(`div`,{className:`mb-12 animate-fade-in`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-3xl font-bold mb-6 text-golf-green text-center`,children:`Additional Services`}),(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto bg-white shadow-lg rounded-lg overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`p-6 bg-golf-green text-white`,children:[(0,M.jsx)(`h4`,{className:`text-2xl font-bold`,children:`Available Services`}),(0,M.jsx)(`p`,{className:`opacity-90`,children:`Add these services to enhance your membership experience`})]}),(0,M.jsxs)(lQ,{children:[(0,M.jsx)(uQ,{children:(0,M.jsxs)(pQ,{children:[(0,M.jsx)(mQ,{children:`Service`}),(0,M.jsx)(mQ,{className:`text-right`,children:`Price`})]})}),(0,M.jsx)(dQ,{children:[{service:`Club Storage with Pull Cart`,price:`$184.00`},{service:`Club Storage Bag Only`,price:`$152.00`},{service:`Club Storage with Electric Pull Cart`,price:`$236.00`},{service:`Season Golf Car Rental 1 Seat`,price:`$760.00`},{service:`GTT 1st â Subject To Availability`,price:`$120.00`},{service:`GTT 2nd â Subject To Availability`,price:`$180.00`},{service:`Pull Cart Rental for Season`,price:`$157.00`},{service:`Locker`,price:`$157.00`},{service:`50/50 Draw for Season`,price:`$40.00`},{service:`Driving Range Single`,price:`$289.00`},{service:`Driving Range Family`,price:`$578.00`}].map((e,t)=>(0,M.jsxs)(pQ,{children:[(0,M.jsx)(hQ,{children:e.service}),(0,M.jsx)(hQ,{className:`text-right font-medium`,children:e.price})]},t))})]}),(0,M.jsxs)(`div`,{className:`p-4 bg-gray-50 text-sm text-gray-600 flex items-center gap-2`,children:[(0,M.jsx)(Rn,{size:16,className:`text-golf-green`}),(0,M.jsx)(`span`,{children:`All prices are subject to HST (there is no HST on the Food and Beverage minimum spend)`})]})]})]}),(0,M.jsxs)(`div`,{className:`mt-12 bg-golf-sand/20 p-8 rounded-2xl max-w-4xl mx-auto`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold mb-4 text-golf-green text-center`,children:`How to Apply`}),(0,M.jsxs)(`p`,{className:`text-center text-gray-700 mb-6`,children:[`Any and all membership inquiries can be sent to `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`text-golf-green hover:underline`,children:`[email protected]`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-4 justify-center`,children:[(0,M.jsx)(R,{asChild:!0,className:`bg-golf-green hover:bg-golf-green-dark`,children:(0,M.jsx)(`a`,{href:`/join-waitlist`,children:`Join the Waitlist`})}),(0,M.jsx)(R,{asChild:!0,variant:`outline`,className:`border-golf-green text-golf-green hover:bg-golf-green/10`,children:(0,M.jsx)(`a`,{href:`/contact`,children:`Contact Membership Office`})})]})]})]})})]})},vQ=()=>(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Book Tee Times | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Book your tee time at Belvedere Golf Club. Easy online booking available for members and guests.`})]}),(0,M.jsx)(`div`,{className:`flex-grow container mx-auto px-4 pb-16`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green mb-6`,children:`Book a Tee Time`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-6`,children:`Reserve your preferred tee time at Belvedere Golf Club. Members and guests can book online through our convenient booking system.`}),(0,M.jsx)(`div`,{className:`bg-white rounded-lg shadow-lg overflow-hidden`,children:(0,M.jsx)(`div`,{className:`h-[800px] w-full`,children:(0,M.jsx)(`iframe`,{src:`https://belvederegc.cps.golf/`,title:`Belvedere Golf Club Tee Times`,className:`w-full h-full border-0`,allow:`fullscreen`})})}),(0,M.jsxs)(`div`,{className:`mt-8 p-4 bg-golf-green/10 rounded-lg`,children:[(0,M.jsx)(`h2`,{className:`text-xl font-semibold text-golf-green mb-2`,children:`Need Assistance?`}),(0,M.jsxs)(`p`,{className:`text-gray-700`,children:[`If you need help booking your tee time or have any questions, please contact our Pro Shop at `,(0,M.jsx)(`a`,{href:`tel:1-877-515-8687`,className:`text-golf-green hover:underline`,children:`1-877-515-8687`}),` or `,(0,M.jsx)(`a`,{href:`tel:9025665542`,className:`text-golf-green hover:underline`,children:`(902) 566-5542`}),`.`]})]})]})})]}),yQ=[{id:`donation`,label:`Donation Request`,email:`[email protected]`,icon:(0,M.jsx)(Pn,{className:`h-5 w-5`}),description:`Request donations or support for your organization or cause.`},{id:`foodbeverage`,label:`Food & Beverage`,email:`[email protected]`,icon:(0,M.jsx)(ir,{className:`h-5 w-5`}),description:`Questions about dining options, event catering, or restaurant reservations.`},{id:`events`,label:`Events, Weddings & Meetings`,email:`[email protected]`,icon:(0,M.jsx)(rn,{className:`h-5 w-5`}),description:`Inquiries about booking venues for weddings, corporate events, or special occasions.`},{id:`advancedbooking`,label:`Advanced Booking Request`,email:`[email protected]`,icon:(0,M.jsx)(rn,{className:`h-5 w-5`}),description:`Request a tee time in advance for your group. Subject to availability and booking guidelines.`},{id:`proshop`,label:`Pro Shop & Tee Times`,email:`[email protected]`,icon:(0,M.jsx)(ir,{className:`h-5 w-5`}),description:`Information about tee times, equipment, apparel, golf lessons, or custom club fittings.`},{id:`professional`,label:`Club Professional`,email:`[email protected]`,icon:(0,M.jsx)(jn,{className:`h-5 w-5`}),description:`Inquiries about lessons, clinics, private instruction, and professional guidance.`},{id:`accounting`,label:`Accounting`,email:`[email protected]`,icon:(0,M.jsx)(wn,{className:`h-5 w-5`}),description:`Questions about membership dues, billing, or payment options.`},{id:`tournament`,label:`Tournament Inquiries`,email:`[email protected]`,icon:(0,M.jsx)(rn,{className:`h-5 w-5`}),description:`Information about upcoming tournaments, registrations, or hosting your own tournament.`},{id:`manager`,label:`General Manager`,email:`[email protected]`,icon:(0,M.jsx)(fr,{className:`h-5 w-5`}),description:`Direct inquiries for the club's management on important club matters.`}];RZ({name:wZ().min(2,{message:`Name must be at least 2 characters.`}),email:wZ().email({message:`Please enter a valid email address.`}
352),phone:wZ().optional(),message:wZ().min(10,{message:`Message must be at least 10 characters.`})});var bQ=[`Advanced bookings will not be available during the first three hours of any day, as this window is reserved for members only.`,`Fridays are excluded from advanced bookings.`,`If an advanced booking cannot be accommodated, public golfers will have 5-day advance booking privileges enabled.`,`Green Card Holders have 5-day advance booking privileges.`],xQ=()=>{let{toast:e}=hC(),[t,n]=(0,_.useState)(null),r=(0,_.useRef)(null);(0,_.useEffect)(()=>{t&&typeof window<`u`&&window.innerWidth<1024&&r.current?.scrollIntoView({behavior:`smooth`,block:`start`})},[t]);let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(`general`),[c,l]=(0,_.useState)({name:``,email:``,phone:``,message:``,subject:`General Inquiry`}),[u,d]=(0,_.useState)({name:``,organization:``,email:``,phone:``,requestType:``,requestDetails:``,story:``}),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)({name:``,email:``,phone:``,golferType:`public`,date:``,preferredTime:``,players:`2`,notes:``}),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(``),[C,w]=(0,_.useState)(!1),T=e=>{v({...g,[e.target.name]:e.target.value})},E=async e=>{e.preventDefault(),w(!0),S(``);let{name:t,email:n,phone:r,date:i}=g;if(!t.trim()||!n.trim()||!r.trim()||!i){S(`Please fill out all required fields.`),w(!1);return}try{if(!(await fetch(`/api/send-advanced-booking`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(g)})).ok)throw Error(`Failed to submit. Please try again or contact us directly.`);NY({formType:`advanced_booking_request`,name:t,email:n,phone:r,subject:`Advanced Booking Request`,formData:g}),b(!0),v({name:``,email:``,phone:``,golferType:`public`,date:``,preferredTime:``,players:`2`,notes:``})}catch(e){S(e?.message||`There was a problem submitting your request. Please try again.`)}finally{w(!1)}},D=e=>{l({...c,[e.target.name]:e.target.value})},O=e=>{d({...u,[e.target.name]:e.target.value})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsxs)(`main`,{className:`pb-16`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green text-white py-16`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 text-center`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-4`,children:`Contact Us`}),(0,M.jsx)(`p`,{className:`text-xl max-w-2xl mx-auto`,children:`Have a question or inquiry? Select a department below and we'll make sure your message reaches the right people.`})]})}),(0,M.jsx)(`div`,{className:`container mx-auto px-4 py-12`,children:(0,M.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-8`,children:[(0,M.jsxs)(`div`,{className:`lg:col-span-1`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold mb-6 text-golf-green`,children:`Select Department`}),(0,M.jsx)(`div`,{className:`space-y-4`,children:yQ.map(e=>(0,M.jsx)(Bm,{className:`cursor-pointer transition-all ${t?.id===e.id?`border-golf-green bg-golf-green/5`:`hover:border-golf-green/50`}`,onClick:()=>n(e),children:(0,M.jsxs)(Wm,{className:`p-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(`div`,{className:`rounded-full p-2 ${t?.id===e.id?`bg-golf-green text-white`:`bg-gray-100`}`,children:e.icon}),(0,M.jsx)(`h3`,{className:`font-medium`,children:e.label})]}),(0,M.jsx)(`p`,{className:`text-sm text-gray-500 mt-2 pl-11`,children:e.description})]})},e.id))}),(0,M.jsxs)(`div`,{className:`mt-8 bg-golf-sand/10 p-6 rounded-lg`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold mb-4 text-golf-green`,children:`Contact Information`}),(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(Jn,{className:`h-5 w-5 text-golf-green`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`Phone`}),(0,M.jsx)(`p`,{children:`(902) 566-5542`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(Un,{className:`h-5 w-5 text-golf-green`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`General Email`}),(0,M.jsx)(`p`,{children:`[email protected]`})]})]})]})]})]}),(0,M.jsx)(`div`,{ref:r,className:`lg:col-span-2 scroll-mt-24`,children:(0,M.jsxs)(Bm,{children:[(0,M.jsxs)(Vm,{children:[(0,M.jsx)(Hm,{className:`font-playfair text-golf-green`,children:t?`Contact ${t.label}`:`Contact Form`}),(0,M.jsx)(Um,{children:t?`Fill out this form to send a message directly to our ${t.label.toLowerCase()} department.`:`Please select a department from the left to send your message to the appropriate team.`})]}),(0,M.jsx)(Wm,{children:t?(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-lg overflow-hidden`,children:[t.id===`advancedbooking`?y?(0,M.jsxs)(`div`,{className:`text-center p-6`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(`svg`,{className:`w-8 h-8 text-golf-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})})}),(0,M.jsx)(`h3`,{className:`text-2xl font-bold text-golf-green mb-3`,children:`Request Received!`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Thank you â the Belvedere Team will review your details and be in touch shortly.`})]}):(0,M.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-4`,children:[(0,M.jsx)(`h4`,{className:`font-semibold text-golf-green mb-2 text-sm uppercase tracking-wide`,children:`Booking Guidelines`}),(0,M.jsx)(`ul`,{className:`space-y-2`,children:bQ.map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-gray-700`,children:[(0,M.jsx)(`span`,{className:`text-golf-green font-bold mt-0.5`,children:`â¢`}),(0,M.jsx)(`span`,{children:e})]},t))})]}),(0,M.jsxs)(`form`,{onSubmit:E,className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-name`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Full Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`ab-name`,name:`name`,value:g.name,onChange:T,required:!0,placeholder:`Your full name`,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-phone`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Phone Number`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`tel`,id:`ab-phone`,name:`phone`,value:g.phone,onChange:T,required:!0,placeholder:`(902) 555-1234`,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green`})]})]}),(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-email`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`ab-email`,name:`email`,value:g.email,onChange:T,required:!0,placeholder:`[email protected]`,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-golferType`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Golfer Type`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsxs)(`select`,{id:`ab-golferType`,name:`golferType`,value:g.golferType,onCh
352ange:T,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green bg-white`,children:[(0,M.jsx)(`option`,{value:`public`,children:`Public Golfer`}),(0,M.jsx)(`option`,{value:`member`,children:`Belvedere Member`})]})]})]}),(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-3 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-date`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Requested Date`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`date`,id:`ab-date`,name:`date`,value:g.date,onChange:T,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`ab-preferredTime`,className:`block font-medium text-golf-green mb-1 text-sm`,children:`Preferred Time`}),(0,M.jsxs)(`select`,{id:`ab-preferredTime`,name:`preferredTime`,value:g.preferredTime,onChange:T,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green bg-white`,children:[(0,M.jsx)(`option`,{value:``,children:`No preference`}),(0,M.jsx)(`option`,{value:`morning`,children:`Morning`}),(0,M.jsx)(`option`,{value:`afternoon`,children:`Afternoon`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-players`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Players`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`select`,{id:`ab-players`,name:`players`,value:g.players,onChange:T,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green bg-white`,children:Array.from({length:20},(e,t)=>t+1).map(e=>(0,M.jsxs)(`option`,{value:String(e),children:[e,` `,e===1?`player`:`players`]},e))})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`ab-notes`,className:`block font-medium text-golf-green mb-1 text-sm`,children:[`Additional Notes `,(0,M.jsx)(`span`,{className:`text-gray-400 font-normal`,children:`(optional)`})]}),(0,M.jsx)(`textarea`,{id:`ab-notes`,name:`notes`,value:g.notes,onChange:T,rows:2,placeholder:`Any special requests or details about your group...`,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),x&&(0,M.jsx)(`div`,{className:`bg-red-50 border border-red-200 rounded p-3 text-center`,children:(0,M.jsx)(`p`,{className:`text-red-700 text-sm`,children:x})}),(0,M.jsx)(`button`,{type:`submit`,disabled:C,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-3 px-6 rounded transition disabled:opacity-50 disabled:cursor-not-allowed`,children:C?`Sending...`:`Submit Booking Request`})]})]}):t.id===`donation`?f?(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Thank You!`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 mb-4`,children:`Your donation request has been sent successfully.`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`We'll get back to you as soon as possible.`})]}):(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),a(!0),h(``),p(!1);let t={to:`[email protected]`,from:`[email protected]`,subject:`Donation Request - ${u.name}`,replyTo:u.email,name:u.name,organization:u.organization,email:u.email,phone:u.phone||`Not provided`,requestType:u.requestType,requestDetails:u.requestDetails,story:u.story};try{if(!(await fetch(`https://hook.us1.make.com/0amxmnlcl1jsfetx66qa8pru89wdedfr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).ok)throw Error(`Failed to submit the donation request. Please try again or contact us directly.`);NY({formType:`donation`,name:u.name,email:u.email,phone:u.phone,subject:u.requestType,formData:u}),p(!0),d({name:``,organization:``,email:``,phone:``,requestType:``,requestDetails:``,story:``})}catch(e){h(e?.message||`There was a problem submitting your request. Please try again or c
352ontact us directly.`)}finally{a(!1)}},className:`space-y-6 px-4`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-2`,children:`Request Form`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`Please provide detailed information about your organization and the type of support you're seeking.`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`donation-name`,className:`block font-medium text-golf-green mb-1`,children:[`Contact Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`donation-name`,name:`name`,value:u.name,onChange:O,required:!0,placeholder:`Your name`,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`donation-organization`,className:`block font-medium text-golf-green mb-1`,children:`Organization Name`}),(0,M.jsx)(`input`,{type:`text`,id:`donation-organization`,name:`organization`,value:u.organization,onChange:O,placeholder:`Your organization`,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`donation-email`,className:`block font-medium text-golf-green mb-1`,children:[`Email`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`donation-email`,name:`email`,value:u.email,onChange:O,required:!0,placeholder:`[email protected]`,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`donation-phone`,className:`block font-medium text-golf-green mb-1`,children:`Phone (Optional)`}),(0,M.jsx)(`input`,{type:`tel`,id:`donation-phone`,name:`phone`,value:u.phone,onChange:O,placeholder:`(123) 456-7890`,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`donation-requestType`,className:`block font-medium text-golf-green mb-1`,children:`Type of Request`}),(0,M.jsxs)(`select`,{id:`donation-requestType`,name:`requestType`,value:u.requestType,onChange:O,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`,children:[(0,M.jsx)(`option`,{value:``,children:`Select a request type`}),(0,M.jsx)(`option`,{value:`Monetary Support`,children:`Monetary Support`}),(0,M.jsx)(`option`,{value:`Sponsorship`,children:`Sponsorship`}),(0,M.jsx)(`option`,{value:`Goods/Services`,children:`Goods/Services`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`donation-requestDetails`,className:`block font-medium text-golf-green mb-1`,children:`What are you requesting?`}),(0,M.jsx)(`textarea`,{id:`donation-requestDetails`,name:`requestDetails`,value:u.requestDetails,onChange:O,placeholder:`Please specify the items or services you are requesting...`,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`,rows:3})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`donation-story`,className:`block font-medium text-golf-green mb-1`,children:`Your Story`}),(0,M.jsx)(`textarea`,{id:`donation-story`,name:`story`,value:u.story,onChange:O,placeholder:`Tell us about your organization and why you're seeking support...`,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`,rows:4})]}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`Please provide details about your organization's mission and how the requested support will help.`}),(0,M.jsx)(`button`,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-2 px-4 rounded transition`,disabled:i,children:i?`Sending...`:`Submit Request`}),m&&(0,M.jsx)(`p`,{className:`text-red-600 text-center mt-4`,children:m})]}):f?(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Thank You!`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 mb-4`,children:`Your message has been sent successfully.`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`We'll get back to you as soon as possible.`})]}):(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),a(!0),h(``),p(!1);let n={to:t.email,from:`[email protected]`,subject:`Contact Form: ${c.subject} - ${c.name}`,replyTo:c.email,name:c.name,email:c.email,phone:c.phone||`Not provided`,message:c.message};try{if(!(await fetch(`https://hook.us1.make.com/0amxmnlcl1jsfetx66qa8pru89wdedfr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)})).ok)throw Error(`Failed to submit the form. Please try again or c
352ontact us directly.`);NY({formType:`contact`,name:c.name,email:c.email,phone:c.phone,subject:c.subject,formData:{...c,department:t?.label}}),p(!0),l({name:``,email:``,phone:``,message:``,subject:`General Inquiry`})}catch(e){h(e?.message||`There was a problem submitting your request. Please try again or contact us directly.`)}finally{a(!1)}},className:`space-y-6 px-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`name`,className:`block font-medium text-golf-green mb-1`,children:[`Full Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`name`,name:`name`,value:c.name,onChange:D,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green focus:ring-offset-0`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`email`,className:`block font-medium text-golf-green mb-1`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:c.email,onChange:D,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green focus:ring-offset-0`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`phone`,className:`block font-medium text-golf-green mb-1`,children:`Phone Number`}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:c.phone,onChange:D,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green focus:ring-offset-0`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`subject`,className:`block font-medium text-golf-green mb-1`,children:[`Subject`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsxs)(`select`,{id:`subject`,name:`subject`,value:c.subject,onChange:D,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green focus:ring-offset-0`,children:[t?.id===`donation`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Monetary Support`,children:`Monetary Support`}),(0,M.jsx)(`option`,{value:`Sponsorship`,children:`Sponsorship`}),(0,M.jsx)(`option`,{value:`Goods/Services`,children:`Goods/Services`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`foodbeverage`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Dining Reservations`,children:`Dining Reservations`}),(0,M.jsx)(`option`,{value:`Event Catering`,children:`Event Catering`}),(0,M.jsx)(`option`,{value:`Menu Questions`,children:`Menu Questions`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`events`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Wedding Inquiry`,children:`Wedding Inquiry`}),(0,M.jsx)(`option`,{value:`Corporate Event`,children:`Corporate Event`}),(0,M.jsx)(`option`,{value:`Meeting Room Rental`,children:`Meeting Room Rental`}),(0,M.jsx)(`option`,{value:`Special Occasion`,children:`Special Occasion`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`proshop`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Tee Time`,children:`Tee Time`}),(0,M.jsx)(`option`,{value:`Equipment`,children:`Equipment`}),(0,M.jsx)(`option`,{value:`Apparel`,children:`Apparel`}),(0,M.jsx)(`option`,{value:`Club Fitting`,children:`Club Fitting`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`professional`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Golf Lessons`,children:`Golf Lessons`}),(0,M.jsx)(`option`,{value:`Private Instruction`,children:`Private Instruction`}),(0,M.jsx)(`option`,{value:`Clinic Information`,children:`Clinic Information`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`accounting`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Membership Dues`,children:`Membership Dues`}),(0,M.jsx)(`option`,{value:`Billing Question`,children:`Billing Question`}),(0,M.jsx)(`option`,{value:`Payment Options`,children:`Payment Options`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`tournament`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`Tournament Registration`,children:`Tournament Registration`}),(0,M.jsx)(`option`,{value:`Host Tournament`,children:`Host Tournament`}),(0,M.jsx)(`option`,{value:`Tournament Schedule`,children:`Tournament Schedule`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),t?.id===`manager`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`option`,{value:`General Inquiry`,children:`General Inquiry`}),(0,M.jsx)(`option`,{value:`Membership`,children:`Membership`}),(0,M.jsx)(`option`,{value:`Club Operations`,children:`Club Operations`}),(0,M.jsx)(`option`,{value:`Other`,children:`Other`})]}),!t&&(0,M.jsx)(`option`,{value:`General Inquiry`,children:`General Inquiry`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`message`,className:`block font-medium text-golf-green mb-1`,children:[`Message`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`textarea`,{id:`message`,name:`message`,value:c.message,onChange:D,required:!0,rows:4,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green focus:ring-offset-0`})]}),(0,M.jsx)(`button`,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-2 px-4 roun
352ded transition`,disabled:i,children:i?`Sending...`:`Send Message`})]}),m&&(0,M.jsx)(`p`,{className:`text-red-600 text-center mt-4`,children:m})]}):(0,M.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-center`,children:[(0,M.jsx)(`div`,{className:`bg-golf-sand/10 rounded-full p-6 mb-4`,children:(0,M.jsx)($t,{className:`h-12 w-12 text-golf-green transform -rotate-90 lg:rotate-180`})}),(0,M.jsx)(`h3`,{className:`text-xl font-medium mb-2`,children:`Select a Department First`}),(0,M.jsx)(`p`,{className:`text-gray-500 max-w-md`,children:`Please choose a department from the left to ensure your inquiry reaches the correct team at Belvedere Golf Club.`})]})}),(0,M.jsx)(Gm,{className:`flex-col space-y-4 border-t pt-6`,children:(0,M.jsx)(`p`,{className:`text-sm text-gray-500`,children:`We typically respond within 1-2 business days.`})})]})})]})})]})]})},SQ=()=>{let e=Fu();return(0,_.useEffect)(()=>{console.error(`404 Error: User attempted to access non-existent route:`,e.pathname)},[e.pathname]),(0,M.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-gray-100`,children:(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h1`,{className:`text-4xl font-bold mb-4`,children:`404`}),(0,M.jsx)(`p`,{className:`text-xl text-gray-600 mb-4`,children:`Oops! Page not found`}),(0,M.jsx)(`a`,{href:`/`,className:`text-blue-500 hover:text-blue-700 underline`,children:`Return to Home`})]})})},CQ=({images:e})=>{let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(!1),a=e=>{n(e),i(!0)},o=()=>{i(!1),n(null)},s=()=>{t!==null&&n(t===0?e.length-1:t-1)},c=()=>{t!==null&&n(t===e.length-1?0:t+1)};return(0,_.useEffect)(()=>{let e=e=>{if(r)switch(e.key){case`ArrowLeft`:e.preventDefault(),s();break;case`ArrowRight`:e.preventDefault(),c();break;case`Escape`:e.preventDefault(),o();break}};if(r)return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r,t]),(0,M.jsxs)(`div`,{className:`w-full`,children:[(0,M.jsxs)(UT,{className:`w-full max-w-6xl mx-auto`,children:[(0,M.jsx)(WT,{className:`-ml-2 md:-ml-4`,children:e.map((e,t)=>(0,M.jsx)(GT,{className:`pl-2 md:pl-4 basis-1/2 md:basis-1/3 lg:basis-1/4`,children:(0,M.jsx)(`div`,{className:`p-1`,children:(0,M.jsx)(`div`,{className:`overflow-hidden rounded-lg aspect-[4/3] bg-gray-100 flex items-center justify-center cursor-pointer`,onClick:()=>a(t),children:(0,M.jsx)(`img`,{src:e.src,alt:e.alt,className:`w-full h-full object-cover transition-all hover:scale-105`})})})},t))}),(0,M.jsx)(KT,{className:`left-2 bg-white/70`}),(0,M.jsx)(qT,{className:`right-2 bg-white/70`})]}),r&&t!==null&&(0,M.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/80 flex items-center justify-center p-4`,children:(0,M.jsxs)(`div`,{className:`relative max-w-5xl max-h-[90vh] w-full`,children:[(0,M.jsx)(R,{variant:`ghost`,size:`icon`,className:`absolute -top-12 right-0 text-white hover:bg-white/20 z-10`,onClick:o,children:(0,M.jsx)(gr,{className:`h-6 w-6`})}),(0,M.jsx)(R,{variant:`ghost`,size:`icon`,className:`absolute left-0 top-1/2 -translate-y-1/2 text-white hover:bg-white/20 h-12 w-12 z-10`,onClick:s,children:(0,M.jsx)(pn,{className:`h-8 w-8`})}),(0,M.jsx)(R,{variant:`ghost`,size:`icon`,className:`absolute right-0 top-1/2 -translate-y-1/2 text-white hover:bg-white/20 h-12 w-12 z-10`,onClick:c,children:(0,M.jsx)(mn,{className:`h-8 w-8`})}),(0,M.jsx)(`img`,{src:e[t].src,alt:e[t].alt,className:`w-full h-full object-contain max-h-[85vh] rounded-lg`}),(0,M.jsxs)(`div`,{className:`absolute bottom-4 left-1/2 -translate-x-1/2 bg-black/50 text-white px-3 py-1 rounded-full text-sm`,children:[t+1,` / `,e.length]})]})})]})},wQ=()=>(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Weddings | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Host your dream wedding at Belvedere Golf Club. Our beautiful venue offers stunning views and exceptional service for your special day.`})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green mb-6`,children:`Weddings at Belvedere`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-8`,children:`Make your special day truly unforgettable at Belvedere Golf Club. Our picturesque setting offers a stunning backdrop for your wedding reception, with panoramic views of our beautifully maintained course.`}),(0,M.jsx)(CQ,{images:[{src:`/images/IMG_9775.jpeg`,alt:`Elegant wedding setup at Belvedere Golf Club`},{src:`/images/IMG_9759.jpeg`,alt:`Beautiful wedding reception venue`},{src:`/images/IMG_9760.jpeg`,alt:`Wedding ceremony and reception space`},{src:`/images/IMG_9761.jpeg`,alt:`Stunning golf course wedding venue`},{src:`/images/IMG_9762.jpeg`,alt:`Romantic wedding setup with golf course views`},{src:`/images/IMG_9763.jpeg`,alt:`Elegant dining setup for wedding receptions`},{src:`/images/IMG_9764.jpeg`,alt:`Beautifully decorated wedding reception area`},{src:`/images/IMG_9765.jpeg`,alt:`Luxurious wedding venue interior`},{src:`/images/IMG_9767.jpeg`,alt:`Charming wedding reception space`},{src:`/images/IMG_9769.jpeg`,alt:`Intimate wedding venue with golf course backdrop`},{src:`/images/IMG_9771.jpeg`,alt:`Sophisticated wedding reception setup`},{src:`/images/IMG_9772.jpeg`,alt:`Gorgeous wedding venue at Belvedere Golf Club`},{src:`/images/IMG_9773.jpeg`,alt:`Elegant wedding reception with panoramic views`},{src:`/images/IMG_9774.jpeg`,alt:`Perfect wedding venue for special occasions`}]}),(0,M.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-semibold text-golf-green`,children:`Wedding Packages`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`We offer customizable wedding packages to suit your unique needs and vision for your special day. From intimate gatherings to grand celebrations, our experienced staff will help you create memories that last a lifetime.`}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 p-6 rounded-lg border border-golf-green/20`,children:[(0,M.jsx)(`h3`,{className:`text-xl font-semibold text-golf-green mb-4`,children:`Our Wedding Services Include:`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-5 space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`Elegant reception spaces accommodating up to 140 guests`}),(0,M.jsx)(`li`,{children:`Custom catering options with seasonal menus`}),(0,M.jsx)(`li`,{children:`Professional event coordination`}),(0,M.jsx)(`li`,{children:`Exclusive photography locations throughout the course`})]})]}),(0,M.jsx)(`div`,{className:`flex justify-center mt-8`,children:(0,M.jsx)(L,{to:`/contact`,children:(0,M.jsx)(R,{className:`bg-golf-green hover:bg-golf-green-dark`,children:`Contact Us About Weddings`})})})]})]})}),(0,M.jsx)(kG,{})]}),TQ=()=>(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Golf Tournaments | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Host a golf tournament at Belvedere Golf Club. Our championship course and professional staff will ensure a successful and memorable event for all participants.`})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green mb-6`,children:`Golf Tournaments`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-8`,children:`Host your next golf tournament or charity event at Belvedere Golf Club. Our championship course and professional staff will ensure a successful and memorable experience for all participants.`}),(0,M.jsx)(CQ,{images:[{src:`/lovable-uploads/49fcea98-2ec3-4851-8755-e281178e1a8e.png`,alt:`Golf tournament at Belvedere Golf Club`},{src:`/lovable-uploads/fb5e7ffc-5005-4d7b-ab80-b102f1858243.png`,alt:`Tournament awards ceremony`},{src:`/lovable-uploads/004826b9-32fc-40d0-9072-755b7ddf9635.png`,alt:`Players on the golf course during tournament`}]}),(0,M.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-semibold text-golf-green`,children:`Tournament Services`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`From corporate outings to charity fundraisers, we offer comprehensive tournament services tailored to your specific needs. Our experienced tournament coordinators will assist with every aspect of your event, from planning to execution.`}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 p-6 rounded-lg border border-golf-green/20`,children:[(0,M.jsx)(`h3`,{className:`text-xl font-semibold text-golf-green mb-4`,children:`Our Tournament Packages Include:`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-5 space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`Custom tournament formats and scoring`}),(0,M.jsx)(`li`,{children:`Registration and check-in services`}),(0,M.jsx)(`li`,{children:`Tournament branding opportunities`}),(0,M.jsx)(`li`,{children:`Customized prize packages`}),(0,M.jsx)(`li`,{children:`Food and beverage services`}),(0,M.jsx)(`li`,{children:`Professional photography`}),(0,M.jsx)(`li`,{children:`Post-tournament awards ceremony`})]})]}),(0,M.jsx)(`div`,{className:`flex justify-center mt-8`,children:(0,M.jsx)(L,{to:`/contact`,children:(0,M.jsx)(R,{className:`bg-golf-green hover:bg-golf-green-dark`,children:`Plan Your Tournament`})})})]})]})})]}),EQ=()=>(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Parties & Gatherings | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Host your next private party, celebration or social gathering at Belvedere Golf Club. Our beautiful venue and attentive staff will make your event special.`})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green mb-6`,children:`Parties & Social Gatherings`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-8`,children:`Celebrate life's special moments in the elegant and welcoming atmosphere of Belvedere Golf Club. Whether you're planning a birthday celebration, anniversary party, retirement gathering, or any special occasion, our versatile spaces and exceptional service will ensure an unforgettable experience.`}),(0,M.jsx)(CQ,{images:[{src:`/lovable-uploads/28e620e6-938a-4705-b2d6-81103c7434a8.png`,alt:`Private party setting at Belvedere Golf Club`},{src:`/lovable-uploads/52573c2d-1e4c-4882-bfd8-3b39905670d6.png`,alt:`Celebration dinner setup`},{src:`/lovable-uploads/1a036cb3-2f83-4bfb-9a62-49d279a35c8d.png`,alt:`Outdoor gathering space`}]}),(0,M.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-semibold text-golf-green`,children:`Celebration Venues`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`From intimate gatherings to large celebrations, our various indoor and outdoor space
352s can be customized to create the perfect atmosphere for your event. Our culinary team will work with you to design a menu that delights your guests.`}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 p-6 rounded-lg border border-golf-green/20`,children:[(0,M.jsx)(`h3`,{className:`text-xl font-semibold text-golf-green mb-4`,children:`Perfect for:`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-5 space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`Birthday celebrations`}),(0,M.jsx)(`li`,{children:`Anniversary parties`}),(0,M.jsx)(`li`,{children:`Retirement gatherings`}),(0,M.jsx)(`li`,{children:`Family reunions`}),(0,M.jsx)(`li`,{children:`Holiday parties`}),(0,M.jsx)(`li`,{children:`Graduation celebrations`}),(0,M.jsx)(`li`,{children:`Social club events`})]})]}),(0,M.jsx)(`div`,{className:`flex justify-center mt-8`,children:(0,M.jsx)(L,{to:`/contact`,children:(0,M.jsx)(R,{className:`bg-golf-green hover:bg-golf-green-dark`,children:`Plan Your Special Event`})})})]})]})})]}),DQ=function(){return DQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DQ.apply(this,arguments)};function OQ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function kQ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function AQ(e){return e.mode===`multiple`}function jQ(e){return e.mode===`range`}function MQ(e){return e.mode===`single`}var NQ={root:`rdp`,multiple_months:`rdp-multiple_months`,with_weeknumber:`rdp-with_weeknumber`,vhidden:`rdp-vhidden`,button_reset:`rdp-button_reset`,button:`rdp-button`,caption:`rdp-caption`,caption_start:`rdp-caption_start`,caption_end:`rdp-caption_end`,caption_between:`rdp-caption_between`,caption_label:`rdp-caption_label`,caption_dropdowns:`rdp-caption_dropdowns`,dropdown:`rdp-dropdown`,dropdown_month:`rdp-dropdown_month`,dropdown_year:`rdp-dropdown_year`,dropdown_icon:`rdp-dropdown_icon`,months:`rdp-months`,month:`rdp-month`,table:`rdp-table`,tbody:`rdp-tbody`,tfoot:`rdp-tfoot`,head:`rdp-head`,head_row:`rdp-head_row`,head_cell:`rdp-head_cell`,nav:`rdp-nav`,nav_button:`rdp-nav_button`,nav_button_previous:`rdp-nav_button_previous`,nav_button_next:`rdp-nav_button_next`,nav_icon:`rdp-nav_icon`,row:`rdp-row`,weeknumber:`rdp-weeknumber`,cell:`rdp-cell`,day:`rdp-day`,day_today:`rdp-day_today`,day_outside:`rdp-day_outside`,day_selected:`rdp-day_selected`,day_disabled:`rdp-day_disabled`,day_hidden:`rdp-day_hidden`,day_range_start:`rdp-day_range_start`,day_range_end:`rdp-day_range_end`,day_range_middle:`rdp-day_range_middle`};function PQ(e,t){return om(e,`LLLL y`,t)}function FQ(e,t){return om(e,`d`,t)}function IQ(e,t){return om(e,`LLLL`,t)}function LQ(e){return`${e}`}function RQ(e,t){return om(e,`cccccc`,t)}function zQ(e,t){return om(e,`yyyy`,t)}var BQ=Object.freeze({__proto__:null,formatCaption:PQ,formatDay:FQ,formatMonthCaption:IQ,formatWeekNumber:LQ,formatWeekdayName:RQ,formatYearCaption:zQ}),VQ=Object.freeze({__proto__:null,labelDay:function(e,t,n){return om(e,`do MMMM (EEEE)`,n)},labelMonthDropdown:function(){return`Month: `},labelNext:function(){return`Go to next month`},labelPrevious:function(){return`Go to previous month`},labelWeekNumber:function(e){return`Week n. ${e}`},labelWeekday:function(e,t){return om(e,`cccc`,t)},labelYearDropdown:function(){return`Year: `}});function HQ(){return{captionLayout:`buttons`,classNames:NQ,formatters:BQ,labels:VQ,locale:Mp,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:`default`}}function UQ(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,i=e.toMonth,a=e.fromDate,o=e.toDate;return r?a=gp(r):t&&(a=new Date(t,0,1)),i?o=hp(i):n&&(o=new Date(n,11,31)),{fromDate:a?tp(a):void 0,toDate:o?tp(o):void 0}}var WQ=(0,_.createContext)(void 0);function GQ(e){var t=e.initialProps,n=HQ(),r=UQ(t),i=r.fromDate,a=r.toDate,o=t.captionLayout??n.captionLayout;o!==`buttons`&&(!i||!a)&&(o=`buttons`);var s;(MQ(t)||AQ(t)||jQ(t))&&(s=t.onSelect);var c=DQ(DQ(DQ({},n),t),{captionLayout:o,classNames:DQ(DQ({},n.classNames),t.classNames),components:DQ({},t.components),formatters:DQ(DQ({},n.formatters),t.formatters),fromDate:i,labels:DQ(DQ({},n.labels),t.labels),mode:t.mode||n.mode,modifiers:DQ(DQ({},n.modifiers),t.modifiers),modifiersClassNames:DQ(DQ({},n.modifiersClassNames),t.modifiersClassNames),onSelect:s,styles:DQ(DQ({},n.styles),t.styles),toDate:a});return(0,M.jsx)(WQ.Provider,{value:c,children:e.children})}function KQ(){var e=(0,_.useContext)(WQ);if(!e)throw Error(`useDayPicker must be used within a DayPickerProvider.`);return e}function qQ(e){var t=KQ(),n=t.locale,r=t.classNames,i=t.styles,a=t.formatters.formatCaption;return(0,M.jsx)(`div`,{className:r.caption_label,style:i.caption_label,"aria-live":`polite`,role:`presentation`,id:e.id,children:a(e.displayMonth,{locale:n})})}function JQ(e){return(0,M.jsx)(`svg`,DQ({width:`8px`,height:`8px`,viewBox:`0 0 120 120`,"data-testid":`iconDropdown`},e,{children:(0,M.jsx)(`path`,{d:`M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.7
35278175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z`,fill:`currentColor`,fillRule:`nonzero`})}))}function YQ(e){var t=e.onChange,n=e.value,r=e.children,i=e.caption,a=e.className,o=e.style,s=KQ(),c=s.components?.IconDropdown??JQ;return(0,M.jsxs)(`div`,{className:a,style:o,children:[(0,M.jsx)(`span`,{className:s.classNames.vhidden,children:e[`aria-label`]}),(0,M.jsx)(`select`,{name:e.name,"aria-label":e[`aria-label`],className:s.classNames.dropdown,style:s.styles.dropdown,value:n,onChange:t,children:r}),(0,M.jsxs)(`div`,{className:s.classNames.caption_label,style:s.styles.caption_label,"aria-hidden":`true`,children:[i,(0,M.jsx)(c,{className:s.classNames.dropdown_icon,style:s.styles.dropdown_icon})]})]})}function XQ(e){var t=KQ(),n=t.fromDate,r=t.toDate,i=t.styles,a=t.locale,o=t.formatters.formatMonthCaption,s=t.classNames,c=t.components,l=t.labels.labelMonthDropdown;if(!n||!r)return(0,M.jsx)(M.Fragment,{});var u=[];if(hm(n,r))for(var d=gp(n),f=n.getMonth();f<=r.getMonth();f++)u.push(Lm(d,f));else for(var d=gp(new Date),f=0;f<=11;f++)u.push(Lm(d,f));return(0,M.jsx)(c?.Dropdown??YQ,{name:`months`,"aria-label":l(),className:s.dropdown_month,style:i.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=Lm(gp(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:o(e.displayMonth,{locale:a}),children:u.map(function(e){return(0,M.jsx)(`option`,{value:e.getMonth(),children:o(e,{locale:a})},e.getMonth())})})}function ZQ(e){var t=e.displayMonth,n=KQ(),r=n.fromDate,i=n.toDate,a=n.locale,o=n.styles,s=n.classNames,c=n.components,l=n.formatters.formatYearCaption,u=n.labels.labelYearDropdown,d=[];if(!r||!i)return(0,M.jsx)(M.Fragment,{});for(var f=r.getFullYear(),p=i.getFullYear(),m=f;m<=p;m++)d.push(Rm(_p(new Date),m));return(0,M.jsx)(c?.Dropdown??YQ,{name:`years`,"aria-label":u(),className:s.dropdown_year,style:o.dropdown_year,onChange:function(n){var r=Rm(gp(t),Number(n.target.value));e.onChange(r)},value:t.getFullYear(),caption:l(t,{locale:a}),children:d.map(function(e){return(0,M.jsx)(`option`,{value:e.getFullYear(),children:l(e,{locale:a})},e.getFullYear())})})}function QQ(e,t){var n=(0,_.useState)(e),r=n[0],i=n[1];return[t===void 0?r:t,i]}function $Q(e){var t=e.month,n=e.defaultMonth,r=e.today,i=t||n||r||new Date,a=e.toDate,o=e.fromDate,s=e.numberOfMonths,c=s===void 0?1:s;return a&&pp(a,i)<0&&(i=Uf(a,-1*(c-1))),o&&pp(i,o)<0&&(i=o),gp(i)}function e$(){var e=KQ(),t=QQ($Q(e),e.month),n=t[0],r=t[1];return[n,function(t){var n;if(!e.disableNavigation){var i=gp(t);r(i),(n=e.onMonthChange)==null||n.call(e,i)}}]}function t$(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,i=gp(e),a=pp(gp(Uf(i,r)),i),o=[],s=0;s<a;s++){var c=Uf(i,s);o.push(c)}return n&&(o=o.reverse()),o}function n$(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,i=t.numberOfMonths,a=i===void 0?1:i,o=r?a:1,s=gp(e);if(!n||!(pp(n,e)<a))return Uf(s,o)}}function r$(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,i=t.numberOfMonths,a=r?i===void 0?1:i:1,o=gp(e);if(!n||!(pp(o,n)<=0))return Uf(o,-a)}}var i$=(0,_.createContext)(void 0);function a$(e){var t=KQ(),n=e$(),r=n[0],i=n[1],a=t$(r,t),o=n$(r,t),s=r$(r,t),c=function(e){return a.some(function(t){return mm(e,t)})},l={currentMonth:r,displayMonths:a,goToMonth:i,goToDate:function(e,n){c(e)||(n&&pm(e,n)?i(Uf(e,1+t.numberOfMonths*-1)):i(e))},previousMonth:s,nextMonth:o,isDateDisplayed:c};return(0,M.jsx)(i$.Provider,{value:l,children:e.children})}function o$(){var e=(0,_.useContext)(i$);if(!e)throw Error(`useNavigation must be used within a NavigationProvider`);return e}function s$(e){var t=KQ(),n=t.classNames,r=t.styles,i=t.components,a=o$().goToMonth,o=function(t){a(Uf(t,e.displayIndex?-e.dis
352playIndex:0))},s=(0,M.jsx)(i?.CaptionLabel??qQ,{id:e.id,displayMonth:e.displayMonth});return(0,M.jsxs)(`div`,{className:n.caption_dropdowns,style:r.caption_dropdowns,children:[(0,M.jsx)(`div`,{className:n.vhidden,children:s}),(0,M.jsx)(XQ,{onChange:o,displayMonth:e.displayMonth}),(0,M.jsx)(ZQ,{onChange:o,displayMonth:e.displayMonth})]})}function c$(e){return(0,M.jsx)(`svg`,DQ({width:`16px`,height:`16px`,viewBox:`0 0 120 120`},e,{children:(0,M.jsx)(`path`,{d:`M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z`,fill:`currentColor`,fillRule:`nonzero`})}))}function l$(e){return(0,M.jsx)(`svg`,DQ({width:`16px`,height:`16px`,viewBox:`0 0 120 120`},e,{children:(0,M.jsx)(`path`,{d:`M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z`,fill:`currentColor`})}))}var u$=(0,_.forwardRef)(function(e,t){var n=KQ(),r=n.classNames,i=n.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var o=a.join(` `),s=DQ(DQ({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),(0,M.jsx)(`button`,DQ({},e,{ref:t,type:`button`,className:o,style:s}))});function d$(e){var t=KQ(),n=t.dir,r=t.locale,i=t.classNames,a=t.styles,o=t.labels,s=o.labelPrevious,c=o.labelNext,l=t.components;if(!e.nextMonth&&!e.previousMonth)return(0,M.jsx)(M.Fragment,{});var u=s(e.previousMonth,{locale:r}),d=[i.nav_button,i.nav_button_previous].join(` `),f=c(e.nextMonth,{locale:r}),p=[i.nav_button,i.nav_button_next].join(` `),m=l?.IconRight??l$,h=l?.IconLeft??c$;return(0,M.jsxs)(`div`,{className:i.nav,style:a.nav,children:[!e.hidePrevious&&(0,M.jsx)(u$,{name:`previous-month`,"aria-label":u,className:d,style:a.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:n===`rtl`?(0,M.jsx)(m,{className:i.nav_icon,style:a.nav_icon}):(0,M.jsx)(h,{className:i.nav_icon,style:a.nav_icon})}),!e.hideNext&&(0,M.jsx)(u$,{name:`next-month`,"aria-label":f,className:p,style:a.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:n===`rtl`?(0,M.jsx)(h,{className:i.nav_icon,style:a.nav_icon}):(0,M.jsx)(m,{className:i.nav_icon,style:a.nav_icon})})]})}function f$(e){var t=KQ().numberOfMonths,n=o$(),r=n.previousMonth,i=n.nextMonth,a=n.goToMonth,o=n.displayMonths,s=o.findIndex(function(t){return mm(e.displayMonth,t)}),c=s===0,l=s===o.length-1,u=t>1&&(c||!l),d=t>1&&(l||!c);return(0,M.jsx)(d$,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:function(){r&&a(r)},onNextClick:function(){i&&a(i)}})}function p$(e){var t=KQ(),n=t.classNames,r=t.disableNavigation,i=t.styles,a=t.captionLayout,o=t.components?.CaptionLabel??qQ,s=r?(0,M.jsx)(o,{id:e.id,displayMonth:e.displayMonth}):a===`dropdown`?(0,M.jsx)(s$,{displayMonth:e.displayMonth,id:e.id}):a===`dropdown-buttons`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(s$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,M.jsx)(f$,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,M.jsx)(f$,{displayMonth:e.displayMonth,id:e.id})]});return(0,M.jsx)(`div`,{className:n.caption,style:i.caption,children:s})}function m$(e){var t=KQ(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?(0,M.jsx)(`tfoot`,{className:i,style:r.tfoot,children:(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{colSpan:8,children:n})})}):(0,M.jsx)(M.Fragment,{})}function h$(e,t,n){for(var r=n?$f(new Date):Qf(new Date,{locale:e,weekStartsOn:t}),i=[],a=0;a<7;a++){var o=Hf(r,a);i.push(o)}return i}function g$(){var e=KQ(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,a=e.weekStartsOn,o=e.ISOWeek,s=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,l=h$(i,a,o);return(0,M.jsxs)(`tr`,{style:n.head_row,className:t.head_row,children:[r&&(0,M.jsx)(`td`,{style:n.head_cell,className:t.head_cell}),l.map(function(e,r){return(0,M.jsx)(`th`,{scope:`col`,className:t.head_cell,style:n.head_cell,"aria-label":c(e,{locale:i}),children:s(e,{locale:i})},r)})]})}function _$(){var e=KQ(),t=e.classNames,n=e.styles,r=e.components?.HeadRow??g$;return(0,M.jsx)(`thead`,{style:n.head,className:t.head,children:(0,M.jsx)(r,{})})}function v$(e){var t=KQ(),n=t.locale,r=t.formatters.formatDay;return(0,M.jsx)(M.Fragment,{children:r(e.date,{locale:n})})}var y$=(0,_.createContext)(void 0);function b$(e){return AQ(e.initialProps)?(0,M.jsx)(x$,{initialProps:e.initialProps,children:e.children}):(0,M.jsx)(y$.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}function x$(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,a=t.max,o=function(e,n,o){var s,c;if((s=t.onDayClick)==null||s.call(t,e,n,o),!(n.selected&&i&&r?.length===i)&&!(!n.selected&&a&&r?.length===a)){var l=r?kQ([],r,!0):[];if(n.selected){var u=l.findIndex(function(t){return up(e,t)});l.splice(u,1)}else l.push(e);(c=t.onSelect)==null||c.call(t,l,e,n,o)}},s={disabled:[]};r&&s.disabled.push(function(e){var t=a&&r.length>a-1,n=r.some(function(t){return up(t,e)});return!!(t&&!n)});var c={selected:r,onDayClick:o,modifiers:s};return(0,M.jsx)(y$.Provider,{value:c,children:n})}function S$(){var e=(0,_.useContext)(y$);if(!e)throw Error(`useSelectMultiple must be used within a SelectMultipleProvider`);return e}function C$(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?up(i,e)&&up(r,e)?void 0:up(i,e)?{from:i,to:void 0}:up(r,e)?void 0:fm(r,e)?{from:e,to:i}:{from:r,to:e}:i?fm(e,i)?{from:i,to:e}:{from:e,to:i}:r?pm(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var w$=(0,_.createContext)(void 0);function T$(e){return jQ(e.initialProps)?(0,M.jsx)(E$,{initialProps:e.initialProps,children:e.children}):(0,M.jsx)(w$.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}function E$(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},a=i.from,o=i.to,s=t.min,c=t.max,l=function(e,n,i){var a,o;(a=t.onDayClick)==null||a.call(t,e,n,i);var s=C$(e,r);(o=t.onSelect)==null||o.call(t,s,e,n,i)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(u.range_start=[a],o?(u.range_end=[o],up(a,o)||(u.range_middle=[{after:a,before:o}])):u.range_end=[a]):o&&(u.range_start=[o],u.range_end=[o]),s&&(a&&!o&&u.disabled.push({after:gm(a,s-1),before:Hf(a,s-1)}),a&&o&&u.disabled.push({after:a,before:Hf(a,s-1)}
352),!a&&o&&u.disabled.push({after:gm(o,s-1),before:Hf(o,s-1)})),c){if(a&&!o&&(u.disabled.push({before:Hf(a,-c+1)}),u.disabled.push({after:Hf(a,c-1)})),a&&o){var d=c-(rp(o,a)+1);u.disabled.push({before:gm(a,d)}),u.disabled.push({after:Hf(o,d)})}!a&&o&&(u.disabled.push({before:Hf(o,-c+1)}),u.disabled.push({after:Hf(o,c-1)}))}return(0,M.jsx)(w$.Provider,{value:{selected:r,onDayClick:l,modifiers:u},children:n})}function D$(){var e=(0,_.useContext)(w$);if(!e)throw Error(`useSelectRange must be used within a SelectRangeProvider`);return e}function O$(e){return Array.isArray(e)?kQ([],e,!0):e===void 0?[]:[e]}function k$(e){var t={};return Object.entries(e).forEach(function(e){var n=e[0],r=e[1];t[n]=O$(r)}),t}var A$;(function(e){e.Outside=`outside`,e.Disabled=`disabled`,e.Selected=`selected`,e.Hidden=`hidden`,e.Today=`today`,e.RangeStart=`range_start`,e.RangeEnd=`range_end`,e.RangeMiddle=`range_middle`})(A$||={});var j$=A$.Selected,M$=A$.Disabled,N$=A$.Hidden,P$=A$.Today,F$=A$.RangeEnd,I$=A$.RangeMiddle,L$=A$.RangeStart,R$=A$.Outside;function z$(e,t,n){var r,i=(r={},r[j$]=O$(e.selected),r[M$]=O$(e.disabled),r[N$]=O$(e.hidden),r[P$]=[e.today],r[F$]=[],r[I$]=[],r[L$]=[],r[R$]=[],r);return e.fromDate&&i[M$].push({before:e.fromDate}),e.toDate&&i[M$].push({after:e.toDate}),AQ(e)?i[M$]=i[M$].concat(t.modifiers[M$]):jQ(e)&&(i[M$]=i[M$].concat(n.modifiers[M$]),i[L$]=n.modifiers[L$],i[I$]=n.modifiers[I$],i[F$]=n.modifiers[F$]),i}var B$=(0,_.createContext)(void 0);function V$(e){var t=KQ(),n=z$(t,S$(),D$()),r=k$(t.modifiers),i=DQ(DQ({},n),r);return(0,M.jsx)(B$.Provider,{value:i,children:e.children})}function H$(){var e=(0,_.useContext)(B$);if(!e)throw Error(`useModifiers must be used within a ModifiersProvider`);return e}function U$(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function W$(e){return!!(e&&typeof e==`object`&&`from`in e)}function G$(e){return!!(e&&typeof e==`object`&&`after`in e)}function K$(e){return!!(e&&typeof e==`object`&&`before`in e)}function q$(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function J$(e,t){var n,r=t.from,i=t.to;return r&&i?(rp(i,r)<0&&(n=[i,r],r=n[0],i=n[1]),rp(e,r)>=0&&rp(i,e)>=0):i?up(i,e):r?up(r,e):!1}function Y$(e){return dp(e)}function X$(e){return Array.isArray(e)&&e.every(dp)}function Z$(e,t){return t.some(function(t){if(typeof t==`boolean`)return t;if(Y$(t))return up(e,t);if(X$(t))return t.includes(e);if(W$(t))return J$(e,t);if(q$(t))return t.dayOfWeek.includes(e.getDay());if(U$(t)){var n=rp(t.before,e),r=rp(t.after,e),i=n>0,a=r<0;return fm(t.before,t.after)?a&&i:i||a}return G$(t)?rp(e,t.after)>0:K$(t)?rp(t.before,e)>0:typeof t==`function`?t(e):!1})}function Q$(e,t,n){var r=Object.keys(t).reduce(function(n,r){var i=t[r];return Z$(e,i)&&n.push(r),n},[]),i={};return r.forEach(function(e){return i[e]=!0}),n&&!mm(e,n)&&(i.outside=!0),i}function $$(e,t){for(var n=gp(e[0]),r=hp(e[e.length-1]),i,a,o=n;o<=r;){var s=Q$(o,t);if(!(!s.disabled&&!s.hidden)){o=Hf(o,1);continue}if(s.selected)return o;s.today&&!a&&(a=o),i||=o,o=Hf(o,1)}return a||i}var e1=365;function t1(e,t){var n=t.moveBy,r=t.direction,i=t.context,a=t.modifiers,o=t.retry,s=o===void 0?{count:0,lastFocused:e}:o,c=i.weekStartsOn,l=i.fromDate,u=i.toDate,d=i.locale,f={day:Hf,week:ap,month:Uf,year:op,startOfWeek:function(e){return i.ISOWeek?$f(e):Qf(e,{locale:d,weekStartsOn:c})},endOfWeek:function(e){return i.ISOWeek?yp(e):vp(e,{locale:d,weekStartsOn:c})}}[n](e,r===`after`?1:-1);r===`before`&&l?f=sp([l,f]):r===`after`&&u&&(f=cp([u,f]));var p=!0;if(a){var m=Q$(f,a);p=!m.disabled&&!m.hidden}return p?f:s.count>e1?s.lastFocused:t1(f,{moveBy:n,direction:r,context:i,modifiers:a,retry:DQ(DQ({}
352,s),{count:s.count+1})})}var n1=(0,_.createContext)(void 0);function r1(e){var t=o$(),n=H$(),r=(0,_.useState)(),i=r[0],a=r[1],o=(0,_.useState)(),s=o[0],c=o[1],l=$$(t.displayMonths,n),u=i??(s&&t.isDateDisplayed(s))?s:l,d=function(){c(i),a(void 0)},f=function(e){a(e)},p=KQ(),m=function(e,r){if(i){var a=t1(i,{moveBy:e,direction:r,context:p,modifiers:n});up(i,a)||(t.goToDate(a,i),f(a))}},h={focusedDay:i,focusTarget:u,blur:d,focus:f,focusDayAfter:function(){return m(`day`,`after`)},focusDayBefore:function(){return m(`day`,`before`)},focusWeekAfter:function(){return m(`week`,`after`)},focusWeekBefore:function(){return m(`week`,`before`)},focusMonthBefore:function(){return m(`month`,`before`)},focusMonthAfter:function(){return m(`month`,`after`)},focusYearBefore:function(){return m(`year`,`before`)},focusYearAfter:function(){return m(`year`,`after`)},focusStartOfWeek:function(){return m(`startOfWeek`,`before`)},focusEndOfWeek:function(){return m(`endOfWeek`,`after`)}};return(0,M.jsx)(n1.Provider,{value:h,children:e.children})}function i1(){var e=(0,_.useContext)(n1);if(!e)throw Error(`useFocusContext must be used within a FocusProvider`);return e}function a1(e,t){return Q$(e,H$(),t)}var o1=(0,_.createContext)(void 0);function s1(e){return MQ(e.initialProps)?(0,M.jsx)(c1,{initialProps:e.initialProps,children:e.children}):(0,M.jsx)(o1.Provider,{value:{selected:void 0},children:e.children})}function c1(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var i,a,o;if((i=t.onDayClick)==null||i.call(t,e,n,r),n.selected&&!t.required){(a=t.onSelect)==null||a.call(t,void 0,e,n,r);return}(o=t.onSelect)==null||o.call(t,e,e,n,r)}};return(0,M.jsx)(o1.Provider,{value:r,children:n})}function l1(){var e=(0,_.useContext)(o1);if(!e)throw Error(`useSelectSingle must be used within a SelectSingleProvider`);return e}function u1(e,t){var n=KQ(),r=l1(),i=S$(),a=D$(),o=i1(),s=o.focusDayAfter,c=o.focusDayBefore,l=o.focusWeekAfter,u=o.focusWeekBefore,d=o.blur,f=o.focus,p=o.focusMonthBefore,m=o.focusMonthAfter,h=o.focusYearBefore,g=o.focusYearAfter,_=o.focusStartOfWeek,v=o.focusEndOfWeek;return{onClick:function(o){var s,c,l,u;MQ(n)?(s=r.onDayClick)==null||s.call(r,e,t,o):AQ(n)?(c=i.onDayClick)==null||c.call(i,e,t,o):jQ(n)?(l=a.onDayClick)==null||l.call(a,e,t,o):(u=n.onDayClick)==null||u.call(n,e,t,o)},onFocus:function(r){var i;f(e),(i=n.onDayFocus)==null||i.call(n,e,t,r)},onBlur:function(r){var i;d(),(i=n.onDayBlur)==null||i.call(n,e,t,r)},onKeyDown:function(r){var i;switch(r.key){case`ArrowLeft`:r.preventDefault(),r.stopPropagation(),n.dir===`rtl`?s():c();break;case`ArrowRight`:r.preventDefault(),r.stopPropagation(),n.dir===`rtl`?c():s();break;case`ArrowDown`:r.preventDefault(),r.stopPropagation(),l();break;case`ArrowUp`:r.preventDefault(),r.stopPropagation(),u();break;case`PageUp`:r.preventDefault(),r.stopPropagation(),r.shiftKey?h():p();break;case`PageDown`:r.preventDefault(),r.stopPropagation(),r.shiftKey?g():m();break;case`Home`:r.preventDefault(),r.stopPropagation(),_();break;case`End`:r.preventDefault(),r.stopPropagation(),v();break}(i=n.onDayKeyDown)==null||i.call(n,e,t,r)},onKeyUp:function(r){var i;(i=n.onDayKeyUp)==null||i.call(n,e,t,r)},onMouseEnter:function(r){var i;(i=n.onDayMouseEnter)==null||i.call(n,e,t,r)},onMouseLeave:function(r){var i;(i=n.onDayMouseLeave)==null||i.call(n,e,t,r)},onPointerEnter:function(r){var i;(i=n.onDayPointerEnter)==null||i.call(n,e,t,r)},onPointerLeave:function(r){var i;(i=n.onDayPointerLeave)==null||i.call(n,e,t,r)},onTouchCancel:function(r){var i;(i=n.onDayTouchCancel)==null||i.call(n,e,t,r)},onTouchEnd:function(r){var i;(i=n.onDayTouchEnd)==null||i.call(n,e,t,r)},onTouchMove:function(r){var i;(i=n.onDayTouchMove)==null||i.call(n,e,t,r)},onTouchStart:function(r){var i;(i=n.onDayTouchStart)==null||i.call(n,e,t,r)}}}function d1(){var e=KQ(),t=l1(),n=S$(),r=D$();return MQ(e)?t.selected:AQ(e)?n.selected:jQ(e)?r.selected:void 0}function f1(e){return Object.values(A$).includes(e)}function p1(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(f1(t)){var i=e.classNames[`day_${t}`];i&&n.push(i)}}),n}function m1(e,t){var n=DQ({},e.styles.day);return Object.keys(t).forEach(function(t){n=DQ(DQ({},n),e.modifiersStyles?.[t])}),n}function h1(e,t,n){var r,i=KQ(),a=i1(),o=a1(e,t),s=u1(e,o),c=d1(),l=!!(i.onDayCl
352ick||i.mode!=="default");(0,_.useEffect)(function(){var t;o.outside||a.focusedDay&&l&&up(a.focusedDay,e)&&((t=n.current)==null||t.focus())},[a.focusedDay,e,n,l,o.outside]);var u=p1(i,o).join(` `),d=m1(i,o),f=!!(o.outside&&!i.showOutsideDays||o.hidden),p={style:d,className:u,children:(0,M.jsx)(i.components?.DayContent??v$,{date:e,displayMonth:t,activeModifiers:o}),role:`gridcell`},m=a.focusTarget&&up(a.focusTarget,e)&&!o.outside,h=a.focusedDay&&up(a.focusedDay,e);return{isButton:l,isHidden:f,activeModifiers:o,selectedDays:c,buttonProps:DQ(DQ(DQ({},p),(r={disabled:o.disabled,role:`gridcell`},r[`aria-selected`]=o.selected,r.tabIndex=h||m?0:-1,r)),s),divProps:p}}function g1(e){var t=(0,_.useRef)(null),n=h1(e.date,e.displayMonth,t);return n.isHidden?(0,M.jsx)(`div`,{role:`gridcell`}):n.isButton?(0,M.jsx)(u$,DQ({name:`day`,ref:t},n.buttonProps)):(0,M.jsx)(`div`,DQ({},n.divProps))}function _1(e){var t=e.number,n=e.dates,r=KQ(),i=r.onWeekNumberClick,a=r.styles,o=r.classNames,s=r.locale,c=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,u=l(Number(t),{locale:s});if(!i)return(0,M.jsx)(`span`,{className:o.weeknumber,style:a.weeknumber,children:u});var d=c(Number(t),{locale:s});return(0,M.jsx)(u$,{name:`week-number`,"aria-label":d,className:o.weeknumber,style:a.weeknumber,onClick:function(e){i(t,n,e)},children:u})}function v1(e){var t=KQ(),n=t.styles,r=t.classNames,i=t.showWeekNumber,a=t.components,o=a?.Day??g1,s=a?.WeekNumber??_1,c;return i&&(c=(0,M.jsx)(`td`,{className:r.cell,style:n.cell,children:(0,M.jsx)(s,{number:e.weekNumber,dates:e.dates})})),(0,M.jsxs)(`tr`,{className:r.row,style:n.row,children:[c,e.dates.map(function(t){return(0,M.jsx)(`td`,{className:r.cell,style:n.cell,role:`presentation`,children:(0,M.jsx)(o,{displayMonth:e.displayMonth,date:t})},lm(t))})]})}function y1(e,t,n){for(var r=n?.ISOWeek?yp(t):vp(t,n),i=n?.ISOWeek?$f(e):Qf(e,n),a=rp(r,i),o=[],s=0;s<=a;s++)o.push(Hf(i,s));return o.reduce(function(e,t){var r=n?.ISOWeek?Pp(t):Lp(t,n),i=e.find(function(e){return e.weekNumber===r});return i?(i.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)},[])}function b1(e,t){var n=y1(gp(e),hp(e),t);if(t?.useFixedWeeks){var r=dm(e,t);if(r<6){var i=n[n.length-1],a=i.dates[i.dates.length-1],o=ap(a,6-r),s=y1(ap(a,1),o,t);n.push.apply(n,s)}}return n}function x1(e){var t=KQ(),n=t.locale,r=t.classNames,i=t.styles,a=t.hideHead,o=t.fixedWeeks,s=t.components,c=t.weekStartsOn,l=t.firstWeekContainsDate,u=t.ISOWeek,d=b1(e.displayMonth,{useFixedWeeks:!!o,ISOWeek:u,locale:n,weekStartsOn:c,firstWeekContainsDate:l}),f=s?.Head??_$,p=s?.Row??v1,m=s?.Footer??m$;return(0,M.jsxs)(`table`,{id:e.id,className:r.table,style:i.table,role:`grid`,"aria-labelledby":e[`aria-labelledby`],children:[!a&&(0,M.jsx)(f,{}),(0,M.jsx)(`tbody`,{className:r.tbody,style:i.tbody,children:d.map(function(t){return(0,M.jsx)(p,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),(0,M.jsx)(m,{displayMonth:e.displayMonth})]})}function S1(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var C1=S1()?_.useLayoutEffect:_.useEffect,w1=!1,T1=0;function E1(){return`react-day-picker-${++T1}`}function D1(e){var t=(0,_.useState)(e??(w1?E1():null)),n=t[0],r=t[1];return C1(function(){n===null&&r(E1())},[]),(0,_.useEffect)(function(){w1===!1&&(w1=!0)},[]),e??n??void 0}function O1(e){var t,n=KQ(),r=n.dir,i=n.classNames,a=n.styles,o=n.components,s=o$().displayMonths,c=D1(n.id?`${n.id}-${e.displayIndex}`:void 0),l=n.id?`${n.id}-grid-${e.displayIndex}`:void 0,u=[i.month],d=a.month,f=e.displayIndex===0,p=e.displayIndex===s.length-1,m=!f&&!p;r===`rtl`&&(t=[f,p],p=t[0],f=t[1]),f&&(u.push(i.caption_start),d=DQ(DQ({},d),a.caption_start)),p&&(u.push(i.caption_end),d=DQ(DQ({},d),a.caption_end)),m&&(u.push(i.caption_between),d=DQ(DQ({},d),a.caption_between));var h=o?.Caption??p$;return(0,M.jsxs)(`div`,{className:u.join(` `),style:d,children:[(0,M.jsx)(h,{id:c,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,M.jsx)(x1,{id:l,"aria-labelledby":c,displayMonth:e.displayMonth})]},e.displayIndex)}function k1(e){var t=KQ(),n=t.classNames,r=t.styles;return(0,M.jsx)(`div`,{className:n.months,style:r.months,children:e.children})}function A1(e){var t=e.initialProps,n=KQ(),r=i1(),i=o$(),a=(0,_.useState)(!1),o=a[0],s=a[1];(0,_.useEffect)(function(){n.initialFocus&&r.focusTarget&&(o||(r.focus(r.focusTarget),s(!0)))},[n.initialFocus,o,r.focus,r.focusTarget,r]);var c=[n.classNames.root,n.className];n.numberOfMonths>1&&c.push(n.classNames.multiple_months),n.showWeekNumber&&c.push(n.classNames.with_weeknumber);var l=DQ(DQ({},n.styles.root),n.style),u=Object.keys(t).filter(function(e){return e.startsWith(`data-`)}).reduce(function(e,n){var r;return DQ(DQ({},e),(r={},r[n]=t[n],r))},{}),d=t.components?.Months??k1;return(0,M.jsx)(`div`,DQ({className:c.join(` `),style:l,dir:n.dir,id:n.id,nonce:t.nonce,title:t.title,lang:t.lang},u,{children:(0,M.jsx)(d,{children:i.displayMonths.map(function(e,t){return(0,M.jsx)(O1,{displayIndex:t,displayMonth:e},t)})})}))}function j1(e){var t=e.children,n=OQ(e,[`children`]);return(0,M.jsx)(GQ,{initialProps:n,children:(0,M.jsx)(a$,{children:(0,M.jsx)(s1,{initialProps:n,children:(0,M.jsx)(b$,{initialProps:n,children:(0,M.jsx)(T$,{initialProps:n,children:(0,M.jsx)(V$,{children:(0,M.jsx)(r1,{children:t})})})})})})})}function M1(e){return(0,M.jsx)(j1,DQ({},e,{children:(0,M.jsx)(A1,{initialProps:e})}))}function N1({className:e,classNames:t,showOutsideDays:n=!0,...r}){return(0,M.jsx)(M1,{showOutsideDays:n,className:F(`p-3`,e),classNames:{months:`flex flex-col sm:flex-row space-y-4 sm:sp
352ace-x-4 sm:space-y-0`,month:`space-y-4`,caption:`flex justify-center pt-1 relative items-center`,caption_label:`text-sm font-medium`,nav:`space-x-1 flex items-center`,nav_button:F(Ef({variant:`outline`}),`h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100`),nav_button_previous:`absolute left-1`,nav_button_next:`absolute right-1`,table:`w-full border-collapse space-y-1`,head_row:`flex`,head_cell:`text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]`,row:`flex w-full mt-2`,cell:`h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20`,day:F(Ef({variant:`ghost`}),`h-9 w-9 p-0 font-normal aria-selected:opacity-100`),day_range_end:`day-range-end`,day_selected:`bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground`,day_today:`bg-[#14532d] text-white font-bold border-2 border-[#14532d]`,day_outside:`day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground`,day_disabled:`text-muted-foreground opacity-50`,day_range_middle:`aria-selected:bg-accent aria-selected:text-accent-foreground`,day_hidden:`invisible`,...t},components:{IconLeft:({...e})=>(0,M.jsx)(pn,{className:`h-4 w-4`}),IconRight:({...e})=>(0,M.jsx)(mn,{className:`h-4 w-4`})},...r})}N1.displayName=`Calendar`;var P1=()=>{let[e,t]=(0,_.useState)(void 0),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(new Date),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),{toast:f}=hC(),p=Ru();(0,_.useEffect)(()=>{d(sessionStorage.getItem(`belvedere_social_admin_auth`)===`true`)},[]),(0,_.useEffect)(()=>{(async()=>{try{let{data:e,error:t}=await wb.from(`social_events`).select(`date, end_date`);if(t)throw t;if(e&&e.length>0){let t=[];e.forEach(e=>{let n=_m(e.date),r=e.end_date?_m(e.end_date):n,i=new Date(n);for(;i<=r;)t.push(new Date(i)),i.setDate(i.getDate()+1)}),l(t)}}catch(e){console.error(`Error loading event dates for calendar:`,e)}})()},[]);let m=()=>{let e=new Date;return e.setHours(0,0,0,0),e},h=c.filter(e=>{let t=m(),n=new Date(e);return n.setHours(0,0,0,0),n.getTime()===t.getTime()}),g=e=>{t(e),r(e===void 0)},v=()=>{a(e=>zm(e,1))},y=()=>{a(e=>Uf(e,1))},b=`webcal://belvederegolfpei.com/feed/belvedere-events.ics`;return(0,M.jsxs)(`main`,{className:`min-h-screen bg-white`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Upcoming Events | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Stay updated with all the upcoming social events and activities at Belvedere Golf Club.`})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,M.jsxs)(`div`,{className:`flex justify-between items-center mb-6`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green`,children:`Upcoming Events`}),u&&(0,M.jsxs)(R,{variant:`outline`,className:`text-golf-green border-golf-green/30 hover:bg-golf-green/10 flex items-center`,onClick:()=>p(`/calendar-admin`),children:[(0,M.jsx)($n,{className:`mr-2 h-4 w-4`}),`Manage Events`]})]}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-8`,children:`Stay up to date with all the exciting events happening at Belvedere Golf Club. From tournaments to social gatherings, there's always something happening at the club.`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-8`,children:[(0,M.jsxs)(`div`,{className:`lg:col-span-1`,children:[(0,M.jsx)(Bm,{children:(0,M.jsxs)(Wm,{className:`pt-6`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-center mb-4`,children:[(0,M.jsx)(cn,{className:`mr-2 h-5 w-5 text-golf-green`}),(0,M.jsx)(`span`,{className:`font-medium`,children:`Select Date`})]}),(0,M.jsx)(N1,{mode:`single`,selected:e,onSelect:g,className:`rounded-md border shadow pointer-events-auto`,modifiers:{highlighted:c,todayEvent:h},modifiersStyles:{todayEvent:{backgroundColor:`#14532d`,color:`white`,fontWeight:`bold`,border:`2px solid #fff`},highlighted:{backgroundColor:`rgba(22, 163, 74, 0.1)`,fontWeight:`bold`,border:`1px dashed #16A34A`}}}),e&&(0,M.jsx)(`div`,{className:`mt-4 text-center`,children:(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>g(void 0),className:`text-golf-green border-golf-green/30 hover:bg-golf-green/10`,children:`Show All Events`})})]})}),(0,M.jsx)(`div`,{className:`mt-4 flex flex-col space-y-3`,children:(0,M.jsxs)(R,{variant:`outline`,className:`w-full text-golf-green border-golf-green/30 hover:bg-golf-green/10 flex items-center justify-center`,onClick:()=>s(!0),children:[(0,M.jsx)(on,{className:`mr-2 h-4 w-4`}),`Subscribe to Calendar`]})})]}),(0,M.jsxs)(`div`,{className:`lg:col-span-2`,children:[!e&&(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-semibold mb-4`,children:om(i,`MM
352MM yyyy`)}),(0,M.jsxs)(`div`,{className:`flex justify-center space-x-4`,children:[(0,M.jsx)(`button`,{onClick:v,className:`px-4 py-2 bg-golf-sand/20 rounded hover:bg-golf-sand/40`,children:`Previous Month`}),(0,M.jsx)(`button`,{onClick:()=>a(new Date),className:`px-4 py-2 bg-golf-sand/20 rounded hover:bg-golf-sand/40`,children:`Current Month`}),(0,M.jsx)(`button`,{onClick:y,className:`px-4 py-2 bg-golf-sand/20 rounded hover:bg-golf-sand/40`,children:`Next Month`})]})]}),(0,M.jsx)(nC,{selectedDate:e,showAllEvents:!e,currentMonth:i})]})]})]})}),(0,M.jsx)(KS,{open:o,onOpenChange:s,children:(0,M.jsxs)(XS,{className:`sm:max-w-md`,children:[(0,M.jsxs)(ZS,{children:[(0,M.jsx)($S,{children:`Subscribe to Event Calendar`}),(0,M.jsx)(eC,{children:`Add our events calendar to your preferred calendar app to stay updated.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col space-y-3 py-4`,children:[(0,M.jsxs)(R,{variant:`outline`,className:`justify-start`,onClick:()=>{navigator.clipboard.writeText(b),f({title:`Google Calendar`,description:`Copied! In Google Calendar, click + next to 'Other calendars' > From URL, and paste the link.`})},children:[(0,M.jsx)(`img`,{src:`https://upload.wikimedia.org/wikipedia/commons/a/a5/Google_Calendar_icon_%282020%29.svg`,alt:`Google Calendar`,className:`w-5 h-5 mr-2`}),`Google Calendar (Copy Link)`]}),(0,M.jsx)(`a`,{href:`https://outlook.office.com/calendar/addcalendar?url=webcal://belvederegolfpei.com/feed/belvedere-events.ics`,target:`_blank`,rel:`noopener noreferrer`,className:`block`,children:(0,M.jsxs)(R,{variant:`outline`,className:`justify-start`,children:[(0,M.jsx)(`img`,{src:`https://upload.wikimedia.org/wikipedia/commons/d/df/Microsoft_Office_Outlook_%282018%E2%80%93present%29.svg`,alt:`Microsoft Outlook`,className:`w-5 h-5 mr-2`}),`Microsoft Outlook`]})}),(0,M.jsx)(`a`,{href:b,className:`block`,children:(0,M.jsxs)(R,{variant:`outline`,className:`justify-start`,children:[(0,M.jsx)(cn,{className:`h-5 w-5 mr-2`}),`Apple Calendar (iCal)`]})})]}),(0,M.jsx)(JS,{asChild:!0,children:(0,M.jsx)(R,{className:`w-full bg-golf-green hover:bg-golf-green/80`,children:`Done`})})]})})]})},F1=`Switch`,[I1,L1]=me(F1),[R1,z1]=I1(F1),B1=_.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=_.useState(null),m=j(t,e=>p(e)),h=_.useRef(!1),g=f?u||!!f.closest(`form`):!0,[v=!1,y]=He({prop:i,defaultProp:a,onChange:l});return(0,M.jsxs)(R1,{scope:n,checked:v,disabled:s,children:[(0,M.jsx)(N.button,{type:`button`,role:`switch`,"aria-checked":v,"aria-required":o,"data-state":W1(v),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:A(e.onClick,e=>{y(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,M.jsx)(U1,{control:f,bubbles:!h.current,name:r,value:c,checked:v,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});B1.displayName=F1;var V1=`SwitchThumb`,H1=_.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=z1(V1,n);return(0,M.jsx)(N.span,{"data-state":W1(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});H1.displayName=V1;var U1=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,a=_.useRef(null),o=xC(n),s=us(t);return _.useEffect(()=>{let e=a.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(o!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[o,n,r]),(0,M.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...e.style,...s,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})};function W1(e){return e?`checked`:`unchecked`}var G1=B1,K1=H1,q1=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(G1,{className:F(`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`,e),...t,ref:n,children:(0,M.jsx)(K1,{className:F(`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`)})}));q1.displayName=G1.displayName;var J1=()=>{let[e,t]=(0,_.useState)(!1),[n,r]=(0,_.useState)(`upcoming`),i=e=>{try{let t=new Date,n;return n=e.end_date?!e.is_all_day&&e.end_time?_m(`${e.end_date}T${e.end_time}`):new Date(e.end_date+`T23:59:59`):!e.is_all_day&&e.time?_m(`${e.date}
352T${e.time}`):new Date(e.date+`T23:59:59`),n<t}catch{return!1}},[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)([]),l=s.filter(e=>!i(e)),u=s.filter(e=>i(e)),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)({id:``,title:``,description:``,date:``,time:``,location:``,image:null,url:null,is_all_day:!1,end_date:null,end_time:null}),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),w=_.useRef(null),T=Ru(),E=`/lovable-uploads/ed4ee0f9-6867-41fc-b95e-12b9ec553b7f.png`,D=async()=>{try{C(!0);let{data:e,error:t}=await wb.from(`social_events`).select(`*`).order(`date`,{ascending:!0});if(t)throw t;c(e||[])}catch(e){console.error(`Error fetching events:`,e),Bi.error(`Failed to load events`,{description:`There was an error loading the events from the database.`})}finally{C(!1)}};(0,_.useEffect)(()=>{e&&D()},[e]),(0,_.useEffect)(()=>{sessionStorage.getItem(`belvedere_admin_auth`)===`true`&&t(!0)},[]);let O=e=>{e.preventDefault(),C(!0),setTimeout(()=>{a===`golfclub2025`?(t(!0),sessionStorage.setItem(`belvedere_admin_auth`,`true`),Bi.success(`Access granted`,{description:`Welcome to the event management dashboard.`})):Bi.error(`Access denied`,{description:`Incorrect password. Please try again.`}),C(!1)},800)},ee=()=>{g({id:window.crypto&&typeof window.crypto.randomUUID==`function`?window.crypto.randomUUID():``,title:``,description:``,date:``,time:``,location:``,image:null,url:null,is_all_day:!1,end_date:null,end_time:null}),y(!0),f(!0),x(!1)},k=e=>{g({...e,description:e.description||``,image:e.image||null,url:e.url||null,is_all_day:e.is_all_day||!1,end_date:e.end_date||null,end_time:e.end_time||null}),y(!1),f(!0),x(!1)},A=e=>{g(e),m(!0)},te=async()=>{if(h.id){C(!0);try{let{error:e}=await wb.from(`social_events`).delete().eq(`id`,h.id);if(e)throw e;c(s.filter(e=>e.id!==h.id)),Bi.success(`Event deleted`,{description:`The event has been successfully removed.`})}catch(e){console.error(`Error deleting event:`,e),Bi.error(`Failed to delete event`,{description:`There was an error deleting the event.`})}finally{C(!1),m(!1)}}},ne=async()=>{if(!h.title||!h.date||!h.is_all_day&&!h.time||!h.location){Bi.error(`Missing information`,{description:`Please fill in all required fields.`});return}C(!0);try{let e=h.image||E,t={id:h.id,title:h.title,description:h.description,date:h.date,time:h.is_all_day?`00:00`:h.time,location:h.location,image:e,url:h.url,is_all_day:h.is_all_day,end_date:h.end_date,end_time:h.is_all_day?null:h.end_time};if(h.id||delete t.id,v){let{error:e}=await wb.from(`social_events`).insert(t);if(e)throw e;Bi.success(`Event added`,{description:`The new event has been successfully added.`})}else{let{error:e}=await wb.from(`social_events`).update(t).eq(`id`,h.id);if(e)throw e;Bi.success(`Event updated`,{description:`The event has been successfully updated.`})}D(),f(!1)}catch(e){console.error(`Error saving event:`,e),Bi.error(`Failed to save event`,{description:`There was an error saving the event to the database.`})}finally{C(!1)}},j=e=>{let{name:t,value:n}=e.target;g({...h,[t]:n})};return e?(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Event Management | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Admin panel for managing social events at Belvedere Golf Club.`})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4 overflow-auto w-full max-w-full`,children:(0,M.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between mb-8 flex-wrap`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h1`,{className:`text-3xl font-playfair font-bold text-golf-green`,children:`Event Management`}),(0,M.jsx)(`p`,{className:`text-gray-600 mt-1`,children:`Manage the social calendar events for the club`})]}),(0,M.jsxs)(`div`,{className:`flex space-x-3 mt-4 sm:mt-0 w-full sm:w-auto justify-end sm:justify-start overflow-x-auto`,children:[(0,M.jsxs)(R,{onClick:()=>T(`/social-calendar`),variant:`outline`,className:`flex items-center w-full sm:w-auto`,children:[(0,M.jsx)(Qt,{className:`h-4 w-4 mr-2`}),`Back to Calendar`]}),(0,M.jsxs)(R,{onClick:ee,className:`bg-golf-green hover:bg-golf-green/80 w-full sm:w-auto`,children:[(0,M.jsx)(Yn,{className:`h-4 w-4 mr-2`}),` Add Event`]})]})]}),(0,M.jsx)(Bm,{children:(0,M.jsx)(Wm,{className:`pt-6`,children:S&&s.length===0?(0,M.jsx)(`div`,{className:`text-center py-12`,children:(0,M.jsx)(`p`,{className:`text-gray-500`,children:`Loading events...`})}):(0,M.jsxs)(`div`,{className:`overflow-x-scroll sm:overflow-x-auto w-full`,children:[(0,M.jsxs)(`div`,{className:`flex space-x-4 mb-4`,children:[(0,M.jsx)(`button`,{className:`px-4 py-2 rounded-t-md border-b-2 font-medium transition-colors ${n===`upcoming`?`border-golf-green text-golf-green bg-white`:`border-transparent text-gray-500 bg-gray-50 hover:text-golf-green`}`,onClick:()=>r(`upcoming`),type:`button`,children:`Upcoming`}),(0,M.jsx)(`button`,{className:`px-4 py-2 rounded-t-md border-b-2 font-medium transition-colors ${n===`archive`?`border-golf-green text-golf-green bg-white`:`border-transparent text-gray-500 bg-gray-50 hover:text-golf-green`}`,onClick:()=>r(`archive`),type:`button`,children:`Archive`})]}),(0,M.jsx)(`div`,{className:`min-w-[600px]`,children:(0,M.jsxs)(lQ,{children:[(0,M.jsx)(uQ,{children:(0,M.jsxs)(pQ,{children:[(0,M.jsx)(mQ,{children:`Date`}),(0,M.jsx)(mQ,{children:`Event`}),(0,M.jsx)(mQ,{children:`Location`}),(0,M.jsx)(mQ,{children:`Image`}),(0,M.jsx)(mQ,{className:`text-right`,children:`Actions`})]})}),(0,M.jsx)(dQ,{children:(n===`upcoming`?l:u).length>0?(n===`upcoming`?l:u).map(e=>(0,M.jsxs)(pQ,{children:[(0,M.jsxs)(hQ,{children:[(0,M.jsxs)(`div`,{children:[om(_m(e.date),`MM
352M d`),e.is_all_day?(0,M.jsx)(`span`,{className:`ml-1 text-xs bg-blue-100 text-blue-800 px-1.5 py-0.5 rounded-full`,children:`All Day`}):(0,M.jsxs)(M.Fragment,{children:[` at `,om(_m(`1970-01-01T${e.time}`),`h:mm a`)]})]}),e.end_date&&(0,M.jsxs)(`div`,{className:`text-xs text-gray-500 mt-1`,children:[`Through: `,om(_m(e.end_date),`MMM d`),!e.is_all_day&&e.end_time&&` at ${om(_m(`1970-01-01T${e.end_time}`),`h:mm a`)}`]})]}),(0,M.jsxs)(hQ,{children:[(0,M.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,M.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[e.description&&e.description.substring(0,50),e.description&&e.description.length>50?`...`:``]})]}),(0,M.jsx)(hQ,{children:e.location}),(0,M.jsx)(hQ,{children:e.image?(0,M.jsx)(`div`,{className:`h-10 w-16 relative`,children:(0,M.jsx)(`img`,{src:e.image,alt:e.title,className:`h-full w-full object-cover rounded`})}):(0,M.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:`No image`})}),(0,M.jsxs)(hQ,{className:`text-right space-x-2`,children:[(0,M.jsx)(R,{size:`sm`,variant:`outline`,onClick:()=>k(e),children:(0,M.jsx)(nr,{className:`h-4 w-4`})}),(0,M.jsx)(R,{size:`sm`,variant:`outline`,className:`text-red-500`,onClick:()=>A(e),children:(0,M.jsx)(cr,{className:`h-4 w-4`})})]})]},e.id)):(0,M.jsx)(pQ,{children:(0,M.jsx)(hQ,{colSpan:5,className:`text-center py-8`,children:n===`upcoming`?`No upcoming events found. Click the "Add Event" button to create one.`:`No archived events.`})})})]})})]})})})]})}),(0,M.jsx)(`input`,{type:`file`,ref:w,style:{display:`none`},accept:`image/*`,onChange:e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0],n=new FileReader;n.onload=e=>{e.target&&e.target.result&&(g({...h,image:e.target.result}),x(!1),Bi.success(`Image uploaded`,{description:`The image has been successfully uploaded.`}))},n.readAsDataURL(t)}}}),(0,M.jsx)(KS,{open:d,onOpenChange:f,children:(0,M.jsxs)(XS,{className:`sm:max-w-[500px] max-h-[90vh] overflow-y-auto`,children:[(0,M.jsxs)(ZS,{children:[(0,M.jsx)($S,{children:v?`Add New Event`:`Edit Event`}),(0,M.jsx)(eC,{children:v?`Fill in the details below to add a new event to the social calendar.`:`Update the event details below.`})]}),(0,M.jsxs)(`div`,{className:`space-y-4 pb-6`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`title`,children:`Event Title*`}),(0,M.jsx)(bJ,{id:`title`,name:`title`,value:h.title||``,onChange:j,placeholder:`Event title`,required:!0})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`description`,children:`Description`}),(0,M.jsx)(xJ,{id:`description`,name:`description`,value:h.description||``,onChange:j,placeholder:`Event description`,rows:3})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,M.jsx)(q1,{id:`is_all_day`,checked:h.is_all_day||!1,onCheckedChange:e=>{g({...h,is_all_day:e})}}),(0,M.jsx)(lJ,{htmlFor:`is_all_day`,className:`font-medium`,children:`All-day event`})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`date`,children:`Start Date*`}),(0,M.jsx)(bJ,{id:`date`,name:`date`,type:`date`,value:h.date||``,onChange:j,required:!0})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`time`,children:h.is_all_day?`Time`:`Start Time*`}),(0,M.jsx)(bJ,{id:`time`,name:`time`,type:`time`,value:h.time||``,onChange:j,required:!h.is_all_day,disabled:h.is_all_day})]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`end_date`,children:`End Date`}),(0,M.jsx)(bJ,{id:`end_date`,name:`end_date`,type:`date`,value:h.end_date||``,onChange:j})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`end_time`,children:`End Time`}),(0,M.jsx)(bJ,{id:`end_time`,name:`end_time`,type:`time`,value:h.end_time||``,onChange:j,disabled:h.is_all_day})]})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`location`,children:`Location*`}),(0,M.jsx)(bJ,{id:`location`,name:`location`,value:h.location||``,onChange:j,placeholder:`Event location`,required:!0})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`url`,children:`Registration/Info URL (Optional)`}),(0,M.jsx)(bJ,{id:`url`,name:`url`,value:h.url||``,onChange:j,placeholder:`https://example.com/register`})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,M.jsxs)(lJ,{htmlFor:`image`,className:`flex items-center`,children:[(0,M.jsx)(Ln,{className:`mr-2 h-4 w-4`}),`Event Image`]}),(0,M.jsxs)(`div`,{className:`flex space-x-2`,children:[(0,M.jsxs)(R,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>{w.current&&w.current.click()},className:`flex items-center text-xs`,children:[(0,M.jsx)(dr,{className:`h-3 w-3 mr-1`}),` Upload Image`]}),!b&&(0,M.jsxs)(R,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>x(!0),className:`flex items-center text-xs`,children:[(0,M.jsx)(Ln,{className:`h-3 w-3 mr-1`}),` URL`]})]})]}),b&&(0,M.jsx)(bJ,{id:`image`,name:`image`,value:h.image||``,onChange:j,placeholder:`Image URL for the event`}),h.image?(0,M.jsxs)(`div`,{className:`mt-2`,children:[(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground mb-2`,children:`Preview:`}),(0,M.jsx)(`div`,{className:`relative h-48 w-full rounded overflow-hidden`,children:(0,M.jsx)(`img`,{src:h.image,alt:`Event preview`,className:`w-full h-full object-cover`,onError:e=>{e.target.src=E,Bi.error(`Image Error`,{description:`The image URL could not be loaded. Using default image.`})}})})]}):(0,M.jsxs)(`div`,{className:`mt-2`,children:[(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground mb-2`,children:`Default image will be used:`}),(0,M.jsx)(`div`,{className:`relative h-48 w-full rounded overflow-hidden bg-gray-50`,children:(0,M.jsx)(`img`,{src:E,alt:`Default event image`,className:`w-full h-full object-contain`})})]})]})]}),(0,M.jsxs)(QS,{children:[(0,M.jsx)(JS,{asChild:!0,children:(0,M.jsxs)(R,{variant:`outline`,className:`mr-2`,children:[(0,M.jsx)(gr,{className:`mr-2 h-4 w-4`}),`Cancel`]})}),(0,M.jsxs)(R,{onClick:ne,className:`bg-golf-green hover:bg-golf-green/80`,disabled:S,children:[(0,M.jsx)(dn,{className:`mr-2 h-4 w-4`}),S?`Saving...`:v?`Add Event`:`Save Changes`]})]})]})}),(0,M.jsx)(KS,{open:p,onOpenChange:m,children:(0,M.jsxs)(XS,{children:[(0,M.jsxs)(ZS,{children:[(0,M.jsx)($S,{children:`Confirm Deletion`}),(0,M.jsxs)(eC,{children:[`Are you sure you want to delete "`,h.title,`"? This action cannot be undone.`]})]}),(0,M.jsxs)(QS,{children:[(0,M.jsx)(JS,{asChild:!0,children:(0,M.jsx)(R,{variant:`outline`,className:`mr-2`,children:`Cancel`})}),(0,M.jsx)(R,{onClick:te,variant:`destructive`,disabled:S,children:S?`Deleting...`:`Delete Event`})]})]})}),(0,M.jsx)(kG,{})]}):(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsx)(`div`,{className:`max-w-md mx-auto`,children:(0,M.jsxs)(Bm,{children:[(0,M.jsx)(Vm,{children:(0,M.jsxs)(Hm,{className:`flex items-center`,children:[(0,M.jsx)(Hn,{className:`mr-2 h-5 w-5`}),` Admin Authentication`]})}),(0,M.jsx)(Wm,{children:(0,M.jsxs)(`form`,{onSubmit:O,className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`password`,children:`Password`}),(0,M.jsx)(bJ,{id:`password`,type:`password`,value:a,onChange:e=>o(e.target.value),placeholder:`Enter admin password`,required:!0}),(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Please enter the admin password to manage social calendar events.`})]}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green/80`,disabled:S,children:S?`Authenticating...`:`Login`}),(0,M.jsx)(`div`,{className:`pt-2`,children:(0,M.jsxs)(R,{type:`button`,variant:`ghost`,className:`w-full text-golf-green hover:text-golf-green/90`,onClick:()=>T(`/social-calendar`),children:[(0,M.jsx)(Qt,{className:`h-4 w-4 mr-2`}),`Back to Calendar`]})})]})})]})})}),(0,M.jsx)(kG,{})]})},Y1=()=>{let{id:e}=Hu(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(!0),[a,o]=(0,_.useState)(null);return(0,_.useEffect)(()=>{(async()=>
352{if(e)try{i(!0);let{data:t,error:r}=await wb.from(`social_events`).select(`*`).eq(`id`,e).single();if(r)throw r;t&&n(t)}catch(e){console.error(`Error loading event:`,e),n(null)}finally{i(!1)}})()},[e]),r?(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h1`,{className:`text-3xl font-bold mb-4`,children:`Loading Event...`}),(0,M.jsx)(`p`,{className:`mb-6`,children:`Please wait while we fetch the event details.`})]})})]}):!t||a?(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h1`,{className:`text-3xl font-bold mb-4`,children:`Event Not Found`}),(0,M.jsx)(`p`,{className:`mb-6`,children:`The event you're looking for doesn't exist or has been removed.`}),(0,M.jsx)(L,{to:`/social-calendar`,children:(0,M.jsxs)(R,{className:`bg-golf-green hover:bg-golf-green/80`,children:[(0,M.jsx)(Qt,{className:`mr-2 h-4 w-4`}),` Back to Calendar`]})})]})})]}):(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsxs)(`title`,{children:[t.title,` | Belvedere Golf Club`]}),(0,M.jsx)(`meta`,{name:`description`,content:t.description})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,M.jsx)(`div`,{className:`mb-6`,children:(0,M.jsxs)(L,{to:`/social-calendar`,className:`inline-flex items-center text-golf-green hover:underline`,children:[(0,M.jsx)(Qt,{className:`mr-1 h-4 w-4`}),` Back to Events Calendar`]})}),(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-md overflow-hidden`,children:[t.image&&(0,M.jsx)(`div`,{className:`w-full`,children:(0,M.jsx)(`img`,{src:t.image,alt:t.title,className:`w-full h-auto max-h-[500px] object-contain bg-gray-50 py-2`,onError:e=>{e.target.src=`public/lovable-uploads/f1dd730e-3e13-4391-8a45-758fafd9fff6.png`}})}),(0,M.jsxs)(`div`,{className:`p-6 md:p-8`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green mb-6`,children:t.title}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-6 mb-8`,children:[(0,M.jsxs)(`div`,{className:`flex items-center text-gray-700`,children:[(0,M.jsx)(rn,{className:`mr-2 h-5 w-5 text-golf-green`}),(0,M.jsx)(`span`,{children:(()=>{if(!t)return``;let e=``;return e=t.is_all_day?`${om(_m(t.date),`EEEE, MMMM d, yyyy`)} - All day`:`${om(_m(t.date),`EEEE, MMMM d, yyyy`)} at ${t.time?om(_m(`${t.date}T${t.time}`),`h:mm a`):``}`,t.end_date&&(t.is_all_day?e+=` through ${om(_m(t.end_date),`EEEE, MMMM d, yyyy`)}`:(e+=` to ${om(_m(t.end_date),`MMMM d`)}`,t.end_time&&(e+=` at ${om(_m(`${t.end_date||t.date}T${t.end_time}`),`h:mm a`)}`))),e})()})]}),(0,M.jsxs)(`div`,{className:`flex items-center text-gray-700`,children:[(0,M.jsx)(Wn,{className:`mr-2 h-5 w-5 text-golf-green`}),(0,M.jsx)(`span`,{children:t.location})]})]}),(0,M.jsx)(`div`,{className:`max-w-none mb-8`,children:(0,M.jsx)(`div`,{className:`text-lg leading-relaxed`,dangerouslySetInnerHTML:{__html:t.description}})}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-4 mt-8`,children:[(0,M.jsx)(L,{to:`/social-calendar`,children:(0,M.jsxs)(R,{variant:`outline`,children:[(0,M.jsx)(cn,{className:`mr-2 h-4 w-4`}),` View All Events`]})}),t.url&&(0,M.jsx)(`a`,{href:t.url,target:`_blank`,rel:`noopener noreferrer`,children:(0,M.jsxs)(R,{className:`bg-golf-green hover:bg-golf-green/80`,children:[`Register Now `,(0,M.jsx)(En,{className:`ml-2 h-4 w-4`})]})})]})]})]})]})})]})};function X1(e,[t,n]){return Math.min(n,Math.max(t,e))}var Z1=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Q1=[` `,`Enter`],$1=`Select`,[e0,t0,n0]=fe($1),[r0,i0]=me($1,[n0,ps]),a0=ps(),[o0,s0]=r0($1),[c0,l0]=r0($1),u0=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=a0(t),[g,v]=_.useState(null),[y,b]=_.useState(null),[x,S]=_.useState(!1),C=bC(l),[w=!1,T]=He({prop:r,defaultProp:i,onChange:a}),[E,D]=He({prop:o,defaultProp:s,onChange:c}),O=_.useRef(null),ee=g?m||!!g.closest(`form`):!0,[k,A]=_.useState(new Set),te=Array.from(k).map(e=>e.props.value).join(`;`);return(0,M.jsx)(ks,{...h,children:(0,M.jsxs)(o0,{required:p,scope:t,trigger:g,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ra(),value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,children:[(0,M.jsx)(e0.Provider,{scope:t,children:(0,M.jsx)(c0,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:_.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),ee?(0,M.jsxs)(i2,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:E,onChange:e=>D(e.target.value),disabled:f,form:m,children:[E===void 0?(0,M.jsx)(`option`,{value:``}):null,Array.from(k)]},te):null]})})};u0.displayName=$1;var d0=`SelectTrigger`,f0=_.forwardRef((e,t)=>
vendor: 7,859 bytes, line 352
352{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=a0(n),o=s0(d0,n),s=o.disabled||r,c=j(t,o.onTriggerChange),l=t0(n),u=_.useRef(`touch`),[d,f,p]=a2(e=>{let t=l().filter(e=>!e.disabled),n=o2(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,M.jsx)(As,{asChild:!0,...a,children:(0,M.jsx)(N.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":r2(o.value)?``:void 0,...i,ref:c,onClick:A(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:A(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:A(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Z1.includes(e.key)&&(m(),e.preventDefault())})})})});f0.displayName=d0;var p0=`SelectValue`,m0=_.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=s0(p0,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=j(t,c.onValueNodeChange);return Pe(()=>{l(u)},[l,u]),(0,M.jsx)(N.span,{...s,ref:d,style:{pointerEvents:`none`},children:r2(c.value)?(0,M.jsx)(M.Fragment,{children:o}):a})});m0.displayName=p0;var h0=`SelectIcon`,g0=_.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,M.jsx)(N.span,{"aria-hidden":!0,...i,ref:t,children:r||`â¼`})});g0.displayName=h0;var _0=`SelectPortal`,v0=e=>(0,M.jsx)(Ie,{asChild:!0,...e});v0.displayName=_0;var y0=`SelectContent`,b0=_.forwardRef((e,t)=>{let n=s0(y0,e.__scopeSelect),[r,i]=_.useState();if(Pe(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?k.createPortal((0,M.jsx)(S0,{scope:e.__scopeSelect,children:(0,M.jsx)(e0.Slot,{scope:e.__scopeSelect,children:(0,M.jsx)(`div`,{children:e.children})})}),t):null}return(0,M.jsx)(T0,{...e,ref:t})});b0.displayName=y0;var x0=10,[S0,C0]=r0(y0),w0=`SelectContentImpl`,T0=_.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...v}=e,y=s0(y0,n),[b,x]=_.useState(null),[S,C]=_.useState(null),w=j(t,e=>x(e)),[T,E]=_.useState(null),[D,O]=_.useState(null),ee=t0(n),[k,te]=_.useState(!1),ne=_.useRef(!1);_.useEffect(()=>{if(b)return iS(b)},[b]),Hb();let re=_.useCallback(e=>{let[t,...n]=ee().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[ee,S]),ie=_.useCallback(()=>re([T,b]),[re,T,b]);_.useEffect(()=>{k&&ie()},[k,ie]);let{onOpenChange:ae,triggerPointerDownPosRef:se}=y;_.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(se.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(se.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||ae(!1),document.removeEventListener(`pointermove`,t),se.current=null};return se.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,ae,se]),_.useEffect(()=>{let e=()=>ae(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ae]);let[ce,le]=a2(e=>{let t=ee().filter(e=>!e.disabled),n=o2(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ue=_.useCallback((e,t,n)=>{let r=!ne.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(ne.current=!0))},[y.value]),de=_.useCallback(()=>b?.focus(),[b]),fe=_.useCallback((e,t,n)=>{let r=!ne.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),pe=r===`popper`?k0:D0,me=pe===k0?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,M.jsx)(S0,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ue,selectedItem:T,onItemLeave:de,itemTextRefCallback:fe,focusSelectedItem:ie,selectedItemText:D,position:r,isPositioned:k,searchRef:ce,children:(0,M.jsx)(Yx,{as:oe,allowPinchZoom:!0,children:(0,M.jsx)(kb,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:A(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,M.jsx)(Te,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,M.jsx)(pe,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...me,onPlaced:()=>te(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:A(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&le(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ee().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>re(t)),e.preventDefault()}})})})})})})});T0.displayName=w0;var E0=`SelectItemAlignedPosition`,D0=_.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=s0(y0,n),o=C0(y0,n),[s,c]=_.useState(null),[l,u]=_.useState(null),d=j(t,e=>u(e)),f=t0(n),p=_.useRef(!1),m=_.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=o,b=_.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-x0,d=X1(a,[x0,Math.max(x0,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-x0,d=X1(a,[x0,Math.max(x0,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-x0*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),_=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+_+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-x0,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,k=m+_+ee,A=x-k;if(k<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=k+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+A;s.style.height=t+`px`,h.scrollTop=k-E+h.offsetTop}s.style.margin=`${x0}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,v,a.dir,r]);Pe(()=>b(),[b]);let[x,S]=_.useState();return Pe(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,M.jsx)(A0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:_.useCallback(e=>
vendor: 4,680 bytes, line 352
352{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,M.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,M.jsx)(N.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});D0.displayName=E0;var O0=`SelectPopperPosition`,k0=_.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=x0,...a}=e,o=a0(n);return(0,M.jsx)(js,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})});k0.displayName=O0;var[A0,j0]=r0(y0,{}),M0=`SelectViewport`,N0=_.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=C0(M0,n),o=j0(M0,n),s=j(t,a.onViewportChange),c=_.useRef(0);return(0,M.jsxs)(M.Fragment,{children:[(0,M.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}),(0,M.jsx)(e0.Slot,{scope:n,children:(0,M.jsx)(N.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:A(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-x0*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});N0.displayName=M0;var P0=`SelectGroup`,[F0,I0]=r0(P0),L0=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=ra();return(0,M.jsx)(F0,{scope:n,id:i,children:(0,M.jsx)(N.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});L0.displayName=P0;var R0=`SelectLabel`,z0=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=I0(R0,n);return(0,M.jsx)(N.div,{id:i.id,...r,ref:t})});z0.displayName=R0;var B0=`SelectItem`,[V0,H0]=r0(B0),U0=_.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=s0(B0,n),c=C0(B0,n),l=s.value===r,[u,d]=_.useState(a??``),[f,p]=_.useState(!1),m=j(t,e=>c.itemRefCallback?.(e,r,i)),h=ra(),g=_.useRef(`touch`),v=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw 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(0,M.jsx)(V0,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:_.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,M.jsx)(e0.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,M.jsx)(N.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:A(o.onFocus,()=>p(!0)),onBlur:A(o.onBlur,()=>p(!1)),onClick:A(o.onClick,()=>{g.current!==`mouse`&&v()}),onPointerUp:A(o.onPointerUp,()=>{g.current===`mouse`&&v()}),onPointerDown:A(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:A(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:A(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Q1.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})});U0.displayName=B0;var W0=`SelectItemText`,G0=_.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=s0(W0,n),s=C0(W0,n),c=H0(W0,n),l=l0(W0,n),[u,d]=_.useState(null),f=j(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=_.useMemo(()=>(0,M.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Pe(()=>(h(m),()=>g(m)),[h,g,m]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?k.createPortal(a.children,o.valueNode):null]})});G0.displayName=W0;var K0=`SelectItemIndicator`,q0=_.forwardRef((e,t)=>
352{let{__scopeSelect:n,...r}=e;return H0(K0,n).isSelected?(0,M.jsx)(N.span,{"aria-hidden":!0,...r,ref:t}):null});q0.displayName=K0;var J0=`SelectScrollUpButton`,Y0=_.forwardRef((e,t)=>{let n=C0(J0,e.__scopeSelect),r=j0(J0,e.__scopeSelect),[i,a]=_.useState(!1),o=j(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,M.jsx)(Q0,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Y0.displayName=J0;var X0=`SelectScrollDownButton`,Z0=_.forwardRef((e,t)=>{let n=C0(X0,e.__scopeSelect),r=j0(X0,e.__scopeSelect),[i,a]=_.useState(!1),o=j(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,M.jsx)(Q0,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Z0.displayName=X0;var Q0=_.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=C0(`SelectScrollButton`,n),o=_.useRef(null),s=t0(n),c=_.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return _.useEffect(()=>()=>c(),[c]),Pe(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,M.jsx)(N.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:A(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:A(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:A(i.onPointerLeave,()=>{c()})})}),$0=`SelectSeparator`,e2=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,M.jsx)(N.div,{"aria-hidden":!0,...r,ref:t})});e2.displayName=$0;var t2=`SelectArrow`,n2=_.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=a0(n),a=s0(t2,n),o=C0(t2,n);return a.open&&o.position===`popper`?(0,M.jsx)(Ms,{...i,...r,ref:t}):null});n2.displayName=t2;function r2(e){return e===``||e===void 0}var i2=_.forwardRef((e,t)=>{let{value:n,...r}=e,i=_.useRef(null),a=j(t,i),o=xC(n);return _.useEffect(()=>{let e=i.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`).set;if(o!==n&&r){let t=new Event(`change`,{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[o,n]),(0,M.jsx)(Ge,{asChild:!0,children:(0,M.jsx)(`select`,{...r,ref:a,defaultValue:n})})});i2.displayName=`BubbleSelect`;function a2(e){let t=_e(e),n=_.useRef(``),r=_.useRef(0),i=_.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=_.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function o2(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=s2(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function s2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var c2=u0,l2=f0,u2=m0,d2=g0,f2=v0,p2=b0,m2=N0,h2=z0,g2=U0,_2=G0,v2=q0,y2=Y0,b2=Z0,x2=e2,S2=c2,C2=u2,w2=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsxs)(l2,{ref:r,className:F(`flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
352ing-offset-background 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`,e),...n,children:[t,(0,M.jsx)(d2,{asChild:!0,children:(0,M.jsx)(fn,{className:`h-4 w-4 opacity-50`})})]}));w2.displayName=l2.displayName;var T2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(y2,{ref:n,className:F(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,M.jsx)(hn,{className:`h-4 w-4`})}));T2.displayName=y2.displayName;var E2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(b2,{ref:n,className:F(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,M.jsx)(fn,{className:`h-4 w-4`})}));E2.displayName=b2.displayName;var D2=_.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>(0,M.jsx)(f2,{children:(0,M.jsxs)(p2,{ref:i,className:F(`relative z-50 max-h-96 min-w-[8rem] overflow-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`,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`,e),position:n,...r,children:[(0,M.jsx)(T2,{}),(0,M.jsx)(m2,{className:F(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,M.jsx)(E2,{})]})}));D2.displayName=p2.displayName;var O2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(h2,{ref:n,className:F(`py-1.5 pl-8 pr-2 text-sm font-semibold`,e),...t}));O2.displayName=h2.displayName;var k2=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsxs)(g2,{ref:r,className:F(`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`,e),...n,children:[(0,M.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,M.jsx)(v2,{children:(0,M.jsx)(dn,{className:`h-4 w-4`})})}),(0,M.jsx)(_2,{children:t})]}));k2.displayName=g2.displayName;var A2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(x2,{ref:n,className:F(`-mx-1 my-1 h-px bg-muted`,e),...t}));A2.displayName=x2.displayName;var j2=`Tabs`,[M2,N2]=me(j2,[GJ]),P2=GJ(),[F2,I2]=M2(j2),L2=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=bC(s),[d,f]=He({prop:r,onChange:i,defaultProp:a});return(0,M.jsx)(F2,{scope:n,baseId:ra(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,M.jsx)(N.div,{dir:u,"data-orientation":o,...l,ref:t})})});L2.displayName=j2;var R2=`TabsList`,z2=_.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=I2(R2,n),o=P2(n);return(0,M.jsx)(rY,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,M.jsx)(N.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});z2.displayName=R2;var B2=`TabsTrigger`,V2=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=I2(B2,n),s=P2(n),c=W2(o.baseId,r),l=G2(o.baseId,r),u=r===o.value;return(0,M.jsx)(iY,{asChild:!0,...s,focusable:!i,active:u,children:(0,M.jsx)(N.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:A(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:A(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:A(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});V2.displayName=B2;var H2=`TabsContent`,U2=_.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=I2(H2,n),c=W2(s.baseId,r),l=G2(s.baseId,r),u=r===s.value,d=_.useRef(u);return _.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,M.jsx)(Re,{present:i||u,children:({present:n})=>(0,M.jsx)(N.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});U2.displayName=H2;function W2(e,t){return`${e}-trigger-${t}`}function G2(e,t){return`${e}-content-${t}`}var K2=L2,q2=z2,J2=V2,Y2=U2,X2=K2,Z2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(q2,{ref:n,className:F(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));Z2.displayName=q2.displayName;var Q2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(J2,{ref:n,className:F(`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`,e),...t}));Q2.displayName=J2.displayName;var $2=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(Y2,{ref:n,className:F(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));$2.displayName=Y2.displayName;var e4=`AlertDialog`,[t4,n4]=me(e4,[sS]),r4=sS(),i4=e=>{let{__scopeAlertDialog:t,...n}=e,r=r4(t);return(0,M.jsx)(RS,{...r,...n,modal:!0})};i4.displayName=e4;var a4=`AlertDialogTrigger`,o4=_.forwardRef((e,t)=>
352{let{__scopeAlertDialog:n,...r}=e,i=r4(n);return(0,M.jsx)(zS,{...i,...r,ref:t})});o4.displayName=a4;var s4=`AlertDialogPortal`,c4=e=>{let{__scopeAlertDialog:t,...n}=e,r=r4(t);return(0,M.jsx)(BS,{...r,...n})};c4.displayName=s4;var l4=`AlertDialogOverlay`,u4=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=r4(n);return(0,M.jsx)(VS,{...i,...r,ref:t})});u4.displayName=l4;var d4=`AlertDialogContent`,[f4,p4]=t4(d4),m4=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=r4(n),o=_.useRef(null),s=j(t,o),c=_.useRef(null);return(0,M.jsx)(NS,{contentName:d4,titleName:h4,docsSlug:`alert-dialog`,children:(0,M.jsx)(f4,{scope:n,cancelRef:c,children:(0,M.jsxs)(HS,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:A(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,M.jsx)(ce,{children:r}),(0,M.jsx)(C4,{contentRef:o})]})})})});m4.displayName=d4;var h4=`AlertDialogTitle`,g4=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=r4(n);return(0,M.jsx)(US,{...i,...r,ref:t})});g4.displayName=h4;var _4=`AlertDialogDescription`,v4=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=r4(n);return(0,M.jsx)(WS,{...i,...r,ref:t})});v4.displayName=_4;var y4=`AlertDialogAction`,b4=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=r4(n);return(0,M.jsx)(GS,{...i,...r,ref:t})});b4.displayName=y4;var x4=`AlertDialogCancel`,S4=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=p4(x4,n),a=r4(n),o=j(t,i);return(0,M.jsx)(GS,{...a,...r,ref:o})});S4.displayName=x4;var C4=({contentRef:e})=>{let t=`\`${d4}\` requires a description for the component to be accessible for screen reader users. 353 354You can add a description to the \`${d4}\` by passing a \`${_4}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 355 356Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${d4}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 357 358For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},w4=i4,T4=c4,E4=u4,D4=m4,O4=b4,k4=S4,A4=g4,j4=v4,M4=w4,N4=T4,P4=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(E4,{className:F(`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`,e),...t,ref:n}));P4.displayName=E4.displayName;var F4=_.forwardRef(({className:e,...t},n)=>(0,M.jsxs)(N4,{children:[(0,M.jsx)(P4,{}),(0,M.jsx)(D4,{ref:n,className:F(`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:rounded-lg`,e),...t})]}));F4.displayName=D4.displayName;var I4=({className:e,...t})=>(0,M.jsx)(`div`,{className:F(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});I4.displayName=`AlertDialogHeader`;var L4=({className:e,...t})=>(0,M.jsx)(`div`,{className:F(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});L4.displayName=`AlertDialogFooter`;var R4=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(A4,{ref:n,className:F(`text-lg font-semibold`,e),...t}));R4.displayName=A4.displayName;var z4=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(j4,{ref:n,className:F(`text-sm text-muted-foreground`,e),...t}));z4.displayName=j4.displayName;var B4=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(O4,{ref:n,className:F(Ef(),e),...t}));B4.displayName=O4.displayName;var V4=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(k4,{ref:n,className:F(Ef({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));V4.displayName=k4.displayName;var H4=iQ.object({name:iQ.string().min(2,{message:`Name must be at least 2 characters.`}),date:iQ.string().min(1,{message:`Date is required.`}),hole:iQ.string().min(1,{message:`Hole number is required.`}
358),club:iQ.string().min(1,{message:`Club used is required.`}),playingPartners:iQ.string().optional(),notes:iQ.string().optional()}),U4=({record:e,isOpen:t,onClose:n,onSave:r,onDelete:i})=>{let[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),h=(0,_.useRef)(null),g=iJ({resolver:zY(H4),defaultValues:{name:e?.name||``,date:e?.raw_date||new Date().toISOString().split(`T`)[0],hole:e?.hole?.toString()||``,club:e?.club||``,playingPartners:e?.playing_partners||``,notes:e?.notes||``}});_.useEffect(()=>{e&&(g.reset({name:e.name,date:e.raw_date,hole:e.hole.toString(),club:e.club,playingPartners:e.playing_partners||``,notes:e.notes||``}),u(e.image))},[e,g]);let v=e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0];c(t);let n=new FileReader;n.onloadend=()=>{u(n.result)},n.readAsDataURL(t)}},y=()=>{h.current&&h.current.click()};async function b(t){if(e){o(!0);try{let n=new Date(t.date).toLocaleDateString(`en-US`,{year:`numeric`,month:`long`,day:`numeric`}),i={...e,name:t.name,date:n,raw_date:t.date,hole:parseInt(t.hole),club:t.club,playing_partners:t.playingPartners||null,notes:t.notes||null,image:l||e.image},{error:a}=await wb.from(`hole_in_ones`).update({name:i.name,date:i.date,raw_date:i.raw_date,hole:i.hole,club:i.club,playing_partners:i.playing_partners,notes:i.notes,image:i.image}).eq(`id`,e.id);if(a)throw a;r(i),Bi.success(`Record updated successfully`,{description:`${i.name}'s hole-in-one record has been updated.`})}catch(e){console.error(`Error updating record:`,e),Bi.error(`Failed to update record`,{description:`There was an error updating the record.`})}finally{o(!1),n()}}}let x=async()=>{if(e){m(!0);try{let{error:t}=await wb.from(`hole_in_ones`).delete().eq(`id`,e.id);if(t)throw t;i(e.id),Bi.success(`Record deleted`,{description:`${e.name}'s hole-in-one record has been removed.`}),f(!1),n()}catch(e){console.error(`Error deleting record:`,e),Bi.error(`Failed to delete record`)}finally{m(!1)}}};return _.useEffect(()=>{t||f(!1)},[t]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(KS,{open:t,onOpenChange:e=>{e||!a&&!p&&n()},children:(0,M.jsxs)(XS,{className:`sm:max-w-[600px]`,children:[(0,M.jsx)(ZS,{children:(0,M.jsx)($S,{children:`Edit Hole in One Record`})}),(0,M.jsx)(uJ,{...g,children:(0,M.jsxs)(`form`,{onSubmit:g.handleSubmit(b),className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(fJ,{control:g.control,name:`name`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Golfer's Name`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{placeholder:`John Smith`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:g.control,name:`date`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Date Achieved`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{type:`date`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:g.control,name:`hole`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Hole Number`}),(0,M.jsxs)(S2,{onValueChange:e.onChange,defaultValue:e.value,children:[(0,M.jsx)(_J,{children:(0,M.jsx)(w2,{children:(0,M.jsx)(C2,{placeholder:`Select Hole`})})}),(0,M.jsx)(D2,{children:[5,7,9,11,16].map(e=>(0,M.jsxs)(k2,{value:e.toString(),children:[`Hole #`,e]},e))})]}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:g.control,name:`club`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Club Used`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{placeholder:`7 Iron`,...e})}),(0,M.jsx)(yJ,{})]})})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(gJ,{children:`Achievement Photo`}),(0,M.jsxs)(`div`,{className:`flex flex-col items-center p-4 border-2 border-dashed rounded-md border-gray-300 bg-gray-50 hover:bg-gray-100 transition-colors cursor-pointer`,onClick:y,children:[(0,M.jsx)(`input`,{ref:h,type:`file`,accept:`image/*`,className:`hidden`,onChange:v}),l?(0,M.jsxs)(`div`,{className:`space-y-2 w-full`,children:[(0,M.jsx)(`img`,{src:l,alt:`Preview`,className:`max-h-40 mx-auto object-contain rounded-md`}),(0,M.jsx)(`p`,{className:`text-sm text-center text-gray-500`,children:`Click to change image`})]}):(0,M.jsxs)(`div`,{className:`flex flex-col items-center space-y-2 py-4`,children:[(0,M.jsx)(dr,{className:`h-8 w-8 text-gray-400`}),(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-700`,children:`Click to upload photo`}),(0,M.jsx)(`p`,{className:`text-xs text-gray-500`,children:`JPG, PNG, GIF up to 10MB`})]})]})]}),(0,M.jsx)(fJ,{control:g.control,name:`playingPartners`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Playing Partners (Optional)`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{placeholder:`John Smith, Jane Doe`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:g.control,name:`notes`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Notes (Optional)`}),(0,M.jsx)(_J,{children:(0,M.jsx)(xJ,{placeholder:`Details about the achievement`,className:`resize-none`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsxs)(QS,{className:`flex justify-between`,children:[(0,M.jsx)(R,{type:`button`,variant:`destructive`,onClick:()=>f(!0),disabled:p||a,children:`Delete Record`}),(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsx)(R,{type:`button`,variant:`outline`,onClick:n,disabled:p||a,children:`Cancel`}),(0,M.jsx)(R,{type:`submit`,className:`bg-golf-green hover:bg-golf-green-dark`,disabled:a||p,children:a?`Saving...`:`Save Changes`})]})]})]})})]})}),(0,M.jsx)(M4,{open:d,onOpenChange:e=>{p||f(e)},children:(0,M.jsxs)(F4,{children:[(0,M.jsxs)(I4,{children:[(0,M.jsx)(R4,{children:`Are you sure?`}),(0,M.jsx)(z4,{children:`This will permanently delete this hole-in-one record. This action cannot be undone.`})]}),(0,M.jsxs)(L4,{children:[(0,M.jsx)(V4,{disabled:p,children:`Cancel`}),(0,M.jsx)(B4,{onClick:x,disabled:p,children:p?`Deleting...`:`Delete`})]})]})})]})},W4={5:{par:3,yards:165,description:`Elevated tee with water in front of the green`},7:{par:3,yards:187,description:`Long par 3 with bunkers guarding both sides`},9:{par:3,yards:148,description:`Scenic downhill par 3 with the clubhouse in the background`},11:{par:3,yards:175,description:`Challenging par 3 with a two-tiered green`},16:{par:3,yards:158,description:`Water along the right side with a well-protected green`}},G4=()=>{Ru();let[e,t]=(0,_.useState)({}),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!0);(0,_.useEffect)(()=>{d(sessionStorage.getItem(`belvedere_admin_auth`)===`true`)},[]),(0,_.useEffect)(()=>{(async()=>{try{let{data:e,error:n}=await wb.from(`hole_in_ones`).select(`*`).order(`date`,{ascending:!1});if(n)throw n;if(e){let n=e.reduce((e,t)=>
358{let n=new Date(t.date).getFullYear().toString();return e[n]||(e[n]=[]),e[n].push(t),e},{});t(n);let i=Object.keys(n).sort((e,t)=>parseInt(t)-parseInt(e));l(i),i.length>0&&r(i[0])}}catch(e){console.error(`Error loading hole in ones:`,e),t({})}finally{v(!1)}})()},[]);let y=e=>{r(e)},b=e=>{a(e),s(!0)},x=()=>{s(!1),setTimeout(()=>a(null),300)},S=(e,t)=>{e.stopPropagation(),p(t),h(!0)},C=async i=>{try{let a=new Date(i.raw_date).getFullYear().toString(),o={...e};for(let e of Object.keys(o)){let t=o[e].findIndex(e=>e.id===i.id);if(t>=0){o[e].splice(t,1),o[e].length===0&&e!==a&&delete o[e];break}}o[a]||(o[a]=[]),o[a]=[i,...o[a]],t(o);let s=Object.keys(o).sort((e,t)=>parseInt(t)-parseInt(e));l(s),s.length>0&&!s.includes(n)&&r(s[0])}catch(e){console.error(`Error updating record in local state:`,e)}},w=async i=>{try{let o={...e};for(let e of Object.keys(o)){let t=o[e].findIndex(e=>e.id===i);if(t>=0){o[e][t].name,o[e].splice(t,1),o[e].length===0&&delete o[e];break}}t(o),a(null),s(!1),p(null),h(!1);let c=Object.keys(o).sort((e,t)=>parseInt(t)-parseInt(e));l(c),c.length>0?c.includes(n)||r(c[0]):r(``)}catch(e){console.error(`Error updating local state after delete:`,e)}},T=e=>(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-md overflow-hidden flex flex-col h-full hover:shadow-lg transition-shadow cursor-pointer group relative`,onClick:()=>b(e),children:[u&&(0,M.jsx)(`button`,{onClick:t=>S(t,e),className:`absolute top-2 right-2 bg-white/90 p-1.5 rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity z-10`,"aria-label":`Edit record`,children:(0,M.jsx)(qn,{className:`h-4 w-4 text-golf-green`})}),(0,M.jsxs)(`div`,{className:`relative`,children:[(0,M.jsx)(`img`,{src:e.image,alt:`${e.name} Hole in One on Hole ${e.hole}`,className:`w-full h-48 object-cover`}),(0,M.jsx)(`div`,{className:`absolute inset-x-0 top-0 bg-golf-green/80 text-white py-1 px-2`,children:(0,M.jsxs)(`h3`,{className:`text-sm font-medium text-center`,children:[e.name,` - HOLE `,e.hole]})})]}),(0,M.jsxs)(`div`,{className:`p-3 flex-grow text-sm`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-gray-600 font-medium text-xs`,children:`Date`}),(0,M.jsx)(`p`,{children:e.date})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-gray-600 font-medium text-xs`,children:`Club Used`}),(0,M.jsx)(`p`,{children:e.club})]}),e.playing_partners&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-gray-600 font-medium text-xs`,children:`Playing With`}),(0,M.jsx)(`p`,{className:`truncate`,title:e.playing_partners,children:e.playing_partners})]})]}),e.notes&&(0,M.jsxs)(`div`,{className:`mt-2`,children:[(0,M.jsx)(`p`,{className:`text-gray-600 font-medium text-xs`,children:`Notes`}),(0,M.jsx)(`p`,{className:`line-clamp-2`,title:e.notes,children:e.notes})]})]})]},e.id);return(0,M.jsxs)(`main`,{className:`min-h-screen bg-white`,children:[(0,M.jsx)(Fw,{}),(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl lg:text-5xl font-playfair font-bold text-golf-green mb-4`,children:`Hole In One Club`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 max-w-3xl mx-auto`,children:`Celebrating those magical moments when skill and luck combine perfectly. Membership in this exclusive club is one of golf's greatest achievements.`})]}),(0,M.jsxs)(`div`,{className:`mb-8 flex flex-col md:flex-row justify-between items-center`,children:[(0,M.jsxs)(`div`,{className:`flex items-center mb-4 md:mb-0`,children:[(0,M.jsx)(tn,{className:`text-golf-green mr-2`,size:24}),(0,M.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Our Hole In One Achievers`})]}),(0,M.jsx)(`div`,{className:`w-full md:w-48`,children:c.length>0&&(0,M.jsxs)(S2,{value:n,onValueChange:y,children:[(0,M.jsx)(w2,{className:`border-golf-green focus:ring-golf-green`,children:(0,M.jsx)(C2,{placeholder:`Select Year`})}),(0,M.jsx)(D2,{children:c.map(e=>(0,M.jsx)(k2,{value:e,children:e},e))})]})})]}),g?(0,M.jsxs)(`div`,{className:`text-center py-10`,children:[(0,M.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-golf-green mx-auto`}),(0,M.jsx)(`p`,{className:`mt-4 text-lg text-gray-600`,children:`Loading records...`})]}):(0,M.jsxs)(X2,{defaultValue:`all`,className:`mb-10`,children:[(0,M.jsxs)(Z2,{className:`bg-golf-green/10 mb-6`,children:[(0,M.jsx)(Q2,{value:`all`,children:`All Par 3's`}),(0,M.jsx)(Q2,{value:`5`,children:`Hole #5`}),(0,M.jsx)(Q2,{value:`7`,children:`Hole #7`}),(0,M.jsx)(Q2,{value:`9`,children:`Hole #9`}),(0,M.jsx)(Q2,{value:`11`,children:`Hole #11`}),(0,M.jsx)(Q2,{value:`16`,children:`Hole #16`})]}),(0,M.jsx)($2,{value:`all`,className:`space-y-8`,children:n&&e[n]?.length?(0,M.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4`,children:e[n].map(e=>T(e))}):(0,M.jsxs)(`div`,{className:`text-center py-10`,children:[(0,M.jsx)(jn,{className:`mx-auto h-16 w-16 text-golf-green/50 mb
358-4`}),(0,M.jsxs)(`h3`,{className:`text-2xl font-semibold text-gray-600`,children:[`No hole-in-ones recorded for `,n]}),(0,M.jsx)(`p`,{className:`text-gray-500 mt-2`,children:`Check another year or hole.`})]})}),[5,7,9,11,16].map(t=>(0,M.jsxs)($2,{value:String(t),children:[(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow-lg p-6 mb-8`,children:[(0,M.jsxs)(`h3`,{className:`text-2xl font-semibold text-golf-green mb-2`,children:[`Hole #`,t]}),(0,M.jsxs)(`p`,{className:`text-gray-600 mb-4`,children:[`Par `,W4[t]?.par,` -`,W4[t]?.yards,` yards`]})]}),n&&e[n]?.filter(e=>e.hole===t).length?(0,M.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4`,children:e[n].filter(e=>e.hole===t).map(e=>T(e))}):(0,M.jsxs)(`div`,{className:`text-center py-10 bg-white rounded-lg shadow-md`,children:[(0,M.jsx)(jn,{className:`mx-auto h-16 w-16 text-golf-green/50 mb-4`}),(0,M.jsxs)(`h3`,{className:`text-xl font-semibold text-gray-600`,children:[`No hole-in-ones on Hole #`,t,` in `,n]}),(0,M.jsx)(`p`,{className:`text-gray-500 mt-2`,children:`Check another year or hole.`})]})]},t))]})]}),i&&(0,M.jsx)(KS,{open:o,onOpenChange:x,children:(0,M.jsxs)(XS,{className:`sm:max-w-3xl`,children:[(0,M.jsxs)(ZS,{children:[(0,M.jsxs)($S,{className:`text-2xl font-playfair text-golf-green`,children:[`Hole in One - `,i.name]}),(0,M.jsxs)(eC,{children:[`Hole #`,i.hole,` - `,i.date]})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`img`,{src:i.image,alt:`${i.name} Hole in One`,className:`w-full rounded-lg shadow-md object-cover max-h-80`})}),(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Details`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 gap-3`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Golfer`}),(0,M.jsx)(`p`,{className:`text-base`,children:i.name})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Date`}),(0,M.jsx)(`p`,{className:`text-base`,children:i.date})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Hole`}),(0,M.jsxs)(`p`,{className:`text-base`,children:[`#`,i.hole]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Club Used`}),(0,M.jsx)(`p`,{className:`text-base`,children:i.club})]}),i.playing_partners&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Playing Partners`}),(0,M.jsx)(`p`,{className:`text-base`,children:i.playing_partners})]})]})]}),i.notes&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Notes`}),(0,M.jsx)(`p`,{className:`text-base`,children:i.notes})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Hole Details`}),(0,M.jsxs)(`p`,{className:`text-base`,children:[`Par `,W4[i.hole]?.par,` -`,W4[i.hole]?.yards,` yards`]}),(0,M.jsx)(`p`,{className:`text-base`,children:W4[i.hole]?.description})]}),u&&(0,M.jsx)(`div`,{className:`pt-2 border-t border-gray-200 mt-4`,children:(0,M.jsxs)(R,{className:`bg-golf-green hover:bg-golf-green-dark w-full`,onClick:()=>{x(),setTimeout(()=>{p(i),h(!0)},300)},children:[(0,M.jsx)(nr,{className:`mr-2 h-4 w-4`}),` Edit This Record`]})})]})]})]})}),(0,M.jsx)(U4,{record:f,isOpen:m,onClose:()=>{h(!1),setTimeout(()=>p(null),300)},onSave:C,onDelete:w}),(0,M.jsx)(kG,{})]})},K4=iQ.object({name:iQ.string().min(2,{message:`Name must be at least 2 characters.`}),date:iQ.string().min(1,{message:`Date is required.`}),hole:iQ.string().min(1,{message:`Hole number is required.`}),club:iQ.string().min(1,{message:`Club used is required.`}),playingPartners:iQ.string().optional(),notes:iQ.string().optional()}),q4=()=>{let[e,t]=(0,_.useState)(!1),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),o=(0,_.useRef)(null),s=iJ({resolver:zY(K4),defaultValues:{name:``,date:new Date().toISOString().split(`T`)[0],hole:``,club:``,playingPartners:``,notes:``}}),c=e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0];r(t);let n=new FileReader;n.onloadend=()=>{a(n.result)},n.readAsDataURL(t)}},l=()=>{o.current&&o.current.click()};async function u(e){t(!0);try{let t=new Date(e.date).toLocaleDateString(`en-US`,{year:`numeric`,month:`long`,day:`numeric`}),n={name:e.name,date:t,raw_date:e.date,hole:parseInt(e.hole),playing_partners:e.playingPartners||null,club:e.club,notes:e.notes||null,image:i||`/placeholder.svg`},{data:o,error:c}=await wb.from(`hole_in_ones`).insert(n).select();if(c)throw c;Bi.success(`Hole in one record added successfully!`,{description:`${e.name}'s achievement on hole #${e.hole} has been recorded.`}),s.reset({name:``,date:new Date().toISOString().split(`T`)[0],hole:``,club:``,playingPartners:``,notes:``}),r(null),a(null)}catch(e){console.error(`Error saving hole in one:`,e),Bi.error(`Failed to save record`,{description:`There was an error saving the hole in one record.`})}finally{t(!1)}}return(0,M.jsxs)(`div`,{className:`max-w-3xl mx-auto`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 mb-6`,children:[(0,M.jsx)(tn,{className:`h-6 w-6 text-golf-green`}),(0,M.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Add Hole in One Achievement`})]}),(0,M.jsx)(uJ,{...s,children:(0,M.jsxs)(`form`,{onSubmit:s.handleSubmit(u),className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsx)(fJ,{control:s.control,name:`name`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Golfer's Name`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{placeholder:`John Smith`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:s.control,name:`date`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Date Achieved`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{type:`date`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:s.control,name:`hole`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Hole Number`}),(0,M.jsxs)(S2,{onValueChange:e.onChange,defaultValue:e.value,children:[(0,M.jsx)(_J,{children:(0,M.jsx)(w2,{children:(0,M.jsx)(C2,{placeholder:`Select Hole`})})}),(0,M.jsx)(D2,{children:[5,7,9,11,16].map(e=>(0,M.jsxs)(k2,{value:e.toString(),children:[`Hole #`,e]},e))})]}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:s.control,name:`club`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Club Used`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{placeholder:`7 Iron`,...e})}),(0,M.jsx)(yJ,{})]})})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(gJ,{children:`Achievement Photo`}),(0,M.jsxs)(`div`,{className:`flex flex-col items-center p-4 border-2 border-dashed rounded-md border-gray-300 bg-gray-50 hover:bg-gray-100 transition-colors cursor-pointer`,onClick:l,children:[(0,M.jsx)(`input`,{ref:o,type:`file`,accept:`image/*`,className:`hidden`,onChange:c}),i?(0,M.jsxs)(`div`,{className:`space-y-2 w-full`,children:[(0,M.jsx)(`img`,{src:i,alt:`Preview`,className:`max-h-40 mx-auto object-contain rounded-md`}),(0,M.jsx)(`p`,{className:`text-sm text-center text-gray-500`,children:`Click to change image`})]}):(0,M.jsxs)(`div`,{className:`flex flex-col items-center space-y-2 py-4`,children:[(0,M.jsx)(dr,{className:`h-8 w-8 text-gray-400`}),(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-700`,children:`Click to upload photo`}),(0,M.jsx)(`p`,{className:`text-xs text-gray-500`,children:`JPG, PNG, GIF up to 10MB`})]})]})]}),(0,M.jsx)(fJ,{control:s.control,name:`playingPartners`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Playing Partners (Optional)`}),(0,M.jsx)(_J,{children:(0,M.jsx)(bJ,{placeholder:`John Smith, Jane Doe`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(fJ,{control:s.control,name:`notes`,render:({field:e})=>(0,M.jsxs)(hJ,{children:[(0,M.jsx)(gJ,{children:`Notes (Optional)`}),(0,M.jsx)(_J,{children:(0,M.jsx)(xJ,{placeholder:`Details about the achievement`,className:`resize-none`,...e})}),(0,M.jsx)(yJ,{})]})}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark`,disabled:e,children:e?`Submitting...`:`Add Hole in One Record`})]})})]})},J4=Kt(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function Y4({className:e,variant:t,...n}){return(0,M.jsx)(`div`,{className:F(J4({variant:t}),e),...n})}var X4=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!1),c=e.f
358ilter(e=>e.customerName.toLowerCase().includes(n.toLowerCase())||e.customerEmail.toLowerCase().includes(n.toLowerCase())||e.id.toLowerCase().includes(n.toLowerCase())),l=e=>new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),u=e=>e.toLocaleString(`en-US`,{style:`currency`,currency:`USD`}),d=e=>{switch(e){case`completed`:return`bg-green-100 text-green-800`;case`processing`:return`bg-blue-100 text-blue-800`;case`pending`:return`bg-yellow-100 text-yellow-800`;case`cancelled`:return`bg-red-100 text-red-800`;default:return`bg-gray-100 text-gray-800`}},f=e=>{a(e),s(!0)},p=(n,r)=>{t(e.map(e=>e.id===n?{...e,status:r}:e)),Bi.success(`Order ${n} status updated to ${r}`),s(!1)};return(0,_.useEffect)(()=>{(async()=>{try{let{data:e,error:n}=await wb.from(`orders`).select(`*`).order(`created_at`,{ascending:!1});if(n)throw n;e&&t(e)}catch(e){console.error(`Error loading orders:`,e),t([])}})()},[]),(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green`,children:`Customer Orders`}),(0,M.jsx)(`div`,{className:`w-full sm:w-auto`,children:(0,M.jsx)(bJ,{placeholder:`Search orders...`,value:n,onChange:e=>r(e.target.value),className:`max-w-sm`})})]}),c.length>0?(0,M.jsx)(`div`,{className:`border rounded-md overflow-hidden`,children:(0,M.jsxs)(lQ,{children:[(0,M.jsx)(uQ,{children:(0,M.jsxs)(pQ,{children:[(0,M.jsx)(mQ,{children:`Order ID`}),(0,M.jsx)(mQ,{children:`Customer`}),(0,M.jsx)(mQ,{children:`Date`}),(0,M.jsx)(mQ,{children:`Amount`}),(0,M.jsx)(mQ,{children:`Status`}),(0,M.jsx)(mQ,{className:`text-right`,children:`Actions`})]})}),(0,M.jsx)(dQ,{children:c.map(e=>(0,M.jsxs)(pQ,{children:[(0,M.jsx)(hQ,{className:`font-medium`,children:e.id}),(0,M.jsx)(hQ,{children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{children:e.customerName}),(0,M.jsx)(`div`,{className:`text-sm text-gray-500`,children:e.customerEmail})]})}),(0,M.jsx)(hQ,{children:l(e.date)}),(0,M.jsx)(hQ,{children:u(e.amount)}),(0,M.jsx)(hQ,{children:(0,M.jsx)(Y4,{className:d(e.status),children:e.status.charAt(0).toUpperCase()+e.status.slice(1)})}),(0,M.jsx)(hQ,{className:`text-right`,children:(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>f(e),children:`View Details`})})]},e.id))})]})}):(0,M.jsx)(`div`,{className:`text-center py-10 border rounded-md`,children:(0,M.jsx)(`p`,{className:`text-gray-500`,children:`No orders matching your search.`})}),(0,M.jsx)(KS,{open:o,onOpenChange:s,children:(0,M.jsxs)(XS,{className:`sm:max-w-md`,children:[(0,M.jsxs)(ZS,{children:[(0,M.jsx)($S,{children:`Order Details`}),(0,M.jsx)(eC,{children:i?`Order ID: ${i.id}`:``})]}),i&&(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Customer`}),(0,M.jsx)(`p`,{className:`mt-1`,children:i.customerName}),(0,M.jsx)(`p`,{className:`text-sm text-gray-500`,children:i.customerEmail})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Date`}),(0,M.jsx)(`p`,{className:`mt-1`,children:l(i.date)})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Items`}),(0,M.jsxs)(`div`,{className:`mt-1 space-y-2`,children:[i.items.map(e=>(0,M.jsxs)(`div`,{className:`flex justify-between py-1 border-b`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{children:e.name}),(0,M.jsxs)(`p`,{className:`text-sm text-gray-500`,children:[`Qty: `,e.quantity]})]}),(0,M.jsx)(`p`,{className:`font-medium`,children:u(e.price*e.quantity)})]},e.id)),(0,M.jsxs)(`div`,{className:`flex justify-between pt-2`,children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`Total`}),(0,M.jsx)(`p`,{className:`font-bold`,children:u(i.amount)})]})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Current Status`}),(0,M.jsx)(`div`,{className:`mt-1`,children:(0,M.jsx)(Y4,{className:d(i.status),children:i.status.charAt(0).toUpperCase()+i.status.slice(1)})})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`Update Status`}),(0,M.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,M.jsx)(R,{variant:`outline`,size:`sm`,className:`bg-yellow-100 text-yellow-800 border-yellow-300 hover:bg-yellow-200`,onClick:()=>p(i.id,`pending`),children:`Pending`}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,className:`bg-blue-100 text-blue-800 border-blue-300 hover:bg-blue-200`,onClick:()=>p(i.id,`processing`),children:`Processing`}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,className:`bg-green-100 text-green-800 border-green-300 hover:bg-green-200`,onClick:()=>p(i.id,`completed`),children:`Completed`}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,className:`bg-red-100 text-red-800 border-red-300 hover:bg-red-200`,onClick:()=>p(i.id,`cancelled`),children:`Cancelled`})]})]})]}),(0,M.jsx)(QS,{children:(0,M.jsx)(R,{variant:`outline`,onClick:()=>s(!1),children:`Close`})})]})})]})},Z4=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)({});(0,_.useEffect)(()=>{u()},[]);let u=async()=>{r(!0);let{data:e,error:n}=await wb.from(`staff`).select(`*`).order(`display_order`,{ascending:!0});!n&&e&&t(e),r(!1)},d=t=>{t?(s(t),l({...t,social_links:t.social_links||{}})):(s(null),l({display_order:e.length})),a(!0)},f=async e=>{e.preventDefault(),o?await wb.from(`staff`).update({...c}).eq(`id`,o.id):await wb.from(`staff`).insert([{...c}]),a(!1),u()},p=async e=>{window.confirm(`Delete this staff member?`)&&(await wb.from(`staff`).delete().eq(`id`,e),u())},m=async(t,n)=>{let r=[...e];if(n===`up`&&t===0||n===`down`&&t===e.length-1)return;let i=n===`up`?t-1:t+1,a=r[t].display_order;r[t].display_order=r[i].display_order,r[i].display_order=a,await wb.from(`staff`).update({display_order:r[t].display_order}).eq(`id`,r[t].id),await wb.from(`staff`).update({display_order:r[i].display_order}).eq(`id`,r[i].id),u()};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`flex justify-between items-center mb-4`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold`,children:`Staff`}),(0,M.jsxs)(R,{onClick:()=>d(),className:`bg-golf-green hover:bg-golf-green/80`,children:[(0,M.jsx)(Yn,{className:`h-4 w-4 mr-2`}),` Add Staff`]})]}),n?(0,M.jsx)(`div`,{children:`Loading...`}):(0,M.jsx)(`div`,{className:`space-y-4`,children:e.map((t,n)=>(0,M.jsx)(Bm,{className:`overflow-hidden`,children:(0,M.jsxs)(Wm,{className:`p-4 flex items-center justify-between`,children:[(0,M.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[t.photo_url&&(0,M.jsx)(`img`,{src:t.photo_url,alt:t.name,className:`w-16 h-16 rounded-full object-cover`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-semibold text-lg`,children:t.name}),(0,M.jsx)(`div`,{className:`text-gray-600`,children:t.position}),(0,M.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[t.email,` `,t.phone]})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>m(n,`up`),disabled:n===0,children:(0,M.jsx)(en,{className:`h-4 w-4`})}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>m(n,`down`),disabled:n===e.length-1,children:(0,M.jsx)(Zt,{className:`h-4 w-4`})}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>d(t),children:(0,M.jsx)(qn,{className:`h-4 w-4`})}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>p(t.id),children:(0,M.jsx)(cr,{className:`h-4 w-4`})})]})]})},t.id))}),(0,M.jsx)(KS,{open:i,onOpenChange:a,children:(0,M.jsxs)(XS,{className:`sm:max-w-[500px]`,children:[(0,M.jsx)(ZS,{children:(0,M.jsx)($S,{children:o?`Edit Staff`:`Add Staff`})}),(0,M.jsxs)(`form`,{onSubmit:f,className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`name`,children:`N
358ame`}),(0,M.jsx)(bJ,{id:`name`,value:c.name||``,onChange:e=>l({...c,name:e.target.value}),required:!0})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`position`,children:`Position`}),(0,M.jsx)(bJ,{id:`position`,value:c.position||``,onChange:e=>l({...c,position:e.target.value}),required:!0})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`email`,children:`Email`}),(0,M.jsx)(bJ,{id:`email`,value:c.email||``,onChange:e=>l({...c,email:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`phone`,children:`Phone`}),(0,M.jsx)(bJ,{id:`phone`,value:c.phone||``,onChange:e=>l({...c,phone:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`photo_url`,children:`Photo URL`}),(0,M.jsx)(bJ,{id:`photo_url`,value:c.photo_url||``,onChange:e=>l({...c,photo_url:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`bio`,children:`Bio`}),(0,M.jsx)(xJ,{id:`bio`,value:c.bio||``,onChange:e=>l({...c,bio:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`social_links`,children:`Social Links (JSON)`}),(0,M.jsx)(xJ,{id:`social_links`,value:JSON.stringify(c.social_links||{},null,2),onChange:e=>{try{l({...c,social_links:JSON.parse(e.target.value)})}catch{}}})]}),(0,M.jsx)(QS,{children:(0,M.jsx)(R,{type:`submit`,className:`bg-golf-green hover:bg-golf-green/80`,children:o?`Update Staff`:`Add Staff`})})]})]})})]})};async function Q4(){let{data:e,error:t}=await wb.from(`banner_settings`).select(`*`).order(`id`,{ascending:!0}).limit(1).maybeSingle();return t?(console.error(`Error fetching banner settings:`,t),null):e?{id:e.id,is_active:e.is_active,link_url:e.link_url,bg_color:e.bg_color,text_color:e.text_color,message:e.message??null}:null}async function $4(e){let t=await Q4(),n={...e};if(t){let{data:e,error:r}=await wb.from(`banner_settings`).update(n).eq(`id`,t.id).select().maybeSingle();return r?(console.error(`Error updating banner settings:`,r),null):e}else{delete n.id;let{data:e,error:t}=await wb.from(`banner_settings`).insert(n).select().maybeSingle();return t?(console.error(`Error inserting banner settings:`,t),null):e}}var e3=()=>{let{toast:e}=hC(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(`#1e3a8a`),[l,u]=(0,_.useState)(`#ffffff`),[d,f]=(0,_.useState)(`ð Registration Now Open for the 70th Annual Island Open!`);return(0,_.useEffect)(()=>{(async()=>{let e=await Q4();e&&(i(!!e.is_active),o(e.link_url||``),c(e.bg_color||`#1e3a8a`),u(e.text_color||`#ffffff`),e.message&&f(e.message))})()},[]),(0,M.jsxs)(Bm,{children:[(0,M.jsx)(Vm,{children:(0,M.jsx)(Hm,{children:`Announcement Banner`})}),(0,M.jsxs)(Wm,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,M.jsx)(lJ,{htmlFor:`active`,children:`Active`}),(0,M.jsx)(q1,{id:`active`,checked:r,onCheckedChange:i})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`message`,children:`Message`}),(0,M.jsx)(bJ,{id:`message`,value:d,onChange:e=>f(e.target.value),placeholder:`Banner message`})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`link`,children:`Link URL (optional)`}),(0,M.jsx)(bJ,{id:`link`,value:a,onChange:e=>o(e.target.value),placeholder:`https://example.com`})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`bg`,children:`Background Color`}),(0,M.jsx)(bJ,{id:`bg`,type:`color`,value:s,onChange:e=>c(e.target.value)})]}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(lJ,{htmlFor:`text`,children:`Text Color`}),(0,M.jsx)(bJ,{id:`text`,type:`color`,value:l,onChange:e=>u(e.target.value)})]})]}),(0,M.jsx)(`div`,{className:`flex justify-end`,children:(0,M.jsx)(R,{onClick:async()=>{try{if(n(!0),!await $4({is_active:r,link_url:a||null,bg_color:s,text_color:l,message:d}))throw Error(`Save failed`);e({title:`Saved`,description:`Banner settings updated.`}),window.dispatchEvent(new CustomEvent(`banner-settings-updated`))}catch(t){console.error(t),e({title:`Error`,description:t.message||`Failed to save`,variant:`destructive`})}finally{n(!1)}},disabled:t,className:`bg-golf-green hover:bg-golf-green/80`,children:t?`Saving...`:`Save Settings`})})]})]})},t3=()=>{let[e,t]=(0,_.useState)(`events`),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(``);(0,_.useEffect)(()=>{(async()=>{let{data:{user:e}}=await wb.auth.getUser();if(r(e),e){let{data:t}=await wb.from(`users`).select(`is_admin`).eq(`id`,e.id).single();t&&t.is_admin&&a(!0)}})()},[]);let y=async e=>{e.preventDefault(),h(!0),v(``);let{error:t}=await wb.auth.signInWithPassword({email:o,password:c});t?v(t.message):window.location.reload(),h(!1)},b=async()=>{await wb.auth.signOut(),window.location.reload()};return n?i?(0,M.jsxs)(`div`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`flex-grow pt-28 pb-16`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl lg:text-5xl font-playfair font-bold text-golf-green mb-4`,children:`Admin Dashboard`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 max-w-3xl mx-auto`,children:`Manage club content, events, achievements, and store orders.`}),(0,M.jsxs)(`div`,{className:`flex justify-center gap-4 mt-4`,children:[(0,M.jsx)(R,{onClick:b,className:`bg-golf-green hover:bg-golf-green-dark`,children:`Log Out`}),(0,M.jsx)(R,{variant:`outline`,onClick:()=>p(e=>!e),children:f?`Cancel`:`Change Password`})]}),f&&(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),h(!0),v(``);let{error:t}=await wb.auth.updateUser({password:u});t?v(t.message):(p(!1),d(``),alert(`Password updated!`)),h(!1)},className:`mt-4 flex flex-col items-center gap-2`,children:[(0,M.jsx)(`input`,{type:`password`,placeholder:`New Password`,value:u,onChange:e=>d(e.target.value),required:!0,className:`border rounded px-3 py-2`}),g&&(0,M.jsx)(`div`,{className:`text-red-600 text-sm`,children:g}),(0,M.jsx)(R,{type:`submit`,className:`bg-golf-green hover:bg-golf-green-dark`,disabled:m,children:m?`Updating...`:`Update Password`})]})]}),(0,M.jsx)(`div`,{className:`bg-white rounded-lg shadow-lg p-6`,children:(0,M.jsxs)(X2,{value:e,onValueChange:t,className:`w-full`,children:[(0,M.jsxs)(Z2,{className:`grid w-full grid-cols-4`,children:[(0,M.jsx)(Q2,{value:`holeinones`,children:`Hole in Ones`}),(0,M.jsx)(Q2,{value:`store`,children:`Store Orders`}),(0,M.jsx)(Q2,{value:`staff`,children:`Staff`}),(0,M.jsx)(Q2,{value:`banner`,children:`Banner`})]}),(0,M.jsx)($2,{value:`holeinones`,className:`pt-6`,children:(0,M.jsx)(q4,{})}),(0,M.jsx)($2,{value:`store`,className:`pt-6`,children:(0,M.jsx)(X4,{})}),(0,M.jsx)($2,{value:`staff`,className:`pt-6`,children:(0,M.jsx)(Z4,{})}),(0,M.jsx)($2,{value:`banner`,className:`pt-6`,children:(0,M.jsx)(e3,{})})]})})]})}),(0,M.jsx)(kG,{})]}):(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4 flex flex-col items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`max-w-md w-full bg-white rounded-lg shadow-lg p-8 text-center`,children:[(0,M.jsx)(`div`,{className:`text-red-600 font-bold mb-4`,children:`You do not have admin access.`}),(0,M.jsx)(R,{onClick:b,className:`bg-golf-green hover:bg-golf-green-dark w-full`,children:`Log Out`})]})}),(0,M.jsx)(kG,{})]}):(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4 flex flex-col items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`max-w-md w-full bg-white rounded-lg shadow-lg p-8`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold mb-6 text-golf-green text-center`,children:`Admin Login`}),(0,M.jsxs)(`form`,{onSubmit:y,className:`space-y-4`,children:[(0,M.jsx)(`input`,{type:`email`,placeholder:`Email`,value:o,onChange:e=>s(e.target.value),required:!0,className:`w-full border rounded px-3 py-2`}),(0,M.jsx)(`input`,{type:`password`,placeholder:`Password`,value:c,onChange:e=>l(e.target.value),required:!0,className:`w-full border rounded px-3 py-2`}),g&&(0,M.jsx)(`div`,{className:`text-red-600 text-sm`,children:g}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark`,disabled:m,children:m?`Logging in...`:`Login`})]})]})}),(0,M.jsx)(kG,{})]})},n3=()=>(0,M.jsxs)(`div`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsx)(Fw,{}),(0,M.jsxs)(`main`,{className:`flex-grow`,children:[(0,M.jsx)(`section`,{className:`container mx-auto px-4 py-8`,children:(0,M.jsx)(`div`,{className:`bg-white rounded-lg shadow-lg overflow-hidden`,children:(0,M.jsx)(`iframe`,{src:`http://35.182.114.72/product/classic-leather-loafers`,className:`w-full min-h-[800px] border-0`,title:`Belvedere Golf Club Pro Shop`,sandbox:`allow-same-origin allow-scripts allow-popups allow-forms`})})}),(0,M.jsx)(`section`,{className:`py-12 container mx-auto px-4 bg-gray-50`,children:(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`div`,{className:`text-4xl mb-4`,children:`ðï¸`}),(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-2`,children:`Wide Selection`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Browse our extensive collection of golf merchandise and apparel`})]}),(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`div`,{className:`text-4xl mb-4`,children:`ð`}),(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-2`,children:`Fast Shipping`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Quick delivery to your doorstep`})]}),(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`div`,{className:`text-4xl mb-4`,children:`ð³`}),(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-2`,children:`Secure Checkout`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Safe and easy payment processing`})]})]})})]}),(0,M.jsx)(kG,{})]}),r3=[{id:1,name:`Ryan Power`,title:`President`},{id:2,name:`Ryan Ramsay`,title:`Vice President`},{id:3,name:`Chris Arsenault`,title:`Treasurer`},{id:4,name:`Brenda McIlwaine`,title:`Women's Branch President`},{id:5,name:`Chris Welton`,title:`Director`},{id:6,name:`Curtis Hall`,title:`Director`},{id:7,name:`Jeanette Lazaric`,title:`Director`},{id:8,name:`Len Currie`,title:`Director`},{id:9,name:`Jamie Diamond`,title:`Director`},{id:10,name:`Mike Irwin`,title:`Director`}],i3=()=>(0,M.jsxs)(`main`,{className:`min-h-screen bg-background`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pt-32 pb-16 px-4 md:px-8 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-6 text-golf-green`,children:`Board of Directors`}),(0,M.jsx)(`p`,{className:`text-lg md:text-xl text-gray-700 mb-8`,children:`Leadership dedicated to preserving our traditions and shaping our future`})]})})}),(0,M.jsx)(`section`,{className:`py-12 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-4 mb-6`,children:[(0,M.jsx)(pr,{className:`h-8 w-8 text-golf-green flex-shrink-0 mt-1`}),(0,M.jsx)(`h2`,{className:`font-playfair text-3xl font-bold text-golf-green`,children:`Our Leadership`})]}),(0,M.jsxs)(`div`,{className:`prose prose-lg max-w-none text-gray-700`,children:[(0,M.jsx)(`p`,{className:`mb-6`,children:`The Board of Directors at Belvedere Golf Club provides strategic guid
358ance and oversight to ensure our club continues to thrive while honoring our rich heritage. Composed of dedicated members who volunteer their time and expertise, our board works collaboratively to enhance the golfing experience, maintain our exceptional facilities, and foster a vibrant community atmosphere for all members and guests.`}),(0,M.jsx)(`p`,{children:`Each board member brings unique skills and perspectives, contributing to the thoughtful stewardship of our club for current and future generations. Together, they balance tradition with innovation to ensure Belvedere remains one of Prince Edward Island's premier golfing destinations.`})]})]})})}),(0,M.jsx)(`section`,{className:`py-12 px-4 md:px-8 bg-golf-sand/10`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl font-bold mb-10 text-golf-green text-center`,children:`Meet the Board`}),(0,M.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6`,children:r3.map(e=>(0,M.jsx)(Bm,{className:`overflow-hidden hover:shadow-lg transition-shadow border-golf-green/10 hover:border-golf-green/30`,children:(0,M.jsxs)(Wm,{className:`p-5 text-center`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-4`,children:(0,M.jsx)(pr,{className:`h-8 w-8 text-golf-green`})}),(0,M.jsx)(`h3`,{className:`font-playfair text-xl font-bold text-golf-green mb-1`,children:e.name}),(0,M.jsx)(`p`,{className:`text-sm font-medium text-golf-green/70`,children:e.title})]})},e.id))})]})})}),(0,M.jsx)(`section`,{className:`py-12 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold mb-6 text-golf-green`,children:`Interested in Board Service?`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-8`,children:`We're always looking for passionate members who want to contribute to the future of Belvedere Golf Club. If you're interested in serving on the board or a committee, please reach out to our General Manager.`}),(0,M.jsx)(R,{asChild:!0,className:`bg-golf-green hover:bg-golf-green/90 inline-flex items-center gap-2`,children:(0,M.jsxs)(L,{to:`/contact`,children:[(0,M.jsx)(Un,{className:`h-5 w-5`}),(0,M.jsx)(`span`,{children:`Contact Our GM`})]})})]})})}),(0,M.jsx)(`section`,{className:`py-12 px-4 md:px-8 bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold mb-4 text-golf-green`,children:`Board Inquiries`}),(0,M.jsxs)(`p`,{className:`text-gray-700 mb-6`,children:[`Members who wish to bring matters to the board's attention may do so by contacting the appropriate committee chair or by emailing `,(0,M.jsx)(`span`,{className:`text-golf-green font-semibold`,children:`[email protected]`}),`.`]}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`The board meets monthly, with the Annual General Meeting held at the beginning of each year.`})]})})})]}),a3=()=>{let[e,t]=(0,_.useState)([]);return(0,_.useEffect)(()=>{(async()=>{let{data:e}=await wb.from(`staff`).select(`*`).order(`display_order`,{ascending:!0});e&&t(e)})()},[]),(0,M.jsxs)(`main`,{className:`min-h-screen bg-background`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pt-32 pb-16 px-4 md:px-8`,children:(0,M.jsxs)(`div`,{className:`container mx-auto`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-10 text-golf-green text-center`,children:`Meet Our Staff`}),(0,M.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8`,children:e.map(e=>(0,M.jsxs)(`div`,{className:`bg-white rounded-lg shadow p-6 flex flex-col items-center text-center`,children:[e.photo_url&&(0,M.jsx)(`img`,{src:e.photo_url,alt:e.name,className:`w-24 h-24 rounded-full object-cover mb-4`}),(0,M.jsx)(`div`,{className:`font-semibold text-xl mb-1`,children:e.name}),(0,M.jsx)(`div`,{className:`text-golf-green font-medium mb-2`,children:e.position}),e.bio&&(0,M.jsx)(`div`,{className:`text-gray-600 mb-2`,children:e.bio}),e.email&&(0,M.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[`Email: `,(0,M.jsx)(`a`,{href:`mailto:${e.email}`,className:`underline`,children:e.email})]}),e.phone&&(0,M.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[`Phone: `,e.phone]}
358),e.social_links&&Object.keys(e.social_links).length>0&&(0,M.jsx)(`div`,{className:`flex space-x-2 mt-2 justify-center`,children:Object.entries(e.social_links).map(([e,t])=>(0,M.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:`text-golf-green underline text-sm capitalize`,children:e},e))})]},e.id))})]})})]})},o3=({label:e})=>(0,M.jsxs)(`div`,{className:`w-full h-48 sm:h-56 md:h-64 bg-gray-100 border border-gray-300 rounded-lg flex items-center justify-center text-gray-400 text-lg font-medium shadow-sm`,children:[`[`,e,`]`]}),s3=()=>(0,M.jsx)(`main`,{className:`bg-white min-h-screen`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-3xl`,children:[(0,M.jsxs)(`header`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-4`,children:`About Belvedere Golf Club`}),(0,M.jsx)(`h2`,{className:`text-xl md:text-2xl text-golf-green font-semibold`,children:`A Century of Excellence on Prince Edward Island`})]}),(0,M.jsx)(`div`,{className:`mb-10 flex justify-center`,children:(0,M.jsx)(o3,{label:`Clubhouse Image`})}),(0,M.jsxs)(`article`,{className:`prose prose-lg max-w-none text-gray-700 mx-auto mb-10`,children:[(0,M.jsx)(`p`,{children:`Established in 1902, Belvedere Golf Club stands as a proud monument to the history of golf in Prince Edward Island and Canada. Nestled in the heart of Charlottetown, Belvedere has been a cornerstone of the island's sporting culture for over a century and remains one of the oldest and most storied golf clubs in the country.`}),(0,M.jsx)(`p`,{children:`From its early days as the Charlottetown Golf Links to its evolution into the modern-day Belvedere Golf Club, this exceptional course has been shaped by generations of passionate members, influential champions, and renowned designers. With roots tracing back to a nine-hole course in the early 1900s and a legacy steeped in tradition, Belvedere has hosted provincial, regional, and national competitions, helping shape the careers of notable golfers including PEI native Lorie Kane.`}),(0,M.jsx)(`div`,{className:`my-10`,children:(0,M.jsx)(o3,{label:`Historic Competition Image`})}),(0,M.jsx)(`p`,{children:`Belvedere offers a classic parkland design that is both challenging and rewarding. The course features tree-lined fairways, strategically placed bunkers, and well-maintained greens that reflect over a century of thoughtful care and occasional redesign. With its central location and walkable layout, the course is as popular with daily players as it is with elite competitors.`}),(0,M.jsx)(`p`,{children:`But Belvedere is more than a golf courseâit's a community. Whether you're enjoying the camaraderie of a club event, celebrating a hole-in-one, or simply sharing stories at the 19th hole, the spirit of Belvedere is one of friendship, pride, and timeless enjoyment.`}),(0,M.jsx)(`blockquote`,{className:`border-l-4 border-golf-green pl-4 italic text-gray-600 my-6`,children:`âGolf as seen through the eyes of Belvedere members, arguably some of the most colorful characters the game has ever known on Prince Edward Island.â`}),(0,M.jsxs)(`p`,{children:[`Belvedere is also proud to be a founding participant in the historic `,(0,M.jsx)(`strong`,{children:`Rose Bowl`}),` competition, a Maritime golf tradition dating back to 1925, continuing to foster competitive excellence and interclub camaraderie.`]}),(0,M.jsx)(`p`,{className:`font-semibold text-golf-green`,children:`Join us and become part of over 100 years of history, tradition, and passion for the game.`})]}),(0,M.jsx)(`div`,{className:`mb-10 flex justify-center`,children:(0,M.jsx)(o3,{label:`Rose Bowl or Club Event Image`})})]})}),c3=()=>(0,M.jsxs)(`main`,{className:`min-h-screen bg-gray-50`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Social Updates | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Stay up to date with the latest news and updates from Belvedere Golf Club on Facebook and Instagram.`})]}),(0,M.jsx)(`section`,{className:`bg-golf-green text-white py-16`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 text-center`,children:[(0,M.jsx)(`h1`,{className:`text-4xl md:text-5xl font-playfair font-bold mb-4`,children:`Stay Connected`}),(0,M.jsx)(`p`,{className:`text-lg text-white/80 max-w-2xl mx-auto`,children:`Follow us on social media for course updates, upcoming events, and the latest news from Belvedere Golf Club.`})]})}),(0,M.jsx)(`section`,{className:`py-16`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-2xl mx-auto grid md:grid-cols-2 gap-6`,children:[(0,M.jsxs)(`div`,{className:`bg-white rounded-xl shadow-sm border border-gray-200 p-8 text-center flex flex-col items-center`,children:[(0,M.jsx)(kn,{className:`h-10 w-10 text-[#1877F2] mb-4`}),(0,M.jsx)(`h2`,{className:`font-playfair text-xl font-bold text-golf-green mb-2`,children:`Facebook`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm mb-6`,children:`Events, announcements, and updates from the club.`}),(0,M.jsxs)(R,{className:`bg-[#1877F2] hover:bg-[#1877F2]/90 text-white`,onClick:()=>window.open(`https://www.facebook.com/belvederegolfclub`,`_blank`),children:[`Visit our Page`,(0,M.jsx)(En,{className:`h-4 w-4 ml-2`})]})]}),(0,M.jsxs)(`div`,{className:`bg-white rounded-xl shadow-sm border border-gray-200 p-8 text-center flex flex-col items-center`,children:[(0,M.jsx)(zn,{className:`h-10 w-10 text-[#E1306C] mb-4`}),(0,M.jsx)(`h2`,{className:`font-playfair text-xl font-bold text-golf-green mb-2`,children:`Instagram`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm mb-6`,children:`Photos and highlights from the course and clubhouse.`}
358),(0,M.jsxs)(R,{className:`bg-[#E1306C] hover:bg-[#E1306C]/90 text-white`,onClick:()=>window.open(`https://www.instagram.com/belvederegolfclub`,`_blank`),children:[`Follow Us`,(0,M.jsx)(En,{className:`h-4 w-4 ml-2`})]})]})]})})})]}),l3=`https://js.stripe.com/v3`,u3=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,d3=`loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used`,f3=function(){for(var e=document.querySelectorAll(`script[src^="${l3}"]`),t=0;t<e.length;t++){var n=e[t];if(u3.test(n.src))return n}return null},p3=function(e){var t=e&&!e.advancedFraudSignals?`?advancedFraudSignals=false`:``,n=document.createElement(`script`);n.src=`${l3}${t}`;var r=document.head||document.body;if(!r)throw Error(`Expected document.body not to be null. Stripe.js requires a <body> element.`);return r.appendChild(n),n},m3=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:`stripe-js`,version:`2.4.0`,startTime:t})},h3=null,g3=null,_3=null,v3=function(e){return function(){e(Error(`Failed to load Stripe.js`))}},y3=function(e,t){return function(){window.Stripe?e(window.Stripe):t(Error(`Stripe.js not available`))}},b3=function(e){return h3===null?(h3=new Promise(function(t,n){if(typeof window>`u`||typeof document>`u`){t(null);return}if(window.Stripe&&e&&console.warn(d3),window.Stripe){t(window.Stripe);return}try{var r=f3();if(r&&e)console.warn(d3);else if(!r)r=p3(e);else if(r&&_3!==null&&g3!==null){var i;r.removeEventListener(`load`,_3),r.removeEventListener(`error`,g3),(i=r.parentNode)==null||i.removeChild(r),r=p3(e)}_3=y3(t,n),g3=v3(n),r.addEventListener(`load`,_3),r.addEventListener(`error`,g3)}catch(e){n(e);return}}),h3.catch(function(e){return h3=null,Promise.reject(e)})):h3},x3=function(e,t,n){if(e===null)return null;var r=e.apply(void 0,t);return m3(r,n),r},S3,C3=!1,w3=function(){return S3||(S3=b3(null).catch(function(e){return S3=null,Promise.reject(e)}),S3)};Promise.resolve().then(function(){return w3()}).catch(function(e){C3||console.warn(e)});var T3=function(){var e=[...arguments];C3=!0;var t=Date.now();return w3().then(function(n){return x3(n,e,t)})};T3(`pk_live_51JHYF1DAT2IWgxqKwByNAlsJCRZryC57TXhXlmobbBseOJilttr9elRgGvJTpTybcEOeXzmRlRLSMGD7DRfEXrV600eMFL53Er`);var E3=[`Adult Silver - $2,283.00 +HST`,`Adult Silver with Golf Car - $3,043.00 +HST`,`Super Senior 80+ yrs - $1,868.00 +HST`,`Super Senior 80+ yrs with Golf Car - $2,393.00 +HST`,`Intermediate 19-25 - $1,393.00 +HST`,`Intermediate 26-30 - $1,603.00 +HST`,`Junior 6-9 - $408.00 +HST`,`Junior 10-11 - $568.00 +HST`,`Junior 12-18 - $778.00 +HST`],D3=[`Adult Silver - $2,283.00 +HST`,`Adult Silver with Golf Car - $3,043.00 +HST`,`Super Senior 80+ yrs - $1,868.00 +HST`,`Super Senior 80+ yrs with Golf Car - $2,393.00 +HST`,`Intermediate 19-25 - $1,393.00 +HST`,`Intermediate 26-30 - $1,603.00 +HST`],O3=()=>{let[e,t]=(0,_.useState)({name:``,email:``,phone:``,dob:``,address:``,membershipType:E3[0],comments:``}),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),c=n=>{t({...e,[n.target.name]:n.target.value})},l=D3.includes(e.membershipType);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-white`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-xl`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl font-bold text-golf-green mb-4 text-center`,children:`Join the Waitlist`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 mb-4 text-center`,children:`We're excited you're interested in becoming a member! Please fill out the form below to join our 2026 waitlist and we'll be in touch as soon as a spot becomes available.`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`membershipType`,className:`block font-medium text-golf-green mb-1`,children:`Preferred Membership Type`}),(0,M.jsx)(`select`,{id:`membershipType`,name:`membershipType`,value:e.membershipType,onChange:c,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`,children:E3.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))}),(0,M.jsxs)(`p`,{className:`text-sm text-gray-600 mt-1`,children:[`For details on pricing please see our `,(0,M.jsx)(`a`,{href:`/membership`,className:`text-golf-green underline hover:text-golf-green-dark`,children:`membership page`}),`.`]})]}),l&&(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-6`,children:[(0,M.jsx)(`h2`,{className:`text-xl font-bold text-golf-green mb-4`,children:`Deposit Required for Adult, Super Senior, and Intermediate Memberships`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`A $250 deposit is required to join the list:`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-6 mb-4 space-y-2`,children:[(0,M.jsx)(`li`,{children:`$200 will be applied directly toward your future membership dues.`}),(0,M.jsx)(`li`,{children:`$50 will be donated to support Junior Golf programs at the club.`})]}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`This helps us manage interest and support the next generation of golfers.`})]}),n?(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-lg p-8 text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Thank You!`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 mb-4`,children:`Your waitlist request has been submitted successfully.`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`We'll review your application and be in touch soon. If you have any questions in the meantime, please don't hesitate to contact us.`})]}):(0,M.jsxs)(`form`,{onSubmit:async n=>{if(n.preventDefault(),s(!0),a(``),r(!1),!e.name.trim()||!e.email.trim()||!e.dob.trim()){a(`Please fill out all required fields: Name, Email, and Date of Birth.`),s(!1);return}try{if(l){console.log(`Creating Stripe checkout session...`);let t=await fetch(`/api/create-checkout`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e.name,email:e.email,membershipType:e.membershipType,dob:e.dob,phone:e.phone,address:e.address,comments:e.comments})});if(!t.ok){let e=await t.json();throw Error(e.error||`Failed to create checkout session`)}let{url:n}=await t.json();try{await fetch(`https://hook.us1.make.com/6vj4ibkn1migpdxd1ka88ts3i7jnnbgm`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,status:`pending_payment`})})}catch(e){console.error(`Webhook error (non-critical):`,e)}NY({formType:`waitlist`,name:e.name,email:e.email,phone:e.phone,subject:e.membershipType,formData:{...e,status:`pending_payment`},status:`pending_payment`}),console.log(`Redirecting to Stripe checkout...`),window.location.href=n}else{let n=`Date of Birth: ${e.dob}\nAddress: ${e.address||`Not provided`}\nPreferred Membership Type: ${e.membershipType}\nAdditional Comments: ${e.comments&&e.comments.trim()?e.comments:`None provided`}`,i={to:`[email protected]`,from:`[email protected]`,subject:`Waitlist Request: ${e.membershipType} - ${e.name}`,replyTo:e.email,name:e.name,email:e.email,phone:e.phone||`Not provided`,message:n};if(await fetch(`https://hook.us1.make.com/6vj4ibkn1migpdxd1ka88ts3i7jnnbgm`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,status:`submitted`})}),!(await fetch(`https://hook.us1.make.com/0amxmnlcl1jsfetx66qa8pru89wdedfr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)})).ok)throw Error(`Failed to submit the waitlist form. Please try again or c
358ontact us directly.`);NY({formType:`waitlist`,name:e.name,email:e.email,phone:e.phone,subject:e.membershipType,formData:e}),r(!0),t({name:``,email:``,phone:``,dob:``,address:``,membershipType:E3[0],comments:``})}}catch(e){console.error(`Submission error:`,e),a(e?.message||`There was an error processing your submission. Please contact us directly.`)}finally{s(!1)}},className:`bg-white shadow-lg rounded-lg p-8 space-y-6`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`name`,className:`block font-medium text-golf-green mb-1`,children:[`Full Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`name`,name:`name`,value:e.name,onChange:c,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`email`,className:`block font-medium text-golf-green mb-1`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:e.email,onChange:c,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`phone`,className:`block font-medium text-golf-green mb-1`,children:`Phone Number`}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:e.phone,onChange:c,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`dob`,className:`block font-medium text-golf-green mb-1`,children:[`Date of Birth`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`date`,id:`dob`,name:`dob`,value:e.dob,onChange:c,required:!0,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`address`,className:`block font-medium text-golf-green mb-1`,children:`Address`}),(0,M.jsx)(`input`,{type:`text`,id:`address`,name:`address`,value:e.address,onChange:c,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`comments`,className:`block font-medium text-golf-green mb-1`,children:`Additional Comments`}),(0,M.jsx)(`textarea`,{id:`comments`,name:`comments`,value:e.comments,onChange:c,rows:4,className:`w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-golf-green`})]}),(0,M.jsx)(`button`,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-2 px-4 rounded transition`,disabled:o,children:o?`Processing...`:l?`Pay Now`:`Submit`}),i&&(0,M.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-lg p-4 mt-4`,children:[(0,M.jsx)(`p`,{className:`text-red-700 text-center`,children:i}),(0,M.jsxs)(`p`,{className:`text-red-600 text-center text-sm mt-2`,children:[`Please contact us directly at `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`underline`,children:`[email protected]`})]})]})]})]})})]})},k3=()=>{let[e]=mf(),t=e.get(`session_id`),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>{t&&(async()=>{try{let{customer:e,metadata:n}=await(await fetch(`/api/verify-payment?session_id=${t}`)).json();s({name:n.name,email:e.email,membershipType:n.membershipType,dob:n.dob,phone:n.phone,address:n.address,comments:n.comments}),r(!1)}catch(e){console.error(`Error processing waitlist submission:`,e),a(`There was an error processing your submission. Please contact us directly.`),r(!1)}})()},[t]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-white`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4 max-w-xl`,children:n?(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-lg p-8 text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Processing Your Submission`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`Please wait while we process your waitlist submission...`})]}):i?(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-lg p-8 text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-red-600 mb-4`,children:`Error`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:i}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Please contact us directly at [email protected]`})]}):(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-lg p-8 text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Thank You!`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 mb-4`,children:`Your waitlist submission and deposit have been received successfully.`}),(0,M.jsxs)(`div`,{className:`text-left mt-6 mb-6`,children:[(0,M.jsx)(`h3`,{className:`font-bold text-golf-green mb-2`,children:`Submission Details`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-6 space-y-1`,children:[(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`N
358ame:`}),` `,o?.name]}),(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`Email:`}),` `,o?.email]}),(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`Membership Type:`}),` `,o?.membershipType]}),(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`Date of Birth:`}),` `,o?.dob]}),(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`Phone:`}),` `,o?.phone]}),(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`Address:`}),` `,o?.address]}),(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`strong`,{children:`Comments:`}),` `,o?.comments]})]})]}),(0,M.jsx)(`p`,{className:`text-gray-600 mb-6`,children:`We'll review your application and be in touch soon. If you have any questions in the meantime, please don't hesitate to contact us.`}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-6`,children:[(0,M.jsx)(`h3`,{className:`font-bold text-golf-green mb-2`,children:`Deposit Details`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`Your $250 deposit has been processed:`}),(0,M.jsxs)(`ul`,{className:`list-disc pl-6 mt-2 space-y-1`,children:[(0,M.jsx)(`li`,{children:`$200 will be applied toward your future membership dues`}),(0,M.jsx)(`li`,{children:`$50 has been donated to support Junior Golf programs`})]})]})]})})})]})},A3=()=>{let[e,t]=(0,_.useState)({name:``,email:``,phone:``,message:``}),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),c=n=>{t({...e,[n.target.name]:n.target.value})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-2xl`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-4`,children:`Returning Members`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 max-w-xl mx-auto`,children:`The deadline for returning member registration has passed. If you still wish to confirm your membership for the 2026 season, please reach out below.`})]}),n?(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 text-center border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(`svg`,{className:`w-8 h-8 text-golf-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})})}),(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Thank You!`}),(0,M.jsx)(`p`,{className:`text-gray-600 mb-6`,children:`Your message has been sent to Jeff Affleck. He'll be in touch shortly.`}),(0,M.jsx)(L,{to:`/`,className:`inline-block text-golf-green hover:text-golf-green-dark font-medium transition-colors`,children:`â Back to Home`})]}):(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-xl p-6 mb-8`,children:(0,M.jsxs)(`p`,{className:`text-gray-700`,children:[`Spaces are limited and available on a first-come, first-served basis. Fill out the form below and `,(0,M.jsx)(`strong`,{children:`Jeff Affleck`}),` (Operations Manager) will follow up with you directly.`]})}),(0,M.jsxs)(`form`,{onSubmit:async n=>{if(n.preventDefault(),s(!0),a(``),!e.name.trim()||!e.email.trim()){a(`Please fill out all required fields: Name and Email.`),s(!1);return}try{if(!(await fetch(`/api/send-returning-member-email`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e.name,email:e.email,phone:e.phone,message:e.message,type:`inquiry`})})).ok)throw Error(`Failed to submit. Please try again or contact us directly.`);NY({formType:`returning_member_inquiry`,name:e.name,email:e.email,phone:e.phone,subject:`Returning Member Inquiry`,formData:e}),r(!0),t({name:``,email:``,phone:``,message:``})}catch(e){a(e?.message||`There was a problem submitting your request. Please try again or c
358ontact us directly.`)}finally{s(!1)}},className:`space-y-5`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`name`,className:`block font-medium text-gray-700 mb-2`,children:[`Full Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`name`,name:`name`,value:e.name,onChange:c,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Enter your full name`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`email`,className:`block font-medium text-gray-700 mb-2`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:e.email,onChange:c,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`[email protected]`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`phone`,className:`block font-medium text-gray-700 mb-2`,children:[`Phone Number `,(0,M.jsx)(`span`,{className:`text-gray-400 font-normal`,children:`(optional)`})]}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:e.phone,onChange:c,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`(902) 555-1234`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`message`,className:`block font-medium text-gray-700 mb-2`,children:[`Message `,(0,M.jsx)(`span`,{className:`text-gray-400 font-normal`,children:`(optional)`})]}),(0,M.jsx)(`textarea`,{id:`message`,name:`message`,value:e.message,onChange:c,rows:4,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Any details about your membership inquiry...`})]}),i&&(0,M.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-xl p-4`,children:[(0,M.jsx)(`p`,{className:`text-red-700 text-center`,children:i}),(0,M.jsxs)(`p`,{className:`text-red-600 text-center text-sm mt-2`,children:[`Please contact us directly at`,` `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`underline`,children:`[email protected]`})]})]}),(0,M.jsx)(`button`,{type:`submit`,disabled:o,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-4 px-6 rounded-xl transition-all shadow-lg hover:shadow-xl disabled:opacity-50 disabled:cursor-not-allowed`,children:o?`Sending...`:`Send Message`})]})]})]})})]})},j3=()=>{let[e]=mf(),t=e.get(`session_id`),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>{(async()=>{try{if(!t){a(`No session ID provided.`),r(!1);return}let e=await fetch(`/api/verify-payment?session_id=${t}`);if(!e.ok)throw Error(`Failed to verify payment`);let{customer:n,metadata:i,amount_total:o}=await e.json();s({name:i.name,email:n?.email||i.email,phone:i.phone,amount:o/100,paymentOption:i.paymentOption});try{await fetch(`/api/send-returning-member-email`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:i.name,email:n?.email||i.email,phone:i.phone,amount:o/100,paymentOption:i.paymentOption,type:`returning`})})}catch(e){console.error(`Email notification error (non-critical):`,e)}NY({formType:`returning_member`,name:i.name,email:n?.email||i.email,phone:i.phone,formData:{amount:o/100,paymentOption:i.paymentOption,sessionId:t},status:`paid`}),r(!1)}catch(e){console.error(`Error processing submission:`,e),a(`There was an error processing your submission. Please contact us directly.`),r(!1)}})()},[t]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4 max-w-2xl`,children:n?(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 text-center border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse`,children:(0,M.jsx)(`svg`,{className:`w-8 h-8 text-golf-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Processing Your Payment`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Please wait while we confirm your payment...`})]}):i?(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 text-center border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(`svg`,{className:`w-8 h-8 text-red-600`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-red-600 mb-4`,children:`Error`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:i}),(0,M.jsxs)(`p`,{className:`text-gray-600`,children:[`Please contact us directly at`,` `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`text-golf-green hover:underline`,children:`[email protected]`})]})]}):(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 border border-gray-100`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`div`,{className:`w-20 h-20 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(`svg`,{className:`w-10 h-10 text-golf-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})})}),(0,M.jsx)(`h1`,{className:`text-3xl font-bold text-golf-green mb-3`,children:`Thank You!`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600`,children:`Your deposit payment has been received successfully.`})]}),(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-6 mb-6`,children:[(0,M.jsx)(`h3`,{className:`font-bold text-golf-green mb-4 text-lg`,children:`Confirmation Details`}),(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsxs)(`div`,{className:`flex justify-between py-2 border-b border-gray-200`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:`N
358ame`}),(0,M.jsx)(`span`,{className:`font-medium text-gray-900`,children:o?.name})]}),(0,M.jsxs)(`div`,{className:`flex justify-between py-2 border-b border-gray-200`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:`Email`}),(0,M.jsx)(`span`,{className:`font-medium text-gray-900`,children:o?.email})]}),o?.phone&&(0,M.jsxs)(`div`,{className:`flex justify-between py-2 border-b border-gray-200`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:`Phone`}),(0,M.jsx)(`span`,{className:`font-medium text-gray-900`,children:o.phone})]}),(0,M.jsxs)(`div`,{className:`flex justify-between py-2`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:`Amount Paid`}),(0,M.jsxs)(`span`,{className:`font-bold text-golf-green text-xl`,children:[`$`,o?.amount?.toFixed(2)]})]})]})]}),o?.paymentOption===`deposit`&&o?.amount===250&&(0,M.jsx)(`div`,{className:`bg-gradient-to-r from-golf-green/5 to-golf-green/10 border border-golf-green/20 rounded-xl p-6 mb-6`,children:(0,M.jsxs)(`p`,{className:`text-gray-700`,children:[`Your `,(0,M.jsx)(`strong`,{children:`$250 deposit`}),` will be applied directly toward your 2026 membership dues.`]})}),(0,M.jsxs)(`div`,{className:`border-t border-gray-200 pt-6 mt-6`,children:[(0,M.jsx)(`h3`,{className:`font-bold text-golf-green mb-3`,children:`What's Next?`}),(0,M.jsxs)(`p`,{className:`text-gray-600 mb-4`,children:[`We've sent a confirmation email to `,(0,M.jsx)(`strong`,{children:o?.email}),`. Our team will be in touch with details about the upcoming season.`]}),(0,M.jsxs)(`p`,{className:`text-gray-500 text-sm`,children:[`Questions? Contact us at`,` `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`text-golf-green hover:underline`,children:`[email protected]`})]})]}),(0,M.jsx)(`div`,{className:`mt-8 text-center`,children:(0,M.jsx)(L,{to:`/`,className:`inline-block bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-3 px-8 rounded-xl transition-all`,children:`Back to Home`})})]})})})]})},M3=()=>{let[e,t]=(0,_.useState)({name:``,email:``,phone:``}),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(!1),o=n=>{t({...e,[n.target.name]:n.target.value})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-2xl`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-4`,children:`2026 Membership Deposit`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 max-w-xl mx-auto`,children:`Secure your spot for the 2026 season with a $250 deposit.`})]}),(0,M.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),a(!0),r(``),!e.name.trim()||!e.email.trim()){r(`Please fill out all required fields: Name and Email.`),a(!1);return}try{let t=await fetch(`/api/create-returning-member-checkout`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e.name,email:e.email,phone:e.phone,amount:250,paymentOption:`deposit`,returnPath:`/membership-deposit`})});if(!t.ok){let e=await t.json();throw Error(e.error||`Failed to create checkout session`)}NY({formType:`returning_member`,name:e.name,email:e.email,phone:e.phone,formData:{...e,amount:250,paymentOption:`deposit`},status:`pending_payment`});let{url:n}=await t.json();window.location.href=n}catch(e){console.error(`Submission error:`,e),r(e?.message||`There was an error processing your submission. Please contact us directly.`)}finally{a(!1)}},className:`space-y-8`,children:[(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`bg-gradient-to-r from-golf-green/5 to-golf-green/10 border border-golf-green/20 rounded-xl p-6 mb-8`,children:(0,M.jsxs)(`p`,{className:`text-gray-700`,children:[`Your `,(0,M.jsx)(`strong`,{children:`$250 deposit`}),` will be applied directly toward your 2026 membership dues.`]})}),(0,M.jsxs)(`div`,{className:`space-y-5`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`name`,className:`block font-medium text-gray-700 mb-2`,children:[`Full Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`name`,name:`name`,value:e.name,onChange:o,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Enter your full name`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`email`,className:`block font-medium text-gray-700 mb-2`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:e.email,onChange:o,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`[email protected]`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`phone`,className:`block font-medium text-gray-700 mb-2`,children:[`Phone Number `,(0,M.jsx)(`span`,{className:`text-gray-400 font-normal`,children:`(optional)`})]}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:e.phone,onChange:o,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`(902) 555-1234`})]})]})]}),n&&(0,M.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-xl p-4`,children:[(0,M.jsx)(`p`,{className:`text-red-700 text-center`,children:n}),(0,M.jsxs)(`p`,{className:`text-red-600 text-center text-sm mt-2`,children:[`Please contact us directly at`,` `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`underline`,children:`[email protected]`})]})]}),(0,M.jsx)(`button`,{type:`submit`,disabled:i,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-4 px-6 rounded-xl transition-all shadow-lg hover:shadow-xl disabled:opacity-50 disabled:cursor-not-allowed`,children:i?`Processing...`:`Pay $250.00 Deposit`})]})]})})]})},N3=()=>(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Flash Sale | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Special offers and flash sales on Belvedere Golf Club merchandise.`})]}),(0,M.jsx)(`section`,{className:`pb-16 px-4 md:px-8 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsx)(`div`,{className:`max-w-4xl mx-auto text-center`,children:(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-6 text-golf-green`,children:`Flash Sale`})})})}),(0,M.jsx)(`div`,{className:`flex-grow container mx-auto px-4 py-8`,children:(0,M.jsx)(`div`,{className:`max-w-2xl mx-auto text-center`,children:(0,M.jsxs)(`div`,{className:`bg-white border border-gray-200 rounded-xl shadow-sm p-12`,children:[(0,M.jsx)(ar,{className:`w-12 h-12 text-golf-green/40 mx-auto mb-4`}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-3`,children:`No Active Promotions`}),(0,M.jsxs)(`p`,{className:`text-gray-600`,children:[`There are no flash sales running at the moment. Check back soon or visit the`,` `,(0,M.jsx)(`a`,{href:`/store`,className:`text-golf-green font-medium hover:underline`,children:`Pro Shop`}),` `,`for our full merchandise selection.`]})]})})})]});function P3({isActive:e=!1,message:t=`ð Registration Now Open for the 70th Annual Island Open!`,linkUrl:n=null,bgColor:r=`#1e3a8a`,textColor:i=`#ffffff`}){return e?(0,M.jsx)(`div`,{id:`announcement-banner`,className:`fixed top-0 left-0 right-0 py-3 px-4 text-center z-[60]`,style:{backgroundColor:r,color:i},children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`p`,{className:`text-sm md:text-base font-medium`,children:[(0,M.jsx)(`strong`,{children:t}),n&&(0,M.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`ml-2 underline font-semibold`,style:{color:i},children:`Learn more â`})]})})}):null}var F3=()=>{let[e,t]=(0,_.useState)(!1),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(),[o,s]=(0,_.useState)(),[c,l]=(0,_.useState)();return(0,_.useEffect)(()=>{let e=async()=>{let e=await Q4();e&&(t(!!e.is_active),r(e.link_url),a(e.bg_color),s(e.text_color),e.message&&l(e.message))};e();let n=()=>e();return window.addEventListener(`banner-settings-updated`,n),()=>window.removeEventListener(`banner-settings-updated`,n)},[]),(0,_.useEffect)(()=>{let e=()=>{let e=document.getElementById(`announcement-banner`),t=e?e.getBoundingClientRect().height:0;document.documentElement.style.setProperty(`--banner-offset`,`${t}px`)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e,c,i,o]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(P3,{isActive:e,message:c,linkUrl:n,bgColor:i,textColor:o}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`min-h-screen ${e?`pt-[calc(var(--banner-offset,0px)+5rem)]`:`pt-[5rem]`}`,children:(0,M.jsx)(fd,{})}),(0,M.jsx)(kG,{})]})},I3=[{days:`Monday â Friday`,time:`10:00 am â 9:00 pm`},{days:`Saturday`,time:`9:00 am â 9:00 pm`},{days:`Sunday`,time:`9:00 am â 6:00 pm`}],L3=()=>(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto p-6 min-h-screen`,children:[(0,M.jsxs)(`section`,{className:`mb-10 text-center`,children:[(0,M.jsx)(`h1`,{className:`text-4xl font-playfair font-bold text-golf-green mb-8`,children:`Belvedere Dining Room`}),(0,M.jsxs)(`div`,{className:`bg-white border border-gray-200 rounded-xl shadow-md overflow-hidden mb-6`,children:[(0,M.jsxs)(`div`,{className:`bg-golf-green px-8 py-5 flex items-center justify-center gap-3`,children:[(0,M.jsx)(xn,{className:`w-5 h-5 text-golf-sand`}),(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-bold text-white tracking-wide`,children:`Hours of Operation`})]}),(0,M.jsx)(`div`,{className:`px-8 py-2 divide-y divide-gray-100`,children:I3.map(({days:e,time:t})=>(0,M.jsxs)(`div`,{className:`flex justify-between items-center py-4`,children:[(0,M.jsx)(`span`,{className:`font-semibold text-golf-green text-lg`,children:e}),(0,M.jsx)(`span`,{className:`text-gray-700 text-lg`,children:t})]},e))}),(0,M.jsxs)(`div`,{className:`bg-golf-sand-light border-t border-golf-sand px-8 py-4 flex items-start gap-3`,children:[(0,M.jsx)(Rn,{className:`w-5 h-5 text-golf-green-light mt-0.5 flex-shrink-0`}),(0,M.jsxs)(`p`,{className:`text-gray-700 text-sm leading-relaxed text-left`,children:[`Hours may vary for special events. Give us a`,` `,(0,M.jsx)(`a`,{href:`tel:+19025663842`,className:`text-golf-green font-semibold hover:underline`,children:`call`}),` `,`or check our`,` `,(0,M.jsx)(`a`,{href:`https://www.facebook.com/belvederegolfclub`,target:`_blank`,rel:`noopener noreferrer`,className:`text-golf-green font-semibold hover:underline`,children:`Facebook page`}),` `,`to confirm hours before visiting.`]}
358)]})]})]}),(0,M.jsxs)(`section`,{className:`bg-white border border-gray-200 rounded-lg p-6 text-center`,children:[(0,M.jsx)(`h3`,{className:`text-xl font-playfair font-bold text-golf-green mb-4`,children:`Stay Connected`}),(0,M.jsxs)(`div`,{className:`space-y-3 text-gray-700`,children:[(0,M.jsxs)(`p`,{children:[(0,M.jsx)(`strong`,{children:`Belvedere Golf Club`}),(0,M.jsx)(`br`,{}),`Phone: `,(0,M.jsx)(`a`,{href:`tel:+19025663842`,className:`text-golf-green hover:underline font-medium`,children:`(902) 566-3842`})]}),(0,M.jsxs)(`p`,{children:[`Follow us on`,` `,(0,M.jsx)(`a`,{href:`https://www.facebook.com/belvederegolfclub`,target:`_blank`,rel:`noopener noreferrer`,className:`text-golf-green font-semibold hover:underline`,children:`Facebook`}),` `,`for the latest updates, events, and specials.`]})]})]})]}),R3=()=>(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Meeting Room Rental | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Rent our private meeting room at Belvedere Golf Club. Perfect for small business meetings with seating for up to 12 people. Starting at $100 for 2 hours.`})]}),(0,M.jsx)(`div`,{className:`flex-grow pt-28 pb-16 container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto`,children:[(0,M.jsx)(`h1`,{className:`text-3xl md:text-4xl font-playfair font-bold text-golf-green mb-6`,children:`Private Meeting Room Rental`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-6 text-lg`,children:`Host your next business meeting in our private meeting room, designed for productivity and privacy. Perfect for small team meetings, client presentations, and executive sessions.`}),(0,M.jsxs)(`div`,{className:`bg-gradient-to-r from-golf-green to-golf-green-dark text-white p-6 rounded-xl mb-8 text-center shadow-lg`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold mb-2`,children:`Rates Starting at $100`}),(0,M.jsx)(`p`,{className:`text-lg opacity-90`,children:`2-hour minimum rental ⢠Up to 12 people ⢠Professional amenities included`})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6 mb-8`,children:[(0,M.jsx)(`div`,{className:`rounded-lg overflow-hidden shadow-lg`,children:(0,M.jsx)(`img`,{src:`/images/meetingroom1.jpg`,alt:`Belvedere Golf Club Meeting Room Interior`,className:`w-full h-64 md:h-80 object-cover`})}),(0,M.jsx)(`div`,{className:`rounded-lg overflow-hidden shadow-lg`,children:(0,M.jsx)(`img`,{src:`/images/meetingroom2.jpg`,alt:`Belvedere Golf Club Meeting Room Setup`,className:`w-full h-64 md:h-80 object-cover`})})]}),(0,M.jsx)(`div`,{className:`bg-golf-green text-white p-6 rounded-lg mb-8`,children:(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-6 text-center`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,M.jsx)(wn,{className:`h-8 w-8 mb-2`}),(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-1`,children:`Starting Rate`}),(0,M.jsx)(`p`,{className:`text-lg`,children:`$100 for 2 hours`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,M.jsx)(pr,{className:`h-8 w-8 mb-2`}),(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-1`,children:`Capacity`}),(0,M.jsx)(`p`,{className:`text-lg`,children:`Up to 12 people`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,M.jsx)(xn,{className:`h-8 w-8 mb-2`}),(0,M.jsx)(`h3`,{className:`text-xl font-semibold mb-1`,children:`Minimum Rental`}),(0,M.jsx)(`p`,{className:`text-lg`,children:`2 hours`})]})]})}),(0,M.jsxs)(`div`,{className:`mb-8`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-semibold text-golf-green mb-6`,children:`Room Features & Amenities`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,M.jsxs)(`div`,{className:`flex items-start space-x-3 p-4 bg-gray-50 rounded-lg`,children:[(0,M.jsx)(hr,{className:`h-6 w-6 text-golf-green mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`High-Speed WiFi`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Reliable internet connection for video calls and presentations`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start space-x-3 p-4 bg-gray-50 rounded-lg`,children:[(0,M.jsx)(ur,{className:`h-6 w-6 text-golf-green mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`TV with HDMI`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Large screen for slideshows and presentations`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start space-x-3 p-4 bg-gray-50 rounded-lg`,children:[(0,M.jsx)(Dn,{className:`h-6 w-6 text-golf-green mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`Complete Privacy`}
358),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Frosted windows and doors ensure confidential discussions`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start space-x-3 p-4 bg-gray-50 rounded-lg`,children:[(0,M.jsx)(pr,{className:`h-6 w-6 text-golf-green mt-1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`Professional Setting`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Comfortable seating and professional atmosphere`})]})]})]})]}),(0,M.jsx)(`div`,{className:`mb-8`,children:(0,M.jsx)(`div`,{className:`rounded-lg overflow-hidden shadow-lg max-w-2xl mx-auto`,children:(0,M.jsx)(`img`,{src:`/images/meetingroom3.jpeg`,alt:`Business meeting in progress at Belvedere Golf Club meeting room`,className:`w-full h-96 object-cover`})})}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 p-8 rounded-lg border border-golf-green/20 text-center`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-playfair font-semibold text-golf-green mb-4`,children:`Ready to Book Your Meeting?`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-6`,children:`Contact us to check availability and make your reservation.`}),(0,M.jsx)(L,{to:`/contact`,children:(0,M.jsx)(R,{className:`bg-golf-green hover:bg-golf-green-dark text-lg px-8 py-3`,children:`Inquire to Book`})})]})]})})]}),z3=`Collapsible`,[B3,V3]=me(z3),[H3,U3]=B3(z3),W3=_.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c=!1,l]=He({prop:r,defaultProp:i,onChange:o});return(0,M.jsx)(H3,{scope:n,disabled:a,contentId:ra(),open:c,onOpenToggle:_.useCallback(()=>l(e=>!e),[l]),children:(0,M.jsx)(N.div,{"data-state":X3(c),"data-disabled":a?``:void 0,...s,ref:t})})});W3.displayName=z3;var G3=`CollapsibleTrigger`,K3=_.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=U3(G3,n);return(0,M.jsx)(N.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":X3(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:A(e.onClick,i.onOpenToggle)})});
vendor: 4,389 bytes, line 358
358K3.displayName=G3;var q3=`CollapsibleContent`,J3=_.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=U3(q3,e.__scopeCollapsible);return(0,M.jsx)(Re,{present:n||i.open,children:({present:e})=>(0,M.jsx)(Y3,{...r,ref:t,present:e})})});J3.displayName=q3;var Y3=_.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=U3(q3,n),[s,c]=_.useState(r),l=_.useRef(null),u=j(t,l),d=_.useRef(0),f=d.current,p=_.useRef(0),m=p.current,h=o.open||s,g=_.useRef(h),v=_.useRef();return _.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Pe(()=>{let e=l.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),c(r)}},[o.open,r]),(0,M.jsx)(N.div,{"data-state":X3(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function X3(e){return e?`open`:`closed`}var Z3=W3,Q3=K3,$3=J3,e6=`Accordion`,t6=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[n6,r6,i6]=fe(e6),[a6,o6]=me(e6,[i6,V3]),s6=V3(),c6=_.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,M.jsx)(n6.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,M.jsx)(m6,{...a,ref:t}):(0,M.jsx)(p6,{...i,ref:t})})});c6.displayName=e6;var[l6,u6]=a6(e6),[d6,f6]=a6(e6,{collapsible:!1}),p6=_.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=He({prop:n,defaultProp:r,onChange:i});return(0,M.jsx)(l6,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:_.useCallback(()=>a&&c(``),[a,c]),children:(0,M.jsx)(d6,{scope:e.__scopeAccordion,collapsible:a,children:(0,M.jsx)(_6,{...o,ref:t})})})}),m6=_.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o=[],s]=He({prop:n,defaultProp:r,onChange:i}),c=_.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=_.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,M.jsx)(l6,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,M.jsx)(d6,{scope:e.__scopeAccordion,collapsible:!0,children:(0,M.jsx)(_6,{...a,ref:t})})})}),[h6,g6]=a6(e6),_6=_.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=j(_.useRef(null),t),c=r6(n),l=bC(i)===`ltr`,u=A(e.onKeyDown,e=>{if(!t6.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,M.jsx)(h6,{scope:n,disabled:r,direction:i,orientation:a,children:(0,M.jsx)(n6.Slot,{scope:n,children:(0,M.jsx)(N.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),v6=`AccordionItem`,[y6,b6]=a6(v6),x6=_.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=g6(v6,n),o=u6(v6,n),s=s6(n),c=ra(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,M.jsx)(y6,{scope:n,open:l,disabled:u,triggerId:c,children:(0,M.jsx)(Z3,{"data-orientation":a.orientation,"data-state":O6(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});x6.displayName=v6;var S6=`AccordionHeader`,C6=_.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=g6(e6,n),a=b6(S6,n);return(0,M.jsx)(N.h3,{"data-orientation":i.orientation,"data-state":O6(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});C6.displayName=S6;var w6=`AccordionTrigger`,T6=_.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=g6(e6,n),a=b6(w6,n),o=f6(w6,n),s=s6(n);return(0,M.jsx)(n6.ItemSlot,{scope:n,children:(0,M.jsx)(Q3,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});T6.displayName=w6;var E6=`AccordionContent`,D6=_.forwardRef((e,t)=>
358{let{__scopeAccordion:n,...r}=e,i=g6(e6,n),a=b6(E6,n),o=s6(n);return(0,M.jsx)($3,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});D6.displayName=E6;function O6(e){return e?`open`:`closed`}var k6=c6,A6=x6,j6=C6,M6=T6,N6=D6,P6=k6,F6=_.forwardRef(({className:e,...t},n)=>(0,M.jsx)(A6,{ref:n,className:F(`border-b`,e),...t}));F6.displayName=`AccordionItem`;var I6=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsx)(j6,{className:`flex`,children:(0,M.jsxs)(M6,{ref:r,className:F(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,M.jsx)(fn,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));I6.displayName=M6.displayName;var L6=_.forwardRef(({className:e,children:t,...n},r)=>(0,M.jsx)(N6,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,M.jsx)(`div`,{className:F(`pb-4 pt-0`,e),children:t})}));L6.displayName=N6.displayName;var R6=({rank:e,className:t})=>(0,M.jsx)(`span`,{className:F(`inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-golf-green-dark font-playfair text-sm font-bold text-white ring-2 ring-golf-gold`,t),children:e}),z6=({prize:e,featured:t})=>{let n=e.icon;return(0,M.jsxs)(`div`,{className:F(`group relative flex flex-col rounded-2xl border bg-white p-5 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl`,t?`border-golf-gold/40 shadow-md`:`border-golf-green/10 shadow-sm`),children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,M.jsx)(R6,{rank:e.rank}),(0,M.jsx)(`span`,{className:`flex h-10 w-10 items-center justify-center rounded-xl bg-golf-sand-light text-golf-green transition-colors group-hover:bg-golf-green group-hover:text-golf-gold-light`,children:(0,M.jsx)(n,{className:`h-5 w-5`})})]}),(0,M.jsx)(`h3`,{className:F(`mt-4 font-playfair font-bold text-golf-green-dark leading-snug`,t?`text-xl`:`text-lg`),children:e.name}),(0,M.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:e.detail}),(0,M.jsxs)(`div`,{className:`mt-auto pt-4`,children:[(0,M.jsx)(`span`,{className:F(`font-playfair font-bold text-golf-gold-ink`,t?`text-2xl`:`text-xl`),children:e.valueLabel}),e.value!==null&&(0,M.jsx)(`span`,{className:`ml-1 text-xs uppercase tracking-wider text-gray-500`,children:`value`})]})]})},B6=({prize:e})=>(0,M.jsxs)(`li`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,M.jsx)(R6,{rank:e.rank,className:`h-8 w-8 text-xs`}),(0,M.jsx)(`span`,{className:`text-base font-semibold leading-snug text-golf-green-dark`,children:e.name}),(0,M.jsx)(`span`,{className:`ml-auto whitespace-nowrap pl-2 font-playfair text-lg font-bold text-golf-gold-ink`,children:e.valueLabel})]}),V6=({onBuy:e})=>{let[t,...n]=Of,r=n.slice(0,5),i=n.slice(5),a=t.icon;return(0,M.jsx)(`section`,{id:`prizes`,className:`scroll-mt-28 bg-golf-sand-light/60 py-20 sm:px-4 md:px-8`,children:(0,M.jsxs)(`div`,{className:`container mx-auto max-w-6xl`,children:[(0,M.jsxs)(`div`,{className:`mx-auto max-w-2xl text-center`,children:[(0,M.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.3em] text-golf-gold-ink`,children:`The Prizes`}),(0,M.jsx)(`h2`,{className:`mt-3 font-playfair text-4xl md:text-5xl font-bold text-golf-green-dark`,children:`11 prizes. One ticket.`}),(0,M.jsxs)(`p`,{className:`mt-4 text-lg text-gray-600`,children:[`Our biggest prize list yet: `,Af(kf),` in golf, dining and gear, plus a Lifetime Membership at the top.`]})]}),(0,M.jsxs)(`div`,{className:`relative mt-12 overflow-hidden rounded-3xl bg-golf-green-dark text-white shadow-2xl`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-cover bg-center opacity-30`,style:{backgroundImage:`url("/lovable-uploads/7b95b060-251e-47e2-9259-933777c5fe0e.jpg")`},"aria-hidden":`true`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-golf-green-dark via-golf-green-dark/90 to-golf-green-dark/60`,"aria-hidden":`true`}),(0,M.jsxs)(`div`,{className:`relative grid gap-8 p-8 md:grid-cols-[1fr_auto] md:items-center md:p-12`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(R6,{rank:1,className:`h-11 w-11 text-base`}),(0,M.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.3em] text-golf-gold-light`,children:`Grand Prize`})]}),(0,M.jsx)(`h3`,{className:`mt-5 font-playfair text-4xl md:text-6xl font-bold leading-tight`,children:`Lifetime Membership`}),(0,M.jsx)(`p`,{className:`mt-4 max-w-xl text-lg text-white/80`,children:`Belvedere Golf Club, for life. A lifetime of rounds at the club golfers have called home since 1902.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-row items-center gap-4 md:flex-col md:gap-0`,children:[(0,M.jsx)(`span`,{className:`flex h-14 w-14 items-center justify-center rounded-full border-2 border-golf-gold bg-golf-gold/10 md:h-24 md:w-24`,children:(0,M.jsx)(a,{className:`h-7 w-7 text-golf-gold-light md:h-11 md:w-11`})}),(0,M.jsx)(`span`,{className:`font-playfair text-3xl italic text-golf-gold-light md:mt-4`,children:`Priceless`})]})]})]}),(0,M.jsx)(`ul`,{className:`mt-6 divide-y divide-golf-green/10 rounded-2xl border border-golf-green/10 bg-white shadow-sm sm:hidden`,children:n.map(e=>(0,M.jsx)(B6,{prize:e},e.rank))}),(0,M.jsx)(`div`,{className:`mt-6 hidden gap-4 sm:grid sm:grid-cols-2 lg:grid-cols-5`,children:r.map(e=>(0,M.jsx)(z6,{prize:e,featured:!0},e.rank))}),(0,M.jsx)(`div`,{className:`mt-4 hidden gap-4 sm:grid sm:grid-cols-2 lg:grid-cols-5`,children:i.map(e=>(0,M.jsx)(z6,{prize:e},e.rank))}),(0,M.jsxs)(`div`,{className:`mt-12 flex flex-col items-center gap-4 text-center`,children:[(0,M.jsxs)(`p`,{className:`font-playfair text-2xl font-bold text-golf-green-dark`,children:[`All `,Of.length,` prizes. O
358ne $`,Df.ticketPrice,` ticket.`]}),(0,M.jsxs)(R,{size:`lg`,onClick:e,className:`h-14 rounded-full bg-golf-green px-8 text-base font-bold text-white shadow-lg hover:bg-golf-green-dark`,children:[(0,M.jsx)(sr,{className:`mr-2 h-5 w-5`}),` Get your ticket`]})]})]})})},H6=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e,d()):typeof define==`function`&&define.amd?define([`exports`,`react`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.ReactStripe={},n.React))})(e,(function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function s(e,t){if(e==null)return{};var n=o(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c(e,t){return l(e)||u(e,t)||d(e,t)||p()}function l(e){if(Array.isArray(e))return e}function u(e,t){var n=e&&(typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`]);if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function d(e,t){if(e){if(typeof e==`string`)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}}function f(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(){throw TypeError(`Invalid attempt to destructure non-iterable instance. 359In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var h={exports:{}},g,_;function v(){return _?g:(_=1,g=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`,g)}var y,b;function x(){if(b)return y;b=1;var e=v();function t(){}function n(){}return n.resetWarningCache=t,y=function(){function r(t,n,r,i,a,o){if(o!==e){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},y}h.exports=x()();var S=h.exports,C=m(S),w=function(e,n,r){var i=!!r,a=t.useRef(r);t.useEffect(function(){a.current=r},[r]),t.useEffect(function(){if(!i||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(n,t),function(){e.off(n,t)}},[i,n,e,a])},T=function(e){var n=t.useRef(e);return t.useEffect(function(){n.current=e},[e]),n.current},E=function(e){return e!==null&&i(e)===`object`},D=function(e){return E(e)&&typeof e.then==`function`},O=function(e){return E(e)&&typeof e.elements==`function`&&typeof e.createToken==`function`&&typeof e.createPaymentMethod==`function`&&typeof e.confirmCardPayment==`function`},ee=`[object Object]`,k=function e(t,n){if(!E(t)||!E(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var i=Object.prototype.toString.call(t)===ee;if(i!==(Object.prototype.toString.call(n)===ee))return!1;if(!i&&!r)return t===n;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(var s={},c=0;c<a.length;c+=1)s[a[c]]=!0;for(var l=0;l<o.length;l+=1)s[o[l]]=!0;var u=Object.keys(s);if(u.length!==a.length)return!1;var d=t,f=n;return u.every(function(t){return e(d[t],f[t])})},A=function(e,t,n){return E(e)?Object.keys(e).reduce(function(i,o){var s=!E(t)||!k(e[o],t[o]);return n.includes(o)?(s&&console.warn(`Unsupported prop change: options.${o} is not a mutable property.`),i):s?r(r({},i||{}),{},a({},o,e[o])):i},null):null},te="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ne=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:te;if(e===null||O(e))return e;throw Error(t)},j=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:te;if(D(e))return{tag:`async`,stripePromise:Promise.resolve(e).then(function(e){return ne(e,t)})};var n=ne(e,t);return n===null?{tag:`empty`}:{tag:`sync`,stripe:n}},re=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:`react-stripe-js`,version:`2.8.1`}),e.registerAppInfo({name:`react-stripe-js`,version:`2.8.1`,url:`https://stripe.com/docs/stripe-js/react`}))},M=t.createContext(null);M.displayName=`ElementsContext`;var ie=function(e,t){if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e},ae=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useMemo(function(){return j(n)},[n]),o=c(t.useState(function(){return{stripe:a.tag===`sync`?a.stripe:null,elements:a.tag===`sync`?a.stripe.elements(r):null}}),2),s=o[0],l=o[1];t.useEffect(function(){var e=!0,t=function(e){l(function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}})};return a.tag===`async`&&!s.stripe?a.stripePromise.then(function(n){n&&e&&t(n)}):a.tag===`sync`&&!s.stripe&&t(a.stripe),function(){e=!1}},[a,s,r]);var u=T(n);t.useEffect(function(){u!==null&&u!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[u,n]);var d=T(r);return t.useEffect(function(){if(s.elements){var e=A(r,d,[`clientSecret`,`fonts`]);e&&s.elements.update(e)}},[r,d,s.elements]),t.useEffect(function(){re(s.stripe)},[s.stripe]),t.createElement(M.Provider,{value:s},i)};ae.propTypes={stripe:C.any,options:C.object};var oe=function(e){return ie(t.useContext(M),e)},se=function(){return oe(`calls useElements()`).elements},ce=function(e){var t=e.children;return t(oe(`mounts <ElementsConsumer>`))};
359ce.propTypes={children:C.func.isRequired};var le=[`on`,`session`],ue=t.createContext(null);ue.displayName=`CustomCheckoutSdkContext`;var de=function(e,t){if(!e)throw Error(`Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ${t} in an <CustomCheckoutProvider> provider.`);return e},fe=t.createContext(null);fe.displayName=`CustomCheckoutContext`;var pe=function(e,t){if(!e)return null;e.on,e.session;var n=s(e,le);return t?r(r({},n),t):r(r({},n),e.session())},me="Invalid prop `stripe` supplied to `CustomCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",he=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useMemo(function(){return j(n,me)},[n]),o=c(t.useState(null),2),s=o[0],l=o[1],u=c(t.useState(function(){return{stripe:a.tag===`sync`?a.stripe:null,customCheckoutSdk:null}}),2),d=u[0],f=u[1],p=function(e,t){f(function(n){return n.stripe&&n.customCheckoutSdk?n:{stripe:e,customCheckoutSdk:t}})},m=t.useRef(!1);t.useEffect(function(){var e=!0;return a.tag===`async`&&!d.stripe?a.stripePromise.then(function(t){t&&e&&!m.current&&(m.current=!0,t.initCustomCheckout(r).then(function(e){e&&(p(t,e),e.on(`change`,l))}))}):a.tag===`sync`&&a.stripe&&!m.current&&(m.current=!0,a.stripe.initCustomCheckout(r).then(function(e){e&&(p(a.stripe,e),e.on(`change`,l))})),function(){e=!1}},[a,d,r,l]);var h=T(n);t.useEffect(function(){h!==null&&h!==n&&console.warn("Unsupported prop change on CustomCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[h,n]);var g=T(r);t.useEffect(function(){if(d.customCheckoutSdk){r.clientSecret&&!E(g)&&!k(r.clientSecret,g.clientSecret)&&console.warn(`Unsupported prop change: options.client_secret is not a mutable property.`);var e=g?.elementsOptions?.appearance,t=r?.elementsOptions?.appearance;t&&!k(t,e)&&d.customCheckoutSdk.changeAppearance(t)}},[r,g,d.customCheckoutSdk]),t.useEffect(function(){re(d.stripe)},[d.stripe]);var _=t.useMemo(function(){return pe(d.customCheckoutSdk,s)},[d.customCheckoutSdk,s]);return d.customCheckoutSdk?t.createElement(ue.Provider,{value:d},t.createElement(fe.Provider,{value:_},i)):null};he.propTypes={stripe:C.any,options:C.shape({clientSecret:C.string.isRequired,elementsOptions:C.object}).isRequired};var N=function(e){return de(t.useContext(ue),e)},ge=function(e){var n=t.useContext(ue),r=t.useContext(M);if(n&&r)throw Error(`You cannot wrap the part of your app that ${e} in both <CustomCheckoutProvider> and <Elements> providers.`);return n?de(n,e):ie(r,e)},_e=function(){N(`calls useCustomCheckout()`);var e=t.useContext(fe);if(!e)throw Error(`Could not find CustomCheckout Context; You need to wrap the part of your app that calls useCustomCheckout() in an <CustomCheckoutProvider> provider.`);return e},ve=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ye=function(e,n){var r=`${ve(e)}Element`,i=n?function(e){ge(`mounts <${r}>`);var n=e.id,i=e.className;return t.createElement(`div`,{id:n,className:i})}:function(n){var i=n.id,a=n.className,o=n.options,s=o===void 0?{}:o,l=n.onBlur,u=n.onFocus,d=n.onReady,f=n.onChange,p=n.onEscape,m=n.onClick,h=n.onLoadError,g=n.onLoaderStart,_=n.onNetworksChange,v=n.onConfirm,y=n.onCancel,b=n.onShippingAddressChange,x=n.onShippingRateChange,S=ge(`mounts <${r}>`),C=`elements`in S?S.elements:null,E=`customCheckoutSdk`in S?S.customCheckoutSdk:null,D=c(t.useState(null),2),O=D[0],ee=D[1],k=t.useRef(null),te=t.useRef(null);w(O,`blur`,l),w(O,`focus`,u),w(O,`escape`,p),w(O,`click`,m),w(O,`loaderror`,h),w(O,`loaderstart`,g),w(O,`networkschange`,_),w(O,`confirm`,v),w(O,`cancel`,y),w(O,`shippingaddresschange`,b),w(O,`shippingratechange`,x),w(O,`change`,f);var ne;d&&(ne=e===`expressCheckout`?d:function(){d(O)}),w(O,`ready`,ne),t.useLayoutEffect(function(){if(k.current===null&&te.current!==null&&(C||E)){var t=null;E?t=E.createElement(e,s):C&&(t=C.create(e,s)),k.current=t,ee(t),t&&t.mount(te.current)}},[C,E,s]);var j=T(s);return t.useEffect(function(){if(k.current){var e=A(s,j,[`paymentRequest`]);e&&`update`in k.current&&k.current.update(e)}},[s,j]),t.useLayoutEffect(function(){return function(){if(k.current&&typeof k.current.destroy==`function`)try{k.current.destroy(),k.current=null}catch{}}},[]),t.createElement(`div`,{id:i,className:a,ref:te})};return i.propTypes={id:C.string,className:C.string,onChange:C.func,onBlur:C.func,onFocus:C.func,onReady:C.func,onEscape:C.func,onClick:C.func,onLoadError:C.func,onLoaderStart:C.func,onNetworksChange:C.func,onConfirm:C.func,onCancel:C.func,onShippingAddressChange:C.func,onShippingRateChange:C.func,options:C.object},i.displayName=r,i.__elementType=e,i},be=typeof window>`u`,xe=t.createContext(null);xe.displayName=`EmbeddedCheckoutProviderContext`;var Se=function(){var e=t.useContext(xe);if(!e)throw Error(`<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>`);return e},Ce="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",we=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useMemo(function(){return j(n,Ce)},[n]),o=t.useRef(null),s=t.useRef(null),l=c(t.useState({embeddedCheckout:null}),2),u=l[0],d=l[1];t.useEffect(function(){if(!(s.current||o.current)){var e=function(e){s.current||o.current||(s.current=e,o.current=s.current.initEmbeddedCheckout(r).then(function(e){d({embeddedCheckout:e})}))};a.tag===`async`&&!s.current&&(r.clientSecret||r.fetchClientSecret)?a.stripePromise.then(function(t){t&&e(t)}):a.tag===`sync`&&!s.current&&(r.clientSecret||r.fetchClientSecret)&&e(a.str
359ipe)}},[a,r,u,s]),t.useEffect(function(){return function(){u.embeddedCheckout?(o.current=null,u.embeddedCheckout.destroy()):o.current&&o.current.then(function(){o.current=null,u.embeddedCheckout&&u.embeddedCheckout.destroy()})}},[u.embeddedCheckout]),t.useEffect(function(){re(s)},[s]);var f=T(n);t.useEffect(function(){f!==null&&f!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[f,n]);var p=T(r);return t.useEffect(function(){if(p!=null){if(r==null){console.warn(`Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.`);return}r.clientSecret===void 0&&r.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),p.clientSecret!=null&&r.clientSecret!==p.clientSecret&&console.warn(`Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead.`),p.fetchClientSecret!=null&&r.fetchClientSecret!==p.fetchClientSecret&&console.warn(`Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead.`),p.onComplete!=null&&r.onComplete!==p.onComplete&&console.warn(`Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it.`),p.onShippingDetailsChange!=null&&r.onShippingDetailsChange!==p.onShippingDetailsChange&&console.warn(`Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it.`),p.onLineItemsChange!=null&&r.onLineItemsChange!==p.onLineItemsChange&&console.warn(`Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.`)}},[p,r]),t.createElement(xe.Provider,{value:u},i)},Te=be?function(e){var n=e.id,r=e.className;return Se(),t.createElement(`div`,{id:n,className:r})}:function(e){var n=e.id,r=e.className,i=Se().embeddedCheckout,a=t.useRef(!1),o=t.useRef(null);return t.useLayoutEffect(function(){return!a.current&&i&&o.current!==null&&(i.mount(o.current),a.current=!0),function(){if(a.current&&i)try{i.unmount(),a.current=!1}catch{}}},[i]),t.createElement(`div`,{ref:o,id:n,className:r})},Ee=function(){return ge(`calls useStripe()`).stripe},De=ye(`auBankAccount`,be),Oe=ye(`card`,be),ke=ye(`cardNumber`,be),Ae=ye(`cardExpiry`,be),je=ye(`cardCvc`,be),Me=ye(`fpxBank`,be),Ne=ye(`iban`,be),Pe=ye(`idealBank`,be),Fe=ye(`p24Bank`,be),Ie=ye(`epsBank`,be),Le=ye(`payment`,be),Re=ye(`expressCheckout`,be),ze=ye(`currencySelector`,be),Be=ye(`paymentRequestButton`,be),Ve=ye(`linkAuthentication`,be),He=ye(`address`,be),Ue=ye(`shippingAddress`,be),We=ye(`paymentMethodMessaging`,be),Ge=ye(`affirmMessage`,be),Ke=ye(`afterpayClearpayMessage`,be);e.AddressElement=He,e.AffirmMessageElement=Ge,e.AfterpayClearpayMessageElement=Ke,e.AuBankAccountElement=De,e.CardCvcElement=je,e.CardElement=Oe,e.CardExpiryElement=Ae,e.CardNumberElement=ke,e.CurrencySelectorElement=ze,e.CustomCheckoutProvider=he,e.Elements=ae,e.ElementsConsumer=ce,e.EmbeddedCheckout=Te,e.EmbeddedCheckoutProvider=we,e.EpsBankElement=Ie,e.ExpressCheckoutElement=Re,e.FpxBankElement=Me,e.IbanElement=Ne,e.IdealBankElement=Pe,e.LinkAuthenticationElement=Ve,e.P24BankElement=Fe,e.PaymentElement=Le,e.PaymentMethodMessagingElement=We,e.PaymentRequestButtonElement=Be,e.ShippingAddressElement=Ue,e.useCustomCheckout=_e,e.useElements=se,e.useStripe=Ee}))}))(),U6=T3(`pk_live_51JHYF1DAT2IWgxqKwByNAlsJCRZryC57TXhXlmobbBseOJilttr9elRgGvJTpTybcEOeXzmRlRLSMGD7DRfEXrV600eMFL53Er`),W6=({step:e})=>(0,M.jsx)(`ol`,{className:`mb-6 flex items-center gap-3 text-sm`,children:[{n:1,label:`Your details`},{n:2,label:`Payment`}].map(({n:t,label:n},r)=>(0,M.jsxs)(_.Fragment,{children:[r>0&&(0,M.jsx)(`li`,{"aria-hidden":`true`,className:`h-px flex-1 bg-golf-green/15`}),(0,M.jsxs)(`li`,{className:F(`flex items-center gap-2`,e>=t?`text-golf-green-dark`:`text-gray-400`),children:[(0,M.jsx)(`span`,{className:F(`flex h-7 w-7 items-center justify-center rounded-full text-xs font-bold`,e>=t?`bg-golf-green text-white`:`bg-gray-100 text-gray-400`),children:t}),(0,M.jsx)(`span`,{className:`font-medium`,children:n})]})]},t))}),G6=({id:e,label:t,hint:n,invalid:r,className:i,...a})=>(0,M.jsxs)(`div`,{className:i,children:[(0,M.jsx)(lJ,{htmlFor:e,className:`mb-1.5 block text-sm font-medium text-golf-green-dark`,children:t}),(0,M.jsx)(bJ,{id:e,"aria-invalid":r||void 0,"aria-describedby":n?`${e}-hint`:void 0,className:F(`h-11 placeholder:text-gray-400 focus-visible:ring-golf-green`,r&&`border-red-500`),...a}),n&&(0,M.jsx)(`p`,{id:`${e}-hint`,className:`mt-1 text-xs text-gray-500`,children:n})]}),K6=({value:e,current:t,onChange:n,icon:r,title:i,subtitle:a})=>(0,M.jsxs)(`label`,{className:F(`flex cursor-pointer items-start gap-3 rounded-xl border-2 p-4 transition-colors`,t===e?`border-golf-green bg-golf-green/5`:`border-gray-200 hover:border-golf-green/40`),children:[(0,M.jsx)(`input`,{type:`radio`,name:`deliveryMethod`,value:e,checked:t===e,onChange:e=>n(e.target.value),className:`sr-only`}),(0,M.jsx)(r,{className:F(`mt-0.5 h-5 w-5 shrink-0`,t===e?`text-golf-green`:`text-gray-400`)}),(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`span`,{className:`block text-sm font-semibold text-golf-green-dark`,children:i}),(0,M.jsx)(`span`,{className:`block text-xs text-gray-500`,children:a})]})]});function q6(){let[e,t]=_.useState(null),[n,r]=_.useState(!1),[i,a]=_.useState(null),[o,s]=_.useState(``),[c,l]=_.useState(``),[u,d]=_.useState(``),[f,p]=_.useState(``),[m,h]=_.useState(`pickup`),[g,v]=_.useState(``),[y,b]=_.useState(``),[x,S]=_.useState(``),[C,w]=_.useState(``),[T,E]=_.useState(!1),[D,O]=_.useState(!1),ee=async e=>{r(!0),a(null);try{let n=await fetch(`/api/create-foundation-intent`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({quantity:1,...e})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(r?.clientSecret)t(r.clientSecret),E(!0);else throw Error(`No client secret received`)}catch(e){console.error(`Failed to create payment intent:`,e),a(`Unable to load payment form. Please try again.`)}finally{r(!1)}},k=m===`mail`,A={purchaserName:!c,ticketName:!u,email:!o.includes(`@`),phoneNumber:!f,address:k&&!g,city:k&&!y,province:k&&!x,postalCode:k&&!C},te=!Object.values(A).some(Boolean),ne=e=>D&&A[e];return i?(0,M.jsxs)(`div`,{className:`rounded-xl border border-red-200 bg-red-50 p-5`,children:[(0,M.jsx)(`div`,{className:`font-medium text-red-800`,children:`Payment Error`}),(0,M.jsx)(`div`,{className:`mt-1 text-sm text-red-700`,children:i}),(0,M.jsx)(R,{onClick:()=>window.location.reload(),className:`mt-4 bg-red-600 text-white hover:bg-red-700`,children:`Try Again`})]}):T?e?(0,M.jsxs)(`div`,{children:[(0,M.jsx)(W6,{step:2}),(0,M.jsx)(H6.Elements,{stripe:U6,options:{clientSecret:e,appearance:{theme:`stripe`,variables:{colorPrimary:`#1A4D2E`}}},children:(0,M.jsx)(J6,{})})]}):(0,M.jsx)(`div`,{className:`py-10 text-center text-sm text-gray-500`,children:`Loading paymentâ¦`}):(0,M.jsxs)(`div`,{children:[(0,M.jsx)(W6,{step:1}),(0,M.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),O(!0),te&&ee({email:o,purchaserName:c,ticketName:u,phoneNumber:f,deliveryMethod:m,address:k?g:void 0,city:k?y:void 0,province:k?x:void 0,postalCode:k?C:void 0})},noValidate:!0,className:`space-y-5`,children:[(0,M.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,M.jsx)(G6,{id:`purchaserName`,label:`Purchaser name`,value:c,onChange:e=>l(e.target.value),invalid:ne(`purchaserName`),autoComplete:`name`,required:!0}),(0,M.jsx)(G6,{id:`ticketName`,label:`Name for ticket`,hint:`The name printed on your ticket.`,value:u,onChange:e=>d(e.target.value),invalid:ne(`ticketName`),required:!0}),(0,M.jsx)(G6,{id:`email`,type:`email`,label:`Email address`,value:o,onChange:e=>
359s(e.target.value),placeholder:`e.g. [email protected]`,invalid:ne(`email`),autoComplete:`email`,required:!0}),(0,M.jsx)(G6,{id:`phoneNumber`,type:`tel`,label:`Phone number`,value:f,onChange:e=>p(e.target.value),placeholder:`e.g. (902) 555-0123`,invalid:ne(`phoneNumber`),autoComplete:`tel`,required:!0})]}),(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{className:`mb-2 text-sm font-medium text-golf-green-dark`,children:`How would you like your ticket?`}),(0,M.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,M.jsx)(K6,{value:`pickup`,current:m,onChange:h,icon:ir,title:`Pick up at the club`,subtitle:`Collect from the pro shop`}),(0,M.jsx)(K6,{value:`mail`,current:m,onChange:h,icon:Un,title:`Mail it to me`,subtitle:`Sent to your address`})]})]}),k&&(0,M.jsxs)(`div`,{className:`space-y-4 rounded-xl border border-golf-green/15 bg-golf-sand-light/50 p-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-golf-green-dark`,children:[(0,M.jsx)(Wn,{className:`h-4 w-4`}),` Mailing address`]}),(0,M.jsx)(G6,{id:`address`,label:`Street address`,value:g,onChange:e=>v(e.target.value),placeholder:`e.g. 123 Main Street`,invalid:ne(`address`),autoComplete:`street-address`,required:!0}),(0,M.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-3`,children:[(0,M.jsx)(G6,{id:`city`,label:`City`,value:y,onChange:e=>b(e.target.value),placeholder:`e.g. Charlottetown`,invalid:ne(`city`),autoComplete:`address-level2`,required:!0}),(0,M.jsx)(G6,{id:`province`,label:`Province`,value:x,onChange:e=>S(e.target.value),placeholder:`e.g. PE`,invalid:ne(`province`),autoComplete:`address-level1`,required:!0}),(0,M.jsx)(G6,{id:`postalCode`,label:`Postal code`,value:C,onChange:e=>w(e.target.value),placeholder:`e.g. C1A 1A1`,invalid:ne(`postalCode`),autoComplete:`postal-code`,required:!0})]})]}),D&&!te&&(0,M.jsxs)(`p`,{role:`alert`,className:`rounded-lg bg-red-50 px-4 py-2 text-sm text-red-700`,children:[`Please fill in the highlighted fields`,A.email&&o?` and check your email address`:``,`.`]}),(0,M.jsx)(R,{type:`submit`,disabled:n,className:`h-12 w-full bg-golf-green text-base font-semibold hover:bg-golf-green-dark`,children:n?`Preparing paymentâ¦`:`Continue to payment · $${Df.ticketPrice}`}),(0,M.jsxs)(`p`,{className:`flex items-center justify-center gap-1.5 text-xs text-gray-500`,children:[(0,M.jsx)(Hn,{className:`h-3.5 w-3.5`}),` All fields are required. Payments are processed securely by Stripe.`]})]})]})}function J6(){let e=(0,H6.useStripe)(),t=(0,H6.useElements)(),[n,r]=_.useState(!1),[i,a]=_.useState(null);return(0,M.jsxs)(`form`,{onSubmit:async n=>{if(n.preventDefault(),!e||!t)return;r(!0),a(null);let{error:i}=await e.confirmPayment({elements:t,confirmParams:{return_url:`${window.location.origin}/foundation-draw?redirect_status=succeeded`}});i&&(console.error(`Payment error:`,i),a(i.message||`Payment failed. Please try again.`)),r(!1)},className:`space-y-5`,children:[i&&(0,M.jsxs)(`div`,{className:`rounded-xl border border-red-200 bg-red-50 p-4`,children:[(0,M.jsx)(`div`,{className:`font-medium text-red-800`,children:`Payment Error`}),(0,M.jsx)(`div`,{className:`mt-1 text-sm text-red-700`,children:i}),i.includes(`live mode`)&&(0,M.jsxs)(`div`,{className:`mt-2 text-xs text-red-600`,children:[(0,M.jsx)(`strong`,{children:`Note:`}),` This appears to be a configuration issue. Please contact support.`]})]}),(0,M.jsx)(H6.PaymentElement,{}),(0,M.jsx)(R,{type:`submit`,disabled:!e||n,className:`h-12 w-full bg-golf-green text-base font-semibold hover:bg-golf-green-dark`,children:n?`Processingâ¦`:`Buy ticket securely · $${Df.ticketPrice}`}),(0,M.jsxs)(`p`,{className:`flex items-center justify-center gap-1.5 text-xs text-gray-500`,children:[(0,M.jsx)(Hn,{className:`h-3.5 w-3.5`}),` Payments are processed securely by Stripe.`]})]})}var Y6=`/lovable-uploads/7b95b060-251e-47e2-9259-933777c5fe0e.jpg`,X6=`/lovable-uploads/foundation-draw-2026.png`,Z6=e=>document.getElementById(e)?.scrollIntoView({behavior:`smooth`}),Q6=()=>{let e=new URLSearchParams(window.location.search),t=e.get(`payment_intent`);return e.get(`redirect_status`)===`succeeded`&&t?(0,M.jsx)(a8,{}):(0,M.jsxs)(`div`,{className:`flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`2026 Golf Foundation Draw | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Win a Lifetime Membership plus 10 more prizes worth ${Af(kf)}. $${Df.ticketPrice} tickets include a 2027 green fee. Draw ${Df.dateLabel}.`})]}),(0,M.jsx)($6,{}),(0,M.jsx)(e8,{}),(0,M.jsx)(V6,{onBuy:()=>Z6(`buy`)}),(0,M.jsx)(t8,{}),(0,M.jsx)(n8,{}),(0,M.jsx)(r8,{}),(0,M.jsx)(i8,{})]})};function $6(){return(0,M.jsxs)(`section`,{className:`relative overflow-hidden bg-golf-green-dark text-white`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-cover bg-center animate-slow-zoom`,style:{backgroundImage:`url("${Y6}")`},"aria-hidden":`true`}),(0,M.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-b from-golf-green-dark/85 via-golf-green-dark/75 to-golf-green-dark`,"aria-hidden":`true`}),(0,M.jsx)(`div`,{className:`relative container mx-auto px-4 pb-20 pt-16 text-center md:px-8 md:pb-28 md:pt-24`,children:(0,M.jsxs)(`div`,{className:`mx-auto max-w-4xl animate-fade-in`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-center gap-4 text-xs font-semibold uppercase tracking-[0.25em] text-golf-gold-light sm:tracking-[0.35em]`,children:[(0,M.jsx)(`span`,{className:`hidden h-px w-10 bg-golf-gold/70 sm:block`}),`Belvedere Golf Foundation`,(0,M.jsx)(`span`,{className:`hidden h-px w-10 bg-golf-gold/70 sm:block`})]}),(0,M.jsxs)(`div`,{className:`mt-6 inline-flex rounded-full border border-golf-gold/50 bg-golf-gold/15 px-4 py-1 text-sm font-semibold text-golf-gold-light`,children:[`Our biggest draw yet · `,Of.length,` prizes, up from `,Df.previousYearPrizeCount]}),(0,M.jsxs)(`h1`,{className:`mt-5 text-balance font-playfair text-[2.75rem] font-bold leading-[1.05] drop-shadow-lg sm:text-5xl md:text-7xl`,children:[(0,M.jsx)(`span`,{className:`block text-golf-gold-light`,children:Df.year}),`Golf Foundation Draw`]}),(0,M.jsxs)(`p`,{className:`mx-auto mt-6 max-w-2xl text-lg text-white/85 md:text-xl`,children:[`Win a `,(0,M.jsx)(`strong`,{className:`text-white`,children:`Lifetime Membership`}),`, plus 10 more prizes worth`,` `,(0,M.jsx)(`strong`,{className:`text-white`,children:Af(kf)}),`. Every ticket includes a 2027 green fee.`]}),(0,M.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm text-white/80`,children:[(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(an,{className:`h-4 w-4 text-golf-gold-light`}),` `,Df.dateLabel]}),(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(xn,{className:`h-4 w-4 text-golf-gold-light`}),` Draw starts at `,Df.timeLabel]})]}),(0,M.jsx)(`div`,{className:`mt-8`,children:(0,M.jsx)(Ff,{drawAt:Df.drawAt})}),(0,M.jsxs)(`div`,{id:`hero-cta`,className:`mt-10 flex flex-col items-center justify-center gap-3 sm:flex-row`,children:[(0,M.jsxs)(R,{size:`lg`,onClick:()=>
359Z6(`buy`),className:`h-14 rounded-full bg-golf-gold px-8 text-base font-bold text-golf-green-dark shadow-lg hover:bg-golf-gold-light`,children:[(0,M.jsx)(sr,{className:`mr-2 h-5 w-5`}),` Get your ticket · $`,Df.ticketPrice]}),(0,M.jsxs)(R,{size:`lg`,variant:`outline`,onClick:()=>Z6(`prizes`),className:`h-14 rounded-full border-white/40 bg-transparent px-8 text-base text-white hover:bg-white/10 hover:text-white`,children:[`See all 11 prizes `,(0,M.jsx)(Zt,{className:`ml-2 h-4 w-4`})]})]})]})})]})}function e8(){return(0,M.jsx)(`section`,{className:`relative z-10 -mt-10 sm:px-4 md:px-8`,children:(0,M.jsx)(`div`,{className:`container mx-auto max-w-5xl`,children:(0,M.jsx)(`dl`,{className:`grid grid-cols-2 divide-golf-green/10 overflow-hidden rounded-2xl border border-golf-gold/30 bg-white shadow-xl md:grid-cols-4 md:divide-x`,children:[{value:String(Of.length),label:`Prizes`,sub:`Up from ${Df.previousYearPrizeCount} last year`,highlight:!0},{value:Af(kf),label:`In prizes`,sub:`Plus a Lifetime Membership`},{value:(0,M.jsx)(jn,{className:`mx-auto h-8 w-8 text-golf-green md:h-9 md:w-9`,"aria-hidden":`true`}),label:`2027 Green fee`,sub:`Included with every ticket`},{value:String(Df.maxTickets),label:`Tickets total`,sub:`Limited draw`}].map(e=>(0,M.jsxs)(`div`,{className:`border-golf-green/10 p-5 text-center [&:nth-child(-n+2)]:border-b md:[&:nth-child(-n+2)]:border-b-0 [&:nth-child(odd)]:border-r md:[&:nth-child(odd)]:border-r-0`,children:[(0,M.jsx)(`dt`,{className:`sr-only`,children:e.label}),(0,M.jsxs)(`dd`,{children:[(0,M.jsx)(`div`,{className:`flex h-10 items-center justify-center font-playfair text-3xl font-bold text-golf-green-dark md:h-11 md:text-4xl`,children:e.value}),(0,M.jsx)(`div`,{className:`mt-1 text-xs font-semibold uppercase tracking-[0.2em] text-golf-gold-ink`,children:e.label}),e.highlight?(0,M.jsx)(`div`,{className:`mt-2 inline-flex rounded-full bg-golf-gold/15 px-2.5 py-0.5 text-xs font-semibold text-golf-green`,children:e.sub}):(0,M.jsx)(`div`,{className:`mt-1 text-xs text-gray-500`,children:e.sub})]})]},e.label))})})})}function t8(){let e=[{icon:lr,title:`A shot at all 11 prizes`,body:`From a Lifetime Membership to a 2027 season membership with cart, passes, a cart rental and more, worth ${Af(kf)} together.`},{icon:jn,title:`A 2027 green fee`,body:`Every ticket comes with a green fee for next season, so you get a round at Belvedere whether you win or not.`},{icon:Nn,title:`Junior golf & community`,body:`Proceeds go to Junior Golf Development and Local Social Programs through the Belvedere Golf Foundation Inc.`}];return(0,M.jsx)(`section`,{className:`py-20 sm:px-4 md:px-8`,children:(0,M.jsxs)(`div`,{className:`container mx-auto max-w-6xl`,children:[(0,M.jsxs)(`div`,{className:`mx-auto max-w-2xl text-center`,children:[(0,M.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.3em] text-golf-gold-ink`,children:`Your Ticket`}),(0,M.jsxs)(`h2`,{className:`mt-3 font-playfair text-4xl font-bold text-golf-green-dark md:text-5xl`,children:[`What $`,Df.ticketPrice,` gets you`]})]}),(0,M.jsx)(`div`,{className:`mt-12 grid gap-6 md:grid-cols-3`,children:e.map(({icon:e,title:t,body:n})=>(0,M.jsxs)(`div`,{className:`rounded-2xl border border-golf-green/10 bg-white p-8 shadow-sm`,children:[(0,M.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-xl bg-golf-green text-golf-gold-light`,children:(0,M.jsx)(e,{className:`h-6 w-6`})}),(0,M.jsx)(`h3`,{className:`mt-5 font-playfair text-2xl font-bold text-golf-green-dark`,children:t}),(0,M.jsx)(`p`,{className:`mt-2 text-gray-600`,children:n})]},t))}),(0,M.jsx)(`div`,{className:`mt-12 text-center`,children:(0,M.jsxs)(R,{size:`lg`,onClick:()=>Z6(`buy`),className:`h-14 rounded-full bg-golf-green px-8 text-base font-bold text-white shadow-lg hover:bg-golf-green-dark`,children:[(0,M.jsx)(sr,{className:`mr-2 h-5 w-5`}),` Get your ticket · $`,Df.ticketPrice]})})]})})}function n8(){return(0,M.jsx)(`section`,{id:`buy`,className:`scroll-mt-28 bg-golf-green-dark py-20 sm:px-4 md:px-8`,children:(0,M.jsxs)(`div`,{className:`container mx-auto max-w-6xl`,children:[(0,M.jsxs)(`div`,{className:`mx-auto max-w-2xl text-center text-white`,children:[(0,M.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.3em] text-golf-gold-light`,children:`Buy Online`}),(0,M.jsx)(`h2`,{className:`mt-3 font-playfair text-4xl font-bold md:text-5xl`,children:`Get your ticket`}),(0,M.jsxs)(`p`,{className:`mt-4 text-white/75`,children:[`Only `,Df.maxTickets,` tickets will be sold.`]})]}),(0,M.jsxs)(`div`,{className:`mt-12 grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.6fr)]`,children:[(0,M.jsxs)(`aside`,{className:`order-2 flex flex-col gap-6 lg:order-1`,children:[(0,M.jsxs)(`div`,{className:`rounded-2xl border border-golf-gold/30 bg-white/5 p-6 text-white`,children:[(0,M.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-golf-gold-light`,children:`Your order`}),(0,M.jsxs)(`div`,{className:`mt-4 flex items-baseline justify-between gap-4 border-b border-white/10 pb-4`,children:[(0,M.jsxs)(`span`,{className:`font-playfair text-xl`,children:[Df.year,` Foundation Draw ticket`]}),(0,M.jsxs)(`span`,{className:`font-playfair text-3xl font-bold text-golf-gold-light`,children:[`$`,Df.ticketPrice]})]}),(0,M.jsx)(`ul`,{className:`mt-4 space-y-3 text-sm text-white/80`,children:[`Entry for all 11 prizes`,`2027 green fee included`,`Draw ${Df.dateLabel} at ${Df.timeLabel}`,`Email receipt sent right away`].map(e=>(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(_n,{className:`mt-0.5 h-4 w-4 shrink-0 text-golf-gold-light`}),` `,e]},e))})]}),(0,M.jsxs)(`a`,{href:X6,target:`_blank`,rel:`noopener noreferrer`,className:`group hidden overflow-hidden rounded-2xl border border-white/10 lg:block`,children:[(0,M.jsx)(`img`,{src:X6,alt:`2026 Golf Foundation Draw poster listing all 11 prizes`,className:`w-full transition-transform duration-500 group-hover:scale-[1.02]`,loading:`lazy`}),(0,M.jsx)(`span`,{className:`block bg-white/5 py-2 text-center text-xs text-white/70 group-hover:text-white`,children:`View the official poster`})]})]}),(0,M.jsxs)(`div`,{className:`order-1 rounded-2xl bg-white p-6 shadow-2xl md:p-8 lg:order-2`,children:[(0,M.jsxs)(`div`,{className:`mb-5 flex items-center justify-between gap-3 rounded-xl bg-golf-sand-light px-4 py-3 lg:hidden`,children:[(0,M.jsxs)(`span`,{className:`text-sm text-golf-green-dark`,children:[(0,M.jsxs)(`span`,{className:`font-semibold`,children:[Df.year,` Draw ticket`]}),` · incl. 2027 green fee`]}),(0,M.jsxs)(`span`,{className:`font-playfair text-xl font-bold text-golf-green-dark`,children:[`$`,Df.ticketPrice]})]}),(0,M.jsx)(q6,{})]})]})]})})}function r8(){let e=[{q:`When is the draw?`,a:`The draw is on ${Df.dateLabel}. Ticket draws start at ${Df.timeLabel}.`},{q:`How do I get my ticket?`,a:`When you buy online you choose how you get your ticket: pick it up at the Belvedere pro shop, or have it mailed to you. Either way, you get an email receipt right away.`},{q:`How many tickets are being sold?`,a:`${Df.maxTickets} tickets will be sold. At least ${Df.minTickets} must sell for the draw to take place.`},{q:`Can I buy more than one ticket?`,a:`Yes. Each online purchase is for one ticket. After checkout, choose "Buy another ticket" to purchase more.`},{q:`What is the 1st Ticket Out prize?`,a:`The first ticket drawn wins a ticket to the 2027 Foundation Draw.`}
359,{q:`Where do the proceeds go?`,a:`Proceeds support Junior Golf Development and Local Social Programs through the Belvedere Golf Foundation Inc.`}];return(0,M.jsx)(`section`,{className:`bg-golf-sand-light/60 py-20 pb-32 sm:px-4 md:px-8 md:pb-20`,children:(0,M.jsxs)(`div`,{className:`container mx-auto max-w-3xl`,children:[(0,M.jsx)(`h2`,{className:`text-center font-playfair text-4xl font-bold text-golf-green-dark`,children:`Good to know`}),(0,M.jsx)(P6,{type:`single`,collapsible:!0,className:`mt-10 rounded-2xl border border-golf-green/10 bg-white px-6 shadow-sm`,children:e.map(({q:t,a:n},r)=>(0,M.jsxs)(F6,{value:`faq-${r}`,className:r===e.length-1?`border-b-0`:void 0,children:[(0,M.jsx)(I6,{className:`text-left font-playfair text-lg text-golf-green-dark hover:no-underline`,children:t}),(0,M.jsx)(L6,{className:`text-base text-gray-600`,children:n})]},t))}),(0,M.jsxs)(`p`,{className:`mt-6 text-center text-gray-600`,children:[`Questions? Call the Pro Shop at`,` `,(0,M.jsx)(`a`,{href:`tel:+19025663842`,className:`font-semibold text-golf-green underline`,children:`(902) 566-3842`})]})]})})}function i8(){let[e,t]=_.useState(!0);return _.useEffect(()=>{let e=[`hero-cta`,`buy`].map(e=>document.getElementById(e)).filter(Boolean);if(!e.length||typeof IntersectionObserver>`u`)return;let n=new Set,r=new IntersectionObserver(e=>{e.forEach(e=>e.isIntersecting?n.add(e.target):n.delete(e.target)),t(n.size>0)},{threshold:.05});return e.forEach(e=>r.observe(e)),()=>r.disconnect()},[]),(0,M.jsx)(`div`,{"aria-hidden":e,className:`fixed inset-x-0 bottom-0 z-40 border-t border-golf-gold/30 bg-golf-green-dark/95 px-4 pt-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] backdrop-blur transition-transform duration-300 md:hidden ${e?`translate-y-full`:`translate-y-0`}`,children:(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,M.jsxs)(`div`,{className:`text-white`,children:[(0,M.jsx)(`div`,{className:`text-xs text-white/70`,children:`11 prizes · 2027 green fee`}),(0,M.jsxs)(`div`,{className:`font-playfair text-xl font-bold text-golf-gold-light`,children:[`$`,Df.ticketPrice]})]}),(0,M.jsx)(R,{onClick:()=>Z6(`buy`),tabIndex:e?-1:0,className:`h-11 rounded-full bg-golf-gold px-6 font-bold text-golf-green-dark hover:bg-golf-gold-light`,children:`Get your ticket`})]})})}function a8(){return(0,M.jsxs)(`div`,{className:`flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Thank You! | Foundation Draw | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Thank you for supporting the Belvedere Foundation. Your ticket has been purchased successfully.`})]}),(0,M.jsxs)(`section`,{className:`relative overflow-hidden bg-golf-green-dark px-4 py-20 text-white md:px-8`,children:[(0,M.jsx)(`div`,{className:`absolute inset-0 bg-cover bg-center opacity-25`,style:{backgroundImage:`url("${Y6}")`},"aria-hidden":`true`}),(0,M.jsxs)(`div`,{className:`relative container mx-auto max-w-3xl text-center`,children:[(0,M.jsx)(`span`,{className:`mx-auto flex h-20 w-20 items-center justify-center rounded-full border-2 border-golf-gold bg-golf-gold/10`,children:(0,M.jsx)(_n,{className:`h-10 w-10 text-golf-gold-light`})}),(0,M.jsx)(`h1`,{className:`mt-6 font-playfair text-5xl font-bold md:text-6xl`,children:`You're in the draw!`}),(0,M.jsxs)(`p`,{className:`mt-4 text-xl text-white/85`,children:[`Your `,Df.year,` Foundation Draw ticket is confirmed. Good luck on `,Df.dateLabel,`!`]})]})]}),(0,M.jsx)(`section`,{className:`px-4 py-16 md:px-8`,children:(0,M.jsx)(`div`,{className:`container mx-auto max-w-3xl`,children:(0,M.jsxs)(`div`,{className:`rounded-2xl border border-golf-green/10 bg-white p-8 shadow-lg`,children:[(0,M.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-3`,children:[{icon:sr,label:`Ticket confirmed`},{icon:Un,label:`Email receipt sent`},{icon:jn,label:`2027 green fee included`}].map(({icon:e,label:t})=>(0,M.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-golf-sand-light/70 p-4 text-golf-green-dark`,children:[(0,M.jsx)(e,{className:`h-5 w-5 shrink-0`}),(0,M.jsx)(`span`,{className:`font-semibold`,children:t})]},t))}),(0,M.jsx)(`h2`,{className:`mt-8 font-playfair text-2xl font-bold text-golf-green-dark`,children:`What's next?`}),(0,M.jsxs)(`ul`,{className:`mt-4 space-y-3 text-gray-600`,children:[(0,M.jsxs)(`li`,{className:`flex gap-2`,children:[(0,M.jsx)(_n,{className:`mt-0.5 h-5 w-5 shrink-0 text-golf-green`}),` Check your email for your receipt and green fee details.`]}),(0,M.jsxs)(`li`,{className:`flex gap-2`,children:[(0,M.jsx)(an,{className:`mt-0.5 h-5 w-5 shrink-0 text-golf-green`}),` Mark your calendar: the draw is `,Df.dateLabel,` at `,Df.timeLabel,`.`]}),(0,M.jsxs)(`li`,{className:`flex gap-2`,children:[(0,M.jsx)(jn,{className:`mt-0.5 h-5 w-5 shrink-0 text-golf-green`}),` Your ticket includes a green fee for the 2027 season.`]}),(0,M.jsxs)(`li`,{className:`flex gap-2`,children:[(0,M.jsx)(Nn,{className:`mt-0.5 h-5 w-5 shrink-0 text-golf-green`}
359),` Thank you for supporting junior golf development and local social programs!`]})]}),(0,M.jsxs)(`div`,{className:`mt-8 flex flex-col justify-center gap-3 sm:flex-row`,children:[(0,M.jsx)(R,{onClick:()=>window.location.href=`/`,className:`h-12 bg-golf-green px-6 hover:bg-golf-green-dark`,children:`Return to Home`}),(0,M.jsx)(R,{variant:`outline`,onClick:()=>window.location.href=`/foundation-draw#buy`,className:`h-12 border-golf-green px-6 text-golf-green hover:bg-golf-green/10`,children:`Buy Another Ticket`})]})]})})})]})}var o8=()=>{let[e,t]=(0,_.useState)(1),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(`credit`),o=e*5,s=n?o:0;return(0,M.jsxs)(`main`,{className:`min-h-screen flex flex-col`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Belvedere Ace Chase | Chase the Ace Lottery | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Join the exciting Belvedere Ace Chase! $5 tickets, weekly draws every Friday night. Get hole-in-one? Get 10 extra tickets! Chase the ace and win big.`})]}),(0,M.jsx)(`section`,{className:`pb-12 px-4 md:px-8 bg-gradient-to-br from-yellow-50 via-amber-50 to-orange-50`,children:(0,M.jsx)(`div`,{className:`container mx-auto`,children:(0,M.jsxs)(`div`,{className:`max-w-5xl mx-auto text-center`,children:[(0,M.jsxs)(`div`,{className:`mb-8`,children:[(0,M.jsx)(Y4,{className:`mb-4 bg-red-500 hover:bg-red-600 text-white px-4 py-2 text-sm font-semibold`,children:`ð§ DRAFT - NOT YET ACTIVE ð§`}),(0,M.jsx)(`h1`,{className:`font-playfair text-5xl md:text-6xl font-bold mb-6 text-golf-green`,children:`Belvedere Ace Chase`}),(0,M.jsxs)(`p`,{className:`text-xl md:text-2xl text-gray-700 mb-6 max-w-3xl mx-auto`,children:[`The ultimate chase-the-ace experience! `,(0,M.jsx)(`span`,{className:`font-semibold text-amber-600`,children:`$5 tickets`}),`, weekly Friday night draws, and special bonuses for hole-in-one achievements.`]})]}),(0,M.jsx)(`div`,{className:`mb-8 flex justify-center`,children:(0,M.jsx)(`img`,{src:`/images/ace-chase-placeholder.svg`,alt:`Belvedere Ace Chase - Chase the Ace lottery with playing card and golf course theme`,className:`max-w-full h-auto rounded-lg shadow-lg border-2 border-amber-300`,style:{maxHeight:`300px`}})}),(0,M.jsx)(`div`,{className:`bg-white/90 backdrop-blur-sm rounded-xl p-6 shadow-lg border border-amber-200 max-w-3xl mx-auto`,children:(0,M.jsxs)(`div`,{className:`grid md:grid-cols-3 gap-6`,children:[(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`div`,{className:`text-3xl font-bold text-golf-green mb-2`,children:`$5`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Per Ticket`})]}),(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`div`,{className:`text-3xl font-bold text-golf-green mb-2`,children:`50%`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`To Belvedere`})]}),(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`div`,{className:`text-3xl font-bold text-golf-green mb-2`,children:`Friday`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Draw Nights`})]})]})})]})})}),(0,M.jsx)(`div`,{className:`flex-grow container mx-auto px-4 py-8`,children:(0,M.jsx)(`div`,{className:`max-w-6xl mx-auto`,children:(0,M.jsxs)(X2,{defaultValue:`overview`,className:`space-y-6`,children:[(0,M.jsxs)(Z2,{className:`grid w-full grid-cols-4`,children:[(0,M.jsx)(Q2,{value:`overview`,children:`Overview`}),(0,M.jsx)(Q2,{value:`rules`,children:`Rules`}),(0,M.jsx)(Q2,{value:`tickets`,children:`Buy Tickets`}),(0,M.jsx)(Q2,{value:`documentation`,children:`Documentation`})]}),(0,M.jsxs)($2,{value:`overview`,className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`grid lg:grid-cols-2 gap-6`,children:[(0,M.jsxs)(Bm,{className:`border-2 border-amber-200`,children:[(0,M.jsx)(Vm,{className:`bg-amber-50`,children:(0,M.jsxs)(Hm,{className:`text-golf-green flex items-center gap-2`,children:[(0,M.jsx)(_r,{className:`h-5 w-5`}),`How Ace Chase Works`]})}),(0,M.jsx)(Wm,{className:`p-6 space-y-4`,children:(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`div`,{className:`bg-amber-100 text-amber-800 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold`,children:`1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-semibold text-golf-green`,children:`Buy Your Tickets`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`$5 per ticket, buy as many as you want`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`div`,{className:`bg-amber-100 text-amber-800 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold`,children:`2`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-semibold text-golf-green`,children:`Friday Night Draws`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Every Friday night at the club`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`div`,{className:`bg-amber-100 text-amber-800 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold`,children:`3`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-semibold text-golf-green`,children:`Chase the Ace`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Win a portion every week, chase the big prize`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`div`,{className:`bg-amber-100 text-amber-800 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold`,children:`â`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-semibold text-amber-600`,children:`Hole-in-One Bonus!`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Get a hole-in-one? Get 10 extra tickets!`})]})]})]})})]}),(0,M.jsxs)(Bm,{className:`border-2 border-golf-green`,children:[(0,M.jsx)(Vm,{className:`bg-golf-green/5`,children:(0,M.jsxs)(Hm,{className:`text-golf-green flex items-center gap-2`,children:[(0,M.jsx)(lr,{className:`h-5 w-5`}),`Prize Structure`]})}),(0,M.jsxs)(Wm,{className:`p-6 space-y-4`,children:[(0,M.jsxs)(`div`,{className:`bg-gradient-to-r from-yellow-100 to-yellow-50 border-2 border-yellow-300 rounded-lg p-4 text-center`,children:[(0,M.jsx)(`div`,{className:`text-lg font-bold text-yellow-800 mb
359-2`,children:`ð CHASE THE ACE ð`}),(0,M.jsx)(`div`,{className:`text-xl font-extrabold text-golf-green`,children:`Progressive Jackpot`}),(0,M.jsx)(`div`,{className:`text-sm text-yellow-700 mt-1`,children:`Grows each week until won`})]}),(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsxs)(`div`,{className:`bg-white border border-golf-green/30 rounded-lg p-3`,children:[(0,M.jsx)(`div`,{className:`font-semibold text-golf-green`,children:`Weekly Winners`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Portion of pot every Friday`})]}),(0,M.jsxs)(`div`,{className:`bg-white border border-golf-green/30 rounded-lg p-3`,children:[(0,M.jsx)(`div`,{className:`font-semibold text-golf-green`,children:`50% to Belvedere`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Supports club operations & programs`})]})]})]})]})]}),(0,M.jsxs)(Bm,{className:`border border-amber-200 bg-gradient-to-r from-amber-50 to-yellow-50`,children:[(0,M.jsx)(Vm,{children:(0,M.jsxs)(Hm,{className:`text-golf-green flex items-center gap-2`,children:[(0,M.jsx)(rr,{className:`h-5 w-5`}),`Special Features`]})}),(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`grid md:grid-cols-3 gap-6`,children:[(0,M.jsx)(`div`,{className:`text-center`,children:(0,M.jsxs)(`div`,{className:`bg-white border-2 border-amber-300 rounded-lg p-4`,children:[(0,M.jsx)(or,{className:`h-8 w-8 text-amber-600 mx-auto mb-3`}),(0,M.jsx)(`div`,{className:`font-semibold text-golf-green mb-2`,children:`Hole-in-One Bonus`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Score a hole-in-one and get 10 bonus tickets automatically added to the next draw!`})]})}),(0,M.jsx)(`div`,{className:`text-center`,children:(0,M.jsxs)(`div`,{className:`bg-white border-2 border-amber-300 rounded-lg p-4`,children:[(0,M.jsx)(Xn,{className:`h-8 w-8 text-amber-600 mx-auto mb-3`}),(0,M.jsx)(`div`,{className:`font-semibold text-golf-green mb-2`,children:`Weekly Subscription`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Set up automatic weekly ticket purchases so you never miss a draw!`})]})}),(0,M.jsx)(`div`,{className:`text-center`,children:(0,M.jsxs)(`div`,{className:`bg-white border-2 border-amber-300 rounded-lg p-4`,children:[(0,M.jsx)(pr,{className:`h-8 w-8 text-amber-600 mx-auto mb-3`}),(0,M.jsx)(`div`,{className:`font-semibold text-golf-green mb-2`,children:`Community Support`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`50% of proceeds support Belvedere Golf Club programs and facilities!`})]})})]})})]})]}),(0,M.jsx)($2,{value:`rules`,className:`space-y-6`,children:(0,M.jsxs)(Bm,{className:`border-2 border-golf-green`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green/5`,children:[(0,M.jsx)(Hm,{className:`text-golf-green`,children:`Official Ace Chase Rules`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`Complete rules and regulations for the Belvedere Ace Chase lottery`})]}),(0,M.jsxs)(Wm,{className:`p-6 space-y-6`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`text-lg font-semibold text-golf-green mb-3`,children:`Basic Rules`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`⢠Tickets cost $5 each`}),(0,M.jsx)(`li`,{children:`⢠Draws are held every Friday night at the club`}),(0,M.jsx)(`li`,{children:`⢠Must be 18+ to participate`}),(0,M.jsx)(`li`,{children:`⢠No limit on number of tickets per person`}),(0,M.jsx)(`li`,{children:`⢠Tickets can be purchased online or at the club`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`text-lg font-semibold text-golf-green mb-3`,children:`Draw Process`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`⢠One ticket is drawn from all eligible tickets`}),(0,M.jsx)(`li`,{children:`⢠Winner selects one card from remaining deck`}),(0,M.jsx)(`li`,{children:`⢠If Ace of Spades is selected, winner gets the jackpot`}),(0,M.jsx)(`li`,{children:`⢠If not, winner gets weekly portion and jackpot rolls over`}),(0,M.jsx)(`li`,{children:`⢠Selected card is removed from deck for future draws`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`text-lg font-semibold text-golf-green mb-3`,children:`Prize Distribution`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`⢠50% of ticket sales goes to Belvedere Golf Club`}),(0,M.jsx)(`li`,{children:`⢠Remaining 50% goes to prize pool`}),(0,M.jsx)(`li`,{children:`⢠Weekly winners receive a portion of current pot`}),(0,M.jsx)(`li`,{children:`⢠Jackpot winner receives the full accumulated amount`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`text-lg font-semibold text-golf-green mb-3`,children:`Hole-in-One Bonus`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`⢠Any golfer who achieves a hole-in-one at Belvedere receives 10 bonus tickets`}),(0,M.jsx)(`li`,{children:`⢠Hole-in-one must be witnessed and verified by club staff`}),(0,M.jsx)(`li`,{children:`⢠Bonus tickets are automatically entered in the next available draw`}),(0,M.jsx)(`li`,{children:`⢠No limit on bonus tickets per person`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`text-lg font-semibold text-golf-green mb-3`,children:`Terms & Conditions`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700 text-sm`,children:[(0,M.jsx)(`li`,{children:`⢠All sales are final, no refunds`}),(0,M.jsx)(`li`,{children:`⢠Winners must claim prizes within 30 days`}),(0,M.jsx)(`li`,{children:`⢠Belvedere Golf Club reserves the right to modify rules with notice`}
359),(0,M.jsx)(`li`,{children:`⢠Proceeds support club operations and community programs`}),(0,M.jsx)(`li`,{children:`⢠Gaming license compliance - details to be added`})]})]})]})]})}),(0,M.jsx)($2,{value:`tickets`,className:`space-y-6`,children:(0,M.jsxs)(Bm,{className:`border-2 border-golf-green max-w-2xl mx-auto`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green/5`,children:[(0,M.jsx)(Hm,{className:`text-golf-green`,children:`Purchase Ace Chase Tickets`}),(0,M.jsx)(Um,{className:`text-golf-green/80`,children:`[PLACEHOLDER] Ticket purchasing functionality - not yet active`})]}),(0,M.jsxs)(Wm,{className:`p-6 space-y-6`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`block text-sm font-medium text-golf-green mb-3`,children:`Number of Tickets`}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>t(Math.max(1,e-1)),disabled:!0,children:`-`}),(0,M.jsx)(`span`,{className:`text-2xl font-bold text-golf-green min-w-12 text-center`,children:e}),(0,M.jsx)(R,{variant:`outline`,size:`sm`,onClick:()=>t(e+1),disabled:!0,children:`+`})]})]}),(0,M.jsxs)(`div`,{className:`bg-amber-50 border border-amber-200 rounded-lg p-4`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,M.jsx)(`input`,{type:`checkbox`,id:`subscription`,checked:n,onChange:e=>r(e.target.checked),className:`w-4 h-4 text-golf-green focus:ring-golf-green rounded`,disabled:!0}),(0,M.jsx)(`label`,{htmlFor:`subscription`,className:`font-medium text-golf-green`,children:`Weekly Subscription`})]}),(0,M.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Automatically purchase `,e,` ticket`,e>1?`s`:``,` every week. Cancel anytime.`]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`block text-sm font-medium text-golf-green mb-3`,children:`Payment Method`}),(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,M.jsxs)(`label`,{className:`flex items-center space-x-2 cursor-pointer`,children:[(0,M.jsx)(`input`,{type:`radio`,name:`paymentMethod`,value:`credit`,checked:i===`credit`,onChange:e=>a(e.target.value),className:`w-4 h-4 text-golf-green focus:ring-golf-green`,disabled:!0}),(0,M.jsx)(Sn,{className:`h-4 w-4`}),(0,M.jsx)(`span`,{className:`text-sm`,children:`Credit Card`})]}),(0,M.jsxs)(`label`,{className:`flex items-center space-x-2 cursor-pointer`,children:[(0,M.jsx)(`input`,{type:`radio`,name:`paymentMethod`,value:`account`,checked:i===`account`,onChange:e=>a(e.target.value),className:`w-4 h-4 text-golf-green focus:ring-golf-green`,disabled:!0}),(0,M.jsx)(nn,{className:`h-4 w-4`}),(0,M.jsx)(`span`,{className:`text-sm`,children:`Put on Account`})]})]})]}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-4`,children:[(0,M.jsxs)(`div`,{className:`flex justify-between items-center mb-2`,children:[(0,M.jsxs)(`span`,{children:[`Tickets (`,e,`)`]}),(0,M.jsxs)(`span`,{children:[`$`,o.toFixed(2)]})]}),n&&(0,M.jsxs)(`div`,{className:`flex justify-between items-center mb-2 text-sm text-gray-600`,children:[(0,M.jsx)(`span`,{children:`Weekly charge`}),(0,M.jsxs)(`span`,{children:[`$`,s.toFixed(2)]})]}),(0,M.jsxs)(`div`,{className:`border-t border-golf-green/20 pt-2 flex justify-between items-center font-bold text-golf-green`,children:[(0,M.jsx)(`span`,{children:`Total`}),(0,M.jsxs)(`span`,{children:[`$`,o.toFixed(2)]})]})]}),(0,M.jsx)(R,{className:`w-full bg-gray-400 cursor-not-allowed`,disabled:!0,children:`Purchase Tickets (Coming Soon)`}),(0,M.jsxs)(`div`,{className:`text-xs text-gray-600 text-center`,children:[(0,M.jsx)(`p`,{children:`ð§ Ticket purchasing functionality is not yet active`}),(0,M.jsx)(`p`,{children:`This is a placeholder for the upcoming Ace Chase lottery`})]})]})]})}),(0,M.jsxs)($2,{value:`documentation`,className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`grid lg:grid-cols-2 gap-6`,children:[(0,M.jsxs)(Bm,{className:`border border-golf-green/20`,children:[(0,M.jsx)(Vm,{children:(0,M.jsx)(Hm,{className:`text-golf-green`,children:`Getting Started`})}),(0,M.jsx)(Wm,{className:`p-6 space-y-4`,children:(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(_n,{className:`h-5 w-5 text-green-500 mt-0.5`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium`,children:`Create an account`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Sign up to track y
359our tickets and winnings`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(_n,{className:`h-5 w-5 text-green-500 mt-0.5`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium`,children:`Purchase tickets`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Buy individual tickets or set up a subscription`})]})]}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(_n,{className:`h-5 w-5 text-green-500 mt-0.5`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium`,children:`Join Friday draws`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Attend weekly draws at the club or check results online`})]})]})]})})]}),(0,M.jsxs)(Bm,{className:`border border-golf-green/20`,children:[(0,M.jsx)(Vm,{children:(0,M.jsx)(Hm,{className:`text-golf-green`,children:`Frequently Asked Questions`})}),(0,M.jsx)(Wm,{className:`p-6 space-y-4`,children:(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium text-golf-green mb-1`,children:`When are tickets drawn?`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Every Friday night at the club during regular hours.`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium text-golf-green mb-1`,children:`How do I claim a prize?`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Winners will be contacted directly. Prizes must be claimed within 30 days.`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium text-golf-green mb-1`,children:`Can I cancel my subscription?`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Yes, subscriptions can be cancelled at any time through your account.`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`font-medium text-golf-green mb-1`,children:`What happens to my bonus tickets?`}),(0,M.jsx)(`div`,{className:`text-sm text-gray-600`,children:`Hole-in-one bonus tickets are automatically added to the next draw.`})]})]})})]})]}),(0,M.jsxs)(Bm,{className:`border-2 border-golf-green bg-golf-green/5`,children:[(0,M.jsx)(Vm,{children:(0,M.jsx)(Hm,{className:`text-golf-green`,children:`Contact Information`})}),(0,M.jsx)(Wm,{className:`p-6`,children:(0,M.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-6`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`font-medium text-golf-green mb-2`,children:`For Ticket Support`}),(0,M.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Email: [email protected]`,(0,M.jsx)(`br`,{}),`Phone: (902) 555-0123`]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`font-medium text-golf-green mb-2`,children:`Club Information`}),(0,M.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Belvedere Golf Club`,(0,M.jsx)(`br`,{}),`123 Golf Course Road`,(0,M.jsx)(`br`,{}),`Charlottetown, PE C1A 1A1`]})]})]})})]})]})]})})})]})},s8=`https://belvederegolfsims.simplybook.me/v2/`,c8=()=>{let e=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=document.createElement(`script`);return e.async=!0,e.src=`//widget.simplybook.me/v2/widget/widget.js`,e.onload=()=>{window.SimplybookWidget&&new window.SimplybookWidget({widget_type:`iframe`,url:`https://belvederegolfsims.simplybook.me`,theme:`creative`,theme_settings:{timeline_show_end_time:`0`,timeline_modern_display:`as_slots`,timeline_hide_unavailable:`1`,index_page_content_grid:`[{"template":"col_25_50_25","items":[null,null,null]},{"template":"col_100","items":["gallery"]},{"template":"col_25_50_25","items":["timetable","about-us","contacts"]}]`,hide_past_days:`0`,sb_base_color:`#33bb60`,display_item_mode:`list`,booking_nav_bg_color:`#d1e9c6`,body_bg_color:`#fdfdfd`,sb_review_image:``,dark_font_color:`#494949`,light_font_color:`#ffffff`,btn_color_1:`#1A4D2E`,hide_img_mode:`1`,show_sidebar:`1`,sb_busy:`#dad2ce`,sb_available:`#d3e0f1`},timeline:`flexible_provider`,datepicker:`top_calendar`,is_rtl:!1,app_config:{clear_session:0,allow_switch_to_ada:0,predefined:[]},container_id:`sbw_simulator`})},document.head.appendChild(e),()=>{document.head.contains(e)&&document.head.removeChild(e)}},[]),(0,M.jsxs)(`main`,{className:`min-h-screen bg-slate-50 py-16 px-4`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Indoor Golf Simulator Booking | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Reserve your time at the Belvedere Golf Club indoor simulator. Book online quickly and securely through our SimplyBook system.`})]}
359),(0,M.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-12`,children:[(0,M.jsxs)(`section`,{className:`text-center space-y-6`,children:[(0,M.jsx)(`p`,{className:`uppercase tracking-wide text-golf-green font-semibold`,children:`Indoor Winter Golf`}),(0,M.jsx)(`h1`,{className:`font-playfair text-3xl sm:text-4xl md:text-5xl text-golf-green font-bold`,children:`Book the Belvedere Golf Simulator`}),(0,M.jsx)(`p`,{className:`text-lg md:text-xl text-gray-700 max-w-3xl mx-auto`,children:`Practice your swing, play world-class courses, or enjoy a social round with friends in our state-of-the-art indoor golf simulator. Reserve your time slot below or open our booking experience in a new window.`}),(0,M.jsxs)(`div`,{className:`flex flex-col sm:flex-row justify-center gap-4`,children:[(0,M.jsxs)(R,{size:`lg`,onClick:()=>{window.open(s8,`_blank`,`noopener,noreferrer`)},className:`bg-golf-green hover:bg-golf-green/90 text-white`,children:[(0,M.jsx)(En,{className:`w-4 h-4 mr-2`}),`Open Booking in New Tab`]}),(0,M.jsx)(R,{size:`lg`,variant:`outline`,className:`border-golf-green text-golf-green hover:bg-golf-green/10`,asChild:!0,children:(0,M.jsx)(`a`,{href:`#simulator-booking`,children:`Scroll to Booking Form`})})]})]}),(0,M.jsxs)(`section`,{id:`simulator-booking`,className:`bg-white border border-golf-green/20 rounded-2xl shadow-xl overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`bg-golf-green text-white py-4 px-6`,children:[(0,M.jsx)(`h2`,{className:`text-xl font-semibold`,children:`Reserve Your Simulator Time`}),(0,M.jsx)(`p`,{className:`text-sm text-white/80`,children:`Use the embedded calendar below to select your preferred date, time, and duration.`})]}),(0,M.jsx)(`div`,{className:`relative w-full`,style:{minHeight:`720px`},children:(0,M.jsx)(`div`,{id:`sbw_simulator`,ref:e,className:`h-full w-full`})})]}),(0,M.jsxs)(`section`,{className:`grid gap-8 md:grid-cols-2`,children:[(0,M.jsxs)(`div`,{className:`bg-white rounded-xl shadow-lg border border-gray-200 p-6 space-y-3`,children:[(0,M.jsx)(`h3`,{className:`text-2xl font-semibold text-golf-green`,children:`What to Expect`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsx)(`li`,{children:`⢠Premium golf simulator technology for accurate ball tracking and course simulation.`}),(0,M.jsx)(`li`,{children:`⢠Comfortable indoor lounge seating with food & beverage service available.`}),(0,M.jsx)(`li`,{children:`⢠Book solo practice sessions or group rounds for up to 4 players.`})]})]}),(0,M.jsxs)(`div`,{className:`bg-white rounded-xl shadow-lg border border-gray-200 p-6 space-y-3`,children:[(0,M.jsx)(`h3`,{className:`text-2xl font-semibold text-golf-green`,children:`Need Assistance?`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`If you have questions about the simulator, packages, or availability, contact the pro shop and our team will be happy to help.`}),(0,M.jsxs)(`p`,{className:`text-gray-700`,children:[`Phone: `,(0,M.jsx)(`a`,{href:`tel:+19025663842`,className:`text-golf-green font-semibold hover:underline`,children:`(902) 566-3842`}),(0,M.jsx)(`br`,{}),`Email: `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`text-golf-green font-semibold hover:underline`,children:`[email protected]`})]})]})]})]})]})},l8=()=>(0,M.jsxs)(`main`,{className:`min-h-screen bg-white`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pt-28 pb-12 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`div`,{className:`inline-flex items-center justify-center w-16 h-16 bg-golf-green/10 rounded-full mb-6`,children:(0,M.jsx)(er,{className:`w-8 h-8 text-golf-green`})}),(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-4 text-golf-green`,children:`Privacy Policy`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600`,children:`Your privacy is important to us. This policy explains how we collect, use, and protect your information.`}),(0,M.jsxs)(`p`,{className:`text-sm text-gray-500 mt-4`,children:[`Last updated: `,`February 2, 2026`]})]})})}),(0,M.jsx)(`section`,{className:`py-16 px-4`,children:(0,M.jsx)(`div`,{className:`container mx-auto max-w-4xl`,children:(0,M.jsxs)(`div`,{className:`prose prose-lg max-w-none`,children:[(0,M.jsx)(`div`,{className:`mb-12`,children:(0,M.jsx)(`p`,{className:`text-gray-700 leading-relaxed`,children:`Belvedere Golf Club ("we," "our," or "us") is committed to protecting your privacy. This Privacy Policy explains how we
359collect, use, disclose, and safeguard your information when you visit our website, use our services, or become a member of our club.`})}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(On,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`Information We Collect`})]}),(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-6 mb-6`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-900 mb-3`,children:`Personal Information`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`We may collect personal information that you voluntarily provide when you:`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Register for membership or join our waitlist`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Make a reservation or book an event`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Contact us through our website or email`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Make a purchase or payment`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Subscribe to our newsletters or updates`})]})]})]}),(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-6`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-900 mb-3`,children:`Types of Information`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`This may include:`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700`,children:[(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}
359),(0,M.jsx)(`span`,{children:`Name, email address, phone number, and mailing address`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Date of birth (for membership eligibility)`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Payment information (processed securely through Stripe)`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Membership preferences and interests`})]})]})]})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(An,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`How We Use Your Information`})]}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`We use your information to:`}),(0,M.jsx)(`div`,{className:`grid md:grid-cols-2 gap-4`,children:[`Process membership applications and payments`,`Communicate about club events and updates`,`Manage reservations and bookings`,`Respond to your inquiries and requests`,`Improve our website and services`,`Send newsletters (with your consent)`,`Comply with legal obligations`,`Protect against fraudulent activity`].map((e,t)=>(0,M.jsxs)(`div`,{className:`flex items-start gap-3 p-3 bg-golf-sand/20 rounded-lg`,children:[(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mt-0.5`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,M.jsx)(`span`,{className:`text-gray-700 text-sm`,children:e})]},t))})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(Hn,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`Payment Processing`})]}),(0,M.jsxs)(`div`,{className:`bg-blue-50 border border-blue-200 rounded-xl p-6`,children:[(0,M.jsxs)(`p`,{className:`text-gray-700`,children:[`All payment transactions are processed through `,(0,M.jsx)(`strong`,{children:`Stripe`}),`, a secure third-party payment processor. We do not store your complete credit card information on our servers. Stripe's security practices comply with PCI-DSS (Payment Card Industry Data Security Standard) requirements.`]}),(0,M.jsxs)(`p`,{className:`text-gray-700 mt-4`,children:[`For more information about Stripe's privacy practices, please visit`,` `,(0,M.jsx)(`a`,{href:`https://stripe.com/privacy`,target:`_blank`,rel:`noopener noreferrer`,className:`text-golf-green hover:underline`,children:`Stripe's Privacy Policy`}),`.`]})]})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(pr,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`Information Sharing`})]}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`We do not sell, trade, or rent your personal information to third parties. We may share your information only in the following circumstances:`}),(0,M.jsxs)(`ul`,{className:`space-y-3 text-gray-700`,children:[(0,M.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`text-golf-green font-bold`,children:`â¢`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Service Providers:`}),` With trusted third-party service providers who assist us in operating our website and conducting our business (e.g., payment processing, email services).`]})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`text-golf-green font-bold`,children:`â¢`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Legal Requirements:`}),` When required by law or to protect our rights, privacy, safety, or property.`]})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`span`,{className:`text-golf-green font-bold`,children:`â¢`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Golf Canada:`}),` Member information may be shared with Golf Canada for membership registration purposes.`]})]})]})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(er,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`Data Security`})]}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`We implement appropriate technical and organizational measures to protect your personal information, including:`}),(0,M.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-5`,children:[(0,M.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Encryption`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`SSL/TLS encryption for data transmitted to and from our website.`})]}),(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-5`,children:[(0,M.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Secure Storage`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`Personal data is stored on secure servers with restricted access.`})]}),(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-5`,children:[(0,M.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Access Controls`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`Limited access to personal information on a need-to-know basis.`})]}),(0,M.jsxs)(`div`,{className:`bg-gray-50 rounded-xl p-5`,children:[(0,M.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Regular Reviews`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-sm`,children:`Periodic review of our data collection and security practices.`})]})]})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(gn,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`Your Rights`})]}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`You have the right to:`}),(0,M.jsxs)(`ul`,{className:`space-y-2 text-gray-700 mb-6`,children:[(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Access the personal information we hold about you`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Request correction of inaccurate information`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}
359),(0,M.jsx)(`span`,{children:`Request deletion of your personal information (subject to legal requirements)`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Opt out of marketing communications at any time`})]}),(0,M.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-1`,children:`â¢`}),(0,M.jsx)(`span`,{children:`Withdraw consent where processing is based on consent`})]})]}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`To exercise any of these rights, please contact us using the information provided below.`})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-4`,children:`Cookies and Tracking`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-4`,children:`Our website may use cookies and similar tracking technologies to enhance your browsing experience. Cookies are small data files stored on your device that help us understand how you use our website.`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`You can control cookies through your browser settings. However, disabling cookies may affect the functionality of certain features on our website.`})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-4`,children:`Children's Privacy`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`Our website is not intended for children under 13 years of age. We do not knowingly collect personal information from children under 13. If you are a parent or guardian and believe your child has provided us with personal information, please contact us so we can take appropriate action.`})]}),(0,M.jsxs)(`div`,{className:`mb-12`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-4`,children:`Changes to This Policy`}),(0,M.jsx)(`p`,{className:`text-gray-700`,children:`We may update this Privacy Policy from time to time. Any changes will be posted on this page with an updated revision date. We encourage you to review this policy periodically to stay informed about how we protect your information.`})]}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-xl p-8`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,M.jsx)(`div`,{className:`p-2 bg-golf-green/10 rounded-lg`,children:(0,M.jsx)(Un,{className:`w-5 h-5 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green m-0`,children:`Contact Us`})]}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-6`,children:`If you have any questions about this Privacy Policy or our data practices, please contact us:`}),(0,M.jsxs)(`div`,{className:`space-y-3 text-gray-700`,children:[(0,M.jsxs)(`p`,{children:[(0,M.jsx)(`strong`,{children:`Belvedere Golf Club`}),(0,M.jsx)(`br`,{}),`280 Keppoch Road`,(0,M.jsx)(`br`,{}),`Charlottetown, PE C1A 5P8`,(0,M.jsx)(`br`,{}),`Canada`]}),(0,M.jsxs)(`p`,{children:[(0,M.jsx)(`strong`,{children:`Email:`}),` `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`text-golf-green hover:underline`,children:`[email protected]`})]}),(0,M.jsxs)(`p`,{children:[(0,M.jsx)(`strong`,{children:`Phone:`}),` `,(0,M.jsx)(`a`,{href:`tel:+19028921500`,className:`text-golf-green hover:underline`,children:`(902) 892-1500`})]})]})]})]})})})]}),u8={"Adult Silver":{base:1983,fbCharge:300},"Adult Silver with Golf Car":{base:2743,fbCharge:300},"Super Senior 80+ yrs":{base:1568,fbCharge:300},"Super Senior 80+ yrs with Golf Car":{base:2093,fbCharge:300},"Intermediate 19-25":{base:1093,fbCharge:300},"Intermediate 26-30":{base:1303,fbCharge:300},"Junior 6-9":{base:408,fbCharge:0},"Junior 10-11":{base:568,fbCharge:0},"Junior 12-18":{base:778,fbCharge:0}},d8={"Club Storage with Pull Cart":{price:184,taxable:!0},"Club Storage Bag Only":{price:152,taxable:!0},"Club Storage with Electric Pull Cart":{price:236,taxable:!0},"Season Golf Car Rental 1 Seat":{price:760,taxable:!0},"GTT 1st â Subject To Availability":{price:120,taxable:!0},"GTT 2nd â Subject To Availability":{price:180,taxable:!0},"Pull Cart Rental for Season":{price:157,taxable:!0},Locker:{price:157,taxable:!0},"50/50 Draw for Season":{price:40,taxable:!1},"Driving Range Single":{price:289,taxable:!0},"Driving Range Family":{price:578,taxable:!0}},f8=[`Club Storage with Pull Cart`,`Club Storage Bag Only`,`Club Storage with Electric Pull Cart`],p8=Object.keys(d8).filter(e=>!f8.includes(e));function m8(e){return`$${e.toFixed(2)}`}var h8=50;function g8(e,t,n,r,i,a){let o=u8[e]??{base:0,fbCharge:0},s=0,c=0;for(let e of t){let t=d8[e];t&&(t.taxable?s+=t.price:c+=t.price)}let l=[...n?[n]:[],...r],u=0,d=0;for(let e of l){let t=d8[e];t&&(t.taxable?u+=t.price:d+=t.price)}let f=a&&i>0?h8:0,p=i,m=(o.base+s+u+f)*.15,h=o.base+o.fbCharge+s+c+u+d+f+m-p;return{base:o.base,fbCharge:o.fbCharge,preServicesTaxable:s,preServicesNonTaxable:c,addlServicesTaxable:u,addlServicesNonTaxable:d,juniorGolfFee:f,hst:m,depositCredit:p,total:h}}var _8=[`Look Up`,`Membership`,`Add Services`,`Review & Pay`];function v8({current:e}){return e>=5?null:(0,M.jsx)(`div`,{className:`flex items-center justify-center gap-2 mb-8`,children:_8.map((t,n)=>{let r=n+1,i=r===e,a=r<e;return(0,M.jsxs)(_.Fragment,{children:[(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,M.jsx)(`div`,{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold transition-colors ${a?`bg-golf-green text-white`:i?`bg-golf-green text-white ring-4 ring-golf-green/20`:`bg-gray-200 text-gray-400`}`,children:a?(0,M.jsx)(_n,{className:`w-4 h-4`}):r}),(0,M.jsx)(`span`,{className:`text-xs hidden sm:block ${i?`text-golf-green font-semibold`:`text-gray-400`}`,children:t})]}),n<_8.length-1&&(0,M.jsx)(`div`,{className:`h-0.5 w-8 sm:w-16 transition-colors ${a?`bg-golf-green`:`bg-gray-200`}`})]},t)})})}var y8=()=>{let[e]=mf(),[t,n]=(0,_.useState)(1),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)([]),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)([]),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let t=e.get(`success`),r=e.get(`cancelled`),a=e.get(`session_id`),o=e.get(`email`);t===`true`?(n(5),a&&fetch(`/api/send-member-confirmation`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:a})}).catch(console.error)):r===`true`&&(o&&i(o),c(`Payment was cancelled. You can try again below.`))},[e]);let E=l?.pre_selected_services??[],D=E.find(e=>f8.includes(e))?[]:f8,O=d.toLowerCase().includes(`with golf car`);console.log(`[MemberPay] selectedMembershipType:`,JSON.stringify(d),`| includesGolfCar:`,O);let ee=p8.filter(e=>!E.includes(e)&&!(O&&e===`Season Golf Car Rental 1 Seat`)),k=l&&d?g8(d,E,h,v,l.deposit_amount,l.is_new_member):null,A=[...E,...h?[h]:[],...v],te=async e=>{e.preventDefault(),c(``),m([]),o(!0);try{let e=await fetch(`/api/member-lookup?email=${encodeURIComponent(r.trim())}`),t=await e.json();if(!e.ok){c(t.error||`No member record found. Please contact the office at [email protected].`),o(!1);return}let i=(Array.isArray(t)?t:[t]).filter(e=>!e.paid);if(i.length===0){c(`All memberships on this account have already been paid. If you have questions, contact the office.`),o(!1);return}i.length===1?(u(i[0]),f(i[0].membership_type),n(2)):m(i)}catch{c(`Something went wrong. Please try again.`)}finally{o(!1)}},ne=e=>{u(e),f(e.membership_type),m([]),n(2)},j=async()=>
359{if(!(!l||!k)){o(!0),c(``);try{let e=await fetch(`/api/create-member-checkout`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:l.email,name:l.name,membershipType:d,preSelectedServices:E,additionalServices:[...h?[h]:[],...v],depositAmount:l.deposit_amount,isNewMember:l.is_new_member,totalAmount:k.total})}),t=await e.json();if(!e.ok)throw Error(t.error||`Failed to create checkout`);NY({formType:`member_payment`,name:l.name,email:l.email,phone:``,subject:`${d} â $${k.total.toFixed(2)}`,formData:{membershipType:d,services:A},status:`pending_payment`}),window.location.href=t.url}catch(e){c(e instanceof Error?e.message:`Something went wrong. Please try again.`),o(!1)}}},re=async()=>{if(!(!l||!k)){x(!0),C(!0);try{await fetch(`/api/send-member-etransfer-notification`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:l.email,name:l.name,membershipType:d,allServices:A,depositCredit:k.depositCredit,totalAmount:k.total})}),NY({formType:`member_payment`,name:l.name,email:l.email,phone:``,subject:`${d} â E-Transfer â $${k.total.toFixed(2)}`,formData:{membershipType:d,services:A},status:`etransfer_pending`}),T(!0)}catch{}finally{C(!1)}}};return(0,M.jsxs)(`main`,{className:`min-h-screen bg-gray-50`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Member Payment Portal | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Pay your 2026 Belvedere Golf Club membership online.`}),(0,M.jsx)(`meta`,{name:`robots`,content:`noindex`})]}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`div`,{className:`pt-28 pb-16 px-4`,children:(0,M.jsxs)(`div`,{className:`container mx-auto max-w-2xl`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`p`,{className:`text-golf-green font-bold uppercase tracking-widest text-sm mb-2`,children:`Belvedere Golf Club`}),(0,M.jsx)(`h1`,{className:`font-playfair text-4xl font-bold text-gray-900`,children:`2026 Member Payment Portal`})]}),(0,M.jsx)(v8,{current:t}),t===1&&(0,M.jsxs)(`div`,{className:`max-w-md mx-auto`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-2`,children:`Find Your Membership`}),(0,M.jsx)(`p`,{className:`text-gray-600`,children:`Enter the email address on file with the club to get started.`})]}),(0,M.jsxs)(`form`,{onSubmit:te,className:`bg-white shadow-lg rounded-xl p-8 space-y-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Email Address`}),(0,M.jsx)(bJ,{type:`email`,value:r,onChange:e=>i(e.target.value),placeholder:`[email protected]`,required:!0,className:`text-base`})]}),s&&(0,M.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-lg p-4 text-sm text-red-700`,children:[s,(0,M.jsxs)(`div`,{className:`mt-2`,children:[(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`underline font-medium`,children:`Contact the office`}),` `,`if you need help.`]})]}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark`,disabled:a,children:a?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Vn,{className:`w-4 h-4 mr-2 animate-spin`}),` Looking upâ¦`]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(mn,{className:`w-4 h-4 mr-2`}),` Find My Record`]})})]}),p.length>0&&(0,M.jsxs)(`div`,{className:`mt-6`,children:[(0,M.jsxs)(`p`,{className:`text-sm font-semibold text-gray-700 mb-3 text-center`,children:[`We found `,p.length,` members on this account. Who are you paying for?`]}),(0,M.jsx)(`div`,{className:`space-y-3`,children:p.map(e=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>ne(e),className:`w-full text-left bg-white border-2 border-gray-200 hover:border-golf-green/50 hover:shadow-sm rounded-xl p-4 transition-all flex items-center justify-between group`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-semibold text-gray-800`,children:e.name}),(0,M.jsx)(`p`,{className:`text-sm text-gray-500`,children:e.membership_type})]}),(0,M.jsx)(mn,{className:`w-5 h-5 text-gray-300 group-hover:text-golf-green transition-colors`})]},e.id))})]})]}),t===2&&(l?(0,M.jsxs)(`div`,{className:`max-w-xl mx-auto`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsxs)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-1`,children:[`Welcome, `,l.name.split(` `)[0],`!`]}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Select your 2026 membership level below.`}),l.membership_type&&(0,M.jsx)(`p`,{className:`text-xs text-golf-green/70 mt-1`,children:`Your registered type is pre-selected â change it if needed.`})]}),(0,M.jsx)(`div`,{className:`space-y-6`,children:[{label:`Adult`,age:`Ages 31â79`,tiers:[`Adult Silver`,`Adult Silver with Golf Car`]},{label:`Super Senior`,age:`Ages 80+`,tiers:[`Super Senior 80+ yrs`,`Super Senior 80+ yrs with Golf Car`]},{label:`Intermediate`,age:`Ages 19â30`,tiers:[`Intermediate 19-25`,`Intermediate 26-30`]},{label:`Junior`,age:`Ages 6â18`,tiers:[`Junior 6-9`,`Junior 10-11`,`Junior 12-18`]}].map(({label:e,age:t,tiers:n})=>{let r=n.filter(e=>u8[e]);return r.length===0?null:(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-3`,children:[(0,M.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-widest text-gray-400`,children:e}),(0,M.jsx)(`span`,{className:`text-xs text-gray-400`,children:t})]}),(0,M.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:r.map(e=>{let t=u8[e],n=d===e,r=l.membership_type===e;return(0,M.jsxs)(`button`,{type:`button`,onClick:()=>f(e),className:`relative text-left rounded-xl border-2 p-4 transition-all ${n?`border-golf-green bg-golf-green/5 ring-2 ring-golf-green/20 shadow-md`:`border-gray-200 bg-white hover:border-golf-green/40 hover:shadow-sm`}`,children:[r&&(0,M.jsx)(`span`,{className:`absolute top-2 right-2 text-xs font-medium bg-golf-green text-white px-2 py-0.5 rounded-full`,children:`On File`}),n&&(0,M.jsx)(_n,{className:`absolute top-3 left-3 w-4 h-4 text-golf-green`}),(0,M.jsxs)(`div`,{className:n?`ml-6`:``,children:[(0,M.jsx)(`p`,{className:`font-semibold text-gray-800 text-sm leading-snug pr-14`,children:e}),(0,M.jsx)(`p`,{className:`text-golf-green font-bold text-lg mt-1`,children:m8(t.base+t.fbCharge)}),(0,M.jsxs)(`p`,{className:`text-xs text-gray-400 mt-0.5`,children:[`Base `,m8(t.base),t.fbCharge>0&&` + F&B ${m8(t.fbCharge)}`,` `,`+ HST`]})]})]},e)})})]},e)})}),l.deposit_amount>0&&(0,M.jsx)(`div`,{className:`mt-5 bg-blue-50 border border-blue-200 rounded-lg p-3 text-sm text-blue-700`,children:l.is_new_member?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`strong`,{children:[m8(l.deposit_amount),` deposit credit`]}),` will be applied â`,` `,m8(l.deposit_amount-h8),` toward your membership and`,` `,m8(h8),` to the Junior Golf Fund.`]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`strong`,{children:[m8(l.deposit_amount),` deposit credit`]}),` will be applied to your total.`]})}),l.notes&&(0,M.jsxs)(`div`,{className:`mt-3 bg-gray-50 rounded-lg p-3 text-sm text-gray-500`,children:[`Note: `,l.notes]}),(0,M.jsxs)(`div`,{className:`flex gap-3 mt-6`,children:[(0,M.jsxs)(R,{variant:`outline`,className:`border-gray-300 text-gray-600`,onClick:()=>n(1),children:[(0,M.jsx)(Qt,{className:`w-4 h-4 mr-1`}),` Back`]}),(0,M.jsxs)(R,{className:`flex-1 bg-golf-green hover:bg-golf-green-dark`,onClick:()=>n(3),disabled:!d,children:[`Continue `,(0,M.jsx)(mn,{className:`w-4 h-4 ml-1`})]})]})]}):null),t===3&&(()=>{if(!l||!k)return null;let e=D.length>0||ee.length>0;return(0,M.jsxs)(`div`,{className:`max-w-lg mx-auto`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-1`,children:e?`Add Services`:`Nothing Else to Add`}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm`,children:e?`Enhance your season with any additional services.`:`All available services are already included on your membership.`})]}),e&&(0,M.jsxs)(`div`,{className:`space-y-6`,children:[D.length>0&&(0,M.jsxs)(`div`,{className:`bg-white shadow rounded-xl p-6`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-800 mb
359-1`,children:`Club Storage`}),(0,M.jsx)(`p`,{className:`text-xs text-gray-400 mb-4`,children:`Choose one option`}),(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsxs)(`label`,{className:`flex items-center gap-3 cursor-pointer group`,children:[(0,M.jsx)(`input`,{type:`radio`,name:`storage`,value:``,checked:h===``,onChange:()=>g(``),className:`accent-golf-green`}),(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`No storage`})]}),D.map(e=>(0,M.jsxs)(`label`,{className:`flex items-center justify-between cursor-pointer group`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(`input`,{type:`radio`,name:`storage`,value:e,checked:h===e,onChange:()=>g(e),className:`accent-golf-green`}),(0,M.jsx)(`span`,{className:`text-sm text-gray-700 group-hover:text-golf-green`,children:e})]}),(0,M.jsxs)(`span`,{className:`text-sm font-medium text-gray-500`,children:[m8(d8[e].price),d8[e].taxable&&(0,M.jsx)(`span`,{className:`text-xs text-gray-400`,children:` +HST`})]})]},e))]})]}),ee.length>0&&(0,M.jsxs)(`div`,{className:`bg-white shadow rounded-xl p-6`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-800 mb-4`,children:`Additional Services`}),(0,M.jsx)(`div`,{className:`space-y-3`,children:ee.map(e=>(0,M.jsxs)(`label`,{className:`flex items-center justify-between cursor-pointer group`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:v.includes(e),onChange:t=>{y(n=>t.target.checked?[...n,e]:n.filter(t=>t!==e))},className:`accent-golf-green w-4 h-4`}),(0,M.jsx)(`span`,{className:`text-sm text-gray-700 group-hover:text-golf-green`,children:e})]}),(0,M.jsxs)(`span`,{className:`text-sm font-medium text-gray-500`,children:[m8(d8[e].price),d8[e].taxable?(0,M.jsx)(`span`,{className:`text-xs text-gray-400`,children:` +HST`}):(0,M.jsx)(`span`,{className:`text-xs text-gray-400`,children:` no HST`})]})]},e))})]})]}),(0,M.jsxs)(`div`,{className:`mt-6 bg-golf-green/5 border border-golf-green/20 rounded-xl p-4 flex justify-between items-center`,children:[(0,M.jsx)(`span`,{className:`text-gray-600 font-medium`,children:`Estimated Total`}),(0,M.jsx)(`span`,{className:`text-golf-green font-bold text-xl`,children:m8(k.total)})]}),(0,M.jsxs)(`div`,{className:`flex gap-3 mt-4`,children:[(0,M.jsxs)(R,{variant:`outline`,className:`border-gray-300 text-gray-600`,onClick:()=>n(2),children:[(0,M.jsx)(Qt,{className:`w-4 h-4 mr-1`}),` Back`]}),(0,M.jsxs)(R,{className:`flex-1 bg-golf-green hover:bg-golf-green-dark`,onClick:()=>n(4),children:[`Review & Pay `,(0,M.jsx)(mn,{className:`w-4 h-4 ml-1`})]})]})]})})(),t===4&&(()=>{if(!l||!k)return null;let e=[...h?[h]:[],...v];return(0,M.jsxs)(`div`,{className:`max-w-lg mx-auto`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-2xl font-bold text-golf-green mb-1`,children:`Review & Pay`}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Confirm your order then choose a payment method.`})]}),(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-xl overflow-hidden mb-6`,children:[(0,M.jsxs)(`div`,{className:`p-6 space-y-3`,children:[(0,M.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:d}),(0,M.jsx)(`span`,{className:`font-medium`,children:m8(k.base)})]}),k.fbCharge>0&&(0,M.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:`F&B Minimum Spend (HST-exempt)`}),(0,M.jsx)(`span`,{className:`font-medium`,children:m8(k.fbCharge)})]}),E.map(e=>(0,M.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:e}),(0,M.jsx)(`span`,{className:`font-medium`,children:d8[e]?m8(d8[e].price):`â`})]},e)),e.map(e=>(0,M.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:e}),(0,M.jsx)(`span`,{className:`font-medium`,children:d8[e]?m8(d8[e].price):`â`})]},e)),k.juniorGolfFee>0&&(0,M.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,M.jsx)(`span`,{className:`text-gray-600`,children:`Junior Golf Fund Contribution`}),(0,M.jsx)(`span`,{className:`font-medium`,children:m8(k.juniorGolfFee)})]}),(0,M.jsxs)(`div`,{className:`border-t pt-3 flex justify-between text-sm text-gray-500`,children:[(0,M.jsx)(`span`,{children:`HST (15% on taxable items)`}),(0,M.jsx)(`span`,{children:m8(k.hst)})]}),k.depositCredit>0&&(0,M.jsxs)(`div`,{className:`flex justify-between text-sm text-blue-600`,children:[(0,M.jsx)(`span`,{children:`Deposit Credit`}),(0,M.jsxs)(`span`,{children:[`â`,m8(k.depositCredit)]})]})]}),(0,M.jsxs)(`div`,{className:`bg-golf-green text-white px-6 py-4 flex justify-between items-center`,children:[(0,M.jsx)(`span`,{className:`font-semibold text-lg`,children:`Total`}),(0,M.jsx)(`span`,{className:`font-bold text-2xl`,children:m8(k.total)})]})]}),s&&(0,M.jsx)(`div`,{className:`bg-red-50 border border-red-200 rounded-lg p-4 text-sm text-red-700 mb-4`,children:s}),!b&&(0,M.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,M.jsx)(R,{className:`bg-golf-green hover:bg-golf-green-dark flex-col h-auto py-4`,onClick:j,disabled:a,children:a?(0,M.jsx)(Vn,{className:`w-5 h-5 animate-spin`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Sn,{className:`w-5 h-5 mb-1`}),(0,M.jsx)(`span`,{className:`text-sm font-semibold`,children:`Credit Card`}),(0,M.jsx)(`span`,{className:`text-xs opacity-80`,children:`Pay securely with Stripe`})]})}),(0,M.jsxs)(R,{variant:`outline`,className:`border-golf-green text-golf-green hover:bg-golf-green/5 flex-col h-auto py-4`,onClick:re,disabled:a,children:[(0,M.jsx)(Un,{className:`w-5 h-5 mb-1`}),(0,M.jsx)(`span`,{className:`text-sm font-semibold`,children:`E-Transfer`}),(0,M.jsx)(`span`,{className:`text-xs opacity-70`,children:`Instru
359ctions sent by email`})]})]}),b&&(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-xl p-6 space-y-4`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-golf-green text-lg`,children:`E-Transfer Instructions`}),(0,M.jsxs)(`div`,{className:`space-y-3 text-sm text-gray-700`,children:[(0,M.jsxs)(`div`,{className:`flex gap-3`,children:[(0,M.jsx)(`span`,{className:`w-6 h-6 bg-golf-green text-white rounded-full flex items-center justify-center shrink-0 text-xs font-bold`,children:`1`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`Amount`}),(0,M.jsxs)(`p`,{className:`text-golf-green font-bold text-lg`,children:[m8(k.total),` CAD`]})]})]}),(0,M.jsxs)(`div`,{className:`flex gap-3`,children:[(0,M.jsx)(`span`,{className:`w-6 h-6 bg-golf-green text-white rounded-full flex items-center justify-center shrink-0 text-xs font-bold`,children:`2`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`Send to`}),(0,M.jsx)(`p`,{className:`font-mono text-golf-green`,children:`[email protected]`})]})]}),(0,M.jsxs)(`div`,{className:`flex gap-3`,children:[(0,M.jsx)(`span`,{className:`w-6 h-6 bg-golf-green text-white rounded-full flex items-center justify-center shrink-0 text-xs font-bold`,children:`3`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`p`,{className:`font-medium`,children:`Message / Notes`}),(0,M.jsxs)(`p`,{className:`font-mono text-gray-600`,children:[`2026 Membership â `,l.name]})]})]})]}),(0,M.jsx)(`div`,{className:`bg-golf-sand/20 rounded-lg p-4 text-sm text-gray-600`,children:S?(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(Vn,{className:`w-4 h-4 animate-spin`}),` Notifying the officeâ¦`]}):(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(_n,{className:`w-4 h-4 text-golf-green`}),`The office has been notified. They'll confirm your membership by email within 2 business days of receiving payment.`]})}),(0,M.jsx)(R,{variant:`outline`,className:`w-full border-gray-300 text-gray-500`,onClick:()=>x(!1),children:`â Back to payment options`})]}),!b&&(0,M.jsxs)(R,{variant:`ghost`,className:`w-full mt-3 text-gray-400`,onClick:()=>n(3),children:[(0,M.jsx)(Qt,{className:`w-4 h-4 mr-1`}),` Back`]})]})})(),t===5&&(0,M.jsx)(`div`,{className:`max-w-md mx-auto text-center`,children:(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-xl p-10`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(_n,{className:`w-8 h-8 text-golf-green`})}),(0,M.jsx)(`h2`,{className:`font-playfair text-3xl font-bold text-golf-green mb-3`,children:`Payment Received!`}),(0,M.jsx)(`p`,{className:`text-gray-600 mb-6`,children:`Your 2026 Belvedere membership is confirmed. A receipt has been sent to your email.`}),(0,M.jsx)(`p`,{className:`text-gray-500 text-sm mb-8`,children:`We look forward to seeing you on the course this season!`}),(0,M.jsx)(R,{asChild:!0,className:`bg-golf-green hover:bg-golf-green-dark`,children:(0,M.jsx)(`a`,{href:`/`,children:`Return to Website`})})]})})]})})]})},b8=(0,M.jsx)(`div`,{className:`bg-golf-green/10 rounded-full p-1 mr-3 mt-1 shrink-0`,children:(0,M.jsx)(`svg`,{className:`h-3 w-3 text-golf-green`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),x8=[`20 rounds of golf`,`Walking (no cart included)`,`Ideal for client entertainment or staff outings`,`Rounds can be used by different golfers`,`Valid for the 2026 season`],S8=[`20 rounds of golf`,`Golf cart included with each round`,`Ideal for client entertainment or staff outings`,`Rounds can be used by different golfers`,`Valid for the 2026 season`],C8=()=>(0,M.jsxs)(`main`,{className:`min-h-screen bg-white`,children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`section`,{className:`pt-28 pb-16 bg-golf-sand/20`,children:(0,M.jsx)(`div`,{className:`container mx-auto px-4`,children:(0,M.jsxs)(`div`,{className:`text-center`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold mb-4 text-golf-green`,children:`Corporate Passes`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-700 max-w-3xl mx-auto`,children:`An ideal option for businesses and groups looking to enjoy world-class golf at Belvedere without a full membership. Corporate passes offer 20 rounds of golf, perfect for client entertainment and staff outings.`})]})})}),(0,M.jsx)(`div`,{className:`bg-golf-green text-white py-6 mb-12`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 text-center`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-3xl font-bold`,children:`2026 Corporate Pass Pricing`}),(0,M.jsx)(`p`,{className:`mt-2 opacity-90`,children:`All prices are subject to HST.`})]})}),(0,M.jsx)(`section`,{className:`pb-16`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4`,children:[(0,M.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-8 max-w-4xl mx-auto`,children:[(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green text-white`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Corporate Pass â Walking`}),(0,M.jsx)(Um,{className:`text-white/90`,children:`20 rounds of golf, walking`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3`,children:x8.map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[b8,(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$1,575.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]}),(0,M.jsxs)(Bm,{className:`overflow-hidden border-golf-green/20 shadow-lg`,children:[(0,M.jsxs)(Vm,{className:`bg-golf-green text-white`,children:[(0,M.jsx)(Hm,{className:`font-playfair text-2xl`,children:`Corporate Pass â With Cart`}),(0,M.jsx)(Um,{className:`text-white/90`,children:`20 rounds of golf, cart included`})]}),(0,M.jsx)(Wm,{className:`pt-6`,children:(0,M.jsx)(`ul`,{className:`space-y-3`,children:S8.map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start`,children:[b8,(0,M.jsx)(`span`,{className:`text-gray-700`,children:e})]},t))})}),(0,M.jsx)(Gm,{className:`bg-gray-50 border-t`,children:(0,M.jsxs)(`span`,{className:`text-xl font-bold text-gray-900`,children:[`$2,100.00 `,(0,M.jsx)(`span`,{className:`text-sm text-gray-500`,children:`+HST`})]})})]})]}),(0,M.jsxs)(`div`,{className:`mt-12 bg-golf-sand/20 p-8 rounded-2xl max-w-4xl mx-auto text-center`,children:[(0,M.jsx)(`h3`,{className:`font-playfair text-2xl font-bold mb-3 text-golf-green`,children:`Interested in a Corporate Pass?`}),(0,M.jsx)(`p`,{className:`text-gray-700 mb-6`,children:`For additional information or to purchase a corporate pass, contact Jeff (General Manager) directly.`}),(0,M.jsx)(R,{asChild:!0,className:`bg-golf-green hover:bg-golf-green-dark`,children:(0,M.jsxs)(`a`,{href:`mailto:[email protected]?subject=Corporate%2
3590Pass%20Inquiry`,children:[(0,M.jsx)(Un,{className:`mr-2 h-4 w-4`}),`Email Jeff for Details`]})})]})]})})]}),w8=[`Advanced bookings will not be available during the first three hours of any day, as this window is reserved for members only.`,`Fridays are excluded from advanced bookings.`,`If an advanced booking cannot be accommodated, public golfers will have 5-day advance booking privileges enabled.`,`Green Card Holders have 5-day advance booking privileges.`],T8=()=>{let[e,t]=(0,_.useState)({name:``,email:``,phone:``,golferType:`public`,date:``,preferredTime:``,players:`2`,notes:``}),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),c=n=>{t({...e,[n.target.name]:n.target.value})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-2xl`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-4`,children:`Advanced Booking Request`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 max-w-xl mx-auto`,children:`Reserve your preferred tee time in advance. Fill out the form below and Jeff will be in touch shortly.`})]}),n?(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 text-center border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(`svg`,{className:`w-8 h-8 text-golf-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})})}),(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-4`,children:`Request Received!`}),(0,M.jsx)(`p`,{className:`text-gray-600 mb-6`,children:`Thank you for your booking request. Jeff will review your details and be in touch shortly.`}),(0,M.jsx)(L,{to:`/`,className:`inline-block text-golf-green hover:text-golf-green-dark font-medium transition-colors`,children:`â Back to Home`})]}):(0,M.jsx)(`div`,{className:`bg-white shadow-xl rounded-2xl p-8 border border-gray-100`,children:(0,M.jsxs)(`form`,{onSubmit:async n=>{if(n.preventDefault(),s(!0),a(``),!e.name.trim()||!e.email.trim()||!e.phone.trim()||!e.date){a(`Please fill out all required fields.`),s(!1);return}try{if(!(await fetch(`/api/send-advanced-booking`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok)throw Error(`Failed to submit. Please try again or contact us directly.`);NY({formType:`advanced_booking_request`,name:e.name,email:e.email,phone:e.phone,subject:`Advanced Booking Request`,formData:e}),r(!0),t({name:``,email:``,phone:``,golferType:`public`,date:``,preferredTime:``,players:`2`,notes:``})}catch(e){a(e?.message||`There was a problem submitting your request. Please try again or contact us directly.`)}finally{s(!1)}},className:`space-y-5`,children:[(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-5`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`name`,className:`block font-medium text-gray-700 mb-2`,children:[`Full Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`name`,name:`name`,value:e.name,onChange:c,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Your full name`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`phone`,className:`block font-medium text-gray-700 mb-2`,children:[`Phone Number`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:e.phone,onChange:c,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`(902) 555-1234`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`email`,className:`block font-medium text-gray-700 mb-2`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:e.email,onChange:c,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`[email protected]`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`golferType`,className:`block font-medium text-gray-700 mb-2`,children:[`Are you a member or public golfer?`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsxs)(`select`,{id:`golferType`,name:`golferType`,value:e.golferType,onCh
359ange:c,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition bg-white`,children:[(0,M.jsx)(`option`,{value:`public`,children:`Public Golfer`}),(0,M.jsx)(`option`,{value:`member`,children:`Belvedere Member`})]})]}),(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-5`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`date`,className:`block font-medium text-gray-700 mb-2`,children:[`Requested Date`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`date`,id:`date`,name:`date`,value:e.date,onChange:c,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{htmlFor:`preferredTime`,className:`block font-medium text-gray-700 mb-2`,children:`Preferred Time`}),(0,M.jsxs)(`select`,{id:`preferredTime`,name:`preferredTime`,value:e.preferredTime,onChange:c,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition bg-white`,children:[(0,M.jsx)(`option`,{value:``,children:`No preference`}),(0,M.jsx)(`option`,{value:`morning`,children:`Morning`}),(0,M.jsx)(`option`,{value:`afternoon`,children:`Afternoon`})]})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`players`,className:`block font-medium text-gray-700 mb-2`,children:[`Number of Players`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`select`,{id:`players`,name:`players`,value:e.players,onChange:c,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition bg-white`,children:Array.from({length:20},(e,t)=>t+1).map(e=>(0,M.jsxs)(`option`,{value:String(e),children:[e,` `,e===1?`player`:`players`]},e))})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`notes`,className:`block font-medium text-gray-700 mb-2`,children:[`Additional Notes `,(0,M.jsx)(`span`,{className:`text-gray-400 font-normal`,children:`(optional)`})]}),(0,M.jsx)(`textarea`,{id:`notes`,name:`notes`,value:e.notes,onChange:c,rows:4,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Any special requests or details about your group...`})]}),i&&(0,M.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-xl p-4`,children:[(0,M.jsx)(`p`,{className:`text-red-700 text-center`,children:i}),(0,M.jsxs)(`p`,{className:`text-red-600 text-center text-sm mt-2`,children:[`You can also reach us at`,` `,(0,M.jsx)(`a`,{href:`mailto:[email protected]`,className:`underline`,children:`[email protected]`})]})]}),(0,M.jsx)(`button`,{type:`submit`,disabled:o,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-4 px-6 rounded-xl transition-all shadow-lg hover:shadow-xl disabled:opacity-50 disabled:cursor-not-allowed`,children:o?`Sending...`:`Submit Booking Request`})]})}),(0,M.jsxs)(`div`,{className:`mt-8 bg-golf-green/5 border border-golf-green/20 rounded-xl p-6`,children:[(0,M.jsx)(`h3`,{className:`font-semibold text-golf-green mb-3`,children:`Booking Guidelines`}),(0,M.jsx)(`ul`,{className:`space-y-2`,children:w8.map((e,t)=>(0,M.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-gray-700`,children:[(0,M.jsx)(`span`,{className:`text-golf-green mt-0.5`,children:`â¢`}),(0,M.jsx)(`span`,{children:e})]},t))})]})]})})]})},E8=`https://hook.us1.make.com/0amxmnlcl1jsfetx66qa8pru89wdedfr`;function D8(e){return new Date(e+`T12:00:00`).toLocaleDateString(`en-CA`,{weekday:`long`,month:`long`,day:`numeric`})}function O8(e){return e.capacity-e.registrationCount}var k8=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)({child_name:``,parent_name:``,email:``,phone:``}),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(!1),m=async()=>{try{let e=`https://zrxrhtupnbvhjpliqqfm.supabase.co`,n=`sb_publishable_0PjUUHMClIaX3V0vfotMZg_THF-K2oQ`,r={apikey:n,Authorization:`Bearer ${n}`},[i,a]=await Promise.all([fetch(`${e}/rest/v1/junior_meeting_slots?select=id,date,time,capacity&order=date.asc,time.asc`,{headers:r}).then(e=>e.json()),fetch(`${e}/rest/v1/junior_meeting_registrations?select=slot_id`,{headers:r}).then(e=>e.json())]),o=Array.isArray(i)?i:[],s=(Array.isArray(a)?a:[]).reduce((e,t)=>
359(e[t.slot_id]=(e[t.slot_id]??0)+1,e),{});t(o.map(e=>({...e,registrationCount:s[e.id]??0})))}catch(e){console.error(`Failed to load slots:`,e)}r(!1)};(0,_.useEffect)(()=>{m()},[]);let h=e.reduce((e,t)=>(e[t.date]||(e[t.date]=[]),e[t.date].push(t),e),{}),g=e=>{s({...o,[e.target.name]:e.target.value})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-3xl`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-4xl md:text-5xl font-bold text-golf-green mb-4`,children:`Junior Member Initiation`}),(0,M.jsx)(`p`,{className:`text-lg text-gray-600 max-w-2xl mx-auto mb-4`,children:`Before hitting the course this season, all junior members are required to attend one orientation meeting. These sessions are designed to give young golfers the foundation they need to enjoy the game with confidence and respect.`}),(0,M.jsx)(`p`,{className:`text-base text-gray-500 max-w-2xl mx-auto mb-4`,children:`Junior members are an incredibly important part of Belvedere Golf Club. Many of our past juniors have gone on to become outstanding players, lifelong members, and key contributors to the club's culture. That tradition matters, and we're proud to continue building it.`}),(0,M.jsx)(`p`,{className:`text-base text-gray-500 max-w-2xl mx-auto mb-4`,children:`Each meeting covers golf etiquette, the rules of the game, course care, and what it means to be a member of Belvedere. More than just learning how to play, this is about understanding how to carry yourself on the course, respect others, and take pride in being part of something special.`}),(0,M.jsx)(`p`,{className:`text-base text-gray-500 max-w-2xl mx-auto mb-4`,children:`Whether your junior is brand new to golf or returning for another season, this introduction helps set the tone for a fun, respectful, and memorable year at the club.`}),(0,M.jsx)(`p`,{className:`text-sm text-golf-green font-medium max-w-2xl mx-auto`,children:`If you have more than one junior golfer, please complete this form separately for each child.`})]}),c?(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-10 text-center border border-gray-100`,children:[(0,M.jsx)(`div`,{className:`w-16 h-16 bg-golf-green/10 rounded-full flex items-center justify-center mx-auto mb-6`,children:(0,M.jsx)(`svg`,{className:`w-8 h-8 text-golf-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})})}),(0,M.jsx)(`h2`,{className:`text-2xl font-bold text-golf-green mb-3`,children:`Registration Confirmed!`}),(0,M.jsxs)(`p`,{className:`text-gray-600 mb-2`,children:[(0,M.jsx)(`strong`,{children:o.child_name}),` is registered for:`]}),i&&(0,M.jsxs)(`p`,{className:`text-golf-green font-semibold text-lg mb-6`,children:[D8(i.date),` at `,i.time]}),(0,M.jsxs)(`p`,{className:`text-gray-500 text-sm`,children:[`A confirmation email has been sent to `,o.email,`.`]})]}):(0,M.jsxs)(`div`,{className:`space-y-8`,children:[(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-2xl p-6 border border-gray-100`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-xl font-bold text-golf-green mb-5`,children:`Step 1 â Choose a Meeting Time`}),n?(0,M.jsx)(`p`,{className:`text-gray-500 text-center py-8`,children:`Loading available times...`}):(0,M.jsx)(`div`,{className:`space-y-6`,children:Object.entries(h).map(([e,t])=>(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-700 mb-3 text-sm uppercase tracking-wide`,children:D8(e)}),(0,M.jsx)(`div`,{className:`flex flex-wrap gap-3`,children:t.map(e=>{let t=O8(e),n=t<=0,r=i?.id===e.id;return(0,M.jsxs)(`button`,{type:`button`,disabled:n,onClick:()=>{a(e),d(``)},className:`px-5 py-3 rounded-xl border-2 text-sm font-medium transition-all ${n?`border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed`:r?`border-golf-green bg-golf-green text-white shadow-md`:`border-golf-green/30 bg-white text-golf-green hover:border-golf-green hover:bg-golf-green/5`}`,children:[(0,M.jsx)(`span`,{className:`block`,children:e.time}),(0,M.jsx)(`span`,{className:`block text-xs mt-0.5 ${r?`text-white/80`:n?`text-gray-400`:`text-gray-500`}`,children:n?`Full`:`${t} spot${t===1?``:`s`} left`})]},e.id)})})]},e))})]}),(0,M.jsxs)(`div`,{className:`bg-white shadow-lg rounded-2xl p-6 border border-gray-100 transition-opacity ${i?`opacity-100`:`opacity-50 pointer-events-none`}`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-xl font-bold text-golf-green mb-1`,children:`Step 2 â Register Your Golfer`}),i?(0,M.jsxs)(`p`,{className:`text-sm text-golf-green/80 mb-5`,children:[`Selected: `,(0,M.jsxs)(`strong`,{children:[D8(i.date),` at `,i.time]})]}):(0,M.jsx)(`p`,{className:`text-sm text-gray-400 mb-5`,children:`Select a time above to continue.`}),(0,M.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!i){d(`Please select a meeting time.`);return}if(!o.child_name.trim()||!o.parent_name.trim()||!o.email.trim()){d(`Please fill out all required fields.`);return}p(!0),d(``);let{error:t}=await wb.from(`junior_meeting_registrations`).insert({slot_id:i.id,child_name:o.child_name,parent_name:o.parent_name,email:o.email,phone:o.phone||null});if(t){d(t.message.includes(`Slot is full`)?`Sorry, this slot just filled up. Please choose another time.`:`There was a problem saving your registration. Please try again.`),p(!1),m();return}let n=D8(i.date);fetch(E8,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({to:o.email,cc:`[email protected]`,bcc:`[email protected]`,from:`[email protected]`,subject:`Junior Meeting Confirmed â ${n} at ${i.time}`,replyTo:`[email protected]`,name:o.parent_name,email:o.email,message:`Hi ${o.parent_name}
359,\n\nThis confirms that ${o.child_name} is registered for the junior member meeting at Belvedere Golf Club.\n\nDate: ${n}\nTime: ${i.time}\n\nIf you have any questions, please contact us at [email protected].\n\nWe look forward to seeing ${o.child_name}!\n\nBelvedere Golf Club`})}).catch(console.error),NY({formType:`junior_meeting_registration`,name:o.parent_name,email:o.email,phone:o.phone,subject:`${i.date} ${i.time}`,formData:{...o,slot_id:i.id}}),l(!0),p(!1)},className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`child_name`,className:`block font-medium text-gray-700 mb-1.5`,children:[`Junior Golfer's Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`child_name`,name:`child_name`,value:o.child_name,onChange:g,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Child's full name`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`parent_name`,className:`block font-medium text-gray-700 mb-1.5`,children:[`Parent/Guardian Name`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,id:`parent_name`,name:`parent_name`,value:o.parent_name,onChange:g,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`Your full name`})]})]}),(0,M.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`email`,className:`block font-medium text-gray-700 mb-1.5`,children:[`Email Address`,(0,M.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,M.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:o.email,onChange:g,required:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`[email protected]`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`label`,{htmlFor:`phone`,className:`block font-medium text-gray-700 mb-1.5`,children:[`Phone `,(0,M.jsx)(`span`,{className:`text-gray-400 font-normal`,children:`(optional)`})]}),(0,M.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:o.phone,onChange:g,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent transition`,placeholder:`(902) 555-1234`})]})]}),u&&(0,M.jsx)(`div`,{className:`bg-red-50 border border-red-200 rounded-xl p-4 text-center`,children:(0,M.jsx)(`p`,{className:`text-red-700`,children:u})}),(0,M.jsx)(`button`,{type:`submit`,disabled:f||!i,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-4 px-6 rounded-xl transition-all shadow-lg hover:shadow-xl disabled:opacity-50 disabled:cursor-not-allowed`,children:f?`Registering...`:`Confirm Registration`})]})]})]})]})})]})};function A8(e){return new Date(e+`T12:00:00`).toLocaleDateString(`en-CA`,{weekday:`long`,month:`long`,day:`numeric`})}var j8=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(``),g=`https://zrxrhtupnbvhjpliqqfm.supabase.co`,v=`sb_publishable_0PjUUHMClIaX3V0vfotMZg_THF-K2oQ`,y={apikey:v,Authorization:`Bearer ${v}`};(0,_.useEffect)(()=>{(async()=>{let[e,n]=await Promise.all([fetch(`${g}/rest/v1/junior_meeting_slots?select=id,date,time,capacity&order=date.asc,time.asc`,{headers:y}).then(e=>e.json()),fetch(`${g}/rest/v1/junior_meeting_registrations?select=slot_id`,{headers:y}).then(e=>e.json())]),i=n.reduce((e,t)=>(e[t.slot_id]=(e[t.slot_id]??0)+1,e),{});t(e.map(e=>({...e,count:i[e.id]??0}))),r(!1)})()},[]);let b=async e=>{if(i?.id===e.id){a(null),s([]);return}a(e),l(!0);let t=await fetch(`${g}/rest/v1/junior_meeting_registrations?slot_id=eq.${e.id}&select=id,child_name,parent_name,email,phone,created_at&order=created_at.asc`,{headers:y}).then(e=>e.json());s(Array.isArray(t)?t:[]),l(!1)},x=async e=>{window.confirm(`Remove this registration? The family will need to re-register.`)&&(d(e),await fetch(`${g}/rest/v1/junior_meeting_registrations?id=eq.${e}`,{method:`DELETE`,headers:{...y,Prefer:`return=minimal`}}),s(t=>t.filter(t=>t.id!==e)),t(e=>e.map(e=>e.id===i?.id?{...e,count:Math.max(0,e.count-1)}:e)),d(null))},S=async e=>{m&&(d(e),await fetch(`${g}/rest/v1/junior_meeting_registrations?id=eq.${e}`,{method:`PATCH`,headers:{...y,"Content-Type":`application/json`,Prefer:`return=minimal`},body:JSON.stringify({slot_id:m})}),s(t=>t.filter(t=>t.id!==e)),t(e=>e.map(e=>e.id===i?.id?{...e,count:Math.max(0,e.count-1)}:e.id===m?{...e,count:e.count+1}:e)),p(null),h(``),d(null))},C=e.reduce((e,t)=>
359(e[t.date]||(e[t.date]=[]),e[t.date].push(t),e),{}),w=e.reduce((e,t)=>e+t.count,0),T=e.reduce((e,t)=>e+t.capacity,0);return n?(0,M.jsx)(`p`,{className:`text-gray-500 py-8 text-center`,children:`Loading...`}):(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-3 gap-4`,children:[(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-4 text-center`,children:[(0,M.jsx)(`p`,{className:`text-2xl font-bold text-golf-green`,children:w}),(0,M.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Total Registered`})]}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-4 text-center`,children:[(0,M.jsx)(`p`,{className:`text-2xl font-bold text-golf-green`,children:T-w}),(0,M.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Spots Remaining`})]}),(0,M.jsxs)(`div`,{className:`bg-golf-green/5 border border-golf-green/20 rounded-lg p-4 text-center`,children:[(0,M.jsx)(`p`,{className:`text-2xl font-bold text-golf-green`,children:e.filter(e=>e.count>=e.capacity).length}),(0,M.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Full Slots`})]})]}),Object.entries(C).map(([t,n])=>(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`font-semibold text-gray-700 mb-2 text-sm uppercase tracking-wide`,children:A8(t)}),(0,M.jsx)(`div`,{className:`space-y-2`,children:n.map(t=>{let n=t.count>=t.capacity,r=i?.id===t.id;return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`button`,{onClick:()=>b(t),className:`w-full flex items-center justify-between px-4 py-3 rounded-lg border text-left transition-all ${r?`border-golf-green bg-golf-green text-white`:`border-gray-200 bg-white hover:border-golf-green/50`}`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:t.time}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsxs)(`span`,{className:`text-sm ${r?`text-white/80`:`text-gray-500`}`,children:[t.count,` / `,t.capacity]}),(0,M.jsx)(`div`,{className:`w-24 bg-gray-200 rounded-full h-2 overflow-hidden`,children:(0,M.jsx)(`div`,{className:`h-2 rounded-full transition-all ${n?`bg-red-400`:`bg-golf-green`}`,style:{width:`${Math.min(t.count/t.capacity*100,100)}%`}})}),n&&(0,M.jsx)(`span`,{className:`text-xs font-semibold px-2 py-0.5 rounded-full ${r?`bg-white/20 text-white`:`bg-red-100 text-red-600`}`,children:`Full`}),(0,M.jsx)(`span`,{className:`text-xs ${r?`text-white/70`:`text-gray-400`}`,children:r?`â²`:`â¼`})]})]}),r&&(0,M.jsx)(`div`,{className:`border border-t-0 border-golf-green/30 rounded-b-lg bg-gray-50 px-4 py-4`,children:c?(0,M.jsx)(`p`,{className:`text-gray-500 text-sm py-2`,children:`Loading registrations...`}):o.length===0?(0,M.jsx)(`p`,{className:`text-gray-400 text-sm py-2`,children:`No registrations yet.`}):(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`text-left text-gray-500 border-b border-gray-200`,children:[(0,M.jsx)(`th`,{className:`pb-2 pr-4 font-medium`,children:`#`}),(0,M.jsx)(`th`,{className:`pb-2 pr-4 font-medium`,children:`Junior Golfer`}),(0,M.jsx)(`th`,{className:`pb-2 pr-4 font-medium`,children:`Parent / Guardian`}),(0,M.jsx)(`th`,{className:`pb-2 pr-4 font-medium`,children:`Email`}),(0,M.jsx)(`th`,{className:`pb-2 pr-4 font-medium`,children:`Phone`}),(0,M.jsx)(`th`,{className:`pb-2 font-medium`,children:`Registered`}),(0,M.jsx)(`th`,{className:`pb-2 font-medium`})]})}),(0,M.jsx)(`tbody`,{children:o.map((t,n)=>(0,M.jsxs)(`tr`,{className:`border-b border-gray-100 last:border-0`,children:[(0,M.jsx)(`td`,{className:`py-2 pr-4 text-gray-400`,children:n+1}),(0,M.jsx)(`td`,{className:`py-2 pr-4 font-medium text-gray-800`,children:t.child_name}),(0,M.jsx)(`td`,{className:`py-2 pr-4 text-gray-700`,children:t.parent_name}),(0,M.jsx)(`td`,{className:`py-2 pr-4`,children:(0,M.jsx)(`a`,{href:`mailto:${t.email}`,className:`text-golf-green hover:underline`,children:t.email})}),(0,M.jsx)(`td`,{className:`py-2 pr-4 text-gray-600`,children:t.phone||`â`}),(0,M.jsx)(`td`,{className:`py-2 text-gray-400 whitespace-nowrap`,children:new Date(t.created_at).toLocaleDateString(`en-CA`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}),(0,M.jsx)(`td`,{className:`py-2 pl-2`,children:f===t.id?(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsxs)(`select`,{value:m,onChange:e=>h(e.target.value),className:`text-xs border border-gray-300 rounded px-1 py-0.5`,children:[(0,M.jsx)(`option`,{value:``,children:`Pick a slotâ¦`}),e.filter(e=>e.id!==i?.id).map(e=>(0,M.jsxs)(`option`,{value:e.id,disabled:e.count>=e.capacity,children:[A8(e.date),` â `,e.time,` (`,e.count,`/`,e.capacity,`)`]}
359,e.id))]}),(0,M.jsx)(`button`,{onClick:()=>S(t.id),disabled:!m||u===t.id,className:`text-xs text-golf-green hover:text-golf-green-dark font-medium disabled:opacity-40`,children:u===t.id?`Movingâ¦`:`Move`}),(0,M.jsx)(`button`,{onClick:()=>{p(null),h(``)},className:`text-xs text-gray-400 hover:text-gray-600`,children:`Cancel`})]}):(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(`button`,{onClick:()=>{p(t.id),h(``)},disabled:!!u,className:`text-xs text-blue-500 hover:text-blue-700 hover:underline disabled:opacity-40`,children:`Transfer`}),(0,M.jsx)(`button`,{onClick:()=>x(t.id),disabled:u===t.id,className:`text-xs text-red-500 hover:text-red-700 hover:underline disabled:opacity-40`,children:u===t.id?`Removingâ¦`:`Remove`})]})})]},t.id))})]})})]},t.id)})})]},t))]})},M8=`juniors2026`,N8=`jm_admin_auth`,P8=()=>{let[e,t]=(0,_.useState)(()=>sessionStorage.getItem(N8)===`1`),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(!1);return e?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-4xl`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between mb-8`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-3xl font-bold text-golf-green`,children:`Junior Meetings â Registrations`}),(0,M.jsx)(`button`,{onClick:()=>{sessionStorage.removeItem(N8),t(!1)},className:`text-sm text-gray-500 hover:text-golf-green underline`,children:`Sign out`})]}),(0,M.jsx)(`div`,{className:`bg-white shadow-lg rounded-2xl p-6 border border-gray-100`,children:(0,M.jsx)(j8,{})})]})})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50 flex items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`bg-white shadow-xl rounded-2xl p-10 w-full max-w-sm border border-gray-100`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-2xl font-bold text-golf-green mb-6 text-center`,children:`Junior Meetings Admin`}),(0,M.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),n===M8?(sessionStorage.setItem(N8,`1`),t(!0)):(a(!0),r(``))},className:`space-y-4`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Password`}),(0,M.jsx)(`input`,{type:`password`,value:n,onChange:e=>{r(e.target.value),a(!1)},autoFocus:!0,className:`w-full border border-gray-300 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-golf-green focus:border-transparent`,placeholder:`Enter password`}),i&&(0,M.jsx)(`p`,{className:`text-red-600 text-sm mt-1`,children:`Incorrect password.`})]}),(0,M.jsx)(`button`,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark text-white font-semibold py-3 rounded-xl transition-all`,children:`Sign In`})]})]})})]})},F8=()=>((0,_.useEffect)(()=>{let e=document.createElement(`script`);return e.src=`https://assets.calendly.com/assets/external/widget.js`,e.async=!0,document.head.appendChild(e),()=>{document.head.contains(e)&&document.head.removeChild(e)}},[]),(0,M.jsxs)(`main`,{className:`min-h-screen`,children:[(0,M.jsxs)(MK,{children:[(0,M.jsx)(`title`,{children:`Book a Private Lesson | Belvedere Golf Club`}),(0,M.jsx)(`meta`,{name:`description`,content:`Book a private golf lesson with Connor Shea at Belvedere Golf Club.`})]}),(0,M.jsxs)(`div`,{className:`container mx-auto px-4 py-12`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-3xl md:text-4xl font-bold text-golf-green mb-3`,children:`Book a Private Lesson`}),(0,M.jsx)(`p`,{className:`text-gray-600 text-lg`,children:`Select a time that works for you below.`})]}),(0,M.jsx)(`div`,{className:`calendly-inline-widget`,"data-url":`https://calendly.com/connor-shea-lessons`,style:{minWidth:`320px`,height:`1050px`}})]})]})),I8=({player:e,picked:t,actual:n,status:r,readOnly:i,onPick:a})=>{let o=i||!e;return(0,M.jsxs)(`button`,{type:`button`,disabled:o,onClick:a,className:F(`group flex w-full items-center gap-2 px-3 py-2 text-left transition-colors`,!o&&`hover:bg-golf-green/5`,t&&(r===`correct`?`bg-emerald-600 text-white hover:bg-emerald-600`:r===`wrong`?`bg-red-500 text-white hover:bg-red-500`:`bg-golf-green text-white hover:bg-golf-green`),o&&`cursor-default`),children:[(0,M.jsx)(`span`,{className:F(`flex h-5 w-6 shrink-0 items-center justify-center rounded text-[10px] font-bold`,t?`bg-white/20 text-white`:`bg-golf-green/10 text-golf-green`),children:e?e.seed:`â`}),(0,M.jsx)(`span`,{className:F(`flex-1 truncate text-sm`,e?t?`font-semibold`:`text-gray-800`:`italic text-muted-foreground`),children:e?e.name:`TBD`}),n===`win`&&!t&&(0,M.jsx)(`span`,{className:`text-[10px] font-bold uppercase tracking-wide text-emerald-600`,children:`won`}),t&&r===`wrong`&&(0,M.jsx)(gr,{className:`h-4 w-4 opacity-90`}),t&&r!==`wrong`&&(0,M.jsx)(dn,{className:`h-4 w-4 opacity-90`})]})},L8=({players:e,competitorIds:t,pickedWinnerId:n,actualWinnerId:r,pickStatus:i,readOnly:a=!1,onPick:o})=>{let[s,c]=t,l=s?e[s]??null:null,u=c?e[c]??null:null,d=e=>!r||!e?null:e===r?`win`:`loss`;return(0,M.jsxs)(`div`,{className:`w-56 overflow-hidden rounded-xl bg-white shadow-md ring-1 ring-gray-100 divide-y divide-gray-100`,children:[(0,M.jsx)(I8,{player:l,picked:!!n&&n===s,actual:d(s),status:i,readOnly:a,onPick:s&&o?()=>o(s):void 0}),(0,M.jsx)(I8,{player:u,picked:!!n&&n===c,actual:d(c),status:i,readOnly:a,onPick:c&&o?()=>o(c):void 0})]})},R8=wb,z8={1:`Round of 16`,2:`Quarterfinals`,3:`Semifinals`,4:`Final`,5:`Championship`},B8=[`Kane`,`Dowling`],V8=`Championship`,H8=`mp_draft_v1`;function U8(e){return e.find(e=>e.flight===V8)}function W8(e){let t=Array.from(new Set(e.map(e=>e.flight))),n=B8.filter(e=>t.includes(e));return[...n,...t.filter(e=>!n.includes(e))]}async function G8(){let[e,t,n]=await Promise.all([R8.from(`mp_players`).select(`id,flight,
359name,seed`).order(`flight`).order(`seed`),R8.from(`mp_matches`).select(`id,flight,round,slot,player1_id,player2_id,actual_winner_id,advances_to_match_id,advances_to_slot`).order(`flight`).order(`round`).order(`slot`),R8.from(`mp_config`).select(`lock_at,scoring`).eq(`id`,1).maybeSingle()]);return{players:e.data??[],matches:t.data??[],config:n.data??null}}function K8(e){return Object.fromEntries(e.map(e=>[e.id,e]))}function q8(e){let t={};for(let n of e)n.advances_to_match_id&&(t[n.advances_to_match_id]??=[]).push(n);return t}function J8(e,t,n){let r=t[e.id]??[];if(r.length===0)return[e.player1_id,e.player2_id];let i=null,a=null;for(let e of r){let t=n[e.id]??null;e.advances_to_slot===1?i=t:e.advances_to_slot===2&&(a=t)}return[i,a]}function Y8(e,t,n,r,i){let a=Object.fromEntries(e.map(e=>[e.id,e])),o={...n,[r]:i},s=a[r];for(;s&&s.advances_to_match_id;){let e=a[s.advances_to_match_id];if(!e)break;let[n,r]=J8(e,t,o),i=o[e.id];i&&i!==n&&i!==r&&delete o[e.id],s=e}return o}function X8(e){return Object.keys(e).length===31}function Z8(e){return Object.entries(e).map(([e,t])=>({match_id:e,predicted_winner_id:t}))}function Q8(){try{let e=localStorage.getItem(H8);if(!e)return{picks:{}};let t=JSON.parse(e);return{picks:t.picks??{},display_name:t.display_name,real_name:t.real_name,team_name:t.team_name,phone:t.phone,email:t.email}}catch{return{picks:{}}}}function $8(e){try{localStorage.setItem(H8,JSON.stringify(e))}catch{}}function e5(e,t=Date.now()){return e?.lock_at?t>=new Date(e.lock_at).getTime():!1}var t5=({matches:e,players:t,picks:n,readOnly:r=!1,showResults:i=!1,resultsView:a=!1,pickStatusByMatch:o,onPick:s})=>{let c=q8(e),l=Array.from(new Set(e.map(e=>e.round))).sort((e,t)=>e-t),u=t=>e.filter(e=>e.round===t).sort((e,t)=>e.slot-t.slot);return(0,M.jsx)(`div`,{className:`overflow-x-auto pb-4 -mx-4 px-4`,children:(0,M.jsx)(`div`,{className:`flex items-stretch gap-3 sm:gap-6 min-w-max`,children:l.map(e=>(0,M.jsxs)(`div`,{className:`flex flex-col min-w-[14rem]`,children:[(0,M.jsx)(`h3`,{className:`mb-3 text-center text-xs font-semibold uppercase tracking-widest text-golf-green/70`,children:z8[e]}),(0,M.jsx)(`div`,{className:`flex flex-1 flex-col justify-around gap-4 py-2`,children:u(e).map(e=>(0,M.jsx)(L8,{players:t,competitorIds:a?[e.player1_id,e.player2_id]:J8(e,c,n),pickedWinnerId:a?e.actual_winner_id:n[e.id],actualWinnerId:a||i?e.actual_winner_id:null,pickStatus:o?.[e.id],readOnly:r||a,onPick:a||!s?void 0:t=>s(e.id,t)},e.id))})]},e))})})};function n5(e){let t=Math.max(0,e);return{d:Math.floor(t/864e5),h:Math.floor(t%864e5/36e5),m:Math.floor(t%36e5/6e4),s:Math.floor(t%6e4/1e3)}}var r5=({value:e,label:t})=>(0,M.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,M.jsx)(`span`,{className:`font-playfair text-2xl sm:text-3xl font-bold text-golf-green tabular-nums`,children:String(e).padStart(2,`0`)}),(0,M.jsx)(`span`,{className:`text-[10px] uppercase tracking-widest text-muted-foreground mt-1`,children:t})]}),i5=({lockAt:e,onLock:t})=>{let n=new Date(e).getTime(),[r,i]=(0,_.useState)(n-Date.now());if((0,_.useEffect)(()=>{let e=setInterval(()=>{let r=n-Date.now();i(r),r<=0&&(clearInterval(e),t?.())},1e3);return()=>clearInterval(e)},[n,t]),r<=0)return(0,M.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full bg-golf-green/10 px-4 py-2 text-sm font-medium text-golf-green`,children:[(0,M.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-golf-green`}),`Picks are locked`]});let{d:a,h:o,m:s,s:c}=n5(r);return(0,M.jsxs)(`div`,{className:`inline-flex items-center gap-4 roun
359ded-2xl bg-white px-5 py-3 shadow-md ring-1 ring-golf-green/10`,children:[(0,M.jsx)(r5,{value:a,label:`Days`}),(0,M.jsx)(`span`,{className:`text-golf-green/30 text-2xl`,children:`:`}),(0,M.jsx)(r5,{value:o,label:`Hrs`}),(0,M.jsx)(`span`,{className:`text-golf-green/30 text-2xl`,children:`:`}),(0,M.jsx)(r5,{value:s,label:`Min`}),(0,M.jsx)(`span`,{className:`text-golf-green/30 text-2xl`,children:`:`}),(0,M.jsx)(r5,{value:c,label:`Sec`})]})},a5=({scoring:e,className:t})=>{let n=[1,2,3,4,5].map(t=>({label:z8[t],pts:e?.[`r${t}`]})).filter(e=>typeof e.pts==`number`);return n.length===0?null:(0,M.jsxs)(`div`,{className:`rounded-2xl bg-white/70 p-4 shadow-sm ring-1 ring-gray-100 ${t??``}`,children:[(0,M.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-golf-green/70`,children:[(0,M.jsx)(Rn,{className:`h-3.5 w-3.5`}),` How points work`]}),(0,M.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-2`,children:n.map((e,t)=>(0,M.jsxs)(_.Fragment,{children:[(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-sm text-gray-700`,children:[e.label,(0,M.jsxs)(`span`,{className:`rounded-full bg-golf-green/10 px-2 py-0.5 text-xs font-bold text-golf-green`,children:[e.pts,` pt`,e.pts===1?``:`s`]})]}),t<n.length-1&&(0,M.jsx)(`span`,{className:`text-gray-300`,children:`·`})]},e.label))}),(0,M.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`You score the points for a round each time your predicted winner actually wins that match. Ties are broken by a correct overall champion pick, then by who entered first.`})]})},o5=()=>{let{toast:e}=hC(),[t,n]=(0,_.useState)(!0),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)({}),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(``),[b,x]=(0,_.useState)(``),[S,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(!1),[O,ee]=(0,_.useState)(null);(0,_.useEffect)(()=>{(async()=>{let{players:e,matches:t,config:r}=await G8();i(e),o(t),c(r),T(e5(r));let a=Q8(),s=new Set(t.map(e=>e.id)),l=Object.fromEntries(Object.entries(a.picks).filter(([e])=>s.has(e)));u(l),a.display_name&&f(a.display_name),a.real_name&&m(a.real_name),a.team_name&&g(a.team_name),a.phone&&y(a.phone),a.email&&x(a.email),Object.keys(l).length!==Object.keys(a.picks).length&&$8({picks:l,display_name:a.display_name,real_name:a.real_name,team_name:a.team_name,phone:a.phone,email:a.email}),n(!1)})()},[]);let k=(0,_.useMemo)(()=>K8(r),[r]),A=(0,_.useMemo)(()=>q8(a),[a]),te=(0,_.useMemo)(()=>a.some(e=>e.actual_winner_id),[a]),ne=(0,_.useMemo)(()=>W8(a),[a]),j=(0,_.useMemo)(()=>ne.filter(e=>e!==V8),[ne]),re=(0,_.useMemo)(()=>U8(a),[a]),ie=w,ae=Object.keys(l).length,oe=X8(l),se=(e,t)=>{w||u(n=>{let r=Y8(a,A,n,e,t);return $8({picks:r,display_name:d,real_name:p,team_name:h,phone:v,email:b}),r})},ce=(e={})=>$8({picks:l,display_name:e.display_name??d,real_name:e.real_name??p,team_name:e.team_name??h,phone:e.phone??v,email:e.email??b});return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(MK,{children:(0,M.jsx)(`title`,{children:`Match Play Pick'em | Belvedere Golf Club`})}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-20 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-6xl`,children:[(0,M.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-golf-green/10 px-3 py-1 text-xs font-semibold uppercase tracking-widest text-golf-green`,children:[(0,M.jsx)(lr,{className:`h-3.5 w-3.5`}),` `,ie?`Live Results`:`Pick'em Challenge`]}),(0,M.jsx)(`h1`,{className:`mt-4 font-playfair text-3xl sm:text-4xl font-bold text-golf-green`,children:`2026 Art MacKenzie Match Play`}),(0,M.jsx)(`p`,{className:`mt-3 text-muted-foreground max-w-2xl mx-auto`,children:ie?`Follow the bracket live as results come in. Winners advance automatically through both flights to the overall championship.`:`Predict every matchup through the whole bracket, then submit with your email. You must click the confirmation link
359we email you for your entry to count. Track your score on the leaderboard as results roll in.`}),(0,M.jsxs)(`div`,{className:`mt-6 flex flex-col items-center gap-3`,children:[s&&!ie&&(0,M.jsx)(i5,{lockAt:s.lock_at,onLock:()=>T(!0)}),(0,M.jsx)(L,{to:`/match-play/leaderboard`,className:`text-sm font-medium text-golf-green underline-offset-4 hover:underline`,children:`View the leaderboard â`})]})]}),t?(0,M.jsx)(`div`,{className:`flex justify-center py-24`,children:(0,M.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-b-2 border-golf-green`})}):(0,M.jsxs)(M.Fragment,{children:[w&&(0,M.jsx)(`div`,{className:`mb-6 rounded-xl bg-golf-green/5 px-4 py-3 text-center text-sm text-golf-green ring-1 ring-golf-green/10`,children:`Picks are closed, the tournament is under way. Live bracket and results below.`}),!w&&(0,M.jsxs)(`div`,{className:`mb-5 flex items-center justify-center gap-3 text-sm text-muted-foreground`,children:[(0,M.jsx)(Bn,{className:`h-4 w-4 text-golf-green`}),(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`span`,{className:`font-semibold text-golf-green`,children:ae}),` / `,31,` `,`matchups picked`]}),(0,M.jsx)(`div`,{className:`h-1.5 w-40 overflow-hidden rounded-full bg-gray-200`,children:(0,M.jsx)(`div`,{className:`h-full rounded-full bg-golf-green transition-all`,style:{width:`${ae/31*100}%`}})})]}),!ie&&s?.scoring&&(0,M.jsx)(a5,{scoring:s.scoring,className:`mb-6`}),(0,M.jsx)(`div`,{className:`space-y-8`,children:j.map(e=>{let t=a.filter(t=>t.flight===e),n=t.filter(e=>l[e.id]).length;return(0,M.jsxs)(`div`,{className:`rounded-2xl bg-white/60 p-3 sm:p-5 shadow-md ring-1 ring-gray-100`,children:[(0,M.jsxs)(`div`,{className:`mb-2 flex items-baseline justify-between px-1`,children:[(0,M.jsxs)(`h2`,{className:`font-playfair text-xl font-bold text-golf-green`,children:[e,` Flight`]}),!w&&(0,M.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,`/`,t.length,` picked`]})]}),(0,M.jsx)(t5,{matches:t,players:k,picks:l,readOnly:w,showResults:w||te,resultsView:ie,onPick:se}),(0,M.jsx)(`p`,{className:`mt-2 px-1 text-xs text-muted-foreground sm:hidden`,children:`Swipe horizontally to see every round â`})]},e)})}),re&&(0,M.jsxs)(`div`,{className:`mx-auto mt-8 max-w-md rounded-2xl bg-golf-green/5 p-5 text-center shadow-md ring-1 ring-golf-green/20`,children:[(0,M.jsxs)(`div`,{className:`mb-1 inline-flex items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-golf-green`,children:[(0,M.jsx)(lr,{className:`h-3.5 w-3.5`}),` Overall Championship`]}),(0,M.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:ie?`The Kane champion faces the Dowling champion for the overall title.`:`Pick who wins it all: your Kane champion vs your Dowling champion.`}),(0,M.jsx)(`div`,{className:`flex justify-center`,children:(0,M.jsx)(L8,{players:k,competitorIds:ie?[re.player1_id,re.player2_id]:J8(re,A,l),pickedWinnerId:ie?re.actual_winner_id:l[re.id],actualWinnerId:ie||te?re.actual_winner_id:null,readOnly:w,onPick:w?void 0:e=>se(re.id,e)})})]}),!w&&(0,M.jsx)(`div`,{className:`mx-auto mt-10 max-w-md`,children:O?(0,M.jsxs)(`div`,{className:`rounded-2xl bg-white p-8 text-center shadow-md ring-1 ring-gray-100`,children:[(0,M.jsx)(vn,{className:`mx-auto h-12 w-12 text-golf-green`}),O.mode===`updated`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h2`,{className:`mt-4 font-playfair text-2xl font-bold text-golf-green`,children:`Entry updated`}),(0,M.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:`Your confirmed entry was updated with your latest picks. You're all set.`})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h2`,{className:`mt-4 font-playfair text-2xl font-bold text-golf-green`,children:`One last step: confirm your email`}),(0,M.jsxs)(`p`,{className:`mt-2 text-muted-foreground`,children:[`We sent a confirmation link to `,(0,M.jsx)(`strong`,{children:b}),`. Your entry is`,(0,M.jsx)(`strong`,{children:` not counted yet`}),`, you must click that link to complete your entry and appear on the leaderboard.`]}),(0,M.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Don't see it? Check your spam or junk folder.`})]}),O.confirmUrl&&(0,M.jsxs)(`p`,{className:`mt-4 break-all rounded-lg bg-amber-50 p-3 text-xs text-amber-800`,children:[`Dev mode (no email sent): confirm at`,` `,(0,M.jsx)(`a`,{className:`underline`,href:O.confirmUrl,children:O.confirmUrl})]})]}):(0,M.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),!w){if(!oe){e({title:`Bracket incomplete`,description:`Pick a winner in all 31 matchups (${ae}/31 done).`,variant:`destructive`});return}if(S){ee({mode:`sent`});return}D(!0);try{let t=crypto.randomUUID(),{data:n,error:r}=await R8.rpc(`mp_submit_entry`,{p_display_name:d.trim(),p_real_name:p.trim(),p_team_name:h.trim()||null,p_phone:v.trim()||null,p_email:b.trim(),p_picks:Z8(l),p_confirm_token:t});if(r){let t=r.message||``;e({title:`Could not submit`,description:/locked/.test(t)?`Picks are locked. The tournament has started.`:/incomplete_picks/.test(t)?`Please pick every matchup before submitting.`:/real_name_required/.test(t)?`Please enter your real name.`:/invalid_email/.test(t)?`That email address doesn't look right.`:`Something went wrong. Please try again.`,variant:`destructive`});return}let i=Array.isArray(n)?n[0]:n;if(!i){e({title:`Could not submit`,description:`Please try again.`,variant:`destructive`});return}if(!i.needs_email){ee({mode:`updated`});return}let a=`${window.location.origin}/match-play/confirm?token=${encodeURIComponent(i.confirm_token)}`;await R8.functions.invoke(`mp-send-confirmation`,{body:{email:b.trim(),name:d.trim(),confirmUrl:a}}),ee({mode:`sent`})}catch{e({title:`Network error`,description:`Could not reach the server. Please try again.`,variant:`destructive`})}finally{D(!1)}}},className:`rounded-2xl bg-white p-6 shadow-md ring-1 ring-gray-100`,children:[(0,M.jsx)(`h2`,{className:`font-playfair text-xl font-bold text-golf-green`,children:`Submit your bracket`}),(0,M.jsx)(`p`,{className:`mt-1 mb-4 text-sm text-muted-foreground`,children:`Enter your name and email. We'll send one confirmation link to that email, and you must click it to complete your entry.`}),(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsx)(bJ,{required:!0,placeholder:`Real name`,value:p,maxLength:60,onChange:e=>{m(e.target.value),ce({real_name:e.target.value})}}),(0,M.jsx)(bJ,{required:!0,placeholder:`Display name (shown on leaderboard)`,value:d,maxLength:40,onChange:e=>{f(e.target.value),ce({display_name:e.target.value})}}),(0,M.jsx)(bJ,{required:!0,type:`email`,placeholder:`[email protected]`,value:b,onChange:e=>{x(e.target.value),ce({email:e.target.value})}}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,M.jsx)(`span`,{className:`h-px flex-1 bg-gray-100`}),(0,M.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-widest text-muted-foreground`,children:`Optional`}),(0,M.jsx)(`span`,{className:`h-px flex-1 bg-gray-100`})]}),(0,M.jsx)(bJ,{placeholder:`Team name`,value:h,maxLength:60,onChange:e=>{g(e.target.value),ce({team_name:e.target.value})}}),(0,M.jsx)(bJ,{type:`tel`,placeholder:`Phone number`,value:v,maxLength:20,onChange:e=>{y(e.target.value),ce({phone:e.target.value})}}),(0,M.jsx)(`input`,{type:`text`,name:`website`,tabIndex:-1,autoComplete:`off`,"aria-hidden":`true`,value:S,onChange:e=>C(e.target.value),className:`absolute left-[-9999px] h-0 w-0 opacity-0`})]}),(0,M.jsxs)(`p`,{className:`mt-4 flex items-start gap-2 rounded-lg bg-amber-50 p-3 text-xs text-amber-800`,children:[(0,M.jsx)(Un,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`strong`,{children:`Important:`}),` submitting alone does not enter you. Your entry is confirmed and counted only after you click the link in the confirmation email.`]})]}),(0,M.jsxs)(R,{type:`submit`,disabled:E,className:`mt-4 w-full bg-golf-green hover:bg-golf-green-dark`,children:[(0,M.jsx)(Un,{className:`h-4 w-4`}
359),E?`Submitting...`:`Submit & confirm by email`]}),!oe&&(0,M.jsxs)(`p`,{className:`mt-3 text-center text-xs text-muted-foreground`,children:[31-ae,` matchup`,31-ae==1?``:`s`,` left to pick`]})]})})]})]})})]})},s5=()=>{let[e]=mf(),t=e.get(`token`),[n,r]=(0,_.useState)({status:`loading`});return(0,_.useEffect)(()=>{if(!t){r({status:`error`});return}(async()=>{try{let{data:e,error:n}=await R8.rpc(`mp_confirm_entry`,{p_token:t}),i=Array.isArray(e)?e[0]:e;!n&&i&&i.display_name?r({status:`ok`,name:i.display_name}):r({status:`error`})}catch{r({status:`error`})}})()},[t]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(MK,{children:(0,M.jsx)(`title`,{children:`Confirm Entry | Match Play Pick'em`})}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-20 min-h-screen bg-gradient-to-b from-white to-gray-50 flex items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`mx-4 w-full max-w-md rounded-2xl bg-white p-10 text-center shadow-xl ring-1 ring-gray-100`,children:[n.status===`loading`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`mx-auto h-10 w-10 animate-spin rounded-full border-b-2 border-golf-green`}),(0,M.jsx)(`p`,{className:`mt-4 text-muted-foreground`,children:`Confirming your entry...`})]}),n.status===`ok`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(vn,{className:`mx-auto h-14 w-14 text-golf-green`}),(0,M.jsxs)(`h1`,{className:`mt-4 font-playfair text-2xl font-bold text-golf-green`,children:[`You're in`,n.name?`, ${n.name}`:``,`!`]}),(0,M.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:`Your bracket is confirmed and entered in the 2026 Art MacKenzie Match Play Pick'em. Good luck!`}),(0,M.jsxs)(`div`,{className:`mt-6 flex flex-col gap-2`,children:[(0,M.jsxs)(L,{to:`/match-play/leaderboard`,className:`inline-flex items-center justify-center gap-2 rounded-xl bg-golf-green px-4 py-3 font-semibold text-white transition-all hover:bg-golf-green-dark`,children:[(0,M.jsx)(lr,{className:`h-4 w-4`}),` View the leaderboard`]}),(0,M.jsx)(L,{to:`/match-play`,className:`text-sm font-medium text-golf-green underline-offset-4 hover:underline`,children:`Back to the bracket`})]})]}),n.status===`error`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(yn,{className:`mx-auto h-14 w-14 text-destructive`}),(0,M.jsx)(`h1`,{className:`mt-4 font-playfair text-2xl font-bold text-golf-green`,children:`Link not valid`}),(0,M.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:`This confirmation link is missing or has expired. Head back to the bracket and submit your picks again to get a fresh link.`}),(0,M.jsx)(L,{to:`/match-play`,className:`mt-6 inline-flex items-center justify-center rounded-xl bg-golf-green px-4 py-3 font-semibold text-white transition-all hover:bg-golf-green-dark`,children:`Back to the bracket`})]})]})})]})},c5=e=>e===1?`text-amber-500`:e===2?`text-gray-400`:e===3?`text-amber-700`:`text-golf-green/40`,l5=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!0),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)({}),[m,h]=(0,_.useState)(null);(0,_.useEffect)(()=>{(async()=>{let[e,n]=await Promise.all([R8.from(`mp_leaderboard`).select(`id,rank,display_name,points,correct_count,champion_correct`).order(`rank`).limit(500),G8()]);t(e.data??[]),a(n.players),s(n.matches),r(n.config?.scoring??null),l(!1)})()},[]);let g=(0,_.useMemo)(()=>K8(i),[i]),v=(0,_.useMemo)(()=>Object.fromEntries(o.map(e=>[e.id,e])),[o]),y=(0,_.useMemo)(()=>q8(o),[o]),b=(0,_.useMemo)(()=>W8(o).filter(e=>e!==V8),[o]),x=(0,_.useMemo)(()=>U8(o),[o]),S=async e=>{if(u===e){d(null);return}if(d(e),!f[e]){h(e);let{data:t}=await R8.rpc(`mp_entry_pick_map`,{p_entry_id:e}),n={};for(let e of t??[])n[e.match_id]=e.predicted_winner_id;p(t=>({...t,[e]:n})),h(null)}},C=e=>{let t={};for(let[n,r]of Object.entries(e)){let e=v[n]?.actual_winner_id;t[n]=e?e===r?`correct`:`wrong`:`pending`}return t},w=e=>{let t=C(e);return(0,M.jsxs)(`div`,{className:`space-y-5`,children:[b.map(n=>(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`h4`,{className:`mb-2 font-playfair text-base font-bold text-golf-green`,children:[n,` Flight`]}),(0,M.jsx)(t5,{matches:o.filter(e=>e.flight===n),players:g,picks:e,readOnly:!0,pickStatusByMatch:t})]},n)),x&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`mb-2 font-playfair text-base font-bold text-golf-green`,children:`Overall Championship`}),(0,M.jsx)(L8,{players:g,competitorIds:J8(x,y,e),pickedWinnerId:e[x.id],pickStatus:t[x.id],readOnly:!0})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-4 pt-1 text-xs text-muted-foreground`,children:[(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,M.jsx)(`span`,{className:`h-3 w-3 rounded bg-emerald-600`}),` Correct`]}),(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,M.jsx)(`span`,{className:`h-3 w-3 rounded bg-red-500`}),` Wrong`]}),(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,M.jsx)(`span`,{className:`h-3 w-3 rounded bg-golf-green`}),` Not decided yet`]})]})]})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(MK,{children:(0,M.jsx)(`title`,{children:`Leaderboard | Match Play Pick'em`})}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-20 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-4xl`,children:[(0,M.jsxs)(`div`,{className:`mb-8 text-center`,children:[(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-golf-green/10 px-3 py-1 text-xs font-semibold uppercase tracking-widest text-golf-green`,children:[(0,M.jsx)(lr,{className:`h-3.5 w-3.5`}),` Standings`]}),(0,M.jsx)(`h1`,{className:`mt-4 font-playfair text-3xl sm:text-4xl font-bold text-golf-green`,children:`Pick'em Leaderboard`}),(0,M.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:`2026 Art MacKenzie Match Play. Updates as results are entered.`}),(0,M.jsx)(L,{to:`/match-play`,className:`mt-4 inline-block text-sm font-medium text-golf-green underline-offset-4 hover:underline`,children:`â Back to the bracket`})]}),n&&(0,M.jsx)(a5,{scoring:n,className:`mb-6`}),c?(0,M.jsx)(`div`,{className:`flex justify-center py-20`,children:(0,M.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-b-2 border-golf-green`})}):e.length===0?(0,M.jsxs)(`div`,{className:`rounded-2xl bg-white p-10 text-center shadow-md ring-1 ring-gray-100`,children:[(0,M.jsx)(or,{className:`mx-auto h-10 w-10 text-golf-green/40`}),(0,M.jsx)(`p`,{className:`mt-3 text-muted-foreground`,children:`No confirmed entries yet. Be the first, fill out your bracket!`})]}):(0,M.jsxs)(`div`,{className:`overflow-hidden rounded-2xl bg-white shadow-md ring-1 ring-gray-100`,children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-[3rem_1fr_4rem_4rem_1.5rem] items-center gap-2 border-b border-gray-100 bg-golf-green/5 px-4 py-3 text-xs font-semibold uppercase tracking-wider text-golf-green/70`,children:[(0,M.jsx)(`span`,{className:`text-center`,children:`#`}),(0,M.jsx)(`span`,{children:`Player`}),(0,M.jsx)(`span`,{className:`text-center`,children:`Correct`}),(0,M.jsx)(`span`,{className:`text-right`,children:`Pts`}),(0,M.jsx)(`span`,{})]}),e.map(e=>{let t=u===e.id;return(0,M.jsxs)(`div`,{className:`border-b border-gray-50 last:border-0`,children:[(0,M.jsxs)(`button`,{onClick:()=>S(e.id),className:`grid w-full grid-cols-[3rem_1fr_4rem_4rem_1.5rem] items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-golf-green/5`,children:[(0,M.jsx)(`span`,{className:`text-center font-playfair text-lg font-bold ${c5(e.rank)}`,children:e.rank}),(0,M.jsxs)(`span`,{className:`flex items-center gap-1.5 truncate font-medium text-gray-800`,children:[(0,M.jsx)(`span`,{className:`truncate`,children:e.display_name}),e.champion_correct&&(0,M.jsx)(Cn,{className:`h-3.5 w-3.5 shrink-0 text-amber-500`,"aria-label":`Correct champion pick`})]}),(0,M.jsx)(`span`,{className:`text-center text-sm text-muted-foreground`,children:e.correct_count}),(0,M.jsx)(`span`,{className:`text-right font-semibold text-golf-green`,children:e.points}),(0,M.jsx)(fn,{className:`h-4 w-4 text-golf-green/50 transition-transform ${t?`rotate-180`:``}`})]}),t&&(0,M.jsx)(`div`,{className:`bg-golf-green/[0.03] px-3 pb-5 pt-2 sm:px-4`,children:m===e.id?(0,M.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,M.jsx)(`div`,{className:`h-5 w-5 animate-spin rounded-full border-b-2 border-golf-green`})}):Object.keys(f[e.id]??{}).length===0?(0,M.jsx)(`p`,{className:`py-4 text-center text-sm text-muted-foreground`,children:`No picks to show.`}):w(f[e.id])})]},e.id)})]}),e.length>0&&(0,M.jsx)(`p`,{className:`mt-3 text-center text-xs text-muted-foreground`,children:`Tap a player to see their bracket.`})]})})]})},u5=`matchplay2026`,d5=`mp_admin_auth`,f5=`matchplay-admin-2026`,p5=({onPass:e})=>{let[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(!1);return(0,M.jsx)(`main`,{className:`pt-28 pb-16 min-h-screen bg-gradient-to-b from-white to-gray-50 flex items-center justify-center`,children:(0,M.jsxs)(`div`,{className:`w-full max-w-sm rounded-2xl border border-gray-100 bg-white p-10 shadow-xl`,children:[(0,M.jsx)(`h1`,{className:`mb-6 text-center font-playfair text-2xl font-bold text-golf-green`,children:`Match Play Admin`}),(0,M.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),t===u5?(sessionStorage.setItem(d5,`1`),e()):(i(!0),n(``))},className:`space-y-4`,children:[(0,M.jsx)(bJ,{type:`password`,value:t,autoF
359ocus:!0,placeholder:`Enter password`,onChange:e=>{n(e.target.value),i(!1)}}),r&&(0,M.jsx)(`p`,{className:`text-sm text-red-600`,children:`Incorrect password.`}),(0,M.jsx)(R,{type:`submit`,className:`w-full bg-golf-green hover:bg-golf-green-dark`,children:`Sign In`})]})]})})},m5=()=>{let{toast:e}=hC(),[t,n]=(0,_.useState)(()=>sessionStorage.getItem(d5)===`1`),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)({}),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!0),v=async()=>{let[{players:e,matches:t},n]=await Promise.all([G8(),R8.rpc(`mp_admin_list_entries`,{p_admin_secret:f5})]);i(e),o(t),c(Object.fromEntries(e.map(e=>[`${e.flight}:${e.seed}`,e.name]))),u(n.data??[]),g(!1)},y=async t=>{let{error:n}=await R8.rpc(`mp_admin_delete_entry`,{p_admin_secret:f5,p_entry_id:t});n?e({title:`Could not delete`,description:n.message,variant:`destructive`}):(f(null),e({title:`Entry deleted`}),v())};(0,_.useEffect)(()=>{t&&v()},[t]);let b=(0,_.useMemo)(()=>Object.fromEntries(r.map(e=>[e.id,e])),[r]);if(!t)return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fw,{}),(0,M.jsx)(p5,{onPass:()=>n(!0)})]});let x=async()=>{m(!0);let t=Object.entries(s).map(([e,t])=>{let[n,r]=e.split(`:`);return{flight:n,seed:Number(r),name:t}}),{error:n}=await R8.rpc(`mp_import_players`,{p_admin_secret:f5,p_players:t});m(!1),n?e({title:`Import failed`,description:n.message,variant:`destructive`}):(e({title:`Players saved`,description:`Roster updated.`}),v())},S=async(t,n)=>{let{error:r}=await R8.rpc(`mp_set_match_result`,{p_admin_secret:f5,p_match_id:t,p_winner_id:n});r?e({title:`Could not save result`,description:r.message,variant:`destructive`}):v()},C=async t=>{let{error:n}=await R8.rpc(`mp_clear_match_result`,{p_admin_secret:f5,p_match_id:t});n?e({title:`Could not clear result`,description:n.message,variant:`destructive`}):v()},w=(e,t,n)=>{n===t?C(e):S(e,t)};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(MK,{children:(0,M.jsx)(`title`,{children:`Match Play Admin`})}),(0,M.jsx)(Fw,{}),(0,M.jsx)(`main`,{className:`pt-28 pb-20 min-h-screen bg-gradient-to-b from-white to-gray-50`,children:(0,M.jsxs)(`div`,{className:`container mx-auto px-4 max-w-4xl`,children:[(0,M.jsxs)(`div`,{className:`mb-8 flex items-center justify-between`,children:[(0,M.jsx)(`h1`,{className:`font-playfair text-3xl font-bold text-golf-green`,children:`Match Play Admin`}),(0,M.jsx)(`button`,{onClick:()=>{sessionStorage.removeItem(d5),n(!1)},className:`text-sm text-gray-500 underline hover:text-golf-green`,children:`Sign out`})]}),h?(0,M.jsx)(`div`,{className:`flex justify-center py-20`,children:(0,M.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-b-2 border-golf-green`})}):(0,M.jsxs)(`div`,{className:`space-y-10`,children:[(0,M.jsxs)(`section`,{className:`rounded-2xl bg-white p-6 shadow-md ring-1 ring-gray-100`,children:[(0,M.jsx)(`h2`,{className:`mb-1 font-playfair text-xl font-bold text-golf-green`,children:`Player roster (2 flights à 16 seeds)`}),(0,M.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`Edit any player name, then save. Bracket structure and seeds stay stable.`}),(0,M.jsx)(`div`,{className:`grid gap-6 sm:grid-cols-2`,children:B8.map(e=>(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`h3`,{className:`mb-2 text-sm font-semibold text-golf-green`,children:[e,` Flight`]}),(0,M.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:16},(e,t)=>t+1).map(t=>{let n=`${e}:${t}`;return(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsxs)(`span`,{className:`w-6 shrink-0 text-right text-xs font-bold text-golf-green/60`,children:[`#`,t]}),(0,M.jsx)(bJ,{value:s[n]??``,onChange:e=>c(t=>({...t,[n]:e.target.value})),className:`h-9`})]},n)})})]},e))}),(0,M.jsxs)(R,{onClick:x,disabled:p,className:`mt-4 bg-golf-green hover:bg-golf-green-dark`,children:[(0,M.jsx)(Qn,{className:`h-4 w-4`}),p?`Saving...`:`Save roster`]})]}),(0,M.jsxs)(`section`,{className:`rounded-2xl bg-white p-6 shadow-md ring-1 ring-gray-100`,children:[(0,M.jsx)(`h2`,{className:`mb-1 font-playfair text-xl font-bold text-golf-green`,children:`Enter results`}),(0,M.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`Click the winner of each completed match. The winner advances automatically. Click the selected winner again to clear it.`}),(0,M.jsx)(`div`,{className:`space-y-8`,children:W8(a).map(e=>{let t=[...new Set(a.filter(t=>t.flight===e).map(e=>e.round))].sort((e,t)=>
359e-t);return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`mb-3 font-playfair text-lg font-bold text-golf-green`,children:e===`Championship`?`Championship`:`${e} Flight`}),(0,M.jsx)(`div`,{className:`space-y-6`,children:t.map(t=>(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{className:`mb-2 text-xs font-semibold uppercase tracking-widest text-golf-green/70`,children:z8[t]}),(0,M.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:a.filter(n=>n.flight===e&&n.round===t).sort((e,t)=>e.slot-t.slot).map(e=>{let t=e.player1_id?b[e.player1_id]:null,n=e.player2_id?b[e.player2_id]:null,r=t&&n;return(0,M.jsx)(`div`,{className:`flex items-center gap-1 rounded-lg border border-gray-100 p-1`,children:[t,n].map((t,n)=>(0,M.jsx)(`button`,{disabled:!r,title:t&&e.actual_winner_id===t.id?`Click again to clear this result`:void 0,onClick:()=>t&&w(e.id,t.id,e.actual_winner_id),className:`flex-1 truncate rounded-md px-2 py-2 text-sm transition-colors ${t&&e.actual_winner_id===t.id?`bg-golf-green font-semibold text-white hover:bg-golf-green-dark`:r?`hover:bg-golf-green/10`:`text-muted-foreground`}`,children:t?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`span`,{className:`text-xs opacity-60`,children:[`#`,t.seed]}),` `,t.name]}):`TBD`},n))},e.id)})})]},t))})]},e)})}),(0,M.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,M.jsx)(lr,{className:`h-4 w-4 text-golf-green`}),`Results feed the public leaderboard instantly.`]})]}),(0,M.jsxs)(`section`,{className:`rounded-2xl bg-white p-6 shadow-md ring-1 ring-gray-100`,children:[(0,M.jsxs)(`h2`,{className:`mb-1 flex items-center gap-2 font-playfair text-xl font-bold text-golf-green`,children:[(0,M.jsx)(pr,{className:`h-5 w-5`}),` Entries (`,l.length,`)`]}),(0,M.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:`All submitted brackets. Only confirmed entries appear on the leaderboard. Delete removes the entry and its picks permanently.`}),l.length===0?(0,M.jsx)(`p`,{className:`py-6 text-center text-sm text-muted-foreground`,children:`No entries yet.`}):(0,M.jsx)(`div`,{className:`divide-y divide-gray-100`,children:l.map(e=>(0,M.jsxs)(`div`,{className:`flex items-center gap-3 py-3`,children:[(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`truncate font-medium text-gray-800`,children:e.display_name}),e.confirmed?(0,M.jsx)(`span`,{className:`rounded-full bg-golf-green/10 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-golf-green`,children:`Confirmed`}):(0,M.jsx)(`span`,{className:`rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-amber-700`,children:`Unconfirmed`})]}),(0,M.jsxs)(`div`,{className:`truncate text-xs text-muted-foreground`,children:[e.real_name&&(0,M.jsxs)(M.Fragment,{children:[e.real_name,` · `]}),e.email,` · `,e.pick_count,` picks`,e.team_name&&(0,M.jsxs)(M.Fragment,{children:[` · Team: `,e.team_name]}),e.phone&&(0,M.jsxs)(M.Fragment,{children:[` · `,e.phone]})]})]}),d===e.id?(0,M.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,M.jsx)(`button`,{onClick:()=>y(e.id),className:`rounded-md bg-destructive px-2.5 py-1.5 text-xs font-semibold text-destructive-foreground hover:bg-destructive/90`,children:`Confirm delete`}),(0,M.jsx)(`button`,{onClick:()=>f(null),className:`text-xs text-gray-500 hover:text-gray-800`,children:`Cancel`})]}):(0,M.jsx)(`button`,{onClick:()=>f(e.id),title:`Delete entry`,className:`shrink-0 rounded-md p-2 text-gray-400 transition-colors hover:bg-red-50 hover:text-destructive`,children:(0,M.jsx)(cr,{className:`h-4 w-4`})})]},e.id))})]})]})]})})]})},h5=new ol;(0,g.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(_.StrictMode,{children:(0,M.jsx)(()=>(0,M.jsx)(_.StrictMode,{children:(0,M.jsx)(cl,{client:h5,children:(0,M.jsxs)(af,{children:[(0,M.jsx)(Tf,{}),(0,M.jsxs)(mc,{children:[(0,M.jsx)(Si,{}),(0,M.jsx)(ea,{}),(0,M.jsx)(hd,{children:(0,M.jsxs)(pd,{element:(0,M.jsx)(F3,{}),children:[(0,M.jsx)(pd,{path:`/`,element:(0,M.jsx)(vC,{})}),(0,M.jsx)(pd,{path:`/about`,element:(0,M.jsx)(JT,{})}),(0,M.jsx)(pd,{path:`/about/board-members`,element:(0,M.jsx)(i3,{})}),(0,M.jsx)(pd,{path:`/about/history`,element:(0,M.jsx)(s3,{})}),(0,M.jsx)(pd,{path:`/about/social-updates`,element:(0,M.jsx)(c3,{})}),(0,M.jsx)(pd,{path:`/dining-room`,element:(0,M.jsx)(L3,{})}),(0,M.jsx)(pd,{path:`/updates`,element:(0,M.jsx)(OG,{})}),(0,M.jsx)(pd,{path:`/scorecard`,element:(0,M.jsx)(AG,{})}),(0,M.jsx)(pd,{path:`/lessons`,element:(0,M.jsx)(cQ,{})}),(0,M.jsx)(pd,{path:`/membership`,element:(0,M.jsx)(_Q,{})}),(0,M.jsx)(pd,{path:`/teetimes`,element:(0,M.jsx)(vQ,{})}),(0,M.jsx)(pd,{path:`/simulator`,element:(0,M.jsx)(c8,{})}),(0,M.jsx)(pd,{path:`/contact`,element:(0,M.jsx)(xQ,{})}),(0,M.jsx)(pd,{path:`/events/weddings`,element:(0,M.jsx)(wQ,{})}),(0,M.jsx)(pd,{path:`/events/tournaments`,element:(0,M.jsx)(TQ,{})}),(0,M.jsx)(pd,{path:`/events/parties`,element:(0,M.jsx)(EQ,{})}),(0,M.jsx)(pd,{path:`/meeting-room`,element:(0,M.jsx)(R3,{})}),(0,M.jsx)(pd,{path:`/foundation-draw`,element:(0,M.jsx)(Q6,{})}),(0,M.jsx)(pd,{path:`/ace-chase`,element:(0,M.jsx)(o8,{})}),(0,M.jsx)(pd,{path:`/events`,element:(0,M.jsx)(P1,{})}),(0,M.jsx)(pd,{path:`/social-calendar`,element:(0,M.jsx)(P1,{})}),(0,M.jsx)(pd,{path:`/calendar-admin`,element:(0,M.jsx)(J1,{})}),(0,M.jsx)(pd,{path:`/event/:id`,element:(0,M.jsx)(Y1,{})}),(0,M.jsx)(pd,{path:`/achievements/hole-in-one`,element:(0,M.jsx)(G4,{})}),(0,M.jsx)(pd,{path:`/admin`,element:(0,M.jsx)(t3,{})}),(0,M.jsx)(pd,{path:`/admin/club-events`,element:(0,M.jsx)(t3,{})}),(0,M.jsx)(pd,{path:`/store`,element:(0,M.jsx)(n3,{})}),(0,M.jsx)(pd,{path:`/staff`,element:(0,M.jsx)(a3,{})}),(0,M.jsx)(pd,{path:`/join-waitlist`,element:(0,M.jsx)(O3,{})}),(0,M.jsx)(pd,{path:`/waitlist-success`,element:(0,M.jsx)(k3,{})}),(0,M.jsx)(pd,{path:`/returning-members`,element:(0,M.jsx)(A3,{})}),(0,M.jsx)(pd,{path:`/membership-deposit`,element:(0,M.jsx)(M3,{})}),(0,M.jsx)(pd,{path:`/membership-deposit-success`,element:(0,M.jsx)(j3,{})}),(0,M.jsx)(pd,{path:`/returning-members-late`,element:(0,M.jsx)(M3,{})}),(0,M.jsx)(pd,{path:`/returning-members-success`,element:(0,M.jsx)(j3,{})}),(0,M.jsx)(pd,{path:`/flash-sale`,element:(0,M.jsx)(N3,{})}),(0,M.jsx)(pd,{path:`/privacy`,element:(0,M.jsx)(l8,{})}),(0,M.jsx)(pd,{path:`/member-pay`,element:(0,M.jsx)(y8,{})}),(0,M.jsx)(pd,{path:`/corporate-passes`,element:(0,M.jsx)(C8,{})}),(0,M.jsx)(pd,{path:`/advanced-bookings`,element:(0,M.jsx)(T8,{})}),(0,M.jsx)(pd,{path:`/junior-meetings`,element:(0,M.jsx)(k8,{})}),(0,M.jsx)(pd,{path:`/junior-meetings-admin`,element:(0,M.jsx)(P8,{})}),(0,M.jsx)(pd,{path:`/book-lessons`,element:(0,M.jsx)(F8,{})}),(0,M.jsx)(pd,{path:`/match-play`,element:(0,M.jsx)(o5,{})}),(0,M.jsx)(pd,{path:`/match-play/confirm`,element:(0,M.jsx)(s5,{})}),(0,M.jsx)(pd,{path:`/match-play/leaderboard`,element:(0,M.jsx)(l5,{})}),(0,M.jsx)(pd,{path:`/match-play/admin`,element:(0,M.jsx)(m5,{})}),(0,M.jsx)(pd,{path:`*`,element:(0,M.jsx)(SQ,{})})]})})]})]})})}),{})}));
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.